From 1fa95b5fc50ca12e996ec3511187e05e3f55a442 Mon Sep 17 00:00:00 2001 From: Mohammed Sadiq Date: Wed, 12 May 2021 19:07:58 +0530 Subject: [PATCH] keyboard: Use content style for listboxes --- panels/keyboard/cc-input-list-box.c | 4 - panels/keyboard/cc-input-list-box.ui | 5 +- panels/keyboard/cc-keyboard-panel.c | 3 - panels/keyboard/cc-keyboard-panel.ui | 211 ++++++++++------------ panels/keyboard/cc-xkb-modifier-dialog.c | 2 - panels/keyboard/cc-xkb-modifier-dialog.ui | 4 +- 6 files changed, 104 insertions(+), 125 deletions(-) diff --git a/panels/keyboard/cc-input-list-box.c b/panels/keyboard/cc-input-list-box.c index 6c2cb5614..191207490 100644 --- a/panels/keyboard/cc-input-list-box.c +++ b/panels/keyboard/cc-input-list-box.c @@ -762,10 +762,6 @@ cc_input_list_box_init (CcInputListBox *self) maybe_start_ibus (); #endif - gtk_list_box_set_header_func (GTK_LIST_BOX (self), - cc_list_box_update_header_func, - NULL, NULL); - g_signal_connect_object (self->input_settings, "changed::" KEY_INPUT_SOURCES, G_CALLBACK (input_sources_changed), self, G_CONNECT_SWAPPED); diff --git a/panels/keyboard/cc-input-list-box.ui b/panels/keyboard/cc-input-list-box.ui index 3df59dee9..cbe7a9f32 100644 --- a/panels/keyboard/cc-input-list-box.ui +++ b/panels/keyboard/cc-input-list-box.ui @@ -5,6 +5,9 @@ True none + True @@ -47,4 +50,4 @@ - \ No newline at end of file + diff --git a/panels/keyboard/cc-keyboard-panel.c b/panels/keyboard/cc-keyboard-panel.c index 6b203f18f..8c0e03056 100644 --- a/panels/keyboard/cc-keyboard-panel.c +++ b/panels/keyboard/cc-keyboard-panel.c @@ -257,9 +257,6 @@ cc_keyboard_panel_init (CcKeyboardPanel *self) 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); - self->input_source_settings = g_settings_new ("org.gnome.desktop.input-sources"); /* "Input Source Switching" section */ diff --git a/panels/keyboard/cc-keyboard-panel.ui b/panels/keyboard/cc-keyboard-panel.ui index 9bc7f105d..9b0952e88 100644 --- a/panels/keyboard/cc-keyboard-panel.ui +++ b/panels/keyboard/cc-keyboard-panel.ui @@ -67,15 +67,9 @@ - + True - False - 20 - - - True - - + 20 @@ -109,62 +103,59 @@ - + True - False - 20 + 20 + - + True - + True + True + False + 0 + True + True + - + True - True - False - 0 - True - True - - - - True - 6 - True - Use the _same source for all windows - - + 6 + True + Use the _same source for all windows + + + + + True - + True + True + False + 0 + True + True + same_source + - + True - True - False - 0 - True - True - same_source - - - - True - 6 - True - Switch input sources _individually for each window - - + 6 + True + Switch input sources _individually for each window @@ -205,62 +196,59 @@ - + True - False - 20 + True + none + 250 + 20 + + - + True True - none - 250 - + Alternate Characters Key + True - + True True - Alternate Characters Key - True - - - True - True - Right Alt - - - - - True - go-next-symbolic - - - + Right Alt - + - + + True + go-next-symbolic + + + + + + + + True + True + Compose Key + True + + True True - Compose Key - True - - - True - True - - - - - True - go-next-symbolic - - - + + + + + True + go-next-symbolic + @@ -279,31 +267,28 @@ - + True - False + True + none + 250 + + - + True True - none - 250 - + View and Customize Shortcuts + True - + True - True - View and Customize Shortcuts - True - - - True - go-next-symbolic - - - + go-next-symbolic + diff --git a/panels/keyboard/cc-xkb-modifier-dialog.c b/panels/keyboard/cc-xkb-modifier-dialog.c index ae6326a96..b1fae3d6d 100644 --- a/panels/keyboard/cc-xkb-modifier-dialog.c +++ b/panels/keyboard/cc-xkb-modifier-dialog.c @@ -299,8 +299,6 @@ cc_xkb_modifier_dialog_init (CcXkbModifierDialog *self) self->modifier = NULL; - gtk_list_box_set_header_func (self->listbox, cc_list_box_update_header_func, NULL, NULL); - self->input_source_settings = g_settings_new ("org.gnome.desktop.input-sources"); g_signal_connect_object (self->input_source_settings, "changed::xkb-options", diff --git a/panels/keyboard/cc-xkb-modifier-dialog.ui b/panels/keyboard/cc-xkb-modifier-dialog.ui index 851b92d6b..7863ebef3 100644 --- a/panels/keyboard/cc-xkb-modifier-dialog.ui +++ b/panels/keyboard/cc-xkb-modifier-dialog.ui @@ -36,7 +36,7 @@ True False @@ -60,7 +60,7 @@ True False