A little cleanup

This commit is contained in:
Timothy Warren 2012-04-04 07:47:39 -04:00
parent 9b49d655d2
commit 7d33ba2660
2 changed files with 24 additions and 21 deletions

View File

@ -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))

View File

@ -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();