Comment normalization

This commit is contained in:
Timothy Warren 2012-04-19 21:55:44 -04:00
parent 1a1fa660bd
commit b094bb1db9
7 changed files with 78 additions and 43 deletions

View File

@ -40,7 +40,7 @@ function array_to_object($array)
// --------------------------------------------------------------------------
/**
* Create info dialog to retun an informational message
* Create info dialog to return an informational message
*
* @param string $message
* @return void
@ -142,5 +142,4 @@ function about()
$dlg->destroy();
}
// End of functions.php

View File

@ -19,26 +19,36 @@ class Connection_Sidebar extends GtkVBox {
/**
* Reference to Settings instance
*
* @var Settings
*/
protected $settings;
/**
* Reference to popup menu
*
* @var GtkMenu
*/
protected $menu;
/**
* Treeview for displaying connections
*
* @var GtkTreeView
*/
protected $treeview;
/**
* Singleton instance
*
* @var Connection_Sidebar
*/
private static $instance;
/**
* Name of current db connection
*
* @var string
*/
private $conn_name;

View File

@ -19,6 +19,8 @@ class Data_Grid extends GtkTreeView {
/**
* GtkTreeStore object
*
* @var GtkTreeStore
*/
protected $model;

View File

@ -19,97 +19,127 @@ class DB_Info_Widget extends GtkTable {
/**
* Alias to Settings::get_instance
*
* @var Settings
*/
private $settings;
/**
* Connection name
*
* @var GtkEntry
*/
protected $conn;
/**
* Connection database name
*
* @var GtkEntry
*/
protected $conn_db;
/**
* Connection database type
*
* @var GtkComboBox
*/
protected $dbtype;
/**
* Connection database host
*
* @var GtkEntry
*/
protected $host;
/**
* Connection user name
*
* @var GtkEntry
*/
protected $user;
/**
* Connection password
*
* @var GtkEntry
*/
protected $pass;
/**
* Connection database file
*
* @var GtkFileChooserButton
*/
protected $db_file;
/**
* Connection port
*
* @var GtkEntry
*/
protected $port;
/**
* Reference to last connection name
*
* @var string
*/
protected $old_conn;
/**
* Labels
* Label for connection name
*
* @var GtkLabel
*/
protected $lblconn;
/**
* Labels
* Label for connection database name
*
* @var Gtklabel
*/
protected $lblconn_db;
/**
* Labels
* Label for database type
*
* @var Gtklabel
*/
protected $lbldbtype;
/**
* Labels
* Label for database host
*
* @var Gtklabel
*/
protected $lblhost;
/**
* Labels
* Label for database connection user
*
* @var GtkLabel
*/
protected $lbluser;
/**
* Labels
* Label for database connection password
*
* @var GtkLabel
*/
protected $lblpass;
/**
* Labels
*/
protected $lbldatabase;
/**
* Labels
* Label for database file
*
* @var GtkLabel
*/
protected $lbldb_file;
/**
* Labels
* Label for database connection port
*
* @var GtkLabel
*/
protected $lblport;
@ -121,6 +151,7 @@ class DB_Info_Widget extends GtkTable {
* No params = add, params = edit
*
* @param object $db
* @return void
*/
public function __construct($db=null)
{
@ -535,48 +566,32 @@ class DB_Info_Widget extends GtkTable {
$y2 = 0;
// Connection name
{
$this->_add_row("Connection name", 'conn', $y1, $y2);
}
$this->_add_row("Connection name", 'conn', $y1, $y2);
// Database type
{
$dbtypelbl = new GtkLabel("Database Type");
$typealign = new GtkAlignment(0, 0.5, 0, 0);
$typealign->add($dbtypelbl);
$this->attach($typealign, 0, 1, ++$y1, ++$y2);
$this->attach($this->dbtype, 1, 2, $y1, $y2);
}
$dbtypelbl = new GtkLabel("Database Type");
$typealign = new GtkAlignment(0, 0.5, 0, 0);
$typealign->add($dbtypelbl);
$this->attach($typealign, 0, 1, ++$y1, ++$y2);
$this->attach($this->dbtype, 1, 2, $y1, $y2);
// DB File
{
$this->_add_row("Database File", 'db_file', $y1, $y2);
}
$this->_add_row("Database File", 'db_file', $y1, $y2);
// First Db
{
$this->_add_row("Database Name", 'conn_db', $y1, $y2);
}
$this->_add_row("Database Name", 'conn_db', $y1, $y2);
// Host
{
$this->_add_row("Host", 'host', $y1, $y2);
}
$this->_add_row("Host", 'host', $y1, $y2);
// Port
{
$this->_add_row("Port", 'port', $y1, $y2);
}
$this->_add_row("Port", 'port', $y1, $y2);
// Username
{
$this->_add_row("User", 'user', $y1, $y2);
}
$this->_add_row("User", 'user', $y1, $y2);
// Password
{
$this->_add_row("Password", 'pass', $y1, $y2);
}
$this->_add_row("Password", 'pass', $y1, $y2);
// Add/Edit connection button
{

View File

@ -19,12 +19,15 @@ class DB_tabs extends GTKNotebook {
/**
* Current Tab Widget object
*
* @var DB_Tabs
*/
private static $instance;
/**
* Db Data cache
*
* @var array
*/
private $data;

View File

@ -19,6 +19,8 @@ class DB_Table_Data extends GTKWindow {
/**
* Reference to the scrolled window
*
* @var GtkScrolledWindow
*/
protected $win;

View File

@ -21,11 +21,15 @@ class Main extends GtkWindow {
/**
* Reference to settings instance
*
* @var Settings
*/
private $settings;
/**
* Reference to connection sidebar instance
*
* @var Connection_Sidebar
*/
private $connection_sidebar;