aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-27 20:27:58 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-28 18:09:35 +0800
commit0ab3bd0797578847fe4f4967a3526333cb4a4e61 (patch)
treee2162a76b84f646db3dd02f7b40ec9c225a3e30f /src
parent3fd6aa7dcc3a209e4e0795b932efcf4cc1688e90 (diff)
downloadgsoc2013-empathy-0ab3bd0797578847fe4f4967a3526333cb4a4e61.tar
gsoc2013-empathy-0ab3bd0797578847fe4f4967a3526333cb4a4e61.tar.gz
gsoc2013-empathy-0ab3bd0797578847fe4f4967a3526333cb4a4e61.tar.bz2
gsoc2013-empathy-0ab3bd0797578847fe4f4967a3526333cb4a4e61.tar.lz
gsoc2013-empathy-0ab3bd0797578847fe4f4967a3526333cb4a4e61.tar.xz
gsoc2013-empathy-0ab3bd0797578847fe4f4967a3526333cb4a4e61.tar.zst
gsoc2013-empathy-0ab3bd0797578847fe4f4967a3526333cb4a4e61.zip
make sure that chat_window_contact_menu_update is not called recursively
Calling empathy_chat_get_contact_menu() may have as a side effect to call empathy_contact_set_persona() which will fire a 'notify' signal and so trigger another mennu update. There is no point doing a second one, and creating a second menu, so best to avoid recursive calls.
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index f21db0335..8dec7c08f 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -112,6 +112,8 @@ struct _EmpathyChatWindowPriv
GSettings *gsettings_ui;
EmpathySoundManager *sound_mgr;
+
+ gboolean updating_menu;
};
static GList *chat_windows = NULL;
@@ -598,6 +600,10 @@ chat_window_contact_menu_update (EmpathyChatWindow *self,
{
GtkWidget *menu, *submenu, *orig_submenu;
+ if (self->priv->updating_menu)
+ return;
+ self->priv->updating_menu = TRUE;
+
menu = gtk_ui_manager_get_widget (self->priv->ui_manager,
"/chats_menubar/menu_contact");
orig_submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu));
@@ -626,6 +632,8 @@ chat_window_contact_menu_update (EmpathyChatWindow *self,
"notify::visible",
(GCallback)_submenu_notify_visible_changed_cb, window, 0);
}
+
+ self->priv->updating_menu = FALSE;
}
static guint