[evolution/gnome-3-0] Bug #651633 - Hidden task/memo sidebar always automagically re-appears
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-0] Bug #651633 - Hidden task/memo sidebar always automagically re-appears
- Date: Fri, 19 Aug 2011 06:58:34 +0000 (UTC)
commit 6e241ffdba07b48c41e97d7b5d00f689511c12ac
Author: Milan Crha <mcrha redhat com>
Date: Fri Aug 19 08:56:54 2011 +0200
Bug #651633 - Hidden task/memo sidebar always automagically re-appears
widgets/misc/e-paned.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/widgets/misc/e-paned.c b/widgets/misc/e-paned.c
index 6740d44..4a27af7 100644
--- a/widgets/misc/e-paned.c
+++ b/widgets/misc/e-paned.c
@@ -237,6 +237,19 @@ paned_realize (GtkWidget *widget)
priv->toplevel_ready = TRUE;
}
+static gboolean
+paned_queue_resize_on_idle (gpointer user_data)
+{
+ GtkWidget *paned = user_data;
+
+ g_return_val_if_fail (paned != NULL, FALSE);
+
+ gtk_widget_queue_resize_no_redraw (paned);
+ g_object_unref (paned);
+
+ return FALSE;
+}
+
static void
paned_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
@@ -279,6 +292,12 @@ paned_size_allocate (GtkWidget *widget,
gtk_paned_set_position (GTK_PANED (paned), position);
paned->priv->sync_request = SYNC_REQUEST_NONE;
+
+ /* gtk_paned_set_position() calls queue_resize, which cannot
+ be called from size_allocate, thus call it on idle to take
+ the change in the effect.
+ */
+ g_idle_add (paned_queue_resize_on_idle, g_object_ref (paned));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]