aboutsummaryrefslogtreecommitdiff
path: root/src/menubar.vala
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2023-10-06 12:00:58 +0200
committerMihai Moldovan <ionic@ionic.de>2023-10-06 12:00:58 +0200
commitadfa1f3b9b566127eb0dc5b1f96a8ddf1b4b5693 (patch)
treef98a137122c20ffb08a21150dabb0e6b6f8856b2 /src/menubar.vala
parentcab9f6acc55a464bbc10638d7cb186ab41c918d6 (diff)
parentb96c7558d35f5106b4ea5fed6098e5e3e1f43ddd (diff)
downloadarctica-greeter-adfa1f3b9b566127eb0dc5b1f96a8ddf1b4b5693.tar.gz
arctica-greeter-adfa1f3b9b566127eb0dc5b1f96a8ddf1b4b5693.tar.bz2
arctica-greeter-adfa1f3b9b566127eb0dc5b1f96a8ddf1b4b5693.zip
Merge branch 'sunweaver-mr/greeter-set-env'
Attributes GH PR #81: https://github.com/ArcticaProject/arctica-greeter/pull/81
Diffstat (limited to 'src/menubar.vala')
-rw-r--r--src/menubar.vala37
1 files changed, 5 insertions, 32 deletions
diff --git a/src/menubar.vala b/src/menubar.vala
index b9772fa..6dd802b 100644
--- a/src/menubar.vala
+++ b/src/menubar.vala
@@ -288,33 +288,6 @@ public class MenuBar : Gtk.MenuBar
nat = HEIGHT;
}
- private void greeter_set_env (string key, string val)
- {
- GLib.Environment.set_variable (key, val, true);
-
- /* And also set it in the DBus activation environment so that any
- * indicator services pick it up. */
- try
- {
- var proxy = new GLib.DBusProxy.for_bus_sync (GLib.BusType.SESSION,
- GLib.DBusProxyFlags.NONE, null,
- "org.freedesktop.DBus",
- "/org/freedesktop/DBus",
- "org.freedesktop.DBus",
- null);
-
- var builder = new GLib.VariantBuilder (GLib.VariantType.ARRAY);
- builder.add ("{ss}", key, val);
-
- proxy.call_sync ("UpdateActivationEnvironment", new GLib.Variant ("(a{ss})", builder), GLib.DBusCallFlags.NONE, -1, null);
- }
- catch (Error e)
- {
- warning ("Could not get set environment for indicators: %s", e.message);
- return;
- }
- }
-
private Indicator.Object? load_indicator_file (string indicator_name)
{
string dir = Config.INDICATOR_FILE_DIR;
@@ -386,20 +359,20 @@ public class MenuBar : Gtk.MenuBar
private void setup_indicators ()
{
/* Set indicators to run with reduced functionality */
- greeter_set_env ("INDICATOR_GREETER_MODE", "1");
+ AGUtils.greeter_set_env ("INDICATOR_GREETER_MODE", "1");
/* Don't allow virtual file systems? */
- greeter_set_env ("GIO_USE_VFS", "local");
- greeter_set_env ("GVFS_DISABLE_FUSE", "1");
+ AGUtils.greeter_set_env ("GIO_USE_VFS", "local");
+ AGUtils.greeter_set_env ("GVFS_DISABLE_FUSE", "1");
/* Hint to have mate-settings-daemon run in greeter mode */
- greeter_set_env ("RUNNING_UNDER_GDM", "1");
+ AGUtils.greeter_set_env ("RUNNING_UNDER_GDM", "1");
/* Let indicators know about our unique dbus name */
try
{
var conn = Bus.get_sync (BusType.SESSION);
- greeter_set_env ("ARCTICA_GREETER_DBUS_NAME", conn.get_unique_name ());
+ AGUtils.greeter_set_env ("ARCTICA_GREETER_DBUS_NAME", conn.get_unique_name ());
}
catch (IOError e)
{