diff --git a/include/view.h b/include/view.h index c7b9e574..89b692f6 100644 --- a/include/view.h +++ b/include/view.h @@ -26,6 +26,8 @@ typedef enum MENU_ERROR_DIALOG = 4, /** INDICATOR */ MENU_INDICATOR = 8, + /** Show column */ + MENU_PROMPT_COLON = 16, } MenuFlags; /** diff --git a/source/dialogs/dmenu.c b/source/dialogs/dmenu.c index 47c81562..06628fc5 100644 --- a/source/dialogs/dmenu.c +++ b/source/dialogs/dmenu.c @@ -457,7 +457,8 @@ Mode dmenu_mode = ._get_completion = NULL, ._preprocess_input = NULL, .private_data = NULL, - .free = NULL + .free = NULL, + .display_name = "dmenu:" }; static void dmenu_finish ( RofiViewState *state, int retv ) diff --git a/source/rofi.c b/source/rofi.c index 047b5b0e..a4eafc20 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -179,7 +179,7 @@ static void run_switcher ( ModeMode mode ) return; } curr_switcher = mode; - RofiViewState * state = rofi_view_create ( modi[mode], config.filter, NULL, MENU_NORMAL, process_result ); + RofiViewState * state = rofi_view_create ( modi[mode], config.filter, NULL, MENU_PROMPT_COLON, process_result ); if ( state ) { rofi_view_set_active ( state ); } diff --git a/source/view.c b/source/view.c index babd3ce7..df5ee606 100644 --- a/source/view.c +++ b/source/view.c @@ -177,7 +177,14 @@ static void rofi_view_update_prompt ( RofiViewState *state ) { if ( state->prompt ) { const char *str = mode_get_display_name ( state->sw ); - textbox_text ( state->prompt, str ); + if ( (state->menu_flags&MENU_PROMPT_COLON) != 0){ + char *pr = g_strconcat ( str, ":", NULL); + textbox_text ( state->prompt, pr ); + g_free(pr); + } + else { + textbox_text ( state->prompt, str ); + } } }