aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChandni Verma <chandniverma2112@gmail.com>2010-11-25 10:12:51 +0800
committerChandni Verma <chandniverma2112@gmail.com>2010-11-26 09:45:28 +0800
commit72a404293ef360571eda0eb45166517010daa247 (patch)
tree38247a5c8c24a3b01e8f2090b0d2f39a951c5b15 /src
parent4b33293b29499f574955946aea70dae420e7accc (diff)
downloadgsoc2013-empathy-72a404293ef360571eda0eb45166517010daa247.tar
gsoc2013-empathy-72a404293ef360571eda0eb45166517010daa247.tar.gz
gsoc2013-empathy-72a404293ef360571eda0eb45166517010daa247.tar.bz2
gsoc2013-empathy-72a404293ef360571eda0eb45166517010daa247.tar.lz
gsoc2013-empathy-72a404293ef360571eda0eb45166517010daa247.tar.xz
gsoc2013-empathy-72a404293ef360571eda0eb45166517010daa247.tar.zst
gsoc2013-empathy-72a404293ef360571eda0eb45166517010daa247.zip
Only the required submenus of 'Room' menu are updated, not the entire menu.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=597043
Diffstat (limited to 'src')
-rw-r--r--src/empathy-main-window.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index cc49db934..cdf0deddb 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -602,7 +602,7 @@ main_window_update_status (EmpathyMainWindow *window)
{
EmpathyMainWindowPriv *priv = GET_PRIV (window);
gboolean connected, connecting;
- GList *l;
+ GList *l, *children;
connected = empathy_account_manager_get_accounts_connected (&connecting);
@@ -619,6 +619,15 @@ main_window_update_status (EmpathyMainWindow *window)
for (l = priv->actions_connected; l; l = l->next) {
gtk_action_set_sensitive (l->data, connected);
}
+
+ /* Update favourite rooms sensitivity */
+ children = gtk_container_get_children (GTK_CONTAINER (priv->room_menu));
+ for (l = children; l != NULL; l = l->next) {
+ if (g_object_get_data (G_OBJECT (l->data), "is_favorite") != NULL) {
+ gtk_widget_set_sensitive (GTK_WIDGET (l->data), connected);
+ }
+ }
+ g_list_free (children);
}
static void
@@ -1112,6 +1121,8 @@ main_window_favorite_chatroom_menu_add (EmpathyMainWindow *window,
name = empathy_chatroom_get_name (chatroom);
menu_item = gtk_menu_item_new_with_label (name);
+ g_object_set_data (G_OBJECT (menu_item), "is_favorite",
+ GUINT_TO_POINTER (TRUE));
g_object_set_data (G_OBJECT (chatroom), "menu_item", menu_item);
g_signal_connect (menu_item, "activate",
@@ -1436,7 +1447,8 @@ main_window_connection_items_setup (EmpathyMainWindow *window,
GObject *action;
guint i;
const gchar *actions_connected[] = {
- "room",
+ "room_join_new",
+ "room_join_favorites",
"chat_new_message",
"chat_new_call",
"chat_add_contact",