[emerillon] Delay the registration of the sidebar_visibility_changed_cb callback
- From: Łukasz Jernaś <ljernas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [emerillon] Delay the registration of the sidebar_visibility_changed_cb callback
- Date: Tue, 4 May 2010 10:08:43 +0000 (UTC)
commit 1abf6cb137be444181b87d076af6bfe591156759
Author: Simon Wenner <simon wenner ch>
Date: Sun May 2 15:25:36 2010 +0200
Delay the registration of the sidebar_visibility_changed_cb callback
Register the callback after the first widget_show call. If it is registered before, it is called at each application startup and enables the sidebar in gconf although the user requested to hide the sidebar.
emerillon/window.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/emerillon/window.c b/emerillon/window.c
index ae12e23..202db4b 100644
--- a/emerillon/window.c
+++ b/emerillon/window.c
@@ -781,11 +781,6 @@ build_ui (EmerillonWindow *self)
self->priv->sidebar = emerillon_sidebar_new ();
gtk_widget_set_size_request (self->priv->sidebar, 200, -1);
- g_signal_connect_after (self->priv->sidebar, "show",
- G_CALLBACK (sidebar_visibility_changed_cb), self);
- g_signal_connect_after (self->priv->sidebar, "hide",
- G_CALLBACK (sidebar_visibility_changed_cb), self);
-
/* Horizontal pane. */
hpaned = gtk_hpaned_new ();
gtk_paned_pack1 (GTK_PANED (hpaned), self->priv->sidebar, FALSE, FALSE);
@@ -793,6 +788,11 @@ build_ui (EmerillonWindow *self)
gtk_widget_show (self->priv->sidebar);
gtk_widget_show (viewport);
+ g_signal_connect_after (self->priv->sidebar, "show",
+ G_CALLBACK (sidebar_visibility_changed_cb), self);
+ g_signal_connect_after (self->priv->sidebar, "hide",
+ G_CALLBACK (sidebar_visibility_changed_cb), self);
+
gtk_box_pack_start (GTK_BOX (vbox), hpaned, TRUE, TRUE, 0);
gtk_widget_show (hpaned);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]