[gnome-control-center] region: Removal of the Layouts tab
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] region: Removal of the Layouts tab
- Date: Fri, 1 Jun 2012 18:05:04 +0000 (UTC)
commit 0fb0d6139b373dfd6ef934d86b92aa99edf8b23e
Author: Rui Matos <tiagomatos gmail com>
Date: Wed May 16 23:22:02 2012 +0200
region: Removal of the Layouts tab
https://bugzilla.gnome.org/show_bug.cgi?id=662489
configure.ac | 5 +-
panels/region/Makefile.am | 10 +-
panels/region/cc-region-panel.c | 2 -
panels/region/gnome-region-panel-layout-chooser.ui | 180 -------
panels/region/gnome-region-panel-options-dialog.ui | 79 ---
panels/region/gnome-region-panel-system.c | 103 +----
panels/region/gnome-region-panel-xkb.c | 190 -------
panels/region/gnome-region-panel-xkb.h | 96 ----
panels/region/gnome-region-panel-xkblt.c | 470 ------------------
panels/region/gnome-region-panel-xkbltadd.c | 495 -------------------
panels/region/gnome-region-panel-xkbot.c | 515 --------------------
panels/region/gnome-region-panel-xkbpv.c | 120 -----
panels/region/use_cases.txt | 42 --
13 files changed, 7 insertions(+), 2300 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 309e6b7..0318ae2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,9 +114,8 @@ PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1
PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES colord >= 0.1.8)
PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
-PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES libgnomekbd >= 2.91.91
- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
- libxklavier >= 5.1 libgnomekbdui >= 2.91.91)
+PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES
+ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES)
PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0
libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION
diff --git a/panels/region/Makefile.am b/panels/region/Makefile.am
index f5b3728..da7aaab 100644
--- a/panels/region/Makefile.am
+++ b/panels/region/Makefile.am
@@ -25,12 +25,7 @@ libregion_la_SOURCES = \
gnome-region-panel-system.h \
gnome-region-panel-input.c \
gnome-region-panel-input.h \
- gnome-region-panel-xkb.c \
- gnome-region-panel-xkblt.c \
- gnome-region-panel-xkbltadd.c \
- gnome-region-panel-xkbot.c \
- gnome-region-panel-xkbpv.c \
- gnome-region-panel-xkb.h
+ $(NULL)
libregion_la_LIBADD = $(PANEL_LIBS) $(REGION_PANEL_LIBS) $(builddir)/../common/liblanguage.la
@@ -41,9 +36,8 @@ libregion_la_LDFLAGS = $(PANEL_LDFLAGS)
uidir = $(pkgdatadir)/ui
ui_DATA = \
gnome-region-panel.ui \
- gnome-region-panel-layout-chooser.ui \
gnome-region-panel-input-chooser.ui \
- gnome-region-panel-options-dialog.ui
+ $(NULL)
desktopdir = $(datadir)/applications
Desktop_in_files = gnome-region-panel.desktop.in
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index dbaa455..d67ad48 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -22,7 +22,6 @@
#include "cc-region-panel.h"
#include <gtk/gtk.h>
-#include "gnome-region-panel-xkb.h"
#include "gnome-region-panel-input.h"
#include "gnome-region-panel-lang.h"
#include "gnome-region-panel-formats.h"
@@ -161,7 +160,6 @@ cc_region_panel_init (CcRegionPanel * self)
gtk_widget_reparent (prefs_widget, GTK_WIDGET (self));
- setup_xkb_tabs (priv->builder);
setup_input_tabs (priv->builder, self);
setup_language (priv->builder);
setup_formats (priv->builder);
diff --git a/panels/region/gnome-region-panel-system.c b/panels/region/gnome-region-panel-system.c
index a02ef54..c0941b6 100644
--- a/panels/region/gnome-region-panel-system.c
+++ b/panels/region/gnome-region-panel-system.c
@@ -29,13 +29,13 @@
#include <glib/gi18n.h>
-#include <libgnomekbd/gkbd-keyboard-config.h>
#include "cc-common-language.h"
#include "gdm-languages.h"
#include "gnome-region-panel-system.h"
-#include "gnome-region-panel-xkb.h"
-static GSettings *locale_settings, *xkb_settings;
+#define WID(s) GTK_WIDGET(gtk_builder_get_object (dialog, s))
+
+static GSettings *locale_settings;
static GDBusProxy *localed_proxy;
static GPermission *localed_permission;
@@ -131,64 +131,6 @@ system_update_language (GtkBuilder *dialog, const gchar *language)
}
static void
-xkb_settings_changed (GSettings *settings,
- const gchar *key,
- GtkBuilder *dialog)
-{
- guint i;
- GString *disp, *list, *variants;
- GtkWidget *label;
- gchar **layouts;
-
- layouts = g_settings_get_strv (settings, "layouts");
- if (layouts == NULL)
- return;
-
- label = WID ("user_input_source");
- disp = g_string_new ("");
- list = g_string_new ("");
- variants = g_string_new ("");
-
- for (i = 0; layouts[i]; i++) {
- gchar *utf_visible;
- char **split;
- gchar *layout, *variant;
-
- utf_visible = xkb_layout_description_utf8 (layouts[i]);
- if (disp->str[0] != '\0')
- g_string_append (disp, ", ");
- g_string_append (disp, utf_visible ? utf_visible : layouts[i]);
- g_free (utf_visible);
-
- split = g_strsplit_set (layouts[i], " \t", 2);
-
- if (split == NULL || split[0] == NULL)
- continue;
-
- layout = split[0];
- variant = split[1];
-
- if (list->str[0] != '\0')
- g_string_append (list, ",");
- g_string_append (list, layout);
-
- if (variants->str[0] != '\0')
- g_string_append (variants, ",");
- g_string_append (variants, variant ? variant : "");
-
- g_strfreev (split);
- }
- g_strfreev (layouts);
-
- g_object_set_data_full (G_OBJECT (label), "input_source", g_string_free (list, FALSE), g_free);
- g_object_set_data_full (G_OBJECT (label), "input_variants", g_string_free (variants, FALSE), g_free);
- gtk_label_set_text (GTK_LABEL (label), disp->str);
- g_string_free (disp, TRUE);
-
- update_copy_button (dialog);
-}
-
-static void
update_property (GDBusProxy *proxy,
const char *property)
{
@@ -223,11 +165,6 @@ on_localed_properties_changed (GDBusProxy *proxy,
GtkBuilder *dialog)
{
GVariant *v;
- GtkWidget *label;
- const char *layout;
- char **layouts;
- GString *disp;
- guint i;
if (invalidated_properties != NULL) {
guint i;
@@ -287,33 +224,6 @@ on_localed_properties_changed (GDBusProxy *proxy,
g_variant_unref (v);
}
- label = WID ("system_input_source");
- v = g_dbus_proxy_get_cached_property (proxy, "X11Layout");
- if (v) {
- layout = g_variant_get_string (v, NULL);
- g_object_set_data_full (G_OBJECT (label), "input_source", g_strdup (layout), g_free);
- } else {
- g_object_set_data_full (G_OBJECT (label), "input_source", NULL, g_free);
- update_copy_button (dialog);
- return;
- }
-
- disp = g_string_new ("");
- layouts = g_strsplit (layout, ",", -1);
- for (i = 0; layouts[i]; i++) {
- gchar *utf_visible;
-
- utf_visible = xkb_layout_description_utf8 (layouts[i]);
- if (disp->str[0] != '\0')
- disp = g_string_append (disp, ", ");
- disp = g_string_append (disp, utf_visible ? utf_visible : layouts[i]);
- g_free (utf_visible);
- }
- gtk_label_set_text (GTK_LABEL (label), disp->str);
- g_string_free (disp, TRUE);
-
- g_variant_unref (v);
-
update_copy_button (dialog);
}
@@ -468,11 +378,6 @@ setup_system (GtkBuilder *dialog)
G_CALLBACK (locale_settings_changed), dialog);
g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, locale_settings);
- xkb_settings = g_settings_new (GKBD_KEYBOARD_SCHEMA);
- g_signal_connect (xkb_settings, "changed::layouts",
- G_CALLBACK (xkb_settings_changed), dialog);
- g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, xkb_settings);
-
/* Display user settings */
language = cc_common_language_get_current_language ();
system_update_language (dialog, language);
@@ -480,8 +385,6 @@ setup_system (GtkBuilder *dialog)
locale_settings_changed (locale_settings, "region", dialog);
- xkb_settings_changed (xkb_settings, "layouts", dialog);
-
bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
g_dbus_proxy_new (bus,
G_DBUS_PROXY_FLAGS_NONE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]