From 1c84fcd67431f656e6a93e6a87da0667d10bf383 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Tue, 10 Apr 2012 16:47:25 -0400 Subject: [PATCH] Double-click now connects to a database --- sys/windows/widgets/connection_sidebar.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/windows/widgets/connection_sidebar.php b/sys/windows/widgets/connection_sidebar.php index f37874d..3391f4b 100644 --- a/sys/windows/widgets/connection_sidebar.php +++ b/sys/windows/widgets/connection_sidebar.php @@ -67,7 +67,6 @@ class Connection_Sidebar extends GtkVBox { // Set up context menu event $this->treeview->connect('button-press-event', array($this, 'on_button')); - $selection = $this->treeview->get_selection(); $selection->set_mode(GTK::SELECTION_SINGLE); } @@ -124,6 +123,10 @@ class Connection_Sidebar extends GtkVBox { // Connect event to change database tabs $this->treeview->connect('cursor-changed', array($this, 'switch_tab')); + + // Connect event to connect on double-click + $this->treeview->connect('row-activated', array($this, 'db_connect')); + } // -------------------------------------------------------------------------- @@ -354,7 +357,6 @@ class Connection_Sidebar extends GtkVBox { /** * Create connection to a database * - * @param string $name * @return void */ public function db_connect()