Mon Apr 3 16:42:06 PDT 2000 Michael Jennings <mej@eterm.org>

Added a --buttonbar option to force on/off all your buttonbars.


SVN revision: 2423
This commit is contained in:
Michael Jennings 2000-04-03 23:43:15 +00:00
parent f2badab9b8
commit d922e2ce53
5 changed files with 23 additions and 5 deletions

View File

@ -3409,3 +3409,8 @@ Fri Mar 31 15:12:37 PST 2000 Michael Jennings <mej@eterm.org>
Added the escape sequence for the "no input" option. "\e]6;27\a".
-------------------------------------------------------------------------------
Mon Apr 3 16:42:06 PDT 2000 Michael Jennings <mej@eterm.org>
Added a --buttonbar option to force on/off all your buttonbars.
-------------------------------------------------------------------------------

View File

@ -32,13 +32,10 @@ AC_ARG_WITH(cc, [ --with-cc=compiler force Eterm to build with a particula
)
if test "$CC" = "check"; then
dnl# Check for Pentium compilers
AC_CHECK_PROG(EGCS, egcs, egcs)
dnl# Check for Pentium compiler
AC_CHECK_PROG(PGCC, pgcc, pgcc)
if test ! -z "$EGCS"; then
CC=$EGCS
elif test ! -z "$PGCC"; then
if test ! -z "$PGCC"; then
CC=$PGCC
else
unset CC

View File

@ -54,6 +54,8 @@
# define bbar_reset_total_height() (bbar_total_h = -1)
#endif
#define FOREACH_BUTTONBAR(x) do {buttonbar_t *bbar; for (bbar = buttonbar; bbar; bbar = bbar->next) { x } } while (0)
/************ Structures ************/
typedef struct button_struct {
simage_t *icon;

View File

@ -93,6 +93,7 @@ static conf_var_t *conf_vars = NULL;
static char *rs_pipe_name = NULL;
static int rs_shade = 0;
static char *rs_tint = NULL;
static unsigned long rs_buttonbars = 1;
#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
static char *rs_bigfont_key = NULL;
static char *rs_smallfont_key = NULL;
@ -320,6 +321,7 @@ static const struct {
OPT_BLONG("select-line", "triple-click selects whole line", &Options, Opt_select_whole_line),
OPT_BLONG("select-trailing-spaces", "do not skip trailing spaces when selecting", &Options, Opt_select_trailing_spaces),
OPT_BLONG("report-as-keysyms", "report special keys as keysyms", &Options, Opt_report_as_keysyms),
OPT_BLONG("buttonbar", "toggle the display of all buttonbars", &rs_buttonbars, BBAR_FORCE_TOGGLE),
/* =======[ Keyboard options ]======= */
#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
@ -3795,6 +3797,16 @@ post_parse(void)
PixColors[bgColor] = images[image_bg].norm->bg;
}
/* rs_buttonbars is set to 1. If it stays 1, the option was never
specified. If specified, it will either become 3 (on) or 0 (off). */
if (rs_buttonbars != 1) {
if (rs_buttonbars) {
FOREACH_BUTTONBAR(bbar_set_visible(bbar, 1););
} else {
FOREACH_BUTTONBAR(bbar_set_visible(bbar, 0););
}
rs_buttonbars = 1; /* Reset for future use. */
}
/* Update buttonbar sizes based on new imageclass info. */
bbar_resize_all(-1);

View File

@ -82,6 +82,8 @@
# define IMOPT_ITRANS (1U << 1)
# define IMOPT_VIEWPORT (1U << 2)
# define BBAR_FORCE_TOGGLE (0x03)
#define BOOL_OPT_ISTRUE(s) (!strcasecmp((s), true_vals[0]) || !strcasecmp((s), true_vals[1]) \
|| !strcasecmp((s), true_vals[2]) || !strcasecmp((s), true_vals[3]))
#define BOOL_OPT_ISFALSE(s) (!strcasecmp((s), false_vals[0]) || !strcasecmp((s), false_vals[1]) \