[gnome-settings-daemon] keyboard: Remove the input source switcher helper



commit 1709bf58a60b76bce77038bb804991447d215f49
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Apr 22 18:01:30 2013 +0200

    keyboard: Remove the input source switcher helper
    
    Mutter and gnome-shell will handle that task going forward.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=700349

 data/gsd-enums.h                                   |   25 -
 ...e.settings-daemon.peripherals.gschema.xml.in.in |    4 -
 plugins/keyboard/Makefile.am                       |   22 -
 plugins/keyboard/gsd-input-sources-switcher.c      |  599 --------------------
 plugins/keyboard/gsd-keyboard-manager.c            |   51 --
 5 files changed, 0 insertions(+), 701 deletions(-)
---
diff --git a/data/gsd-enums.h b/data/gsd-enums.h
index 2c4b27e..b0fabb0 100644
--- a/data/gsd-enums.h
+++ b/data/gsd-enums.h
@@ -124,29 +124,4 @@ typedef enum
   GSD_NUM_LOCK_STATE_OFF
 } GsdNumLockState;
 
-typedef enum
-{
-  GSD_INPUT_SOURCES_SWITCHER_OFF,
-  GSD_INPUT_SOURCES_SWITCHER_SHIFT_L,
-  GSD_INPUT_SOURCES_SWITCHER_ALT_L,
-  GSD_INPUT_SOURCES_SWITCHER_CTRL_L,
-  GSD_INPUT_SOURCES_SWITCHER_SHIFT_R,
-  GSD_INPUT_SOURCES_SWITCHER_ALT_R,
-  GSD_INPUT_SOURCES_SWITCHER_CTRL_R,
-  GSD_INPUT_SOURCES_SWITCHER_ALT_SHIFT_L,
-  GSD_INPUT_SOURCES_SWITCHER_ALT_SHIFT_R,
-  GSD_INPUT_SOURCES_SWITCHER_CTRL_SHIFT_L,
-  GSD_INPUT_SOURCES_SWITCHER_CTRL_SHIFT_R,
-  GSD_INPUT_SOURCES_SWITCHER_SHIFT_L_SHIFT_R,
-  GSD_INPUT_SOURCES_SWITCHER_ALT_L_ALT_R,
-  GSD_INPUT_SOURCES_SWITCHER_CTRL_L_CTRL_R,
-  GSD_INPUT_SOURCES_SWITCHER_ALT_SHIFT,
-  GSD_INPUT_SOURCES_SWITCHER_CTRL_SHIFT,
-  GSD_INPUT_SOURCES_SWITCHER_ALT_CTRL,
-  GSD_INPUT_SOURCES_SWITCHER_CAPS,
-  GSD_INPUT_SOURCES_SWITCHER_SHIFT_CAPS,
-  GSD_INPUT_SOURCES_SWITCHER_ALT_CAPS,
-  GSD_INPUT_SOURCES_SWITCHER_CTRL_CAPS,
-} GsdInputSourcesSwitcher;
-
 #endif /* __gsd_enums_h__ */
diff --git a/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in 
b/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in
index 0b10655..f1d1648 100644
--- a/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.peripherals.gschema.xml.in.in
@@ -106,10 +106,6 @@
       <summary>NumLock state</summary>
       <description>The remembered state of the NumLock LED.</description>
     </key>
-    <key name="input-sources-switcher" enum="org.gnome.settings-daemon.GsdInputSourcesSwitcher">
-      <default>'off'</default>
-      <summary>Modifiers-only input sources switcher shortcut</summary>
-    </key>
   </schema>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.settings-daemon.peripherals.mouse" 
path="/org/gnome/settings-daemon/peripherals/mouse/">
     <key name="locate-pointer" type="b">
diff --git a/plugins/keyboard/Makefile.am b/plugins/keyboard/Makefile.am
index f593120..7addef8 100644
--- a/plugins/keyboard/Makefile.am
+++ b/plugins/keyboard/Makefile.am
@@ -75,28 +75,6 @@ check-local: test-keyboard-ibus-utils
        $(builddir)/test-keyboard-ibus-utils > /dev/null
 endif
 
