diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-01-05 18:33:57 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-01-05 18:33:57 +0100 |
commit | 3eb450c37eee98bab34c014899b81964b01caee4 (patch) | |
tree | 2688a209936bebb6d1e91fd6c2f63fe147d1962b /source/view.c | |
parent | e6a6d5f8947c1950be2a8354d27040e32f4d49de (diff) |
Add generic container (renamed window widget) put container around message.
Diffstat (limited to 'source/view.c')
-rw-r--r-- | source/view.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/view.c b/source/view.c index 337ee5b0..a7ea0b7b 100644 --- a/source/view.c +++ b/source/view.c @@ -613,7 +613,7 @@ void __create_window ( MenuFlags menu_flags ) } // Setup font. // Dummy widget. - window *win = window_create ( "window" ); + container *win = container_create ( "window" ); char *font = rofi_theme_get_string ( WIDGET ( win ), "font" , config.menu_font ); if ( font ) { PangoFontDescription *pfd = pango_font_description_from_string ( font ); @@ -1452,9 +1452,9 @@ RofiViewState *rofi_view_create ( Mode *sw, // Get active monitor size. TICK_N ( "Get active monitor" ); - state->main_window = window_create ( "window" ); + state->main_window = container_create ( "window" ); state->main_box = box_create ( "window.mainbox.box", BOX_VERTICAL ); - window_add ( state->main_window, WIDGET ( state->main_box ) ); + container_add ( state->main_window, WIDGET ( state->main_box ) ); state->input_bar = box_create ( "window.mainbox.inputbar.box", BOX_HORIZONTAL ); @@ -1495,8 +1495,10 @@ RofiViewState *rofi_view_create ( Mode *sw, textbox_text ( state->case_indicator, get_matching_state () ); if ( message ) { + container *box = container_create ( "window.mainbox.message.box" ); textbox *message_tb = textbox_create ( "window.mainbox.message.textbox", TB_AUTOHEIGHT | TB_MARKUP | TB_WRAP, NORMAL, message ); - box_add ( state->main_box, WIDGET ( message_tb ), FALSE, end); + container_add ( box, WIDGET (message_tb) ); + box_add ( state->main_box, WIDGET ( box ), FALSE, end); } state->overlay = textbox_create ( "window.overlay", TB_AUTOWIDTH|TB_AUTOHEIGHT, URGENT, "blaat" ); @@ -1546,9 +1548,9 @@ int rofi_view_error_dialog ( const char *msg, int markup ) state->menu_flags = MENU_ERROR_DIALOG; state->finalize = process_result; - state->main_window = window_create ( "window" ); + state->main_window = container_create ( "window" ); state->main_box = box_create ( "window.mainbox", BOX_VERTICAL); - window_add ( state->main_window, WIDGET ( state->main_box ) ); + container_add ( state->main_window, WIDGET ( state->main_box ) ); state->text = textbox_create ( "window.mainbox.message", ( TB_AUTOHEIGHT | TB_WRAP ) + ( ( markup ) ? TB_MARKUP : 0 ), NORMAL, ( msg != NULL ) ? msg : "" ); box_add ( state->main_box, WIDGET ( state->text ), TRUE, FALSE ); |