summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.in7
-rw-r--r--src/buttons.h2
-rw-r--r--src/options.c12
-rw-r--r--src/options.h2
5 files changed, 23 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 72c11cd..82e6057 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
+
+-------------------------------------------------------------------------------
diff --git a/configure.in b/configure.in
index a16d6c2..34f5b0a 100644
--- a/configure.in
+++ b/configure.in
@@ -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
diff --git a/src/buttons.h b/src/buttons.h
index 97dfd52..fdb6f4b 100644
--- a/src/buttons.h
+++ b/src/buttons.h
@@ -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;
diff --git a/src/options.c b/src/options.c
index 34049b6..7b469c9 100644
--- a/src/options.c
+++ b/src/options.c
@@ -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);
diff --git a/src/options.h b/src/options.h
index 8b537e3..60e88cc 100644
--- a/src/options.h
+++ b/src/options.h
@@ -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]) \