Select root iter in the PluginsWindow treeview. set focus on close button when switch page.
This commit is contained in:
parent
83e7a8745b
commit
926b7d8514
2 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
||||||
<object class="GtkNotebook" id="plugins_notebook">
|
<object class="GtkNotebook" id="plugins_notebook">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
<signal name="switch_page" handler="on_plugins_notebook_switch_page"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkHPaned" id="hpaned1">
|
<object class="GtkHPaned" id="hpaned1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
|
|
@ -82,14 +82,19 @@ class PluginsWindow(object):
|
||||||
self._clear_installed_plugin_info()
|
self._clear_installed_plugin_info()
|
||||||
|
|
||||||
self.fill_installed_plugins_model()
|
self.fill_installed_plugins_model()
|
||||||
|
selection.select_iter(self.installed_plugins_model.get_iter_root())
|
||||||
|
|
||||||
self.xml.connect_signals(self)
|
self.xml.connect_signals(self)
|
||||||
|
|
||||||
self.plugins_notebook.set_current_page(0)
|
self.plugins_notebook.set_current_page(0)
|
||||||
|
self.xml.get_object('close_button').grab_focus()
|
||||||
|
|
||||||
self.window.show_all()
|
self.window.show_all()
|
||||||
gtkgui_helpers.possibly_move_window_in_current_desktop(self.window)
|
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')
|
@log_calls('PluginsWindow')
|
||||||
def installed_plugins_treeview_selection_changed(self, treeview_selection):
|
def installed_plugins_treeview_selection_changed(self, treeview_selection):
|
||||||
model, iter = treeview_selection.get_selected()
|
model, iter = treeview_selection.get_selected()
|
||||||
|
|
Loading…
Add table
Reference in a new issue