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
=== modified file 'src/applet-main.c'
--- src/applet-main.c 2011-02-17 20:51:09 +0000
+++ src/applet-main.c 2011-03-22 21:07:32 +0000
@@ -119,6 +119,28 @@
119gchar * hotkey_keycode = "<Super>F1";119gchar * hotkey_keycode = "<Super>F1";
120#endif120#endif
121121
122/********************
123 * Environment Names
124 * *******************/
125#ifdef INDICATOR_APPLET
126#define INDICATOR_SPECIFIC_ENV "indicator-applet-original"
127#endif
128#ifdef INDICATOR_APPLET_SESSION
129#define INDICATOR_SPECIFIC_ENV "indicator-applet-session"
130#endif
131#ifdef INDICATOR_APPLET_COMPLETE
132#define INDICATOR_SPECIFIC_ENV "indicator-applet-complete"
133#endif
134#ifdef INDICATOR_APPLET_APPMENU
135#define INDICATOR_SPECIFIC_ENV "indicator-applet-appmenu"
136#endif
137
138static const gchar * indicator_env[] = {
139 "indicator-applet",
140 INDICATOR_SPECIFIC_ENV,
141 NULL
142};
143
122/*************144/*************
123 * init function145 * init function
124 * ***********/146 * ***********/
@@ -496,6 +518,9 @@
496 IndicatorObject * io = indicator_object_new_from_file(fullpath);518 IndicatorObject * io = indicator_object_new_from_file(fullpath);
497 g_free(fullpath);519 g_free(fullpath);
498520
521 /* Set the environment it's in */
522 indicator_object_set_environment(io, (const GStrv)indicator_env);
523
499 /* Attach the 'name' to the object */524 /* Attach the 'name' to the object */
500 g_object_set_data(G_OBJECT(io), IO_DATA_ORDER_NUMBER, GINT_TO_POINTER(name2order(name)));525 g_object_set_data(G_OBJECT(io), IO_DATA_ORDER_NUMBER, GINT_TO_POINTER(name2order(name)));
501526

Subscribers

People subscribed via source and target branches

to status/vote changes: