Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[s][ui] Allow always to scroll through the subsystem lists on Subsyst…

…em Chooser
  • Loading branch information...
commit be2eb67722a7d8911cf4137386403fbcc079db2e 1 parent a48b326
J. Félix Ontañón authored
Showing with 75 additions and 68 deletions.
  1. +67 −64 data/udev-discover.ui
  2. +8 −4 udev-discover.in
131 data/udev-discover.ui
View
@@ -7,69 +7,6 @@
<property name="stock_id">gtk-about</property>
<signal name="activate" handler="about_action_activate_cb" swapped="no"/>
</object>
- <object class="GtkListStore" id="allsubsys_liststore">
- <columns>
- <!-- column-name icon -->
- <column type="GdkPixbuf"/>
- <!-- column-name name -->
- <column type="gchararray"/>
- </columns>
- </object>
- <object class="GtkListStore" id="chosensubsys_liststore">
- <columns>
- <!-- column-name icon -->
- <column type="GdkPixbuf"/>
- <!-- column-name name -->
- <column type="gchararray"/>
- </columns>
- </object>
- <object class="GtkListStore" id="deviceprop_store">
- <columns>
- <!-- column-name Key -->
- <column type="gchararray"/>
- <!-- column-name Value -->
- <column type="gchararray"/>
- </columns>
- </object>
- <object class="GtkTreeStore" id="devices_treestore">
- <columns>
- <!-- column-name sysfs_path -->
- <column type="gchararray"/>
- <!-- column-name icon -->
- <column type="GdkPixbuf"/>
- <!-- column-name name -->
- <column type="gchararray"/>
- <!-- column-name subsystem -->
- <column type="gchararray"/>
- <!-- column-name visible -->
- <column type="gboolean"/>
- <!-- column-name devicename -->
- <column type="gchararray"/>
- </columns>
- </object>
- <object class="GtkTextBuffer" id="eventslog_textbuffer"/>
- <object class="GtkToggleAction" id="expand_toggleaction">
- <property name="label">Expand devices tree</property>
- <property name="short_label">Expand</property>
- <property name="tooltip">Expand devices tree</property>
- <property name="icon_name">format-indent-more</property>
- <property name="active">True</property>
- <signal name="toggled" handler="expand_toggleaction_toggled_cb" swapped="no"/>
- </object>
- <object class="GtkToggleAction" id="followchanged_toggleaction">
- <property name="label">Follow changing devices</property>
- <property name="short_label">Follow changes</property>
- <property name="tooltip">Focus follows changing devices</property>
- <property name="stock_id">gtk-dialog-warning</property>
- <signal name="toggled" handler="followchanged_toggleaction_toggled_cb" swapped="no"/>
- </object>
- <object class="GtkToggleAction" id="follownew_toggleaction">
- <property name="label">Follow new devices</property>
- <property name="short_label">Follow new</property>
- <property name="tooltip">Focus follows new devices</property>
- <property name="stock_id">gtk-add</property>
- <signal name="toggled" handler="follownew_toggleaction_toggled_cb" swapped="no"/>
- </object>
<object class="GtkAction" id="help_action">
<property name="label">Help</property>
<property name="short_label">Help</property>
@@ -824,6 +761,69 @@ Javier Hernandez &lt;jhernandez@emergya.es&gt;</property>
</object>
</child>
</object>
+ <object class="GtkListStore" id="allsubsys_liststore">
+ <columns>
+ <!-- column-name icon -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name name -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkListStore" id="chosensubsys_liststore">
+ <columns>
+ <!-- column-name icon -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name name -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkListStore" id="deviceprop_store">
+ <columns>
+ <!-- column-name Key -->
+ <column type="gchararray"/>
+ <!-- column-name Value -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkTreeStore" id="devices_treestore">
+ <columns>
+ <!-- column-name sysfs_path -->
+ <column type="gchararray"/>
+ <!-- column-name icon -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name name -->
+ <column type="gchararray"/>
+ <!-- column-name subsystem -->
+ <column type="gchararray"/>
+ <!-- column-name visible -->
+ <column type="gboolean"/>
+ <!-- column-name devicename -->
+ <column type="gchararray"/>
+ </columns>
+ </object>
+ <object class="GtkTextBuffer" id="eventslog_textbuffer"/>
+ <object class="GtkToggleAction" id="expand_toggleaction">
+ <property name="label">Expand devices tree</property>
+ <property name="short_label">Expand</property>
+ <property name="tooltip">Expand devices tree</property>
+ <property name="icon_name">format-indent-more</property>
+ <property name="active">True</property>
+ <signal name="toggled" handler="expand_toggleaction_toggled_cb" swapped="no"/>
+ </object>
+ <object class="GtkToggleAction" id="followchanged_toggleaction">
+ <property name="label">Follow changing devices</property>
+ <property name="short_label">Follow changes</property>
+ <property name="tooltip">Focus follows changing devices</property>
+ <property name="stock_id">gtk-dialog-warning</property>
+ <signal name="toggled" handler="followchanged_toggleaction_toggled_cb" swapped="no"/>
+ </object>
+ <object class="GtkToggleAction" id="follownew_toggleaction">
+ <property name="label">Follow new devices</property>
+ <property name="short_label">Follow new</property>
+ <property name="tooltip">Focus follows new devices</property>
+ <property name="stock_id">gtk-add</property>
+ <signal name="toggled" handler="follownew_toggleaction_toggled_cb" swapped="no"/>
+ </object>
<object class="GtkWindow" id="main_window">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -1710,7 +1710,6 @@ Javier Hernandez &lt;jhernandez@emergya.es&gt;</property>
<child>
<object class="GtkBox" id="custompreset_box">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
@@ -1723,6 +1722,7 @@ Javier Hernandez &lt;jhernandez@emergya.es&gt;</property>
<child>
<object class="GtkTreeView" id="allsubsys_treeview">
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="model">allsubsys_liststore</property>
<property name="search_column">1</property>
@@ -1769,6 +1769,7 @@ Javier Hernandez &lt;jhernandez@emergya.es&gt;</property>
<object class="GtkButton" id="addsubsys_button">
<property name="label">gtk-add</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
@@ -1786,6 +1787,7 @@ Javier Hernandez &lt;jhernandez@emergya.es&gt;</property>
<object class="GtkButton" id="removesubsys_button">
<property name="label">gtk-delete</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
@@ -1817,6 +1819,7 @@ Javier Hernandez &lt;jhernandez@emergya.es&gt;</property>
<child>
<object class="GtkTreeView" id="chosensubsys_treeview">
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="model">chosensubsys_liststore</property>
<property name="reorderable">True</property>
12 udev-discover.in
View
@@ -77,7 +77,6 @@ class SubsystemChoserDialog(GConfStore):
self.custom_radiobutton = self.builder.get_object('custom_radiobutton')
self.addsubsys_button = self.builder.get_object('addsubsys_button')
self.removesubsys_button = self.builder.get_object('removesubsys_button')
- self.custompreset_box = self.builder.get_object('custompreset_box')
self.allsubsys_liststore = self.builder.get_object('allsubsys_liststore')
self.chosensubsys_liststore = \
self.builder.get_object('chosensubsys_liststore')
@@ -130,17 +129,22 @@ class SubsystemChoserDialog(GConfStore):
for subsys in chosen_set:
self.chosensubsys_liststore.append([None, subsys])
+ def subsystem_allow_edit(allow=True):
+ for widget in self.addsubsys_button, self.removesubsys_button, \
+ self.allsubsys_treeview, self.chosensubsys_treeview:
+ widget.set_sensitive(allow)
+
if preset == COMMON_SUBSYS_PRESET:
- self.custompreset_box.set_sensitive(False)
+ subsystem_allow_edit(False)
default = set(DEFAULT_SUBSYSTEMS)
populate(set(self.subsystems) - default, default)
elif preset == ALL_SUBSYS_PRESET:
- self.custompreset_box.set_sensitive(False)
+ subsystem_allow_edit(False)
populate([], self.subsystems)
elif preset == CUSTOM_SUBSYS_PRESET:
- self.custompreset_box.set_sensitive(True)
+ subsystem_allow_edit()
chosen = set(self.chosen_subsystems)
populate(set(self.subsystems) - chosen, chosen)
Please sign in to comment.
Something went wrong with that request. Please try again.