diff --git a/src/windows/main.php b/src/windows/main.php index 0d4bdf7..39d5fb9 100644 --- a/src/windows/main.php +++ b/src/windows/main.php @@ -19,7 +19,7 @@ */ class Main extends GtkWindow { - private $settings, $model; + private $settings, $connection_sidebar; /** * Create and display the main window on startup @@ -29,7 +29,7 @@ class Main extends GtkWindow { parent::__construct(); //Resize to a sane size - $this->resize(640, 480); + $this->set_size_request(640, 480); $this->set_position(Gtk::WIN_POS_CENTER); @@ -108,12 +108,14 @@ class Main extends GtkWindow { $main_vbox->pack_start($hpane); $scrolled_win = new GtkScrolledWindow(); - $scrolled_win->set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); + $scrolled_win->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); $scrolled_win->add(new DataGrid()); + // Add the connection sidebar + $this->connection_sidebar = new Connection_Sidebar(); // Add the left column to the hpane - $hpane->pack1(new Connection_Sidebar(), FALSE); + $hpane->pack1($this->connection_sidebar, FALSE); $hpane->pack2($scrolled_win); // Add the Vbox, and show the window diff --git a/src/windows/widgets/connection_sidebar.php b/src/windows/widgets/connection_sidebar.php index fcbdc02..752fa1f 100644 --- a/src/windows/widgets/connection_sidebar.php +++ b/src/windows/widgets/connection_sidebar.php @@ -14,6 +14,8 @@ class Connection_Sidebar extends GtkVBox { + protected $settings; + public function __construct() { parent::__construct(); @@ -129,4 +131,25 @@ class Connection_Sidebar extends GtkVBox { return new Add_DB(); } + // -------------------------------------------------------------------------- + + /** + * Remove a connection from the connection manager + */ + public function remove_connection() + { + + } + + // -------------------------------------------------------------------------- + + /** + * Add a connection to the connection manager + */ + public function add_connection() + { + + } + } +// End of connection_sidebar.php