[gnome-control-center] Move input sources from region panel to keyboard panel
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Move input sources from region panel to keyboard panel
- Date: Sat, 19 Dec 2020 09:48:34 +0000 (UTC)
commit 8996ffac88ae104781ccd3e5e842027ffeccc8a5
Author: Ian Douglas Scott <idscott system76 com>
Date: Fri Jul 24 09:06:36 2020 -0700
Move input sources from region panel to keyboard panel
panels/{region => keyboard}/cc-ibus-utils.c | 0
panels/{region => keyboard}/cc-ibus-utils.h | 0
panels/{region => keyboard}/cc-input-chooser.c | 2 +-
panels/{region => keyboard}/cc-input-chooser.h | 0
panels/{region => keyboard}/cc-input-chooser.ui | 0
panels/{region => keyboard}/cc-input-list-box.c | 2 +-
panels/{region => keyboard}/cc-input-list-box.h | 0
panels/{region => keyboard}/cc-input-list-box.ui | 0
panels/{region => keyboard}/cc-input-row.c | 2 +-
panels/{region => keyboard}/cc-input-row.h | 0
panels/{region => keyboard}/cc-input-row.ui | 0
panels/{region => keyboard}/cc-input-source-ibus.c | 0
panels/{region => keyboard}/cc-input-source-ibus.h | 0
panels/{region => keyboard}/cc-input-source-xkb.c | 0
panels/{region => keyboard}/cc-input-source-xkb.h | 0
panels/{region => keyboard}/cc-input-source.c | 0
panels/{region => keyboard}/cc-input-source.h | 0
panels/keyboard/cc-keyboard-panel.c | 43 +++-
panels/keyboard/cc-keyboard-panel.ui | 97 +++++++
panels/keyboard/keyboard.gresource.xml | 3 +
panels/keyboard/meson.build | 14 +-
panels/region/cc-region-panel.c | 124 +--------
panels/region/cc-region-panel.ui | 283 +--------------------
panels/region/meson.build | 8 -
panels/region/region.gresource.xml | 3 -
25 files changed, 160 insertions(+), 421 deletions(-)
---
diff --git a/panels/region/cc-ibus-utils.c b/panels/keyboard/cc-ibus-utils.c
similarity index 100%
rename from panels/region/cc-ibus-utils.c
rename to panels/keyboard/cc-ibus-utils.c
diff --git a/panels/region/cc-ibus-utils.h b/panels/keyboard/cc-ibus-utils.h
similarity index 100%
rename from panels/region/cc-ibus-utils.h
rename to panels/keyboard/cc-ibus-utils.h
diff --git a/panels/region/cc-input-chooser.c b/panels/keyboard/cc-input-chooser.c
similarity index 99%
rename from panels/region/cc-input-chooser.c
rename to panels/keyboard/cc-input-chooser.c
index 7ad59fd0b..f9aaff69a 100644
--- a/panels/region/cc-input-chooser.c
+++ b/panels/keyboard/cc-input-chooser.c
@@ -1016,7 +1016,7 @@ cc_input_chooser_class_init (CcInputChooserClass *klass)
object_class->dispose = cc_input_chooser_dispose;
- gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/region/cc-input-chooser.ui");
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/keyboard/cc-input-chooser.ui");
gtk_widget_class_bind_template_child (widget_class, CcInputChooser, add_button);
gtk_widget_class_bind_template_child (widget_class, CcInputChooser, filter_entry);
diff --git a/panels/region/cc-input-chooser.h b/panels/keyboard/cc-input-chooser.h
similarity index 100%
rename from panels/region/cc-input-chooser.h
rename to panels/keyboard/cc-input-chooser.h
diff --git a/panels/region/cc-input-chooser.ui b/panels/keyboard/cc-input-chooser.ui
similarity index 100%
rename from panels/region/cc-input-chooser.ui
rename to panels/keyboard/cc-input-chooser.ui
diff --git a/panels/region/cc-input-list-box.c b/panels/keyboard/cc-input-list-box.c
similarity index 99%
rename from panels/region/cc-input-list-box.c
rename to panels/keyboard/cc-input-list-box.c
index d42ad48e1..6c2cb5614 100644
--- a/panels/region/cc-input-list-box.c
+++ b/panels/keyboard/cc-input-list-box.c
@@ -723,7 +723,7 @@ cc_input_list_box_class_init (CcInputListBoxClass *klass)
object_class->finalize = cc_input_list_box_finalize;
- gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/region/cc-input-list-box.ui");
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/keyboard/cc-input-list-box.ui");
gtk_widget_class_bind_template_child (widget_class, CcInputListBox, add_input_row);
gtk_widget_class_bind_template_child (widget_class, CcInputListBox, input_size_group);
diff --git a/panels/region/cc-input-list-box.h b/panels/keyboard/cc-input-list-box.h
similarity index 100%
rename from panels/region/cc-input-list-box.h
rename to panels/keyboard/cc-input-list-box.h
diff --git a/panels/region/cc-input-list-box.ui b/panels/keyboard/cc-input-list-box.ui
similarity index 100%
rename from panels/region/cc-input-list-box.ui
rename to panels/keyboard/cc-input-list-box.ui
diff --git a/panels/region/cc-input-row.c b/panels/keyboard/cc-input-row.c
similarity index 99%
rename from panels/region/cc-input-row.c
rename to panels/keyboard/cc-input-row.c
index bc38d9bef..1748a6b09 100644
--- a/panels/region/cc-input-row.c
+++ b/panels/keyboard/cc-input-row.c
@@ -189,7 +189,7 @@ cc_input_row_class_init (CcInputRowClass *klass)
object_class->dispose = cc_input_row_dispose;
- gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/region/cc-input-row.ui");
+ gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/keyboard/cc-input-row.ui");
gtk_widget_class_bind_template_child (widget_class, CcInputRow, drag_handle);
gtk_widget_class_bind_template_child (widget_class, CcInputRow, name_label);
diff --git a/panels/region/cc-input-row.h b/panels/keyboard/cc-input-row.h
similarity index 100%
rename from panels/region/cc-input-row.h
rename to panels/keyboard/cc-input-row.h
diff --git a/panels/region/cc-input-row.ui b/panels/keyboard/cc-input-row.ui
similarity index 100%
rename from panels/region/cc-input-row.ui
rename to panels/keyboard/cc-input-row.ui
diff --git a/panels/region/cc-input-source-ibus.c b/panels/keyboard/cc-input-source-ibus.c
similarity index 100%
rename from panels/region/cc-input-source-ibus.c
rename to panels/keyboard/cc-input-source-ibus.c
diff --git a/panels/region/cc-input-source-ibus.h b/panels/keyboard/cc-input-source-ibus.h
similarity index 100%
rename from panels/region/cc-input-source-ibus.h
rename to panels/keyboard/cc-input-source-ibus.h
diff --git a/panels/region/cc-input-source-xkb.c b/panels/keyboard/cc-input-source-xkb.c
similarity index 100%
rename from panels/region/cc-input-source-xkb.c
rename to panels/keyboard/cc-input-source-xkb.c
diff --git a/panels/region/cc-input-source-xkb.h b/panels/keyboard/cc-input-source-xkb.h
similarity index 100%
rename from panels/region/cc-input-source-xkb.h
rename to panels/keyboard/cc-input-source-xkb.h
diff --git a/panels/region/cc-input-source.c b/panels/keyboard/cc-input-source.c
similarity index 100%
rename from panels/region/cc-input-source.c
rename to panels/keyboard/cc-input-source.c
diff --git a/panels/region/cc-input-source.h b/panels/keyboard/cc-input-source.h
similarity index 100%
rename from panels/region/cc-input-source.h
rename to panels/keyboard/cc-input-source.h
diff --git a/panels/keyboard/cc-keyboard-panel.c b/panels/keyboard/cc-keyboard-panel.c
index ffbb93994..a2bb99b1c 100644
--- a/panels/keyboard/cc-keyboard-panel.c
+++ b/panels/keyboard/cc-keyboard-panel.c
@@ -29,6 +29,7 @@
#include "cc-keyboard-panel.h"
#include "cc-keyboard-resources.h"
#include "cc-keyboard-shortcut-dialog.h"
+#include "cc-input-list-box.h"
#include "cc-xkb-modifier-dialog.h"
#include "keyboard-shortcuts.h"
@@ -38,6 +39,11 @@ struct _CcKeyboardPanel
{
CcPanel parent_instance;
+ GtkListBox *input_source_list;
+
+ GtkRadioButton *per_window_source;
+ GtkRadioButton *same_source;
+
/* "Type Special Characters" section */
CcXkbModifierDialog *alt_chars_dialog;
CcXkbModifierDialog *compose_dialog;
@@ -95,6 +101,14 @@ static const XkbModifier COMPOSE_MODIFIER = {
NULL,
};
+static const gchar *custom_css =
+".keyboard-panel-radio-button {"
+" padding-left: 6px;"
+" padding-right: 12px;"
+" padding-top: 12px;"
+" padding-bottom: 12px;"
+"}";
+
static void
special_chars_activated (GtkWidget *button,
GtkListBoxRow *row,
@@ -179,8 +193,14 @@ cc_keyboard_panel_class_init (CcKeyboardPanelClass *klass)
g_object_class_override_property (object_class, PROP_PARAMETERS, "parameters");
+ // TODO better way?
+ CC_TYPE_INPUT_LIST_BOX;
+
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/keyboard/cc-keyboard-panel.ui");
+ gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, input_source_list);
+ gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, per_window_source);
+ gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, same_source);
gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, special_chars_list);
gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, alt_chars_row);
gtk_widget_class_bind_template_child (widget_class, CcKeyboardPanel, compose_row);
@@ -195,14 +215,35 @@ cc_keyboard_panel_class_init (CcKeyboardPanelClass *klass)
static void
cc_keyboard_panel_init (CcKeyboardPanel *self)
{
+ GtkCssProvider *provider;
+
g_resources_register (cc_keyboard_get_resource ());
gtk_widget_init_template (GTK_WIDGET (self));
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_data (provider, custom_css, -1, NULL);
+
+ gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 1);
+ g_object_unref (provider);
+
+ gtk_list_box_set_header_func (self->input_source_list, cc_list_box_update_header_func, NULL, NULL);
gtk_list_box_set_header_func (self->special_chars_list, cc_list_box_update_header_func, NULL, NULL);
- /* "Type Special Characters" section */
self->input_source_settings = g_settings_new ("org.gnome.desktop.input-sources");
+
+ /* "Input Source Switching" section */
+ g_settings_bind (self->input_source_settings, "per-window",
+ self->per_window_source, "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (self->input_source_settings, "per-window",
+ self->same_source, "active",
+ G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_INVERT_BOOLEAN);
+
+
+ /* "Type Special Characters" section */
g_settings_bind_with_mapping (self->input_source_settings,
"xkb-options",
self->value_alternate_chars,
diff --git a/panels/keyboard/cc-keyboard-panel.ui b/panels/keyboard/cc-keyboard-panel.ui
index 93360a97b..b21c5fa8b 100644
--- a/panels/keyboard/cc-keyboard-panel.ui
+++ b/panels/keyboard/cc-keyboard-panel.ui
@@ -38,6 +38,103 @@
<property name="margin_right">18</property>
<property name="spacing">12</property>
<property name="halign">center</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Input Sources</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="CcInputListBox" id="input_list">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Input Source Switching</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ <child>
+ <object class="GtkFrame">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkListBox" id="input_source_list">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkRadioButton" id="same_source">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <style>
+ <class name="keyboard-panel-radio-button" />
+ </style>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="margin_left">6</property>
+ <property name="use_underline">True</property>
+ <property name="label" translatable="yes">Use the _same source for all
windows</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkListBoxRow">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkRadioButton" id="per_window_source">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">same_source</property>
+ <style>
+ <class name="keyboard-panel-radio-button" />
+ </style>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="margin_left">6</property>
+ <property name="use_underline">True</property>
+ <property name="label" translatable="yes">Allow _different sources for
each window</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
diff --git a/panels/keyboard/keyboard.gresource.xml b/panels/keyboard/keyboard.gresource.xml
index 14c05d8a1..a310f0500 100644
--- a/panels/keyboard/keyboard.gresource.xml
+++ b/panels/keyboard/keyboard.gresource.xml
@@ -7,5 +7,8 @@
<file preprocess="xml-stripblanks">cc-keyboard-shortcut-dialog.ui</file>
<file preprocess="xml-stripblanks">cc-keyboard-panel.ui</file>
<file preprocess="xml-stripblanks">cc-keyboard-shortcut-editor.ui</file>
+ <file preprocess="xml-stripblanks">cc-input-chooser.ui</file>
+ <file preprocess="xml-stripblanks">cc-input-row.ui</file>
+ <file preprocess="xml-stripblanks">cc-input-list-box.ui</file>
</gresource>
</gresources>
diff --git a/panels/keyboard/meson.build b/panels/keyboard/meson.build
index 8055becf9..a2ae0263d 100644
--- a/panels/keyboard/meson.build
+++ b/panels/keyboard/meson.build
@@ -64,13 +64,21 @@ sources = files(
'cc-keyboard-manager.c',
'cc-keyboard-shortcut-editor.c',
'wm-common.c',
- 'keyboard-shortcuts.c'
+ 'keyboard-shortcuts.c',
+ 'cc-ibus-utils.c',
+ 'cc-input-chooser.c',
+ 'cc-input-row.c',
+ 'cc-input-source.c',
+ 'cc-input-source-ibus.c',
+ 'cc-input-list-box.c',
+ 'cc-input-source-xkb.c',
)
resource_data = files(
'enter-keyboard-shortcut.svg',
'cc-keyboard-panel.ui',
'cc-keyboard-shortcut-editor.ui',
+ 'cc-input-chooser.ui',
)
sources += gnome.compile_resources(
@@ -86,6 +94,10 @@ deps = common_deps + [
x11_dep
]
+if enable_ibus
+ deps += ibus_dep
+endif
+
panels_libs += static_library(
cappletname,
sources: sources,
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index 1049228a6..7526183c4 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -32,7 +32,6 @@
#include "cc-region-resources.h"
#include "cc-language-chooser.h"
#include "cc-format-chooser.h"
-#include "cc-input-list-box.h"
#include "cc-common-language.h"
@@ -42,7 +41,6 @@
#include <act/act.h>
-#define GNOME_DESKTOP_INPUT_SOURCES_DIR "org.gnome.desktop.input-sources"
#define GNOME_SYSTEM_LOCALE_DIR "org.gnome.system.locale"
#define KEY_REGION "region"
@@ -51,11 +49,8 @@
struct _CcRegionPanel {
CcPanel parent_instance;
- GtkLabel *alt_next_source;
GtkLabel *formats_label;
GtkListBoxRow *formats_row;
- CcInputListBox *input_list;
- GtkBox *input_section_box;
GtkSizeGroup *input_size_group;
GtkToggleButton *login_button;
GtkLabel *login_label;
@@ -63,15 +58,8 @@ struct _CcRegionPanel {
GtkListBox *language_list;
GtkListBoxRow *language_row;
GtkFrame *language_section_frame;
- GtkLabel *next_source;
- GtkLabel *next_source_label;
- GtkButton *options_button;
- GtkRadioButton *per_window_source;
- GtkLabel *previous_source;
- GtkLabel *previous_source_label;
GtkButton *restart_button;
GtkRevealer *restart_revealer;
- GtkRadioButton *same_source;
gboolean login;
gboolean login_auto_apply;
@@ -575,96 +563,6 @@ setup_language_section (CcRegionPanel *self)
update_region_from_setting (self);
}
-static void
-update_shortcut_label (GtkLabel *label,
- const gchar *value)
-{
- g_autofree gchar *text = NULL;
- guint accel_key;
- g_autofree guint *keycode = NULL;
- GdkModifierType mods;
-
- if (value == NULL || *value == '\0') {
- gtk_widget_hide (GTK_WIDGET (label));
- return;
- }
-
- gtk_accelerator_parse_with_keycode (value, &accel_key, &keycode, &mods);
- if (accel_key == 0 && keycode == NULL && mods == 0) {
- g_warning ("Failed to parse keyboard shortcut: '%s'", value);
- gtk_widget_hide (GTK_WIDGET (label));
- return;
- }
-
- text = gtk_accelerator_get_label_with_keycode (gtk_widget_get_display (GTK_WIDGET (label)),
accel_key, *keycode, mods);
- gtk_label_set_text (label, text);
-}
-
-static void
-update_shortcuts (CcRegionPanel *self)
-{
- g_auto(GStrv) previous = NULL;
- g_auto(GStrv) next = NULL;
- g_autofree gchar *previous_shortcut = NULL;
- g_autoptr(GSettings) settings = NULL;
-
- settings = g_settings_new ("org.gnome.desktop.wm.keybindings");
-
- previous = g_settings_get_strv (settings, "switch-input-source-backward");
- next = g_settings_get_strv (settings, "switch-input-source");
-
- previous_shortcut = g_strdup (previous[0]);
-
- update_shortcut_label (self->previous_source, previous_shortcut);
- update_shortcut_label (self->next_source, next[0]);
-}
-
-static void
-update_modifiers_shortcut (CcRegionPanel *self)
-{
- g_auto(GStrv) options = NULL;
- gchar **p;
- g_autoptr(GSettings) settings = NULL;
- g_autoptr(GnomeXkbInfo) xkb_info = NULL;
- const gchar *text;
-
- xkb_info = gnome_xkb_info_new ();
- settings = g_settings_new ("org.gnome.desktop.input-sources");
- options = g_settings_get_strv (settings, "xkb-options");
-
- for (p = options; p && *p; ++p)
- if (g_str_has_prefix (*p, "grp:"))
- break;
-
- if (p && *p) {
- text = gnome_xkb_info_description_for_option (xkb_info, "grp", *p);
- gtk_label_set_text (self->alt_next_source, text);
- } else {
- gtk_widget_hide (GTK_WIDGET (self->alt_next_source));
- }
-}
-
-static void
-setup_input_shortcuts (CcRegionPanel *self)
-{
- GSettings *input_settings = g_settings_new (GNOME_DESKTOP_INPUT_SOURCES_DIR);
-
- g_object_bind_property (self->previous_source, "visible",
- self->previous_source_label, "visible",
- G_BINDING_DEFAULT);
- g_object_bind_property (self->next_source, "visible",
- self->next_source_label, "visible",
- G_BINDING_DEFAULT);
-
- g_settings_bind (input_settings, "per-window",
- self->per_window_source, "active",
- G_SETTINGS_BIND_DEFAULT);
- g_settings_bind (input_settings, "per-window",
- self->same_source, "active",
- G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_INVERT_BOOLEAN);
-
-}
-
static void
on_localed_properties_changed (CcRegionPanel *self,
GVariant *changed_properties,
@@ -758,7 +656,6 @@ localed_proxy_ready (GObject *source,
}
self->localed = proxy;
- cc_input_list_box_set_localed (self->input_list, self->localed);
gtk_widget_set_sensitive (GTK_WIDGET (self->login_button), TRUE);
@@ -780,7 +677,6 @@ login_changed (CcRegionPanel *self)
g_permission_get_can_acquire (self->permission));
/* FIXME: insensitive doesn't look quite right for this */
gtk_widget_set_sensitive (GTK_WIDGET (self->language_section_frame), !self->login || can_acquire);
- gtk_widget_set_sensitive (GTK_WIDGET (self->input_section_box), !self->login || can_acquire);
update_language_label (self);
}
@@ -798,7 +694,6 @@ set_login_button_visibility (CcRegionPanel *self)
g_object_get (self->user_manager, "has-multiple-users", &has_multiple_users, NULL);
self->login_auto_apply = !has_multiple_users && g_permission_get_allowed (self->permission);
- cc_input_list_box_set_login_auto_apply (self->input_list, self->login_auto_apply);
gtk_widget_set_visible (GTK_WIDGET (self->login_button), !self->login_auto_apply);
g_signal_handlers_disconnect_by_func (self->user_manager, set_login_button_visibility, self);
@@ -817,7 +712,6 @@ setup_login_button (CcRegionPanel *self)
error->message);
return;
}
- cc_input_list_box_set_permission (self->input_list, self->permission);
bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL);
g_dbus_proxy_new (bus,
@@ -879,30 +773,17 @@ cc_region_panel_class_init (CcRegionPanelClass * klass)
object_class->constructed = cc_region_panel_constructed;
object_class->finalize = cc_region_panel_finalize;
- // TODO better way?
- CC_TYPE_INPUT_LIST_BOX;
-
gtk_widget_class_set_template_from_resource (widget_class,
"/org/gnome/control-center/region/cc-region-panel.ui");
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, alt_next_source);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, formats_label);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, formats_row);
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, input_list);
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, input_section_box);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, login_label);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, language_label);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, language_list);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, language_row);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, language_section_frame);
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, next_source);
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, next_source_label);
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, options_button);
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, per_window_source);
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, previous_source);
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, previous_source_label);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, restart_button);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, restart_revealer);
- gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, same_source);
gtk_widget_class_bind_template_callback (widget_class, restart_now);
}
@@ -930,11 +811,8 @@ cc_region_panel_init (CcRegionPanel *self)
setup_login_button (self);
setup_language_section (self);
- setup_input_shortcuts (self);
- update_shortcuts (self);
- update_modifiers_shortcut (self);
needs_restart_file = get_needs_restart_file ();
if (g_file_query_exists (needs_restart_file, NULL))
set_restart_notification_visible (self, NULL, TRUE);
-}
\ No newline at end of file
+}
diff --git a/panels/region/cc-region-panel.ui b/panels/region/cc-region-panel.ui
index d7c70aa7c..801f5357c 100644
--- a/panels/region/cc-region-panel.ui
+++ b/panels/region/cc-region-panel.ui
@@ -167,90 +167,6 @@
</child>
</object>
</child>
- <child>
- <object class="GtkBox" id="input_section_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="hexpand">True</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <property name="margin_bottom">12</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="input_heading_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Input Sources</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- <accessibility>
- <relation target="input_list" type="label-for"/>
- </accessibility>
- </object>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Choose keyboard layouts or input
methods.</property>
- <property name="wrap">True</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkMenuButton" id="options_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="popover">options_popover</property>
- <property name="hexpand">True</property>
- <property name="halign">end</property>
- <property name="valign">start</property>
- <child>
- <object class="GtkImage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">emblem-system-symbolic</property>
- </object>
- </child>
- <style>
- <class name="image-button"/>
- </style>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkFrame">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="CcInputListBox" id="input_list">
- <property name="visible">True</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
<child>
<object class="GtkLabel" id="login_label">
<property name="valign">end</property>
@@ -270,201 +186,4 @@
</object>
</child>
</template>
- <object class="GtkPopover" id="options_popover">
- <property name="can_focus">False</property>
- <property name="border_width">12</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_start">6</property>
- <property name="margin_top">6</property>
- <property name="margin_bottom">6</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">6</property>
- <property name="label" translatable="yes">Input Source Options</property>
- <property name="margin_bottom">6</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="same_source">
- <property name="label" translatable="yes">Use the _same source for all windows</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="per_window_source">
- <property name="label" translatable="yes">Allow _different sources for each window</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">same_source</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">12</property>
- <property name="margin_bottom">6</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Keyboard Shortcuts</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="previous_source_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Previous source</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="previous_source">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Super+Shift+Space</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="next_source_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Next source</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="next_source">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Super+Space</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="alt_next_source">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Left+Right Alt</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">6</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">12</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">40</property>
- <property name="label" translatable="yes">These keyboard shortcuts can be changed in the
keyboard settings</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">7</property>
- <property name="width">2</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
-</interface>
+</interface>
\ No newline at end of file
diff --git a/panels/region/meson.build b/panels/region/meson.build
index ca9af8ae1..68b7f000e 100644
--- a/panels/region/meson.build
+++ b/panels/region/meson.build
@@ -21,19 +21,11 @@ sources = files(
'cc-region-panel.c',
'cc-format-chooser.c',
'cc-format-preview.c',
- 'cc-ibus-utils.c',
- 'cc-input-chooser.c',
- 'cc-input-row.c',
- 'cc-input-source.c',
- 'cc-input-source-ibus.c',
- 'cc-input-list-box.c',
- 'cc-input-source-xkb.c',
)
resource_data = files(
'cc-format-chooser.ui',
'cc-format-preview.ui',
- 'cc-input-chooser.ui',
'cc-region-panel.ui',
'view-layout-symbolic.svg',
)
diff --git a/panels/region/region.gresource.xml b/panels/region/region.gresource.xml
index 61d82998b..b1d72b2e2 100644
--- a/panels/region/region.gresource.xml
+++ b/panels/region/region.gresource.xml
@@ -2,9 +2,6 @@
<gresources>
<gresource prefix="/org/gnome/control-center/region">
<file preprocess="xml-stripblanks">cc-format-chooser.ui</file>
- <file preprocess="xml-stripblanks">cc-input-chooser.ui</file>
- <file preprocess="xml-stripblanks">cc-input-row.ui</file>
- <file preprocess="xml-stripblanks">cc-input-list-box.ui</file>
<file preprocess="xml-stripblanks">cc-region-panel.ui</file>
<file preprocess="xml-stripblanks">cc-format-preview.ui</file>
</gresource>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]