name directory correctly
This commit is contained in:
@@ -0,0 +1,243 @@
|
||||
diff --exclude='*.wanjet' --exclude='.??*' --exclude=config.h --exclude='*.orig' --exclude=Makefile --exclude='*.o' --exclude=Doxyfile --exclude='*.a' --exclude=config.log --exclude=config.status --exclude='init-*' -Nuarp server/drivers/CFontz633.c server.OPT/drivers/CFontz633.c
|
||||
--- server/drivers/CFontz633.c 2006-01-26 19:47:59.000000000 -0800
|
||||
+++ server.OPT/drivers/CFontz633.c 2006-02-21 19:35:27.000000000 -0800
|
||||
@@ -131,6 +131,9 @@ static void CFontz633_init_vbar (Driver
|
||||
static void CFontz633_init_hbar (Driver *drvthis);
|
||||
static void CFontz633_no_live_report (Driver *drvthis);
|
||||
static void CFontz633_hardware_clear (Driver *drvthis);
|
||||
+#ifndef OPT //store boot screen
|
||||
+static void CFontz633_store_boot_state (Driver *drvthis);
|
||||
+#endif //OPT
|
||||
|
||||
|
||||
/*
|
||||
@@ -305,6 +308,16 @@ CFontz633_init (Driver *drvthis)
|
||||
CFontz633_no_live_report (drvthis);
|
||||
CFontz633_hardware_clear (drvthis);
|
||||
|
||||
+#ifndef OPT //store boot screen
|
||||
+ /* get and store the power on boot line, repurposing the "size" buffer */
|
||||
+ strncpy(size, drvthis->config_get_string (drvthis->name, "BootDisplay", 0, "" ), sizeof(size));
|
||||
+ if ( size[0] ) {
|
||||
+ CFontz633_string (drvthis, 1, 1, size);
|
||||
+ CFontz633_flush (drvthis);
|
||||
+ CFontz633_store_boot_state (drvthis);
|
||||
+ }
|
||||
+#endif //OPT
|
||||
+
|
||||
report (RPT_DEBUG, "%s: done\n", __FUNCTION__);
|
||||
|
||||
return 0;
|
||||
@@ -1118,3 +1131,15 @@ CFontz633_string (Driver *drvthis, int x
|
||||
}
|
||||
}
|
||||
|
||||
+#ifndef OPT //store boot screen
|
||||
+/*
|
||||
+ * Saves current state as boot state
|
||||
+ */
|
||||
+static void
|
||||
+CFontz633_store_boot_state (Driver *drvthis)
|
||||
+{
|
||||
+ PrivateData *p = drvthis->private_data;
|
||||
+
|
||||
+ send_zerobyte_message(p->fd, CF633_Store_Current_State_As_Boot_State);
|
||||
+}
|
||||
+#endif //OPT
|
||||
diff --exclude='*.wanjet' --exclude='.??*' --exclude=config.h --exclude='*.orig' --exclude=Makefile --exclude='*.o' --exclude=Doxyfile --exclude='*.a' --exclude=config.log --exclude=config.status --exclude='init-*' -Nuarp server/menuscreens.c server.OPT/menuscreens.c
|
||||
--- server/menuscreens.c 2006-01-26 19:47:59.000000000 -0800
|
||||
+++ server.OPT/menuscreens.c 2006-02-21 19:31:00.000000000 -0800
|
||||
@@ -48,6 +48,9 @@ char * down_key;
|
||||
char * left_key;
|
||||
char * right_key;
|
||||
|
||||
+#ifndef OPT
|
||||
+char * menuname; /* the name for the default menu */
|
||||
+#endif //OPT
|
||||
Screen * menuscreen = NULL;
|
||||
MenuItem * active_menuitem = NULL;
|
||||
/** the "real" main_menu */
|
||||
@@ -91,6 +94,11 @@ int menuscreens_init()
|
||||
if (tmp)
|
||||
right_key = strdup(tmp);
|
||||
|
||||
+#ifndef OPT //get main menu name and hybrid keys from config file
|
||||
+ /* Get main menu name from config file */
|
||||
+ menuname = strdup (config_get_string ("menu", "menuname", 0, "LCDproc Menu"));
|
||||
+#endif //OPT
|
||||
+
|
||||
|
||||
/* Now reserve keys */
|
||||
input_reserve_key (menu_key, true, NULL);
|
||||
@@ -437,55 +445,62 @@ void menuscreen_create_menu ()
|
||||
|
||||
debug (RPT_DEBUG, "%s()", __FUNCTION__);
|
||||
|
||||
+#ifndef OPT //main menu name from config file
|
||||
+ main_menu = menu_create ("mainmenu", NULL, menuname, NULL);
|
||||
+#else //OPT
|
||||
main_menu = menu_create ("mainmenu", NULL, "LCDproc Menu", NULL);
|
||||
+#endif //OPT
|
||||
|
||||
- options_menu = menu_create ("options", NULL, "Options", NULL);
|
||||
- menu_add_item (main_menu, options_menu);
|
||||
-
|
||||
-#ifdef LCDPROC_TESTMENUS
|
||||
- screens_menu = menu_create ("screens", NULL, "Screens", NULL);
|
||||
- menu_add_item (main_menu, screens_menu);
|
||||
-#endif /*LCDPROC_TESTMENUS*/
|
||||
-
|
||||
- /* menu's client is NULL since we're in the server */
|
||||
- checkbox = menuitem_create_checkbox ("heartbeat", heartbeat_handler, "Heartbeat", NULL, true, heartbeat);
|
||||
- menu_add_item (options_menu, checkbox);
|
||||
-
|
||||
- /* menu's client is NULL since we're in the server */
|
||||
- checkbox = menuitem_create_checkbox ("backlight", backlight_handler, "Backlight", NULL, true, backlight);
|
||||
- menu_add_item (options_menu, checkbox);
|
||||
+#ifndef OPT //Options menu display from config file
|
||||
+ if ( config_get_bool ("server", "LCDOptionsMenu", 0, 0)) {
|
||||
+ options_menu = menu_create ("options", NULL, "Options", NULL);
|
||||
+ menu_add_item (main_menu, options_menu);
|
||||
+
|
||||
+ /* menu's client is NULL since we're in the server */
|
||||
+ checkbox = menuitem_create_checkbox ("heartbeat", heartbeat_handler, "Heartbeat", NULL, true, heartbeat);
|
||||
+ menu_add_item (options_menu, checkbox);
|
||||
+
|
||||
+ /* menu's client is NULL since we're in the server */
|
||||
+ checkbox = menuitem_create_checkbox ("backlight", backlight_handler, "Backlight", NULL, true, backlight);
|
||||
+ menu_add_item (options_menu, checkbox);
|
||||
+
|
||||
+ for (driver = drivers_getfirst(); driver; driver = drivers_getnext()) {
|
||||
+ int contrast_avail = (driver->get_contrast && driver->set_contrast) ? 1 : 0;
|
||||
+ int brightness_avail = (driver->get_brightness && driver->set_brightness) ? 1 : 0;
|
||||
|
||||
- for (driver = drivers_getfirst(); driver; driver = drivers_getnext()) {
|
||||
- int contrast_avail = (driver->get_contrast && driver->set_contrast) ? 1 : 0;
|
||||
- int brightness_avail = (driver->get_brightness && driver->set_brightness) ? 1 : 0;
|
||||
-
|
||||
- if (contrast_avail || brightness_avail) {
|
||||
- /* menu's client is NULL since we're in the server */
|
||||
- driver_menu = menu_create (driver->name, NULL, driver->name, NULL);
|
||||
- menu_set_association(driver_menu, driver);
|
||||
- menu_add_item (options_menu, driver_menu);
|
||||
- if (contrast_avail) {
|
||||
- int contrast = driver->get_contrast(driver);
|
||||
-
|
||||
+ if (contrast_avail || brightness_avail) {
|
||||
/* menu's client is NULL since we're in the server */
|
||||
- slider = menuitem_create_slider ("contrast", contrast_handler, "Contrast",
|
||||
- NULL, "min", "max", 0, 1000, 25, contrast);
|
||||
- menu_add_item (driver_menu, slider);
|
||||
- }
|
||||
- if (brightness_avail) {
|
||||
- int onbrightness = driver->get_brightness (driver, BACKLIGHT_ON);
|
||||
- int offbrightness = driver->get_brightness (driver, BACKLIGHT_OFF);
|
||||
-
|
||||
- slider = menuitem_create_slider ("onbrightness", brightness_handler, "On Brightness",
|
||||
- NULL, "min", "max", 0, 1000, 25, onbrightness);
|
||||
- menu_add_item (driver_menu, slider);
|
||||
-
|
||||
- slider = menuitem_create_slider ("offbrightness", brightness_handler, "Off Brightness",
|
||||
- NULL, "min", "max", 0, 1000, 25, offbrightness);
|
||||
- menu_add_item (driver_menu, slider);
|
||||
+ driver_menu = menu_create (driver->name, NULL, driver->name, NULL);
|
||||
+ menu_set_association(driver_menu, driver);
|
||||
+ menu_add_item (options_menu, driver_menu);
|
||||
+ if (contrast_avail) {
|
||||
+ int contrast = driver->get_contrast(driver);
|
||||
+
|
||||
+ /* menu's client is NULL since we're in the server */
|
||||
+ slider = menuitem_create_slider ("contrast", contrast_handler, "Contrast",
|
||||
+ NULL, "min", "max", 0, 1000, 25, contrast);
|
||||
+ menu_add_item (driver_menu, slider);
|
||||
+ }
|
||||
+ if (brightness_avail) {
|
||||
+ int onbrightness = driver->get_brightness (driver, BACKLIGHT_ON);
|
||||
+ int offbrightness = driver->get_brightness (driver, BACKLIGHT_OFF);
|
||||
+
|
||||
+ slider = menuitem_create_slider ("onbrightness", brightness_handler, "On Brightness",
|
||||
+ NULL, "min", "max", 0, 1000, 25, onbrightness);
|
||||
+ menu_add_item (driver_menu, slider);
|
||||
+
|
||||
+ slider = menuitem_create_slider ("offbrightness", brightness_handler, "Off Brightness",
|
||||
+ NULL, "min", "max", 0, 1000, 25, offbrightness);
|
||||
+ menu_add_item (driver_menu, slider);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
+ if ( config_get_bool ("server", "LCDScreensMenu", 0, 0)) {
|
||||
+ screens_menu = menu_create ("screens", NULL, "Screens", NULL);
|
||||
+ menu_add_item (main_menu, screens_menu);
|
||||
+ }
|
||||
+#endif //OPT
|
||||
|
||||
#ifdef LCDPROC_TESTMENUS
|
||||
test_menu = menu_create ("test", NULL, "Test menu", NULL);
|
||||
diff --exclude='*.wanjet' --exclude='.??*' --exclude=config.h --exclude='*.orig' --exclude=Makefile --exclude='*.o' --exclude=Doxyfile --exclude='*.a' --exclude=config.log --exclude=config.status --exclude='init-*' -Nuarp server/serverscreens.c server.OPT/serverscreens.c
|
||||
--- server/serverscreens.c 2006-01-26 19:47:59.000000000 -0800
|
||||
+++ server.OPT/serverscreens.c 2006-02-21 19:27:40.000000000 -0800
|
||||
@@ -31,6 +31,12 @@
|
||||
#include "widget.h"
|
||||
#include "serverscreens.h"
|
||||
|
||||
+#ifndef OPT //startup screen title from config
|
||||
+#include "shared/configfile.h"
|
||||
+
|
||||
+char * title;
|
||||
+#endif //OPT
|
||||
+
|
||||
#define UNSET_INT -1
|
||||
|
||||
Screen * server_screen;
|
||||
@@ -38,6 +44,7 @@ int rotate_server_screen = UNSET_INT;
|
||||
|
||||
#define MAX_SERVERSCREEN_WIDTH 40
|
||||
|
||||
+
|
||||
int
|
||||
server_screen_init ()
|
||||
{
|
||||
@@ -46,6 +53,11 @@ server_screen_init ()
|
||||
|
||||
debug (RPT_DEBUG, "server_screen_init");
|
||||
|
||||
+#ifndef OPT //startup screen title from config
|
||||
+ /* Get server title name from config file */
|
||||
+ title = strdup (config_get_string ("server", "title", 0, "LCDproc Server"));
|
||||
+#endif //OPT
|
||||
+
|
||||
/* Create the screen */
|
||||
server_screen = screen_create ("_server_screen", NULL);
|
||||
if (!server_screen) {
|
||||
@@ -77,7 +89,11 @@ server_screen_init ()
|
||||
w->text = malloc (MAX_SERVERSCREEN_WIDTH+1);
|
||||
if (line == 1) {
|
||||
w->type = WID_TITLE;
|
||||
+#ifndef OPT //startup screen titel from config
|
||||
+ strncpy (w->text, title, MAX_SERVERSCREEN_WIDTH);
|
||||
+#else //OPT
|
||||
strncpy (w->text, "LCDproc Server", MAX_SERVERSCREEN_WIDTH);
|
||||
+#endif //OPT
|
||||
} else {
|
||||
w->text[0] = 0;
|
||||
}
|
||||
@@ -156,6 +172,18 @@ goodbye_screen ()
|
||||
char *l16 = " LCDproc! ";
|
||||
#endif
|
||||
|
||||
+#ifndef OPT // disable config goobye
|
||||
+ char * goodbye_string;
|
||||
+
|
||||
+ if ( (goodbye_string = strdup(config_get_string("server", "goodbye", 0, "")))) {
|
||||
+ t20=t16=goodbye_string;
|
||||
+ if (strlen(goodbye_string) > 16 )
|
||||
+ l16 = goodbye_string + 16;
|
||||
+ if (strlen(goodbye_string) > 20 )
|
||||
+ l20 = goodbye_string + 20;
|
||||
+ }
|
||||
+#endif //OPT
|
||||
+
|
||||
if( !display_props )
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user