Fix toolbar visibility
authorVitaly Sinilin <vs@kp4.ru>
Mon, 7 Sep 2015 21:18:56 +0000 (00:18 +0300)
committerKlaus Ethgen <Klaus@Ethgen.de>
Tue, 8 Sep 2015 11:14:00 +0000 (12:14 +0100)
The toolbar should not be visible on startup when the
configuration file has the line

    toolbar_hidden = "true"

Its visibility state at startup should be the same it
was at the last shutdown.

src/layout.c

index 649ee67..45c702c 100644 (file)
@@ -271,11 +271,10 @@ static GtkWidget *layout_tool_setup(LayoutWindow *lw)
 
        menu_bar = layout_actions_menu_bar(lw);
        gtk_box_pack_start(GTK_BOX(box), menu_bar, FALSE, FALSE, 0);
-       gtk_widget_show(menu_bar);
 
        toolbar = layout_actions_toolbar(lw, TOOLBAR_MAIN);
        gtk_box_pack_start(GTK_BOX(box), toolbar, FALSE, FALSE, 0);
-       if (!lw->options.toolbar_hidden) gtk_widget_show(toolbar);
+       if (lw->options.toolbar_hidden) gtk_widget_hide(toolbar);
 
        tabcomp = tab_completion_new_with_history(&lw->path_entry, NULL, "path_list", -1,
                                                  layout_path_entry_cb, lw);