Fix About Dialog
This commit is contained in:
parent
72897157bd
commit
651f42f305
@ -101,30 +101,4 @@ function confirm($message)
|
||||
return ($answer === Gtk::RESPONSE_YES) ? TRUE : FALSE;*/
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Display About menu with version information
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function about()
|
||||
{
|
||||
/*$dlg = new \wxAboutDialogInfo();
|
||||
|
||||
$dlg->SetName(PROGRAM_NAME);
|
||||
$dlg->SetVersion(VERSION);
|
||||
|
||||
$dlg->SetCopyright("Copyright (c) ".date('Y')." Timothy J. Warren");
|
||||
|
||||
$dlg->SetWebSite('https://github.com/aviat4ion/OpenSQLManager','Fork on Github');
|
||||
|
||||
$dlg->SetLicense(file_get_contents(BASE_DIR . "/LICENSE"));
|
||||
|
||||
$dlg->SetDevelopers(array(
|
||||
'Timothy J. Warren',
|
||||
));
|
||||
|
||||
\wxGenericAboutBox($dlg);*/
|
||||
}
|
||||
// End of functions.php
|
@ -46,7 +46,7 @@ class Main extends \wxFrame {
|
||||
{
|
||||
parent::__construct(NULL, NULL, PROGRAM_NAME, \wxDefaultPosition, new \wxSize(800, 600));
|
||||
|
||||
$this->SetSizeHints(\wxDefaultSize, \wxDefaultSize);
|
||||
//$this->SetSizeHints(wxDefaultSize, wxDefaultSize);
|
||||
|
||||
$this->_create_menu();
|
||||
|
||||
@ -85,6 +85,33 @@ class Main extends \wxFrame {
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Display About menu with version information
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function about()
|
||||
{
|
||||
$dlg = new \wxAboutDialogInfo();
|
||||
|
||||
$dlg->SetName(PROGRAM_NAME);
|
||||
$dlg->SetVersion(VERSION);
|
||||
|
||||
$dlg->SetCopyright("Copyright (c) ".date('Y')." Timothy J. Warren");
|
||||
|
||||
$dlg->SetWebSite('https://github.com/aviat4ion/OpenSQLManager','Fork on Github');
|
||||
|
||||
$dlg->SetLicense(file_get_contents(BASE_DIR . "/LICENSE"));
|
||||
|
||||
$dlg->SetDevelopers(array(
|
||||
'Timothy J. Warren',
|
||||
));
|
||||
|
||||
\wxAboutBox($dlg);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Layout the main interface
|
||||
* Create menus, hboxes, vboxs and other widgets
|
||||
@ -96,9 +123,21 @@ class Main extends \wxFrame {
|
||||
// Set up the main menu
|
||||
$this->_create_menu();
|
||||
|
||||
$win = new \wxSplitterWindow($this);
|
||||
// Create a split window
|
||||
$win = new \wxSplitterWindow($this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
|
||||
$win->setSplitMode(wxSPLIT_HORIZONTAL);
|
||||
|
||||
// Add a sizer
|
||||
$bSizer1 = new \wxBoxSizer(wxHORIZONTAL);
|
||||
$bSizer1->Add($win, 1, wxALL|wxEXPAND, 0);
|
||||
|
||||
$this->SetSizer($bSizer1);
|
||||
$this->Layout();
|
||||
|
||||
$this->Centre(wxBOTH);
|
||||
|
||||
//$tabs = new \wxNotebook($win, 2);
|
||||
|
||||
// Add the connection sidebar
|
||||
$this->connection_sidebar =& Connection_Sidebar::get_instance();
|
||||
}
|
||||
@ -132,8 +171,8 @@ class Main extends \wxFrame {
|
||||
// Help Menu
|
||||
{
|
||||
// Set up the about item
|
||||
//$top_help_menu->Append(4, "&About", "About this program");
|
||||
//$this->Connect(4, wxEVT_COMMAND_MENU_SELECTED, "about");
|
||||
$top_help_menu->Append(4, "&About", "About this program");
|
||||
$this->Connect(4, wxEVT_COMMAND_MENU_SELECTED, array($this, "about"));
|
||||
|
||||
// Add the top level menu to the menubar
|
||||
$menu_bar->Append($top_help_menu, "&Help");
|
||||
|
Reference in New Issue
Block a user