Hi,

I am working on an update for Russian translation of geeqie and have
discovered a couple of small bugs that nobody seem to care about. The
first one is about the toolbar that is not hidden after restart even
though the configuration file has the line

    toolbar_hidden = "true"

and View->Files and Folders->Hide toolbar checkbox is checked.

This bug was introduced in

    commit b4581c40f8cb47f32d1102589b005d5435e9e297
    Author:     Vladimir Nadvornik <nadvor...@suse.cz>
    AuthorDate: Sat Feb 28 09:59:27 2009 +0000

         create toolbar from ui_manager

(So it is already 6.5 years old, huh :)

I couldn't find a clear statement in the GTK documentation about why
widgets retrieved via gtk_ui_manager_get_widget() need not to be made
visible explicitly, so the observed actual behavior on my system is the
only source I can rely upon.

Thanks!

-- 
Vitaly Sinilin <v...@kp4.ru>
>From e1c7aea9887702e423d043caa06c61730a477951 Mon Sep 17 00:00:00 2001
From: Vitaly Sinilin <v...@kp4.ru>
Date: Tue, 8 Sep 2015 00:18:56 +0300
Subject: [PATCH] Fix toolbar visibility

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 |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/layout.c b/src/layout.c
index 649ee67..45c702c 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -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);
-- 
1.7.10.4

------------------------------------------------------------------------------
_______________________________________________
Geeqie-devel mailing list
Geeqie-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geeqie-devel

Reply via email to