Rearranged private methods

This commit is contained in:
Timothy Warren 2012-01-30 13:15:44 -05:00
parent c6da8310d9
commit b7bef6a82e
1 changed files with 42 additions and 28 deletions

View File

@ -32,6 +32,40 @@ class Main extends GtkWindow {
$this->_main_layout(); $this->_main_layout();
} }
// --------------------------------------------------------------------------
/**
* Display About menu with version information
*/
function about()
{
$dlg = new GtkAboutDialog();
$dlg->set_transient_for($this);
$dlg->set_program_name($this->get_title());
$dlg->set_version('0.0.1pre');
$dlg->set_copyright("Copyright (c) ".date('Y')." Timothy J. Warren");
$dlg->set_website('https://github.com/aviat4ion/OpenSQLManager');
$dlg->run();
$dlg->destroy();
}
// --------------------------------------------------------------------------
/**
* Quits the GTK loop
*/
function quit()
{
Gtk::main_quit();
}
// --------------------------------------------------------------------------
/** /**
* Layout the main interface * Layout the main interface
* *
@ -67,6 +101,8 @@ class Main extends GtkWindow {
$this->show_all(); $this->show_all();
} }
// --------------------------------------------------------------------------
/** /**
* Create the main toolbar * Create the main toolbar
* *
@ -84,6 +120,8 @@ class Main extends GtkWindow {
return $tbar; return $tbar;
} }
// --------------------------------------------------------------------------
/** /**
* Create the menu for the program * Create the menu for the program
* *
@ -135,10 +173,12 @@ class Main extends GtkWindow {
return $menu_bar; return $menu_bar;
} }
// --------------------------------------------------------------------------
/** /**
* Display Info box for errors/message * Display Info box for errors/message
*/ */
function _create_infobox() private function _create_infobox()
{ {
$this->infobar = new GtkInfoBar(); $this->infobar = new GtkInfoBar();
$this->messagelabel = new GtkLabel('Welcome to OpenSQLManager!'); $this->messagelabel = new GtkLabel('Welcome to OpenSQLManager!');
@ -150,33 +190,7 @@ class Main extends GtkWindow {
return ($this->infobar); return ($this->infobar);
} }
/**
* Display About menu with version information
*/
function about()
{
$dlg = new GtkAboutDialog();
$dlg->set_transient_for($this);
$dlg->set_program_name($this->get_title());
$dlg->set_version('0.0.1pre');
$dlg->set_copyright("Copyright (c) ".date('Y')." Timothy J. Warren");
$dlg->set_website('https://github.com/aviat4ion/OpenSQLManager');
$dlg->run();
$dlg->destroy();
}
/**
* Quits the GTK loop
*/
function quit()
{
Gtk::main_quit();
}
} }
// End of main.php // End of main.php