summaryrefslogtreecommitdiff
path: root/daemon/gdm-session-settings.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2011-01-31 18:38:28 -0500
committerRay Strode <rstrode@redhat.com>2011-01-31 18:40:51 -0500
commite280e791585ec1859143806519db2e312aa88051 (patch)
tree5562368a8a28df276a73737eaecb222f84c38412 /daemon/gdm-session-settings.c
parent28f0cef5d8623245c1bc40eaaed4bae7bb57348d (diff)
downloadgdm-e280e791585ec1859143806519db2e312aa88051.tar.gz
daemon,greeter: drop support for keyboard layout selection
It's no longer exposed in the UI, and it never really worked well, so drop it for now.
Diffstat (limited to 'daemon/gdm-session-settings.c')
-rw-r--r--daemon/gdm-session-settings.c59
1 files changed, 1 insertions, 58 deletions
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
index 421d87ad..7115acdd 100644
--- a/daemon/gdm-session-settings.c
+++ b/daemon/gdm-session-settings.c
@@ -36,7 +36,6 @@ struct _GdmSessionSettingsPrivate
{
char *session_name;
char *language_name;
- char *layout_name;
};
static void gdm_session_settings_finalize (GObject *object);
@@ -56,7 +55,6 @@ enum {
PROP_0 = 0,
PROP_SESSION_NAME,
PROP_LANGUAGE_NAME,
- PROP_LAYOUT_NAME,
};
G_DEFINE_TYPE (GdmSessionSettings, gdm_session_settings, G_TYPE_OBJECT)
@@ -95,11 +93,6 @@ gdm_session_settings_class_install_properties (GdmSessionSettingsClass *settings
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (object_class, PROP_LANGUAGE_NAME, param_spec);
- param_spec = g_param_spec_string ("layout-name", "Keyboard Layout Name",
- "The name of the keyboard layout",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
- g_object_class_install_property (object_class, PROP_LAYOUT_NAME, param_spec);
}
static void
@@ -121,7 +114,6 @@ gdm_session_settings_finalize (GObject *object)
g_free (settings->priv->session_name);
g_free (settings->priv->language_name);
- g_free (settings->priv->layout_name);
parent_class = G_OBJECT_CLASS (gdm_session_settings_parent_class);
@@ -144,19 +136,6 @@ gdm_session_settings_set_language_name (GdmSessionSettings *settings,
}
void
-gdm_session_settings_set_layout_name (GdmSessionSettings *settings,
- const char *layout_name)
-{
- g_return_if_fail (GDM_IS_SESSION_SETTINGS (settings));
-
- if (settings->priv->layout_name == NULL ||
- strcmp (settings->priv->layout_name, layout_name) != 0) {
- settings->priv->layout_name = g_strdup (layout_name);
- g_object_notify (G_OBJECT (settings), "layout-name");
- }
-}
-
-void
gdm_session_settings_set_session_name (GdmSessionSettings *settings,
const char *session_name)
{
@@ -177,13 +156,6 @@ gdm_session_settings_get_language_name (GdmSessionSettings *settings)
}
char *
-gdm_session_settings_get_layout_name (GdmSessionSettings *settings)
-{
- g_return_val_if_fail (GDM_IS_SESSION_SETTINGS (settings), NULL);
- return g_strdup (settings->priv->layout_name);
-}
-
-char *
gdm_session_settings_get_session_name (GdmSessionSettings *settings)
{
g_return_val_if_fail (GDM_IS_SESSION_SETTINGS (settings), NULL);
@@ -205,10 +177,6 @@ gdm_session_settings_set_property (GObject *object,
gdm_session_settings_set_language_name (settings, g_value_get_string (value));
break;
- case PROP_LAYOUT_NAME:
- gdm_session_settings_set_layout_name (settings, g_value_get_string (value));
- break;
-
case PROP_SESSION_NAME:
gdm_session_settings_set_session_name (settings, g_value_get_string (value));
break;
@@ -237,10 +205,6 @@ gdm_session_settings_get_property (GObject *object,
g_value_set_string (value, settings->priv->language_name);
break;
- case PROP_LAYOUT_NAME:
- g_value_set_string (value, settings->priv->layout_name);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -261,8 +225,7 @@ gboolean
gdm_session_settings_is_loaded (GdmSessionSettings *settings)
{
return settings->priv->session_name != NULL ||
- settings->priv->language_name != NULL ||
- settings->priv->layout_name != NULL;
+ settings->priv->language_name != NULL;
}
gboolean
@@ -275,7 +238,6 @@ gdm_session_settings_load (GdmSessionSettings *settings,
gboolean is_loaded;
char *session_name;
char *language_name;
- char *layout_name;
char *filename;
g_return_val_if_fail (settings != NULL, FALSE);
@@ -322,20 +284,6 @@ gdm_session_settings_load (GdmSessionSettings *settings,
goto out;
}
- layout_name = g_key_file_get_string (key_file, "Desktop", "Layout",
- &load_error);
-
- if (layout_name != NULL) {
- gdm_session_settings_set_layout_name (settings, layout_name);
- g_free (layout_name);
- } else if (g_error_matches (load_error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND)) {
- g_error_free (load_error);
- load_error = NULL;
- } else {
- g_propagate_error (error, load_error);
- goto out;
- }
-
is_loaded = TRUE;
out:
g_key_file_free (key_file);
@@ -380,11 +328,6 @@ gdm_session_settings_save (GdmSessionSettings *settings,
settings->priv->language_name);
}
- if (settings->priv->layout_name != NULL) {
- g_key_file_set_string (key_file, "Desktop", "Layout",
- settings->priv->layout_name);
- }
-
contents = g_key_file_to_data (key_file, &length, &file_error);
if (contents == NULL) {