From 7d33ba26604cf5c7e87b0f6a30e9b96dc0454fe4 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 4 Apr 2012 07:47:39 -0400 Subject: [PATCH] A little cleanup --- sys/windows/widgets/connection_sidebar.php | 2 - sys/windows/widgets/db_tabs.php | 43 ++++++++++++---------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/sys/windows/widgets/connection_sidebar.php b/sys/windows/widgets/connection_sidebar.php index 8f89d08..7107f08 100644 --- a/sys/windows/widgets/connection_sidebar.php +++ b/sys/windows/widgets/connection_sidebar.php @@ -183,8 +183,6 @@ class Connection_Sidebar extends GtkVBox { $col->set_reorderable(TRUE); $info = $model->get_value($iter, 0); - list($width, $height) = Gtk::icon_size_lookup(Gtk::ICON_SIZE_SMALL_TOOLBAR); - $conns = DB_Reg::get_connections(); if(in_array($info->name, $conns)) diff --git a/sys/windows/widgets/db_tabs.php b/sys/windows/widgets/db_tabs.php index 9c52cb9..ac77ec1 100644 --- a/sys/windows/widgets/db_tabs.php +++ b/sys/windows/widgets/db_tabs.php @@ -83,25 +83,6 @@ class DB_tabs extends GTKNotebook { // Empty the tabs self::reset(); - // 'Tables' Tab - { - $tables = new Data_Grid(); - $table_model = $tables->get_model(); - $table_data = $conn->get_tables(); - - foreach($table_data as $t) - { - $table_model->append(null, array($t)); - //$table_model->set($iter, 0, $t); - } - - $cell_renderer = new GtkCellRendererText(); - $tables->insert_column_with_data_func(0, 'Table Name', $cell_renderer, array(self::$instance, 'add_data_col')); - - - self::$instance->add_tab('Tables', $tables); - } - // 'Databases' Tab { $dbs = new Data_Grid(); @@ -125,6 +106,30 @@ class DB_tabs extends GTKNotebook { } + // 'Tables' Tab + { + $tables = new Data_Grid(); + $table_model = $tables->get_model(); + $table_data = $conn->get_tables(); + + foreach($table_data as $t) + { + $table_model->append(null, array($t)); + //$table_model->set($iter, 0, $t); + } + + $cell_renderer = new GtkCellRendererText(); + $tables->insert_column_with_data_func(0, 'Table Name', $cell_renderer, array(self::$instance, 'add_data_col')); + + + self::$instance->add_tab('Tables', $tables); + } + + // 'Views' Tab + { + + } + self::$instance->show_all();