← Back to team overview

ayatana-commits team mailing list archive

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

 

Ted Gould has proposed merging lp:~ted/indicator-applet/set-environment into lp:indicator-applet.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)

For more details, see:
https://code.launchpad.net/~ted/indicator-applet/set-environment/+merge/54425

Set the environment in the indicator-applet's so that indicators can figure out where they are.
-- 
https://code.launchpad.net/~ted/indicator-applet/set-environment/+merge/54425
Your team ayatana-commits is subscribed to branch lp:indicator-applet.
=== 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:06:44 +0000
@@ -119,6 +119,28 @@
 gchar * hotkey_keycode = "<Super>F1";
 #endif
 
+/********************
+ * Environment Names
+ * *******************/
+#ifdef INDICATOR_APPLET
+#define INDICATOR_SPECIFIC_ENV  "indicator-applet-original"
+#endif
+#ifdef INDICATOR_APPLET_SESSION
+#define INDICATOR_SPECIFIC_ENV  "indicator-applet-session"
+#endif
+#ifdef INDICATOR_APPLET_COMPLETE
+#define INDICATOR_SPECIFIC_ENV  "indicator-applet-complete"
+#endif
+#ifdef INDICATOR_APPLET_APPMENU
+#define INDICATOR_SPECIFIC_ENV  "indicator-applet-appmenu"
+#endif
+
+static const gchar * indicator_env[] = {
+	"indicator-applet",
+	INDICATOR_SPECIFIC_ENV,
+	NULL
+};
+
 /*************
  * init function
  * ***********/
@@ -496,6 +518,9 @@
 	IndicatorObject * io = indicator_object_new_from_file(fullpath);
 	g_free(fullpath);
 
+	/* Set the environment it's in */
+	indicator_object_set_environment(io, (const GStrv)indicator_env);
+
 	/* Attach the 'name' to the object */
 	g_object_set_data(G_OBJECT(io), IO_DATA_ORDER_NUMBER, GINT_TO_POINTER(name2order(name)));
 


Follow ups