summaryrefslogtreecommitdiff
path: root/panels/region/cc-input-chooser.ui
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2018-09-12 15:28:57 +1200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2018-10-17 22:34:52 +0000
commit1ea0f875eec584d359509eefe9c24528073fa082 (patch)
tree4efb0072bec65882f8a1e4c2ecb563ef80c94635 /panels/region/cc-input-chooser.ui
parent9a75d4955167a38b2a3439e135b002318ee2264e (diff)
downloadgnome-control-center-1ea0f875eec584d359509eefe9c24528073fa082.tar.gz
region: Update CcInputChooser GTK+ code
- Move more code into the .ui file - Don't save the dialog between runs - it's cheap to generate on demand - Hold references on data passed to dialog - Connect signals in "swapped" form - Use standard naming format for signal callbacks
Diffstat (limited to 'panels/region/cc-input-chooser.ui')
-rw-r--r--panels/region/cc-input-chooser.ui26
1 files changed, 14 insertions, 12 deletions
diff --git a/panels/region/cc-input-chooser.ui b/panels/region/cc-input-chooser.ui
index 65a9948de..8d72357e2 100644
--- a/panels/region/cc-input-chooser.ui
+++ b/panels/region/cc-input-chooser.ui
@@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 3.0 -->
<template class="CcInputChooser" parent="GtkDialog">
<property name="title" translatable="yes">Add an Input Source</property>
- <property name="resizable">False</property>
<property name="modal">True</property>
<property name="destroy_with_parent">True</property>
<property name="resizable">True</property>
@@ -33,7 +32,7 @@
<property name="orientation">vertical</property>
<property name="spacing">0</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow">
+ <object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="hscrollbar-policy">never</property>
<property name="vscrollbar-policy">automatic</property>
@@ -44,18 +43,17 @@
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="min-content-height">300</property>
+ <property name="vadjustment">scroll_adjustment</property>
<child>
- <object class="GtkViewport">
+ <object class="GtkListBox" id="input_sources_listbox">
<property name="visible">True</property>
- <child>
- <object class="GtkListBox" id="input_listbox">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="vexpand">True</property>
- <property name="halign">fill</property>
- <property name="valign">fill</property>
- </object>
- </child>
+ <property name="can-focus">True</property>
+ <property name="vexpand">True</property>
+ <property name="halign">fill</property>
+ <property name="valign">fill</property>
+ <signal name="row-activated" handler="on_input_sources_listbox_row_activated_cb" object="CcInputChooser" swapped="yes" />
+ <signal name="selected-rows-changed" handler="on_input_sources_listbox_selected_rows_changed_cb" object="CcInputChooser" swapped="yes" />
+ <signal name="button-release-event" handler="on_input_sources_listbox_button_release_event_cb" object="CcInputChooser" swapped="yes" />
</object>
</child>
</object>
@@ -68,6 +66,8 @@
<property name="margin-end">6</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
+ <signal name="search-changed" handler="on_filter_entry_search_changed_cb" object="CcInputChooser" swapped="yes" />
+ <signal name="key-release-event" handler="on_filter_entry_key_release_event_cb" object="CcInputChooser" swapped="yes" />
</object>
</child>
<child>
@@ -90,4 +90,6 @@
<action-widget response="-6">cancel_button</action-widget>
</action-widgets>
</template>
+ <object class="GtkAdjustment" id="scroll_adjustment">
+ </object>
</interface>