Merge lp:~ted/indicator-appmenu/lp931219 into lp:indicator-appmenu/0.4

Proposed by Ted Gould
Status: Merged
Merged at revision: 159
Proposed branch: lp:~ted/indicator-appmenu/lp931219
Merge into: lp:indicator-appmenu/0.4
Diff against target: 33 lines (+7/-2)
1 file modified
src/indicator-tracker.c (+7/-2)
To merge this branch: bzr merge lp:~ted/indicator-appmenu/lp931219
Reviewer Review Type Date Requested Status
Conor Curran (community) Approve
Review via email: mp+92868@code.launchpad.net

Description of the change

Don't make indicators that are crazy bad :-)

To post a comment you must log in.
lp:~ted/indicator-appmenu/lp931219 updated
158. By Ted Gould

Realizing I can detect a dummy value on position too

Revision history for this message
Conor Curran (cjcurran) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/indicator-tracker.c'
2--- src/indicator-tracker.c 2012-02-06 14:57:19 +0000
3+++ src/indicator-tracker.c 2012-02-13 22:29:18 +0000
4@@ -445,7 +445,7 @@
5 g_variant_iter_init(&iter, array);
6
7 gchar * iconname = NULL;
8- guint position;
9+ guint position = G_MAXUINT;
10 gchar * dbusaddress = NULL;
11 gchar * dbusobject = NULL;
12 gchar * iconpath = NULL;
13@@ -485,7 +485,7 @@
14
15 if (g_strcmp0(signal_name, "ApplicationAdded") == 0) {
16 gchar * iconname = NULL;
17- guint position;
18+ guint position = G_MAXUINT;
19 gchar * dbusaddress = NULL;
20 gchar * dbusobject = NULL;
21 gchar * iconpath = NULL;
22@@ -560,6 +560,11 @@
23 static void
24 app_proxy_new_indicator (IndicatorTracker * self, gint position, const gchar * id, const gchar * title, const gchar * dbusaddress, const gchar * dbusobject, const gchar * iconname)
25 {
26+ g_return_if_fail(position != G_MAXUINT);
27+ g_return_if_fail(id != NULL);
28+ g_return_if_fail(dbusaddress != NULL);
29+ g_return_if_fail(dbusobject != NULL);
30+
31 g_debug("New application indicator: %s", dbusobject);
32
33 AppIndicator indicator = {

Subscribers

People subscribed via source and target branches