diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-07-18 23:49:26 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-07-18 23:49:26 +0200 |
commit | 59635919ea4825fa50059bca3aebb9c84e84e410 (patch) | |
tree | 7355a8a7cda2cab63cc3d0669392dcf03bf2400f /source/dialogs | |
parent | fc40aa520f80e730863ad96f4a09d2f473b8a7c5 (diff) |
Add selection indicator to dmenu mode.
Diffstat (limited to 'source/dialogs')
-rw-r--r-- | source/dialogs/dmenu.c | 6 | ||||
-rw-r--r-- | source/dialogs/ssh.c | 2 | ||||
-rw-r--r-- | source/dialogs/window.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/source/dialogs/dmenu.c b/source/dialogs/dmenu.c index 6fe27791..0303d1b2 100644 --- a/source/dialogs/dmenu.c +++ b/source/dialogs/dmenu.c @@ -541,13 +541,17 @@ static void dmenu_finalize ( RofiViewState *state ) int dmenu_switcher_dialog ( void ) { mode_init ( &dmenu_mode ); - MenuFlags menu_flags = MENU_NORMAL; + MenuFlags menu_flags = MENU_INDICATOR; DmenuModePrivateData *pd = (DmenuModePrivateData *) dmenu_mode.private_data; char *input = NULL; unsigned int cmd_list_length = pd->cmd_list_length; char **cmd_list = pd->cmd_list; pd->only_selected = FALSE; + + if ( find_arg ( "-no-selection-indicator") >= 0 ){ + menu_flags = MENU_NORMAL; + } if ( find_arg ( "-markup-rows" ) >= 0 ) { pd->do_markup = TRUE; } diff --git a/source/dialogs/ssh.c b/source/dialogs/ssh.c index 331e5431..9cc75543 100644 --- a/source/dialogs/ssh.c +++ b/source/dialogs/ssh.c @@ -198,7 +198,7 @@ static char **read_hosts_file ( char ** retv, unsigned int *length ) // Reading one line per time. while ( getline ( &buffer, &buffer_length, fd ) > 0 ) { // Evaluate one line. - unsigned int index = 0, ti = 0; + unsigned int index = 0, ti = 0; char *token = buffer; // Tokenize it. diff --git a/source/dialogs/window.c b/source/dialogs/window.c index 22bd7541..bd553fc3 100644 --- a/source/dialogs/window.c +++ b/source/dialogs/window.c @@ -680,7 +680,7 @@ static char * _generate_display_string ( const ModeModePrivateData *pd, client * struct arg d = { pd, c }; char *res = g_regex_replace_eval ( pd->window_regex, config.window_format, -1, 0, 0, helper_eval_cb, &d, NULL ); - return g_strchomp(res); + return g_strchomp ( res ); } static char *_get_display_value ( const Mode *sw, unsigned int selected_line, int *state, int get_entry ) |