Misc code cleanup

This commit is contained in:
Timothy Warren 2012-04-02 08:43:27 -04:00
parent e7abfec149
commit ee3f7901ec
4 changed files with 4 additions and 10 deletions

View File

@ -62,7 +62,7 @@ class DB_Reg {
* *
* @return array * @return array
*/ */
public function get_connections() public static function get_connections()
{ {
return array_keys(self::$instance); return array_keys(self::$instance);
} }

View File

@ -197,7 +197,6 @@ class Connection_Sidebar extends GtkVBox {
{ {
// get the row and column // get the row and column
$path_array = $view->get_path_at_pos($event->x, $event->y); $path_array = $view->get_path_at_pos($event->x, $event->y);
$path = $path_array[0][0];
$col = $path_array[1]; $col = $path_array[1];
// Don't try to get values for an item that doesn't exist. Instead, return, // 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 * Creates and displays a context menu for the selected connection
* *
* @param array $pos
* @param object $event
* @param object $col
* @param array $all * @param array $all
* @return void * @return void
*/ */
public function conn_popup_menu($pos, $event, $col, $all) public function conn_popup_menu($all)
{ {
$this->menu = new GtkMenu(); $this->menu = new GtkMenu();

View File

@ -432,7 +432,7 @@ class DB_Info_Widget extends GtkTable {
// parameters // parameters
try try
{ {
$db = new Query_Builder($params); new Query_Builder($params);
} }
catch (PDOException $e) catch (PDOException $e)
{ {

View File

@ -45,8 +45,6 @@ class DB_tabs extends GTKNotebook {
// Move the tab bar to the bottom // Move the tab bar to the bottom
$this->set_tab_pos(Gtk::POS_BOTTOM); $this->set_tab_pos(Gtk::POS_BOTTOM);
$this->add_tab('Tables');
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------