Select root iter in the PluginsWindow treeview. set focus on close button when switch page.

This commit is contained in:
Denis Fomin 2012-06-28 13:37:55 +04:00
parent 83e7a8745b
commit 926b7d8514
2 changed files with 6 additions and 0 deletions

View File

@ -20,6 +20,7 @@
<object class="GtkNotebook" id="plugins_notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="switch_page" handler="on_plugins_notebook_switch_page"/>
<child>
<object class="GtkHPaned" id="hpaned1">
<property name="visible">True</property>

View File

@ -82,14 +82,19 @@ class PluginsWindow(object):
self._clear_installed_plugin_info()
self.fill_installed_plugins_model()
selection.select_iter(self.installed_plugins_model.get_iter_root())
self.xml.connect_signals(self)
self.plugins_notebook.set_current_page(0)
self.xml.get_object('close_button').grab_focus()
self.window.show_all()
gtkgui_helpers.possibly_move_window_in_current_desktop(self.window)
def on_plugins_notebook_switch_page(self, widget, page, page_num):
gobject.idle_add(self.xml.get_object('close_button').grab_focus)
@log_calls('PluginsWindow')
def installed_plugins_treeview_selection_changed(self, treeview_selection):
model, iter = treeview_selection.get_selected()