From 96605ee207b7e1a2eb387606e21dbe58745f62b7 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 30 Jan 2012 18:11:01 -0500 Subject: [PATCH] Added LICENSE file, added more to About dialog --- src/LICENSE | 27 +++++++++++++++++++++++++ src/windows/main.php | 48 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 src/LICENSE diff --git a/src/LICENSE b/src/LICENSE new file mode 100644 index 0000000..3f27335 --- /dev/null +++ b/src/LICENSE @@ -0,0 +1,27 @@ +DON'T BE A DICK PUBLIC LICENSE + + Version 1, December 2009 + + Copyright (C) 2009 Philip Sturgeon + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DON'T BE A DICK PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 1. Do whatever you like with the original work, just don't be a dick. + + Being a dick includes - but is not limited to - the following instances: + + 1a. Outright copyright infringement - Don't just copy this and change the name. + 1b. Selling the unmodified original with no work done what-so-ever, that's REALLY being a dick. + 1c. Modifying the original work to contain hidden harmful content. That would make you a PROPER dick. + + 2. If you become rich through modifications, related works/services, or supporting the original work, + share the love. Only a dick would make loads off this work and not buy the original works + creator(s) a pint. + + 3. Code is provided with no warranty. Using somebody else's code and bitching when it goes wrong makes + you a DONKEY dick. Fix the problem yourself. A non-dick would submit the fix back. \ No newline at end of file diff --git a/src/windows/main.php b/src/windows/main.php index 9d1f501..7187087 100644 --- a/src/windows/main.php +++ b/src/windows/main.php @@ -28,6 +28,9 @@ class Main extends GtkWindow { { parent::__construct(); + //Resize to a sane size + $this->resize(640, 480); + //Layout the interface $this->_main_layout(); } @@ -48,6 +51,18 @@ class Main extends GtkWindow { $dlg->set_copyright("Copyright (c) ".date('Y')." Timothy J. Warren"); $dlg->set_website('https://github.com/aviat4ion/OpenSQLManager'); + $dlg->set_website_label('Fork on Github'); + + $dlg->set_license(file_get_contents("LICENSE")); + + $dlg->set_authors(array( + 'Timothy J. Warren', + 'Nathan Dupuie', + )); + + $dlg->set_artists(array( + 'Nathan Dupuie', + )); $dlg->run(); @@ -88,11 +103,21 @@ class Main extends GtkWindow { $main_vbox->pack_start($this->_create_menu(), FALSE, FALSE); // Add the info box - $main_vbox->pack_start($this->_create_infobox(), FALSE, FALSE); + //$main_vbox->pack_start($this->_create_infobox(), FALSE, FALSE); // Add the main interface area hbox $main_vbox->pack_start($main_hbox, FALSE, FALSE); + // Add the left column to the hbox + $main_hbox->pack_start($this->_connection_sidebar(), FALSE, FALSE); + + /*$notebook = new GtkNoteBook(); + $notebook->append_page(new GtkLabel('Test')); + $notebook->append_page(new GtkLabel('Test'));*/ + + //Add a notebook, just for fun + $main_hbox->pack_start($notebook, FALSE, FALSE); + // Add the Vbox, and show the window $this->add($main_vbox); $this->show_all(); @@ -124,8 +149,8 @@ class Main extends GtkWindow { //File Menu { //Set up the open item - $open = new GtkImageMenuItem(GTK::STOCK_OPEN); - $file_menu->append($open); + //$open = new GtkImageMenuItem(GTK::STOCK_OPEN); + //$file_menu->append($open); //Set up the quit item $quit = new GtkImageMenuItem(GTK::STOCK_QUIT); @@ -168,6 +193,23 @@ class Main extends GtkWindow { return ($infobar); } + // -------------------------------------------------------------------------- + + /** + * Lays out the left sidebar in the main window + * + * @return GtkVbox + */ + private function _connection_sidebar() + { + $dblabel = new GtkLabel('Database Connections'); + $dblabel->set_alignment(0,0); + $conn_vbox = new GtkVBox(); + + $conn_vbox->pack_start($dblabel); + + return $conn_vbox; + } }