148
148
options_menu = new Gtk.Menu ();
153
async void setup_indicators ()
155
/* Set env var that will tell indicators to reduce functionality *.
156
GLib.Environment.set_variable ("INDICATOR_GREETER_MODE", "1", true);
158
/* And also set it in the DBus activation environment so that any
159
* indicator services pick it up. */
162
var proxy = new GLib.DBusProxy.for_bus_sync (GLib.BusType.SESSION,
163
GLib.DBusProxyFlags.NONE, null,
164
"org.freedesktop.DBus",
165
"/org/freedesktop/DBus",
166
"org.freedesktop.DBus",
169
var builder = new GLib.VariantBuilder (GLib.VariantType.ARRAY);
170
builder.add ("{ss}", "INDICATOR_GREETER_MODE", "1");
172
yield proxy.call ("UpdateActivationEnvironment",
173
new GLib.Variant ("(a{ss})", builder),
174
GLib.DBusCallFlags.NONE, -1, null);
178
warning ("Could not get set environment for indicators: %s", e.message);
150
182
load_indicator ("/usr/lib/indicators3/6/libsession.so");
151
183
load_indicator ("/usr/lib/indicators3/6/libdatetime.so");
152
184
load_indicator ("/usr/lib/indicators3/6/libpower.so");