diff options
author | Ted Gould <ted@gould.cx> | 2013-08-22 04:32:13 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-08-22 04:32:13 +0000 |
commit | 3044d4711cf54184bb1ecfdb9d8db5243de9bc58 (patch) | |
tree | 2152a01c63cd3c0fd37f95cabe7afde0addecd06 /src | |
parent | ff533d23778b9799765bfed600b676dc30a934db (diff) | |
parent | a8c93f9ae22d515c092bed0e4dca7873a78f2d88 (diff) | |
download | ayatana-indicator-messages-3044d4711cf54184bb1ecfdb9d8db5243de9bc58.tar.gz ayatana-indicator-messages-3044d4711cf54184bb1ecfdb9d8db5243de9bc58.tar.bz2 ayatana-indicator-messages-3044d4711cf54184bb1ecfdb9d8db5243de9bc58.zip |
Migrate away from deprecated function. Fixes: https://bugs.launchpad.net/bugs/1215180.
Approved by Charles Kerr, PS Jenkins bot.
Diffstat (limited to 'src')
-rw-r--r-- | src/app-section.c | 12 | ||||
-rw-r--r-- | src/im-application-list.c | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/app-section.c b/src/app-section.c index aad994d..a741172 100644 --- a/src/app-section.c +++ b/src/app-section.c @@ -384,7 +384,7 @@ g_simple_action_group_clear (GSimpleActionGroup *group) actions = g_action_group_list_actions (G_ACTION_GROUP (group)); for (it = actions; *it; it++) - g_simple_action_group_remove (group, *it); + g_action_map_remove_action (G_ACTION_MAP(group), *it); g_strfreev (actions); } @@ -406,7 +406,7 @@ app_section_update_menu (AppSection *self) launch = g_simple_action_new_stateful ("launch", G_VARIANT_TYPE_UINT32, g_variant_new_boolean (is_running)); g_signal_connect (launch, "activate", G_CALLBACK (activate_cb), self); g_signal_connect (launch, "change-state", G_CALLBACK (launch_action_change_state), self); - g_simple_action_group_insert (priv->static_shortcuts, G_ACTION (launch)); + g_action_map_add_action (G_ACTION_MAP(priv->static_shortcuts), G_ACTION (launch)); item = g_menu_item_new (g_app_info_get_name (G_APP_INFO (priv->appinfo)), "launch"); g_menu_item_set_attribute (item, "x-canonical-type", "s", "ImAppMenuItem"); @@ -432,7 +432,7 @@ app_section_update_menu (AppSection *self) action = g_simple_action_new (nicks[i], G_VARIANT_TYPE_UINT32); g_signal_connect(action, "activate", G_CALLBACK (nick_activate_cb), self); - g_simple_action_group_insert (priv->static_shortcuts, G_ACTION (action)); + g_action_map_add_action (G_ACTION_MAP(priv->static_shortcuts), G_ACTION (action)); g_object_unref (action); item = g_menu_item_new (name, nicks[i]); @@ -659,7 +659,7 @@ remove_source (AppSection *self, } } - g_simple_action_group_remove (priv->source_actions, id); + g_action_map_remove_action (G_ACTION_MAP(priv->source_actions), id); update_draws_attention (self); } @@ -722,7 +722,7 @@ sources_listed (GObject *source_object, state = g_variant_new ("(uxsb)", count, time, string, draws_attention); action = g_simple_action_new_stateful (id, NULL, state); g_signal_connect (action, "activate", G_CALLBACK (source_action_activated), self); - g_simple_action_group_insert (priv->source_actions, G_ACTION (action)); + g_action_map_add_action (G_ACTION_MAP(priv->source_actions), G_ACTION (action)); item = g_menu_item_new (label, id); g_menu_item_set_attribute (item, "x-canonical-type", "s", "ImSourceMenuItem"); @@ -760,7 +760,7 @@ source_added (IndicatorMessagesApplication *app, state = g_variant_new ("(uxsb)", count, time, string, draws_attention); action = g_simple_action_new_stateful (id, NULL, state); - g_simple_action_group_insert (priv->source_actions, G_ACTION (action)); + g_action_map_add_action (G_ACTION_MAP(priv->source_actions), G_ACTION (action)); if (draws_attention && !priv->draws_attention) { priv->draws_attention = TRUE; diff --git a/src/im-application-list.c b/src/im-application-list.c index 684a2e4..d69609d 100644 --- a/src/im-application-list.c +++ b/src/im-application-list.c @@ -272,7 +272,7 @@ static void im_application_list_source_removed (Application *app, const gchar *id) { - g_simple_action_group_remove (app->source_actions, id); + g_action_map_remove_action (G_ACTION_MAP(app->source_actions), id); g_signal_emit (app->list, signals[SOURCE_REMOVED], 0, app->id, id); @@ -317,7 +317,7 @@ static void im_application_list_message_removed (Application *app, const gchar *id) { - g_simple_action_group_remove (app->message_actions, id); + g_action_map_remove_action (G_ACTION_MAP(app->message_actions), id); g_action_muxer_remove (app->message_sub_actions, id); im_application_list_update_draws_attention (app->list); @@ -575,13 +575,13 @@ im_application_list_init (ImApplicationList *list) list->globalactions = g_simple_action_group_new (); { GSimpleAction * messages = g_simple_action_new_stateful("messages", G_VARIANT_TYPE("a{sv}"), g_variant_new_array(G_VARIANT_TYPE("{sv}"), NULL, 0)); - g_simple_action_group_insert(list->globalactions, G_ACTION(messages)); + g_action_map_add_action(G_ACTION_MAP(list->globalactions), G_ACTION(messages)); } g_simple_action_group_add_entries (list->globalactions, action_entries, G_N_ELEMENTS (action_entries), list); list->statusaction = g_simple_action_new_stateful("status", G_VARIANT_TYPE_STRING, g_variant_new_string("offline")); g_signal_connect(list->statusaction, "activate", G_CALLBACK(status_activated), list); - g_simple_action_group_insert(list->globalactions, G_ACTION(list->statusaction)); + g_action_map_add_action(G_ACTION_MAP(list->globalactions), G_ACTION(list->statusaction)); list->muxer = g_action_muxer_new (); g_action_muxer_insert (list->muxer, NULL, G_ACTION_GROUP (list->globalactions)); @@ -780,7 +780,7 @@ im_application_list_source_added (Application *app, action = g_simple_action_new_stateful (id, G_VARIANT_TYPE_BOOLEAN, state); g_signal_connect (action, "activate", G_CALLBACK (im_application_list_source_activated), app); - g_simple_action_group_insert (app->source_actions, G_ACTION (action)); + g_action_map_add_action (G_ACTION_MAP(app->source_actions), G_ACTION (action)); g_signal_emit (app->list, signals[SOURCE_ADDED], 0, app->id, id, label, iconstr); @@ -906,7 +906,7 @@ im_application_list_message_added (Application *app, action = g_simple_action_new (id, G_VARIANT_TYPE_BOOLEAN); g_object_set_qdata(G_OBJECT(action), message_action_draws_attention_quark(), GINT_TO_POINTER(draws_attention)); g_signal_connect (action, "activate", G_CALLBACK (im_application_list_message_activated), app); - g_simple_action_group_insert (app->message_actions, G_ACTION (action)); + g_action_map_add_action (G_ACTION_MAP(app->message_actions), G_ACTION (action)); { GVariant *entry; @@ -939,7 +939,7 @@ im_application_list_message_added (Application *app, action = g_simple_action_new (name, type ? G_VARIANT_TYPE (type) : NULL); g_object_set_data_full (G_OBJECT (action), "message", g_strdup (id), g_free); g_signal_connect (action, "activate", G_CALLBACK (im_application_list_sub_message_activated), app); - g_simple_action_group_insert (action_group, G_ACTION (action)); + g_action_map_add_action (G_ACTION_MAP(action_group), G_ACTION (action)); g_variant_builder_init (&dict_builder, G_VARIANT_TYPE ("a{sv}")); |