Layout launcher now responds to double-clicks and Return/Space activation
This commit is contained in:
parent
7f49bcfab9
commit
4f7464b915
|
@ -28,6 +28,7 @@
|
||||||
<property name="model">layoutstore</property>
|
<property name="model">layoutstore</property>
|
||||||
<property name="headers_clickable">False</property>
|
<property name="headers_clickable">False</property>
|
||||||
<property name="search_column">0</property>
|
<property name="search_column">0</property>
|
||||||
|
<signal name="row-activated" handler="on_row_activated" swapped="no"/>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
||||||
<property name="title" translatable="yes">Layout</property>
|
<property name="title" translatable="yes">Layout</property>
|
||||||
|
|
|
@ -82,6 +82,14 @@ class LayoutLauncher:
|
||||||
self.layouttreestore.prepend([layout])
|
self.layouttreestore.prepend([layout])
|
||||||
|
|
||||||
def on_launchbutton_clicked(self, widget):
|
def on_launchbutton_clicked(self, widget):
|
||||||
|
"""Handle button click"""
|
||||||
|
self.launch_layout()
|
||||||
|
|
||||||
|
def on_row_activated(self, widget, path, view_column):
|
||||||
|
"""Handle item double-click and return"""
|
||||||
|
self.launch_layout()
|
||||||
|
|
||||||
|
def launch_layout(self):
|
||||||
"""Launch the selected layout as new instance"""
|
"""Launch the selected layout as new instance"""
|
||||||
dbg('We have takeoff!')
|
dbg('We have takeoff!')
|
||||||
selection=self.layouttreeview.get_selection()
|
selection=self.layouttreeview.get_selection()
|
||||||
|
|
Loading…
Reference in New Issue