Merge lp:~larsu/indicator-messages/dont-use-deprecated-functions into lp:~indicator-applet-developers/indicator-messages/trunk.13.10

Proposed by Lars Karlitski
Status: Merged
Approved by: Ted Gould
Approved revision: 359
Merged at revision: 360
Proposed branch: lp:~larsu/indicator-messages/dont-use-deprecated-functions
Merge into: lp:~indicator-applet-developers/indicator-messages/trunk.13.10
Diff against target: 69 lines (+15/-15)
2 files modified
src/im-application-list.c (+3/-3)
test/test-gactionmuxer.cpp (+12/-12)
To merge this branch: bzr merge lp:~larsu/indicator-messages/dont-use-deprecated-functions
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Charles Kerr (community) Approve
Review via email: mp+181555@code.launchpad.net

Description of the change

Don't use deprecated g_simple_action_group_{lookup,insert}

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

LGTM, want to let Jenkins have another go before top-approval?

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/im-application-list.c'
2--- src/im-application-list.c 2013-08-22 01:50:07 +0000
3+++ src/im-application-list.c 2013-08-22 13:23:16 +0000
4@@ -204,7 +204,7 @@
5 /* Set the state */
6 g_action_group_change_action_state (G_ACTION_GROUP(list->globalactions), "messages", g_variant_builder_end(&builder));
7
8- GAction * remove_action = g_simple_action_group_lookup(list->globalactions, "remove-all");
9+ GAction * remove_action = g_action_map_lookup_action (G_ACTION_MAP (list->globalactions), "remove-all");
10 if (g_hash_table_find (list->applications, application_has_items, NULL)) {
11 g_debug("Enabling remove-all");
12 g_simple_action_set_enabled(G_SIMPLE_ACTION(remove_action), TRUE);
13@@ -239,7 +239,7 @@
14 app_message_action_check_draw (Application * app, const gchar * action_name)
15 {
16 GAction * action = NULL;
17- action = g_simple_action_group_lookup (app->message_actions, action_name);
18+ action = g_action_map_lookup_action (G_ACTION_MAP (app->message_actions), action_name);
19 return GPOINTER_TO_INT(g_object_get_qdata(G_OBJECT(action), message_action_draws_attention_quark()));
20 }
21
22@@ -577,7 +577,7 @@
23 GSimpleAction * messages = g_simple_action_new_stateful("messages", G_VARIANT_TYPE("a{sv}"), g_variant_new_array(G_VARIANT_TYPE("{sv}"), NULL, 0));
24 g_action_map_add_action(G_ACTION_MAP(list->globalactions), G_ACTION(messages));
25 }
26- g_simple_action_group_add_entries (list->globalactions, action_entries, G_N_ELEMENTS (action_entries), list);
27+ g_action_map_add_action_entries (G_ACTION_MAP (list->globalactions), action_entries, G_N_ELEMENTS (action_entries), list);
28
29 list->statusaction = g_simple_action_new_stateful("status", G_VARIANT_TYPE_STRING, g_variant_new_string("offline"));
30 g_signal_connect(list->statusaction, "activate", G_CALLBACK(status_activated), list);
31
32=== modified file 'test/test-gactionmuxer.cpp'
33--- test/test-gactionmuxer.cpp 2013-08-22 01:50:07 +0000
34+++ test/test-gactionmuxer.cpp 2013-08-22 13:23:16 +0000
35@@ -94,22 +94,22 @@
36 #endif
37
38 group1 = g_simple_action_group_new ();
39- g_simple_action_group_add_entries (group1,
40- entries1,
41- G_N_ELEMENTS (entries1),
42- NULL);
43+ g_action_map_add_action_entries (G_ACTION_MAP (group1),
44+ entries1,
45+ G_N_ELEMENTS (entries1),
46+ NULL);
47
48 group2 = g_simple_action_group_new ();
49- g_simple_action_group_add_entries (group2,
50- entries2,
51- G_N_ELEMENTS (entries2),
52- NULL);
53+ g_action_map_add_action_entries (G_ACTION_MAP (group2),
54+ entries2,
55+ G_N_ELEMENTS (entries2),
56+ NULL);
57
58 group3 = g_simple_action_group_new ();
59- g_simple_action_group_add_entries (group3,
60- entries3,
61- G_N_ELEMENTS (entries3),
62- NULL);
63+ g_action_map_add_action_entries (G_ACTION_MAP (group3),
64+ entries3,
65+ G_N_ELEMENTS (entries3),
66+ NULL);
67
68 muxer = g_action_muxer_new ();
69 g_action_muxer_insert (muxer, "first", G_ACTION_GROUP (group1));

Subscribers

People subscribed via source and target branches