keyboard: Use content style for listboxes
This commit is contained in:
parent
bb6b3fbbcb
commit
1fa95b5fc5
6 changed files with 104 additions and 125 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
<property name="can_focus">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<signal name="row_activated" handler="input_row_activated_cb" object="CcInputListBox" swapped="yes"/>
|
||||
<style>
|
||||
<class name="content"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="no_inputs_row">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -67,15 +67,9 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<object class="CcInputListBox" id="input_list">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">20</property>
|
||||
<child>
|
||||
<object class="CcInputListBox" id="input_list">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="margin-bottom">20</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -109,62 +103,59 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<object class="GtkListBox" id="input_source_list">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<style>
|
||||
<class name="content"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkListBox" id="input_source_list">
|
||||
<object class="GtkListBoxRow">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkListBoxRow">
|
||||
<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="GtkRadioButton" id="same_source">
|
||||
<object class="GtkLabel">
|
||||
<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>
|
||||
<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="GtkListBoxRow">
|
||||
<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="GtkRadioButton" id="per_window_source">
|
||||
<object class="GtkLabel">
|
||||
<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">Switch input sources _individually for each window</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="label" translatable="yes">Switch input sources _individually for each window</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -205,62 +196,59 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<object class="GtkListBox" id="special_chars_list">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_bottom">20</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="width-request">250</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<signal name="row-activated" handler="special_chars_activated" object="CcKeyboardPanel" swapped="no" />
|
||||
<style>
|
||||
<class name="content"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkListBox" id="special_chars_list">
|
||||
<object class="HdyActionRow" id="alt_chars_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="width-request">250</property>
|
||||
<signal name="row-activated" handler="special_chars_activated" object="CcKeyboardPanel" swapped="no" />
|
||||
<property name="title" translatable="yes">Alternate Characters Key</property>
|
||||
<property name="activatable">True</property>
|
||||
<child>
|
||||
<object class="HdyActionRow" id="alt_chars_row">
|
||||
<object class="GtkLabel" id="value_alternate_chars">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="title" translatable="yes">Alternate Characters Key</property>
|
||||
<property name="activatable">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="value_alternate_chars">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="no">Right Alt</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">go-next-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<property name="label" translatable="no">Right Alt</property>
|
||||
</object>
|
||||
</child>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyActionRow" id="compose_row">
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">go-next-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="HdyActionRow" id="compose_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="title" translatable="yes">Compose Key</property>
|
||||
<property name="activatable">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="value_compose">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="title" translatable="yes">Compose Key</property>
|
||||
<property name="activatable">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="value_compose">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">go-next-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">go-next-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -279,31 +267,28 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<object class="GtkListBox" id="keyboard_shortcuts_listbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="width-request">250</property>
|
||||
<signal name="row-activated" handler="keyboard_shortcuts_activated" object="CcKeyboardPanel" swapped="no" />
|
||||
<style>
|
||||
<class name="content"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkListBox" id="keyboard_shortcuts_listbox">
|
||||
<object class="HdyActionRow" id="common_shortcuts_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="width-request">250</property>
|
||||
<signal name="row-activated" handler="keyboard_shortcuts_activated" object="CcKeyboardPanel" swapped="no" />
|
||||
<property name="title" translatable="yes">View and Customize Shortcuts</property>
|
||||
<property name="activatable">True</property>
|
||||
<child>
|
||||
<object class="HdyActionRow" id="common_shortcuts_row">
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="title" translatable="yes">View and Customize Shortcuts</property>
|
||||
<property name="activatable">True</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="icon_name">go-next-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<property name="icon_name">go-next-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="frame"/>
|
||||
<class name="content"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="HdyActionRow" id="switch_row">
|
||||
|
@ -60,7 +60,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="frame"/>
|
||||
<class name="content"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue