Merge lp:~ted/indicator-applet/set-environment into lp:indicator-applet/0.4

Proposed by Ted Gould
Status: Merged
Merged at revision: 383
Proposed branch: lp:~ted/indicator-applet/set-environment
Merge into: lp:indicator-applet/0.4
Diff against target: 41 lines (+25/-0)
1 file modified
src/applet-main.c (+25/-0)
To merge this branch: bzr merge lp:~ted/indicator-applet/set-environment
Reviewer Review Type Date Requested Status
Conor Curran (community) Approve
Review via email: mp+54425@code.launchpad.net

Description of the change

Set the environment in the indicator-applet's so that indicators can figure out where they are.

To post a comment you must log in.
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/applet-main.c'
2--- src/applet-main.c 2011-02-17 20:51:09 +0000
3+++ src/applet-main.c 2011-03-22 21:07:32 +0000
4@@ -119,6 +119,28 @@
5 gchar * hotkey_keycode = "<Super>F1";
6 #endif
7
8+/********************
9+ * Environment Names
10+ * *******************/
11+#ifdef INDICATOR_APPLET
12+#define INDICATOR_SPECIFIC_ENV "indicator-applet-original"
13+#endif
14+#ifdef INDICATOR_APPLET_SESSION
15+#define INDICATOR_SPECIFIC_ENV "indicator-applet-session"
16+#endif
17+#ifdef INDICATOR_APPLET_COMPLETE
18+#define INDICATOR_SPECIFIC_ENV "indicator-applet-complete"
19+#endif
20+#ifdef INDICATOR_APPLET_APPMENU
21+#define INDICATOR_SPECIFIC_ENV "indicator-applet-appmenu"
22+#endif
23+
24+static const gchar * indicator_env[] = {
25+ "indicator-applet",
26+ INDICATOR_SPECIFIC_ENV,
27+ NULL
28+};
29+
30 /*************
31 * init function
32 * ***********/
33@@ -496,6 +518,9 @@
34 IndicatorObject * io = indicator_object_new_from_file(fullpath);
35 g_free(fullpath);
36
37+ /* Set the environment it's in */
38+ indicator_object_set_environment(io, (const GStrv)indicator_env);
39+
40 /* Attach the 'name' to the object */
41 g_object_set_data(G_OBJECT(io), IO_DATA_ORDER_NUMBER, GINT_TO_POINTER(name2order(name)));
42

Subscribers

People subscribed via source and target branches

to status/vote changes: