[Rigo] add Preferences button

This commit is contained in:
Fabio Erculiani
2012-04-11 23:18:23 +02:00
parent 7f9225ee4d
commit f1ef6fbcbb
2 changed files with 63 additions and 11 deletions

View File

@@ -51,18 +51,62 @@
<property name="can_focus">False</property>
<property name="border_width">8</property>
<child>
<object class="GtkEntry" id="searchEntry">
<property name="height_request">40</property>
<object class="GtkVBox" id="searchVbox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="max_length">100</property>
<property name="invisible_char">●</property>
<property name="primary_icon_stock">gtk-find</property>
<property name="secondary_icon_stock">gtk-undo</property>
<property name="primary_icon_activatable">True</property>
<property name="secondary_icon_activatable">True</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="searchHbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="prefButton">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="relief">none</property>
<child>
<object class="GtkImage" id="prefImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">preferences-other</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="searchEntry">
<property name="height_request">40</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="max_length">100</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_stock">gtk-find</property>
<property name="secondary_icon_stock">gtk-undo</property>
<property name="primary_icon_activatable">True</property>
<property name="secondary_icon_activatable">True</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>

View File

@@ -186,6 +186,14 @@ class Rigo(Gtk.Application):
self._work_view = self._builder.get_object("workViewVbox")
self._work_view.set_name("rigo-view")
self._pref_button = self._builder.get_object(
"prefButton")
def _pref_button_activate(widget):
self._change_view_state(
RigoViewStates.PREFERENCES_VIEW_STATE)
self._pref_button.connect(
"clicked", _pref_button_activate)
# Preferences model, view and controller
self._pref_store = PreferencesListStore()
self._view_pref = PreferencesTreeView(