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 * @param string $message
* @return void * @return void
@ -142,5 +142,4 @@ function about()
$dlg->destroy(); $dlg->destroy();
} }
// End of functions.php // End of functions.php

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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