diff options
author | Daniel Carl <danielcarl@gmx.de> | 2021-10-08 00:44:47 +0200 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2021-10-15 23:19:41 +0100 |
commit | 6693b044e326361f8b82bb64fa7a4c8b256a839b (patch) | |
tree | d1b4a11629dbe18827ee33fccbc1f5d7a81a7628 /src/main.c | |
parent | ceff22d28a8978bda732ad2b89839dd8e4c5eca0 (diff) |
Used macro to define status pattern and values together.
Use a more flexible way to specify how the setting flags are shown on
statusbar.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -631,21 +631,18 @@ void vb_statusbar_update(Client *c) statusbar_update_downloads(c, status); - /** - * These architectures have different kinds of issues with scroll - * percentage, this is a somewhat clean fix that doesn't affect others. - */ + /* These architectures have different kinds of issues with scroll + * percentage, this is a somewhat clean fix that doesn't affect others. */ #if defined(_ARCH_PPC64) || defined(_ARCH_PPC) | defined(_ARCH_ARM) - /* force the scroll percent to be 16-bit */ - c->state.scroll_percent = * (guint16*) ( &c->state.scroll_percent ); + /* force the scroll percent to be 16-bit */ + c->state.scroll_percent = *(guint16*)(&c->state.scroll_percent); #endif - if ( c->config.statusbar_show_settings ) { - /* show 3 user defined variables on statusbar. can add more by using same template */ - g_string_append_printf(status, " %s: %s |", STATUS_NAME1, STATUS_TYPE1 ); - g_string_append_printf(status, " %s: %s |", STATUS_NAME2, STATUS_TYPE2 ); - g_string_append_printf(status, " %s: %s |", STATUS_NAME3, STATUS_TYPE3 ); +#ifdef STATUS_VARAIBLE_SHOW + if (c->config.statusbar_show_settings) { + g_string_append_printf(status, STATUS_VARAIBLE_SHOW); } +#endif /* show the scroll status */ if (c->state.scroll_max == 0) { |