evolution r35408 - trunk/mail
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35408 - trunk/mail
- Date: Wed, 23 Apr 2008 10:06:31 +0100 (BST)
Author: mcrha
Date: Wed Apr 23 09:06:31 2008
New Revision: 35408
URL: http://svn.gnome.org/viewvc/evolution?rev=35408&view=rev
Log:
2008-04-23 Milan Crha <mcrha redhat com>
** Fix for bug #529179
* em-folder-browser.c: (struct _EMFolderBrowserPrivate),
(labels_changed_idle_cb), (gconf_labels_changed), (emfb_destroy):
Rebuild search menu rather on idle, then immediately after the change
in gconf, because other parts may not have this change propagated yet.
Modified:
trunk/mail/ChangeLog
trunk/mail/em-folder-browser.c
Modified: trunk/mail/em-folder-browser.c
==============================================================================
--- trunk/mail/em-folder-browser.c (original)
+++ trunk/mail/em-folder-browser.c Wed Apr 23 09:06:31 2008
@@ -130,6 +130,7 @@
EMMenu *menu; /* toplevel menu manager */
guint labels_change_notify_id; /* mail_config's notify id */
+ guint labels_change_idle_id; /* rebuild menu on idle, when all know about a change */
};
typedef struct EMFBSearchBarItem {
@@ -436,13 +437,27 @@
}
}
+static gboolean
+labels_changed_idle_cb (gpointer user_data)
+{
+ EMFolderBrowser *emfb = (EMFolderBrowser*) user_data;
+
+ emfb_realize (GTK_WIDGET (emfb));
+
+ emfb->priv->labels_change_idle_id = 0;
+
+ return FALSE;
+}
+
static void
gconf_labels_changed (GConfClient *client, guint cnxn_id,
GConfEntry *entry, gpointer user_data)
{
+ EMFolderBrowser *emfb = (EMFolderBrowser*) user_data;
+
/* regenerate menu option whenever something changed in labels */
- if (user_data)
- emfb_realize (user_data);
+ if (emfb && !emfb->priv->labels_change_idle_id)
+ emfb->priv->labels_change_idle_id = g_idle_add (labels_changed_idle_cb, emfb);
}
static void
@@ -580,6 +595,12 @@
emfb->priv->labels_change_notify_id = 0;
}
+ if (emfb->priv->labels_change_idle_id) {
+ g_source_remove (emfb->priv->labels_change_idle_id);
+
+ emfb->priv->labels_change_idle_id = 0;
+ }
+
((GtkObjectClass *)emfb_parent)->destroy(o);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]