A little cleanup
This commit is contained in:
parent
9b49d655d2
commit
7d33ba2660
@ -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))
|
||||
|
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user