From 4f7464b91537ebf0848dd6cdde156cf826a19946 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Mon, 2 Sep 2013 17:21:12 +0200 Subject: [PATCH] Layout launcher now responds to double-clicks and Return/Space activation --- terminatorlib/layoutlauncher.glade | 1 + terminatorlib/layoutlauncher.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/terminatorlib/layoutlauncher.glade b/terminatorlib/layoutlauncher.glade index 989f3a1b..eef81e5f 100644 --- a/terminatorlib/layoutlauncher.glade +++ b/terminatorlib/layoutlauncher.glade @@ -28,6 +28,7 @@ layoutstore False 0 + Layout diff --git a/terminatorlib/layoutlauncher.py b/terminatorlib/layoutlauncher.py index a087162d..0590a24d 100755 --- a/terminatorlib/layoutlauncher.py +++ b/terminatorlib/layoutlauncher.py @@ -82,6 +82,14 @@ class LayoutLauncher: self.layouttreestore.prepend([layout]) 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""" dbg('We have takeoff!') selection=self.layouttreeview.get_selection()