[gnome-control-center/wip/input-sources: 5/13] Initial removal of the Layouts tab
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/input-sources: 5/13] Initial removal of the Layouts tab
- Date: Wed, 18 Apr 2012 15:41:17 +0000 (UTC)
commit 1634a47592da35f6dd3f9fb78460a71cb08ce158
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Nov 15 18:19:24 2011 -0500
Initial removal of the Layouts tab
Still to do: system-wide settings for input sources
panels/region/Makefile.am | 8 +-
panels/region/cc-region-panel.c | 2 -
panels/region/gnome-region-panel-system.c | 72 +----
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/gnome-region-panel.ui | 402 +---------------------
10 files changed, 7 insertions(+), 2363 deletions(-)
---
diff --git a/panels/region/Makefile.am b/panels/region/Makefile.am
index f5b3728..b4f6e76 100644
--- a/panels/region/Makefile.am
+++ b/panels/region/Makefile.am
@@ -24,13 +24,7 @@ libregion_la_SOURCES = \
gnome-region-panel-system.c \
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
+ gnome-region-panel-input.h
libregion_la_LIBADD = $(PANEL_LIBS) $(REGION_PANEL_LIBS) $(builddir)/../common/liblanguage.la
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index 714f300..ee2577a 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"
@@ -152,7 +151,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);
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..de1564b 100644
--- a/panels/region/gnome-region-panel-system.c
+++ b/panels/region/gnome-region-panel-system.c
@@ -33,9 +33,10 @@
#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 +132,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)
{
@@ -287,6 +230,7 @@ on_localed_properties_changed (GDBusProxy *proxy,
g_variant_unref (v);
}
+#if 0
label = WID ("system_input_source");
v = g_dbus_proxy_get_cached_property (proxy, "X11Layout");
if (v) {
@@ -313,6 +257,7 @@ on_localed_properties_changed (GDBusProxy *proxy,
g_string_free (disp, TRUE);
g_variant_unref (v);
+#endif
update_copy_button (dialog);
}
@@ -468,11 +413,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 +420,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,
diff --git a/panels/region/gnome-region-panel.ui b/panels/region/gnome-region-panel.ui
index 15987f1..3536a23 100644
--- a/panels/region/gnome-region-panel.ui
+++ b/panels/region/gnome-region-panel.ui
@@ -170,7 +170,6 @@
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="icon_name">list-add-symbolic</property>
</object>
@@ -185,7 +184,6 @@
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="icon_name">list-remove-symbolic</property>
</object>
@@ -208,9 +206,7 @@
<object class="GtkLabel" id="label23">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
- <property name="icon_name">list-add-symbolic</property>
<property name="label" translatable="yes">Add Language</property>
</object>
<packing>
@@ -222,15 +218,10 @@
<child>
<object class="GtkLinkButton" id="linkbutton1">
<property name="label" translatable="yes">Install languages...</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="has_tooltip">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="icon_name">list-remove-symbolic</property>
- <property name="label" translatable="yes">Remove Language</property>
</object>
<packing>
<property name="expand">False</property>
@@ -311,33 +302,6 @@
</object>
</child>
</object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="region-toolbar">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="toolbar_style">icons</property>
- <property name="show_arrow">False</property>
- <property name="icon_size">1</property>
- <style>
- <class name="inline-toolbar"/>
- </style>
- <child>
- <object class="GtkToolButton" id="region_add">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="icon_name">list-add-symbolic</property>
- <property name="label" translatable="yes">Add Region</property>
- </object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
@@ -349,6 +313,7 @@
<property name="toolbar_style">icons</property>
<property name="show_arrow">False</property>
<property name="icon_size">1</property>
+ <property name="visible">True</property>
<style>
<class name="inline-toolbar"/>
</style>
@@ -357,7 +322,6 @@
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="icon_name">list-add-symbolic</property>
</object>
@@ -372,7 +336,6 @@
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="icon_name">list-remove-symbolic</property>
</object>
@@ -633,18 +596,6 @@
<property name="y_padding">3</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
</child>
</object>
@@ -690,351 +641,6 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="spacing">12</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkScrolledWindow" id="xkb_layouts_swindow">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTreeView" id="xkb_layouts_selected">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection1"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolbar" id="layouts-toolbar">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="toolbar_style">icons</property>
- <property name="show_arrow">False</property>
- <property name="icon_size">1</property>
- <style>
- <class name="inline-toolbar"/>
- </style>
- <child>
- <object class="GtkToolButton" id="xkb_layouts_add">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="icon_name">list-add-symbolic</property>
- <property name="label" translatable="yes">Add Layout</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="xkb_layouts_remove">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="icon_name">list-remove-symbolic</property>
- <property name="label" translatable="yes">Remove Layout</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="xkb_layouts_move_up">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="icon_name">go-up-symbolic</property>
- <property name="label" translatable="yes">Move Up</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="xkb_layouts_move_down">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="icon_name">go-down-symbolic</property>
- <property name="label" translatable="yes">Move Down</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="xkb_layouts_show">
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="icon_name">input-keyboard-symbolic</property>
- <property name="label" translatable="yes">Preview Layout</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox33">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vbox34">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkRadioButton" id="chk_same_group">
- <property name="label" translatable="yes">Use the same layout for all windows</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="chk_separate_group_per_window">
- <property name="label" translatable="yes">Allow different layouts for individual windows</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">chk_same_group</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkRadioButton" id="chk_new_windows_default_layout">
- <property name="label" translatable="yes">New windows use the default layout</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="chk_new_windows_inherit_layout">
- <property name="label" translatable="yes">New windows use the previous window's layout</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">chk_new_windows_default_layout</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkHButtonBox" id="hbuttonbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="xkb_layout_options">
- <property name="label" translatable="yes">_Options...</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">View and edit keyboard layout options</property>
- <property name="tooltip_text" translatable="yes">View and edit keyboard layout options</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="xkb_reset_to_defaults">
- <property name="label" translatable="yes">Reset to De_faults</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip_markup" translatable="yes">Replace the current keyboard layout settings with the
-default settings</property>
- <property name="tooltip_text" translatable="yes">Replace the current keyboard layout settings with the
-default settings</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label46">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Layouts</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
<object class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -1096,7 +702,6 @@ default settings</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="icon_name">list-add-symbolic</property>
</object>
@@ -1110,7 +715,6 @@ default settings</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="icon_name">list-remove-symbolic</property>
</object>
@@ -1124,7 +728,6 @@ default settings</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="icon_name">go-up-symbolic</property>
</object>
@@ -1138,7 +741,6 @@ default settings</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="icon_name">go-down-symbolic</property>
</object>
@@ -1152,7 +754,6 @@ default settings</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="icon_name">input-keyboard-symbolic</property>
</object>
@@ -1588,7 +1189,6 @@ default settings</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
</object>
<packing>
<property name="left_attach">1</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]