diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-08-24 11:21:00 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2012-08-24 11:21:00 +0200 |
commit | 28c6d543fc310d5098edb61d506aa8383a96de6f (patch) | |
tree | ab7ae7218c2dc8ea8cbebe97298ddca7a111c910 | |
parent | 195ec17a1b7e3fc89d95d21fc463499222339a63 (diff) | |
download | ayatana-indicator-messages-28c6d543fc310d5098edb61d506aa8383a96de6f.tar.gz ayatana-indicator-messages-28c6d543fc310d5098edb61d506aa8383a96de6f.tar.bz2 ayatana-indicator-messages-28c6d543fc310d5098edb61d506aa8383a96de6f.zip |
Don't use '&' in variant format strings of g_menu_item_* calls
-rw-r--r-- | libmessaging-menu/messaging-menu.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libmessaging-menu/messaging-menu.c b/libmessaging-menu/messaging-menu.c index 0d80163..b090352 100644 --- a/libmessaging-menu/messaging-menu.c +++ b/libmessaging-menu/messaging-menu.c @@ -759,14 +759,18 @@ messaging_menu_app_remove_source (MessagingMenuApp *app, n_items = g_menu_model_get_n_items (G_MENU_MODEL (app->menu)); for (i = 0; i < n_items; i++) { - const gchar *action = NULL; + gchar *action; - g_menu_model_get_item_attribute (G_MENU_MODEL (app->menu), i, - "action", "&s", &action); - if (!g_strcmp0 (action, source_id)) + if (g_menu_model_get_item_attribute (G_MENU_MODEL (app->menu), i, + "action", "s", &action)) { - g_menu_remove (app->menu, i); - break; + if (!g_strcmp0 (action, source_id)) + { + g_menu_remove (app->menu, i); + break; + } + + g_free (action); } } |