From: <enl...@li...> - 2002-10-25 17:34:17
|
Enlightenment CVS committal Author : mej Project : eterm Module : Eterm Dir : eterm/Eterm/src Modified Files: command.c options.c options.h Log Message: Thu Oct 24 23:54:46 2002 Michael Jennings (mej) Added bbar_dock and bbar_font directives to escreen context so that users can alter the dock location and font of the Escreen buttonbar. This should be it for feature additions and last-minute code changes. I need to update the docs, but that's about it. =================================================================== RCS file: /cvsroot/enlightenment/eterm/Eterm/src/command.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -3 -r1.90 -r1.91 --- command.c 23 Oct 2002 03:03:26 -0000 1.90 +++ command.c 25 Oct 2002 03:57:17 -0000 1.91 @@ -34,7 +34,7 @@ * he guarantee anything whatsoever. *----------------------------------------------------------------------*/ -static const char cvs_ident[] = "$Id: command.c,v 1.90 2002/10/23 03:03:26 mej Exp $"; +static const char cvs_ident[] = "$Id: command.c,v 1.91 2002/10/25 03:57:17 mej Exp $"; /* includes: */ #include "config.h" @@ -2816,7 +2816,7 @@ #endif if (been_here) { /* the start function may be called more than once */ - return 0; /* in later versions, but we only want one EScreen menu */ + return 0; /* in later versions, but we only want one Escreen menu */ } been_here = 1; @@ -2926,7 +2926,7 @@ if (buttonbar == NULL) { buttonbar = bbar; } - bbar_set_font(bbar, "-*-helvetica-medium-r-normal--10-*-*-*-p-*-iso8859-1"); + bbar_set_font(bbar, ((rs_es_font) ? (rs_es_font) : ("-*-helvetica-medium-r-normal--10-*-*-*-p-*-iso8859-1"))); bbar_init(bbar, TERM_WINDOW_GET_WIDTH()); bbar_add(bbar); } @@ -2941,7 +2941,7 @@ make_escreen_menu(bbar); - bbar_set_docked(bbar, BBAR_DOCKED_BOTTOM); + bbar_set_docked(bbar, rs_es_dock); bbar_set_visible(bbar, 0); bbar_show(bbar, 1); parent_resize(); =================================================================== RCS file: /cvsroot/enlightenment/eterm/Eterm/src/options.c,v retrieving revision 1.117 retrieving revision 1.118 diff -u -3 -r1.117 -r1.118 --- options.c 23 Oct 2002 03:03:26 -0000 1.117 +++ options.c 25 Oct 2002 03:57:17 -0000 1.118 @@ -21,7 +21,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -static const char cvs_ident[] = "$Id: options.c,v 1.117 2002/10/23 03:03:26 mej Exp $"; +static const char cvs_ident[] = "$Id: options.c,v 1.118 2002/10/25 03:57:17 mej Exp $"; #include "config.h" #include "feature.h" @@ -144,6 +144,8 @@ char *rs_url = NULL; char *rs_hop = NULL; int rs_delay = -1; +unsigned char rs_es_dock = BBAR_DOCKED_BOTTOM; +char *rs_es_font = NULL; #endif unsigned int rs_line_space = 0; unsigned int rs_meta_mod = 0, rs_alt_mod = 0, rs_numlock_mod = 0; @@ -2367,6 +2369,23 @@ RESET_AND_ASSIGN(rs_hop, get_word(2, buff)); } else if (!BEG_STRCASECMP(buff, "delay ")) { rs_delay = strtol(get_pword(2, buff), (char **) NULL, 0); + } else if (!BEG_STRCASECMP(buff, "bbar_font ")) { + RESET_AND_ASSIGN(rs_es_font, get_word(2, buff)); + } else if (!BEG_STRCASECMP(buff, "bbar_dock ")) { + char *where = get_pword(2, buff); + + if (!where) { + print_error("Parse error in file %s, line %lu: Attribute bbar_dock requires a parameter\n", file_peek_path(), file_peek_line()); + } else if (!BEG_STRCASECMP(where, "top")) { + rs_es_dock = BBAR_DOCKED_TOP; + } else if (!BEG_STRCASECMP(where, "bot")) { /* "bot" or "bottom" */ + rs_es_dock = BBAR_DOCKED_BOTTOM; + } else if (!BEG_STRCASECMP(where, "no")) { /* "no" or "none" */ + rs_es_dock = BBAR_UNDOCKED; + } else { + print_error("Parse error in file %s, line %lu: Invalid parameter \"%s\" to attribute bbar_dock\n", file_peek_path(), + file_peek_line(), where); + } } else { print_error("Parse error in file %s, line %lu: Attribute \"%s\" is not valid within context escreen\n", file_peek_path(), file_peek_line(), buff); =================================================================== RCS file: /cvsroot/enlightenment/eterm/Eterm/src/options.h,v retrieving revision 1.41 retrieving revision 1.42 diff -u -3 -r1.41 -r1.42 --- options.h 5 Oct 2002 01:19:41 -0000 1.41 +++ options.h 25 Oct 2002 03:57:17 -0000 1.42 @@ -112,7 +112,9 @@ #ifdef ESCREEN extern char *rs_url; extern char *rs_hop; -extern int rs_delay; +extern int rs_delay; +extern unsigned char rs_es_dock; +extern char *rs_es_font; #endif extern unsigned int rs_line_space; extern unsigned int rs_meta_mod, rs_alt_mod, rs_numlock_mod; @@ -124,7 +126,7 @@ #endif extern char *rs_cutchars; #ifdef CUTCHAR_OPTION -extern char *rs_cutchars; +extern char *rs_cutchars; #endif extern const char *true_vals[]; extern const char *false_vals[]; |