From 894c9d2e239a4ecc99319fa2517b6d68bdd72774 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 6 Sep 2012 15:14:00 +0200 Subject: messages-service: update chat section when an app is removed --- src/messages-service.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/messages-service.c') diff --git a/src/messages-service.c b/src/messages-service.c index 7cc037b..bc9ac1b 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -115,9 +115,7 @@ app_section_uses_chat (gpointer key, } static void -uses_chat_status_changed (GObject *object, - GParamSpec *pspec, - gpointer user_data) +update_chat_section () { gboolean show_chat; GMenuModel *first_section; @@ -137,6 +135,14 @@ uses_chat_status_changed (GObject *object, g_object_unref (first_section); } +static void +uses_chat_status_changed (GObject *object, + GParamSpec *pspec, + gpointer user_data) +{ + update_chat_section (); +} + static void remove_section (AppSection *section, const gchar *id) @@ -157,6 +163,8 @@ remove_section (AppSection *section, g_menu_model_get_n_items (G_MENU_MODEL (toplevel_menu)) == 1) { g_menu_remove (toplevel_menu, 0); } + + update_chat_section (); } static AppSection * -- cgit v1.2.3