Reformat db_tabs class, update reference to Query

This commit is contained in:
Timothy Warren 2012-04-13 12:00:17 -04:00
parent eea60cbd05
commit 036cb83b33

View File

@ -102,73 +102,54 @@ class DB_tabs extends GTKNotebook {
{
// Empty the tabs
self::reset();
self::$instance->hide_all();
// 'Databases' Tab
/*{
self::_add_tab($conn, 'Databases', 'Db Name', 'get_dbs');
}*/
self::_add_tab($conn, 'Databases', 'Db Name', 'get_dbs');
// 'Schemas' Tab
{
self::_add_tab($conn, 'Schemas', 'Schema Name', 'get_schemas');
}
self::_add_tab($conn, 'Schemas', 'Schema Name', 'get_schemas');
// 'Tables' Tab
{
self::_add_tab($conn, 'Tables', 'Table Name', 'get_tables', array(
array(
'row-activated',
array(self::$instance, 'show_table_data'),
$conn
)
));
}
self::_add_tab($conn, 'Tables', 'Table Name', 'get_tables', array(
array(
'row-activated',
array(self::$instance, 'show_table_data'),
$conn
)
));
// 'System Tables' Tab
/*{
self::_add_tab($conn, 'System Tables', 'Table Name', 'get_system_tables', array(
array(
'row-activated',
array(self::$instance, 'show_table_data'),
$conn
)
));
}*/
self::_add_tab($conn, 'System Tables', 'Table Name', 'get_system_tables', array(
array(
'row-activated',
array(self::$instance, 'show_table_data'),
$conn
)
));
// 'Views' Tab
{
self::_add_tab($conn, 'Views', 'View Name', 'get_views', array(
array(
'row-activated',
array(self::$instance, 'show_table_data'),
$conn
)
));
}
self::_add_tab($conn, 'Views', 'View Name', 'get_views', array(
array(
'row-activated',
array(self::$instance, 'show_table_data'),
$conn
)
));
// 'Sequences' Tab
{
self::_add_tab($conn, 'Sequences', 'Sequence Name', 'get_sequences');
}
self::_add_tab($conn, 'Sequences', 'Sequence Name', 'get_sequences');
// 'Triggers' Tab
{
self::_add_row_tab($conn, 'Triggers','get_triggers');
}
self::_add_row_tab($conn, 'Triggers','get_triggers');
// 'Procedures' Tab
{
self::_add_row_tab($conn, 'Procedures', 'get_procedures');
}
self::_add_row_tab($conn, 'Procedures', 'get_procedures');
// 'Functions' Tab
{
self::_add_row_tab($conn, 'Functions', 'get_functions');
}
self::_add_row_tab($conn, 'Functions', 'get_functions');
// Show the tabs
self::$instance->show_all();
}
@ -248,6 +229,8 @@ class DB_tabs extends GTKNotebook {
}
self::$instance->show_all();
return;
}
@ -282,6 +265,8 @@ class DB_tabs extends GTKNotebook {
self::$instance->add_tab($tab_name, $tab);
}
self::$instance->show_all();
return;
}