Merge lp:~3v1n0/indicator-appmenu/per-window-showmenu+leak-fix into lp:indicator-appmenu/15.10

Proposed by Marco Trevisan (Treviño) on 2015-10-01
Status: Merged
Approved by: Andrea Azzarone on 2015-10-01
Approved revision: no longer in the source branch.
Merged at revision: 273
Proposed branch: lp:~3v1n0/indicator-appmenu/per-window-showmenu+leak-fix
Merge into: lp:indicator-appmenu/15.10
Diff against target: 23 lines (+5/-6)
1 file modified
src/indicator-appmenu.c (+5/-6)
To merge this branch: bzr merge lp:~3v1n0/indicator-appmenu/per-window-showmenu+leak-fix
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-10-01
Andrea Azzarone (community) 2015-10-01 Approve on 2015-10-01
Review via email: mp+273105@code.launchpad.net

Commit message

IndicatorAppmenu: only emit snow-now-changed signal for menus belonging to the window that requested

Also fix a memory leak we had (entries list had to be free'd)

To post a comment you must log in.
Andrea Azzarone (azzar1) :
review: Approve
276. By Marco Trevisan (Treviño) on 2015-10-01

IndicatorAppmenu: only emit snow-now-changed signal for menus belonging to the window that requested

Also fix a memory leak we had (entries list had to be free'd)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/indicator-appmenu.c'
2--- src/indicator-appmenu.c 2015-06-01 17:44:58 +0000
3+++ src/indicator-appmenu.c 2015-10-01 17:03:40 +0000
4@@ -1371,14 +1371,13 @@
5 window_status_changed (WindowMenu * mw, DbusmenuStatus status, IndicatorAppmenu * iapp)
6 {
7 gboolean show_now = (status == DBUSMENU_STATUS_NOTICE);
8- GList * entry_head, * entries;
9-
10- entry_head = indicator_object_get_entries(INDICATOR_OBJECT(iapp));
11-
12- for (entries = entry_head; entries != NULL; entries = g_list_next(entries)) {
13- IndicatorObjectEntry * entry = (IndicatorObjectEntry *)entries->data;
14+ GList * l, * window_entries = window_menu_get_entries(mw);
15+
16+ for (l = window_entries; l; l = l->next) {
17+ IndicatorObjectEntry * entry = l->data;
18 g_signal_emit(G_OBJECT(iapp), INDICATOR_OBJECT_SIGNAL_SHOW_NOW_CHANGED_ID, 0, entry, show_now);
19 }
20+ g_list_free (window_entries);
21 }
22
23 /* Pass up the show menu event */

Subscribers

People subscribed via source and target branches