Merge lp:~nikwen/indicator-messages/clear-all-unescape-fix into lp:indicator-messages/15.10

Proposed by Ted Gould
Status: Merged
Approved by: Ted Gould
Approved revision: 449
Merged at revision: 445
Proposed branch: lp:~nikwen/indicator-messages/clear-all-unescape-fix
Merge into: lp:indicator-messages/15.10
Diff against target: 32 lines (+18/-2)
1 file modified
src/im-application-list.c (+18/-2)
To merge this branch: bzr merge lp:~nikwen/indicator-messages/clear-all-unescape-fix
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Review via email: mp+258261@code.launchpad.net

Commit message

Unescape action names when passing them to the proxy in im_application_list_remove_all()

Description of the change

Unescape action names when passing them to the proxy in im_application_list_remove_all().

This fixes an issue in account-polld and ubuntu-push where no new Gmail notifications would be shown because account-polld still thinks that a "You have about %d more unread messages" notification is being shown although it has been cleared using the "Clear all" button.

To post a comment you must log in.
Revision history for this message
Ted Gould (ted) wrote :

Approving for 15.10 as well.

review: Approve
Revision history for this message
Niklas Wenzel (nikwen) wrote :

Thanks. :)

The comment from the other MP is still valid. Could we get this into the phone images before the next RTM branch off?

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Thanks for merging. :)

What's about the other MP for the phone images? https://code.launchpad.net/~nikwen/indicator-messages/clear-all-unescape-fix/+merge/257471

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 2015-04-03 14:51:51 +0000
3+++ src/im-application-list.c 2015-05-05 14:36:02 +0000
4@@ -522,10 +522,26 @@
5
6 if (app->proxy != NULL) /* If it is remote, we tell the app we've cleared */
7 {
8+ guint i;
9+ gchar **unescaped_source_actions;
10+ gchar **unescaped_message_actions;
11+
12+ /* Unescape action names */
13+ unescaped_source_actions = g_new0 (gchar *, g_strv_length (source_actions) + 1);
14+ for (i = 0; source_actions[i]; i++)
15+ unescaped_source_actions[i] = unescape_action_name (source_actions[i]);
16+
17+ unescaped_message_actions = g_new0 (gchar *, g_strv_length (message_actions) + 1);
18+ for (i = 0; message_actions[i]; i++)
19+ unescaped_message_actions[i] = unescape_action_name (message_actions[i]);
20+
21 indicator_messages_application_call_dismiss (app->proxy,
22- (const gchar * const *) source_actions,
23- (const gchar * const *) message_actions,
24+ (const gchar * const *) unescaped_source_actions,
25+ (const gchar * const *) unescaped_message_actions,
26 app->cancellable, NULL, NULL);
27+
28+ g_strfreev (unescaped_source_actions);
29+ g_strfreev (unescaped_message_actions);
30 }
31
32 g_strfreev (source_actions);

Subscribers

People subscribed via source and target branches