Added LICENSE file, added more to About dialog

This commit is contained in:
Timothy Warren 2012-01-30 18:11:01 -05:00
parent 245a2f78f3
commit 96605ee207
2 changed files with 72 additions and 3 deletions

27
src/LICENSE Normal file
View File

@ -0,0 +1,27 @@
DON'T BE A DICK PUBLIC LICENSE
Version 1, December 2009
Copyright (C) 2009 Philip Sturgeon <email@philsturgeon.co.uk>
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.

View File

@ -28,6 +28,9 @@ class Main extends GtkWindow {
{ {
parent::__construct(); parent::__construct();
//Resize to a sane size
$this->resize(640, 480);
//Layout the interface //Layout the interface
$this->_main_layout(); $this->_main_layout();
} }
@ -48,6 +51,18 @@ class Main extends GtkWindow {
$dlg->set_copyright("Copyright (c) ".date('Y')." Timothy J. Warren"); $dlg->set_copyright("Copyright (c) ".date('Y')." Timothy J. Warren");
$dlg->set_website('https://github.com/aviat4ion/OpenSQLManager'); $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(); $dlg->run();
@ -88,11 +103,21 @@ class Main extends GtkWindow {
$main_vbox->pack_start($this->_create_menu(), FALSE, FALSE); $main_vbox->pack_start($this->_create_menu(), FALSE, FALSE);
// Add the info box // 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 // Add the main interface area hbox
$main_vbox->pack_start($main_hbox, FALSE, FALSE); $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 // Add the Vbox, and show the window
$this->add($main_vbox); $this->add($main_vbox);
$this->show_all(); $this->show_all();
@ -124,8 +149,8 @@ class Main extends GtkWindow {
//File Menu //File Menu
{ {
//Set up the open item //Set up the open item
$open = new GtkImageMenuItem(GTK::STOCK_OPEN); //$open = new GtkImageMenuItem(GTK::STOCK_OPEN);
$file_menu->append($open); //$file_menu->append($open);
//Set up the quit item //Set up the quit item
$quit = new GtkImageMenuItem(GTK::STOCK_QUIT); $quit = new GtkImageMenuItem(GTK::STOCK_QUIT);
@ -168,6 +193,23 @@ class Main extends GtkWindow {
return ($infobar); 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;
}
} }