aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app-section.c12
-rw-r--r--src/im-application-list.c14
-rw-r--r--test/test-gactionmuxer.cpp12
3 files changed, 19 insertions, 19 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}"));
diff --git a/test/test-gactionmuxer.cpp b/test/test-gactionmuxer.cpp
index efd6e4f..498d3dd 100644
--- a/test/test-gactionmuxer.cpp
+++ b/test/test-gactionmuxer.cpp
@@ -190,7 +190,7 @@ TEST(GActionMuxerTest, ActionAttributes) {
group = g_simple_action_group_new ();
action = g_simple_action_new ("one", G_VARIANT_TYPE_STRING);
- g_simple_action_group_insert (group, G_ACTION (action));
+ g_action_map_add_action (G_ACTION_MAP(group), G_ACTION (action));
muxer = g_action_muxer_new ();
g_action_muxer_insert (muxer, "first", G_ACTION_GROUP (group));
@@ -275,7 +275,7 @@ TEST(GActionMuxerTest, Signals) {
group = g_simple_action_group_new ();
action = g_simple_action_new ("one", G_VARIANT_TYPE_STRING);
- g_simple_action_group_insert (group, G_ACTION (action));
+ g_action_map_add_action (G_ACTION_MAP(group), G_ACTION (action));
g_object_unref (action);
muxer = g_action_muxer_new ();
@@ -300,7 +300,7 @@ TEST(GActionMuxerTest, Signals) {
closure.name = "first.two";
action = g_simple_action_new_stateful ("two", G_VARIANT_TYPE_STRING,
g_variant_new_string ("on"));
- g_simple_action_group_insert (group, G_ACTION (action));
+ g_action_map_add_action (G_ACTION_MAP(group), G_ACTION (action));
EXPECT_TRUE (closure.signal_ran);
/* disable the action */
@@ -317,7 +317,7 @@ TEST(GActionMuxerTest, Signals) {
/* remove the first action */
closure.signal_ran = FALSE;
closure.name = "first.one";
- g_simple_action_group_remove (group, "one");
+ g_action_map_remove_action (G_ACTION_MAP(group), "one");
EXPECT_TRUE (closure.signal_ran);
/* remove the whole group, should be notified about "first.two" */
@@ -361,14 +361,14 @@ TEST(GActionMuxerTest, ActivateAction) {
group = g_simple_action_group_new ();
action = g_simple_action_new ("one", G_VARIANT_TYPE_STRING);
- g_simple_action_group_insert (group, G_ACTION (action));
+ g_action_map_add_action (G_ACTION_MAP(group), G_ACTION (action));
g_signal_connect (action, "activate",
G_CALLBACK (action_activated), (gpointer) &signal_ran);
g_object_unref (action);
action = g_simple_action_new_stateful ("two", NULL,
g_variant_new_string ("on"));
- g_simple_action_group_insert (group, G_ACTION (action));
+ g_action_map_add_action (G_ACTION_MAP(group), G_ACTION (action));
g_signal_connect (action, "change-state",
G_CALLBACK (action_change_state), (gpointer) &signal_ran);
g_object_unref (action);