From b7bef6a82e4eab889e1844bec6ed577896cbb879 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 30 Jan 2012 13:15:44 -0500 Subject: [PATCH] Rearranged private methods --- src/windows/main.php | 70 ++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/src/windows/main.php b/src/windows/main.php index 794e1e8..3f423f6 100644 --- a/src/windows/main.php +++ b/src/windows/main.php @@ -32,6 +32,40 @@ class Main extends GtkWindow { $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 * @@ -67,6 +101,8 @@ class Main extends GtkWindow { $this->show_all(); } + // -------------------------------------------------------------------------- + /** * Create the main toolbar * @@ -84,6 +120,8 @@ class Main extends GtkWindow { return $tbar; } + // -------------------------------------------------------------------------- + /** * Create the menu for the program * @@ -135,10 +173,12 @@ class Main extends GtkWindow { return $menu_bar; } + // -------------------------------------------------------------------------- + /** * Display Info box for errors/message */ - function _create_infobox() + private function _create_infobox() { $this->infobar = new GtkInfoBar(); $this->messagelabel = new GtkLabel('Welcome to OpenSQLManager!'); @@ -150,33 +190,7 @@ class Main extends GtkWindow { 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 \ No newline at end of file