[Lcdproc] disabling internal LCDd menu

Harald Latzko root@c-works.net
Thu Jun 14 18:15:03 2007


--Apple-Mail-29--473345083
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Hi!

Here we go, it's done. Attached is a patch for the file server/ 
menuscreens.c, which adds configurability of the internal menu of  
LCDd. just add the item "showMenu=false" to the LCDd.conf in the  
section "menu":

# show internal menu, default: false; possible values: true/false
showMenu=false

to disable the internal menu.
The code is based on 0.5.2. If it's of general need, someone could  
please commit the changes to the official code?


Regards,
Harald


--Apple-Mail-29--473345083
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-mac-type=2A2A2A2A;
	x-unix-mode=0644;
	x-mac-creator=48647261;
	name=lcdproc_menu.diff
Content-Disposition: attachment;
	filename=lcdproc_menu.diff

--- lcdproc-0.5.2/server/menuscreens.c  2007-04-14 14:38:14.000000000 +0000
+++ lcdproc-0.5.2.1/server/menuscreens.c        2007-06-14 20:18:29.000000000 +0000
@@ -73,6 +73,7 @@
 int menuscreens_init(void)
 {
        const char *tmp;
+       char* show_internal_menu;
 
        debug(RPT_DEBUG, "%s()", __FUNCTION__);
 
@@ -81,6 +82,7 @@
        enter_key = strdup(config_get_string("menu", "EnterKey", 0, "Enter"));
        up_key = strdup(config_get_string("menu", "UpKey", 0, "Up"));
        down_key = strdup(config_get_string("menu", "DownKey", 0, "Down"));
+       show_internal_menu = strdup(config_get_string("menu", "showMenu", 0, "false"));
 
        /* if the user has specified in the conf file a left and right key */
        left_key = right_key = NULL;
@@ -102,6 +104,8 @@
        if (right_key)
                input_reserve_key(right_key, false, NULL);
 
+       if(strcmp(show_internal_menu, "false")!=0)
+       {
        /* Create screen */
        menuscreen = screen_create("_menu_screen", NULL);
        if (menuscreen != NULL)
@@ -112,6 +116,7 @@
 
        /* Build menu */
        menuscreen_create_menu();
+       }
 
        return 0;
 }
--Apple-Mail-29--473345083
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed




Am 14.06.2007 um 15:32 schrieb Vallevand, Mark K:

> I, too, would like to find a way to disable the default screen and  
> menu.
> I want to see nothing on the screen until my client starts  
> running.  If
> there is an easy patch, I'd love it.  I'm looking at the code and  
> might
> try something today, but there are lots of other things on my plate.
>
> Regards.
> Mark K Vallevand
>
> "If there are no dogs in Heaven, then when I die I want to go where  
> they
> went."
> -Will Rogers
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE  
> PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e- 
> mail
> and its attachments from all computers.
>
>
> -----Original Message-----
> From: lcdproc-admin@lists.omnipotent.net
> [mailto:lcdproc-admin@lists.omnipotent.net] On Behalf Of Harald Latzko
> Sent: Thursday, June 14, 2007 3:10 AM
> To: Joris Robijn
> Cc: lcdproc@lists.omnipotent.net
> Subject: Re: [Lcdproc] disabling internal LCDd menu
>
> Hi!
>
>> [ Charset ISO-8859-1 unsupported, converting... ]
> (sorry for that, I will change my webmail client when possible).
>
>>>>> is there any way to disable the internal LCDd menu (containing
>>>>> heartbeat and backlight entries)? thank you!
>>>> You can simply define an empty or non existent menu key.
>>> Doesn't this disable the functionality of lcdexec? I need this  
>>> client
>>> for
>>> menu functionality, but I don't want the LCDd internal menu.
>>
>> Indeed. There currently is no other way. Except simply changing the
>> server or client code.
>>
>> It might be interesting to have hotkey support in lcdexec... An
> lcdexec
>> menu or lcdexec command could then have a hotkey attached that shows
> the
>> menu or executes the command. Anyone wanna write it ?
> For the first approach, I think I will give it a try to make the LCDd
> internal menu configurable (enable/disable only via LCDd.conf entry).
> The
> hotkey support for lcdexec seems a little bit too big for me since I
> don't
> know the LCDproc internals.
>
> Regards,
> Harald
> _______________________________________________
> LCDproc mailing list
> LCDproc@lists.omnipotent.net
> http://lists.omnipotent.net/mailman/listinfo/lcdproc
> _______________________________________________
> LCDproc mailing list
> LCDproc@lists.omnipotent.net
> http://lists.omnipotent.net/mailman/listinfo/lcdproc
>


--Apple-Mail-29--473345083--