diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/console.c | 15 | ||||
-rw-r--r-- | src/ui/statusbar.c | 47 | ||||
-rw-r--r-- | src/ui/ui.h | 1 | ||||
-rw-r--r-- | src/ui/window_list.c | 4 |
4 files changed, 13 insertions, 54 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index f3c7816b..dfc54df3 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1124,15 +1124,6 @@ cons_wrap_setting(void) } void -cons_winstidy_setting(void) -{ - if (prefs_get_boolean(PREF_WINS_AUTO_TIDY)) - cons_show("Window Auto Tidy (/wins) : ON"); - else - cons_show("Window Auto Tidy (/wins) : OFF"); -} - -void cons_encwarn_setting(void) { if (prefs_get_boolean(PREF_ENC_WARN)) { @@ -1531,7 +1522,6 @@ cons_show_ui_prefs(void) cons_splash_setting(); cons_winpos_setting(); cons_wrap_setting(); - cons_winstidy_setting(); cons_time_setting(); cons_resource_setting(); cons_vercheck_setting(); @@ -1751,11 +1741,6 @@ cons_inpblock_setting(void) void cons_statusbar_setting(void) { - if (prefs_get_boolean(PREF_STATUSBAR_SHOW_EMPTY)) { - cons_show("Show empty tabs (/statusbar) : ON"); - } else { - cons_show("Show empty tabs (/statusbar) : OFF"); - } if (prefs_get_boolean(PREF_STATUSBAR_SHOW_NAME)) { cons_show("Show tab names (/statusbar) : ON"); } else { diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index 2b507039..991d21f2 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -292,7 +292,6 @@ _status_bar_draw(void) pos = cols - _tabs_width(); int bracket_attrs = theme_attrs(THEME_STATUS_BRACKET); - gboolean show_empty = prefs_get_boolean(PREF_STATUSBAR_SHOW_EMPTY); gboolean show_name = prefs_get_boolean(PREF_STATUSBAR_SHOW_NAME); gint max_tabs = prefs_get_statusbartabs(); @@ -301,7 +300,7 @@ _status_bar_draw(void) int display_num = i == 10 ? 0 : i; StatusBarTab *tab = g_hash_table_lookup(statusbar->tabs, GINT_TO_POINTER(i)); - if (tab || (tab == NULL && show_empty)) { + if (tab) { wattron(statusbar_win, bracket_attrs); if (i == statusbar->current_tab) { mvwprintw(statusbar_win, 0, pos, "-"); @@ -382,46 +381,24 @@ _destroy_tab(StatusBarTab *tab) static int _tabs_width(void) { - gboolean show_empty = prefs_get_boolean(PREF_STATUSBAR_SHOW_EMPTY); gboolean show_name = prefs_get_boolean(PREF_STATUSBAR_SHOW_NAME); gint max_tabs = prefs_get_statusbartabs(); if (show_name) { - if (show_empty) { - int width = 4; - int i = 0; - for (i = 1; i <= max_tabs; i++) { - StatusBarTab *tab = g_hash_table_lookup(statusbar->tabs, GINT_TO_POINTER(i)); - if (tab) { - char *display_name = _display_name(tab); - width += strlen(display_name); - width += 4; - free(display_name); - } else { - width += 3; - } - } - return width; - } else { - int width = 4; - int i = 0; - for (i = 1; i <= max_tabs; i++) { - StatusBarTab *tab = g_hash_table_lookup(statusbar->tabs, GINT_TO_POINTER(i)); - if (tab) { - char *display_name = _display_name(tab); - width += strlen(display_name); - width += 4; - free(display_name); - } + int width = 4; + int i = 0; + for (i = 1; i <= max_tabs; i++) { + StatusBarTab *tab = g_hash_table_lookup(statusbar->tabs, GINT_TO_POINTER(i)); + if (tab) { + char *display_name = _display_name(tab); + width += strlen(display_name); + width += 4; + free(display_name); } - return width; } + return width; } else { - if (show_empty) { - return max_tabs * 3 + 4; - } else { - return g_hash_table_size(statusbar->tabs) * 3 + 4; - } + return g_hash_table_size(statusbar->tabs) * 3 + 4; } } diff --git a/src/ui/ui.h b/src/ui/ui.h index 4630145c..d344f855 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -297,7 +297,6 @@ void cons_occupants_setting(void); void cons_roster_setting(void); void cons_presence_setting(void); void cons_wrap_setting(void); -void cons_winstidy_setting(void); void cons_time_setting(void); void cons_wintitle_setting(void); void cons_notify_setting(void); diff --git a/src/ui/window_list.c b/src/ui/window_list.c index 990a17f1..09a53ed1 100644 --- a/src/ui/window_list.c +++ b/src/ui/window_list.c @@ -238,9 +238,7 @@ wins_close_plugin(char *tag) int index = wins_get_num(toclose); ui_close_win(index); - if (prefs_get_boolean(PREF_WINS_AUTO_TIDY)) { - wins_tidy(); - } + wins_tidy(); } GList* |