[gnome-settings-daemon] keyboard: Remove shell detection code



commit c15b16dc28600acf99954f9b8e48ea513e7e15f8
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jan 28 01:38:15 2011 +0000

    keyboard: Remove shell detection code
    
    It wouldn't have worked anyway if gnome-shell wasn't already running
    (such as on session startup where gnome-settings-daemon is started
    before gnome-shell is, or at the same time).
    
    Those icons should be blacklisted by the shell anyway.

 plugins/keyboard/gsd-keyboard-xkb.c |   38 -----------------------------------
 1 files changed, 0 insertions(+), 38 deletions(-)
---
diff --git a/plugins/keyboard/gsd-keyboard-xkb.c b/plugins/keyboard/gsd-keyboard-xkb.c
index 1f6c491..55f834b 100644
--- a/plugins/keyboard/gsd-keyboard-xkb.c
+++ b/plugins/keyboard/gsd-keyboard-xkb.c
@@ -127,39 +127,6 @@ activation_error (void)
 	gsd_delayed_show_dialog (dialog);
 }
 
-static gboolean
-is_gnome_shell_env ()
-{
-	gboolean retval = FALSE;
-
-	GDBusConnection *bus =
-	    g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
-	if (bus != NULL) {
-		GVariant *result;
-		result = g_dbus_connection_call_sync (bus,
-						      "org.freedesktop.DBus",
-						      "/org/freedesktop/DBus",
-						      "org.freedesktop.DBus",
-						      "GetNameOwner",
-						      g_variant_new ("(s)",
-								     "org.gnome.Shell"),
-						      G_VARIANT_TYPE
-						      ("(s)"),
-						      G_DBUS_CALL_FLAGS_NONE,
-						      -1, NULL, NULL);
-		if (result != NULL) {
-			xkl_debug (20, "GNOME Shell is running\n");
-			retval = TRUE;
-			g_variant_unref (result);
-		} else {
-			xkl_debug (20, "GNOME Shell isn't running\n");
-			retval = FALSE;
-		}
-		g_object_unref (bus);
-	}
-	return retval;
-}
-
 static void
 apply_desktop_settings (void)
 {
@@ -174,11 +141,6 @@ apply_desktop_settings (void)
 	   before activating them */
 	gkbd_desktop_config_activate (&current_config);
 
-	if (is_gnome_shell_env ()) {
-		xkl_debug (150, "Do not show kbd LEDs while running in gnome-shell session\n");
-		return;
-	}
-
 	show_leds =
 	    g_settings_get_boolean (settings_plugin,
 				    SHOW_KEYBOARD_LEDS_INDICATOR_KEY);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]