From ee3f7901ece0db9e2b1f694c0fb7a19bb02bea7d Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 2 Apr 2012 08:43:27 -0400 Subject: [PATCH] Misc code cleanup --- sys/db/dbreg.php | 2 +- sys/windows/widgets/connection_sidebar.php | 8 ++------ sys/windows/widgets/db_info_widget.php | 2 +- sys/windows/widgets/db_tabs.php | 2 -- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/db/dbreg.php b/sys/db/dbreg.php index 7e46b1c..5b761d4 100644 --- a/sys/db/dbreg.php +++ b/sys/db/dbreg.php @@ -62,7 +62,7 @@ class DB_Reg { * * @return array */ - public function get_connections() + public static function get_connections() { return array_keys(self::$instance); } diff --git a/sys/windows/widgets/connection_sidebar.php b/sys/windows/widgets/connection_sidebar.php index b30e0ec..f5e4b15 100644 --- a/sys/windows/widgets/connection_sidebar.php +++ b/sys/windows/widgets/connection_sidebar.php @@ -197,7 +197,6 @@ class Connection_Sidebar extends GtkVBox { { // get the row and column $path_array = $view->get_path_at_pos($event->x, $event->y); - $path = $path_array[0][0]; $col = $path_array[1]; // Don't try to get values for an item that doesn't exist. Instead, return, @@ -209,7 +208,7 @@ class Connection_Sidebar extends GtkVBox { } } - $this->menu = $this->conn_popup_menu($path, $event, $col, $path_array); + $this->menu = $this->conn_popup_menu($path_array); } // -------------------------------------------------------------------------- @@ -217,13 +216,10 @@ class Connection_Sidebar extends GtkVBox { /** * Creates and displays a context menu for the selected connection * - * @param array $pos - * @param object $event - * @param object $col * @param array $all * @return void */ - public function conn_popup_menu($pos, $event, $col, $all) + public function conn_popup_menu($all) { $this->menu = new GtkMenu(); diff --git a/sys/windows/widgets/db_info_widget.php b/sys/windows/widgets/db_info_widget.php index 2482452..dcb2f52 100644 --- a/sys/windows/widgets/db_info_widget.php +++ b/sys/windows/widgets/db_info_widget.php @@ -432,7 +432,7 @@ class DB_Info_Widget extends GtkTable { // parameters try { - $db = new Query_Builder($params); + new Query_Builder($params); } catch (PDOException $e) { diff --git a/sys/windows/widgets/db_tabs.php b/sys/windows/widgets/db_tabs.php index 080ba55..04d18ca 100644 --- a/sys/windows/widgets/db_tabs.php +++ b/sys/windows/widgets/db_tabs.php @@ -45,8 +45,6 @@ class DB_tabs extends GTKNotebook { // Move the tab bar to the bottom $this->set_tab_pos(Gtk::POS_BOTTOM); - - $this->add_tab('Tables'); } // --------------------------------------------------------------------------