-libexec_PROGRAMS += gsd-input-sources-switcher
-
-gsd_input_sources_switcher_SOURCES =   \
-       gsd-input-sources-switcher.c    \
-       $(NULL)
-
-gsd_input_sources_switcher_CPPFLAGS =  \
-       -I$(top_srcdir)/data            \
-       -I$(top_srcdir)/plugins/common  \
-       $(AM_CPPFLAGS)                  \
-       $(NULL)
-
-gsd_input_sources_switcher_CFLAGS =    \
-       $(SETTINGS_PLUGIN_CFLAGS)       \
-       $(AM_CFLAGS)                    \
-       $(NULL)
-
-gsd_input_sources_switcher_LDADD  =    \
-       $(top_builddir)/plugins/common/libcommon.la     \
-       $(SETTINGS_PLUGIN_LIBS)         \
-       $(NULL)
-
 EXTRA_DIST =                   \
        $(icons_DATA)           \
        $(plugin_in_files)      \
diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c
index 79f5733..2c52d6f 100644
--- a/plugins/keyboard/gsd-keyboard-manager.c
+++ b/plugins/keyboard/gsd-keyboard-manager.c
@@ -73,8 +73,6 @@
 #define KEY_BELL_DURATION  "bell-duration"
 #define KEY_BELL_MODE      "bell-mode"
 
-#define KEY_SWITCHER "input-sources-switcher"
-
 #define GNOME_DESKTOP_INTERFACE_DIR "org.gnome.desktop.interface"
 
 #define KEY_GTK_IM_MODULE    "gtk-im-module"
@@ -116,9 +114,6 @@ struct GsdKeyboardManagerPrivate
         guint device_added_id;
         guint device_removed_id;
 
-        gboolean input_sources_switcher_spawned;
-        GPid input_sources_switcher_pid;
-
         GDBusConnection *dbus_connection;
         GDBusNodeInfo *dbus_introspection;
         guint dbus_own_name_id;
@@ -1178,47 +1173,6 @@ apply_all_settings (GsdKeyboardManager *manager)
 }
 
 static void
-set_input_sources_switcher (GsdKeyboardManager *manager,
-                            gboolean            state)
-{
-        if (state) {
-                GError *error = NULL;
-                char *args[2];
-
-                if (manager->priv->input_sources_switcher_spawned)
-                        set_input_sources_switcher (manager, FALSE);
-
-                args[0] = LIBEXECDIR "/gsd-input-sources-switcher";
-                args[1] = NULL;
-
-                g_spawn_async (NULL, args, NULL,
-                               0, NULL, NULL,
-                               &manager->priv->input_sources_switcher_pid, &error);
-
-                manager->priv->input_sources_switcher_spawned = (error == NULL);
-
-                if (error) {
-                        g_warning ("Couldn't spawn %s: %s", args[0], error->message);
-                        g_error_free (error);
-                }
-        } else if (manager->priv->input_sources_switcher_spawned) {
-                kill (manager->priv->input_sources_switcher_pid, SIGHUP);
-                g_spawn_close_pid (manager->priv->input_sources_switcher_pid);
-                manager->priv->input_sources_switcher_spawned = FALSE;
-        }
-}
-
-static gboolean
-enable_switcher (GsdKeyboardManager *manager)
-{
-        GsdInputSourcesSwitcher switcher;
-
-        switcher = g_settings_get_enum (manager->priv->settings, KEY_SWITCHER);
-
-        return switcher != GSD_INPUT_SOURCES_SWITCHER_OFF;
-}
-
-static void
 settings_changed (GSettings          *settings,
                   const char         *key,
                   GsdKeyboardManager *manager)
@@ -1240,8 +1194,6 @@ settings_changed (GSettings          *settings,
                 g_strcmp0 (key, KEY_DELAY) == 0) {
                g_debug ("Key repeat setting '%s' changed, applying key repeat settings", key);
                apply_repeat (manager);
-        } else if (g_strcmp0 (key, KEY_SWITCHER) == 0) {
-                set_input_sources_switcher (manager, enable_switcher (manager));
        } else {
                g_warning ("Unhandled settings change, key '%s'", key);
        }
@@ -1745,7 +1697,6 @@ start_keyboard_idle_cb (GsdKeyboardManager *manager)
                           G_CALLBACK (apply_input_sources_settings), manager);
 
        install_xkb_filter (manager);
-        set_input_sources_switcher (manager, enable_switcher (manager));
         register_manager_dbus (manager);
 
         gnome_settings_profile_end (NULL);
@@ -1812,8 +1763,6 @@ gsd_keyboard_manager_stop (GsdKeyboardManager *manager)
 
        remove_xkb_filter (manager);
 
-        set_input_sources_switcher (manager, FALSE);
-
         g_clear_pointer (&p->invocation, set_input_source_return);
         g_clear_pointer (&p->dbus_introspection, g_dbus_node_info_unref);
         g_clear_object (&p->dbus_connection);


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