Commit 7f9af0fd authored by dickelbeck's avatar dickelbeck

reverting a days worth of my time

parent 5cbb6031
......@@ -18,7 +18,7 @@ email address.
================================================================================
+pcbnew
refined the dialog_freeroute_exchange.pjd file, adding tooltips, wording
changes, and added this comment also:
changes, wxID_CANCEL so ESC key closes, and added this comment also:
// @todo:
// 1) add freeroute.jnlp to the Kicad project
// 2) change this next C++ line simply run $ "javaws freeroute.jnlp" as a system
......
......@@ -66,6 +66,7 @@ IMPLEMENT_DYNAMIC_CLASS( dialog_freeroute_exchange, wxDialog )
BEGIN_EVENT_TABLE( dialog_freeroute_exchange, wxDialog )
////@begin dialog_freeroute_exchange event table entries
EVT_INIT_DIALOG( dialog_freeroute_exchange::OnInitDialog )
EVT_CLOSE( dialog_freeroute_exchange::OnCloseWindow )
EVT_BUTTON( ID_CREATE_EXPORT_DSN_FILE, dialog_freeroute_exchange::OnCreateExportDsnFileClick )
......@@ -74,7 +75,7 @@ BEGIN_EVENT_TABLE( dialog_freeroute_exchange, wxDialog )
EVT_BUTTON( ID_IMPORT_FREEROUTE_DSN_FILE, dialog_freeroute_exchange::OnImportFreerouteDsnFileClick )
EVT_BUTTON( wxID_CLOSE, dialog_freeroute_exchange::OnCloseClick )
EVT_BUTTON( wxID_CANCEL, dialog_freeroute_exchange::OnCancelClick )
EVT_BUTTON( ID_GOTO_FREEROUTE_WEB_SITE, dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick )
......@@ -168,7 +169,7 @@ void dialog_freeroute_exchange::Init()
void dialog_freeroute_exchange::CreateControls()
{
////@begin dialog_freeroute_exchange content construction
// Generated by DialogBlocks, Tue 18 Mar 2008 16:15:58 CDT (unregistered)
// Generated by DialogBlocks, Wed 19 Mar 2008 00:26:30 CDT (unregistered)
dialog_freeroute_exchange* itemDialog1 = this;
......@@ -193,34 +194,38 @@ void dialog_freeroute_exchange::CreateControls()
itemButton6->SetToolTip(_("Merge a session file created by FreeRouter with the current board."));
itemBoxSizer3->Add(itemButton6, 0, wxGROW|wxALL, 5);
wxButton* itemButton7 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
itemButton7->SetToolTip(_("Close this dialog window"));
itemBoxSizer3->Add(itemButton7, 0, wxGROW|wxALL, 5);
wxStdDialogButtonSizer* itemStdDialogButtonSizer7 = new wxStdDialogButtonSizer;
itemBoxSizer3->Add(itemStdDialogButtonSizer7, 0, wxGROW|wxALL, 5);
wxButton* itemButton8 = new wxButton( itemDialog1, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton8->SetDefault();
itemStdDialogButtonSizer7->AddButton(itemButton8);
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer8, 1, wxGROW|wxALL, 5);
itemStdDialogButtonSizer7->Realize();
wxButton* itemButton9 = new wxButton( itemDialog1, ID_GOTO_FREEROUTE_WEB_SITE, _("Visit the FreeRouting.net Website with your Browser"), wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer9, 1, wxGROW|wxALL, 5);
wxButton* itemButton10 = new wxButton( itemDialog1, ID_GOTO_FREEROUTE_WEB_SITE, _("Visit the FreeRouting.net Website with your Browser"), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
itemButton9->SetToolTip(_("Launch your browser and go to the FreeRouting.net website"));
itemBoxSizer8->Add(itemButton9, 0, wxGROW|wxALL, 5);
itemButton10->SetToolTip(_("Launch your browser and go to the FreeRouting.net website"));
itemBoxSizer9->Add(itemButton10, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRouting.net URL"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer8->Add(itemStaticText10, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
wxStaticText* itemStaticText11 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRouting.net URL"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add(itemStaticText11, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
m_FreerouteURLName = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_URL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
m_FreerouteURLName->SetToolTip(_("The URL of the FreeRouting.net website"));
itemBoxSizer8->Add(m_FreerouteURLName, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
itemBoxSizer9->Add(m_FreerouteURLName, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRouting.net Command"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer8->Add(itemStaticText12, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
wxStaticText* itemStaticText13 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRouting.net Command"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add(itemStaticText13, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
m_FreerouteURLCommandString = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_CMD, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
m_FreerouteURLCommandString->SetToolTip(_("The URL of the JNLP file which Java Web Start uses to launch the FreeRouter"));
itemBoxSizer8->Add(m_FreerouteURLCommandString, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
itemBoxSizer9->Add(m_FreerouteURLCommandString, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
////@end dialog_freeroute_exchange content construction
......@@ -331,9 +336,10 @@ void dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick( wxCommandEvent& eve
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
*/
void dialog_freeroute_exchange::OnCloseClick( wxCommandEvent& event )
void dialog_freeroute_exchange::OnCancelClick( wxCommandEvent& event )
{
Close();
D(printf("OnCancelClick\n");)
Close( true );
}
......@@ -343,6 +349,8 @@ void dialog_freeroute_exchange::OnCloseClick( wxCommandEvent& event )
void dialog_freeroute_exchange::OnCloseWindow( wxCloseEvent& event )
{
D(printf("OnCloseWindow\n");)
if( m_FreeRouteSetupChanged ) // Save new config
{
m_Parent->m_Parent->m_EDA_Config->Write( FREEROUTE_URL_KEY,
......@@ -351,7 +359,7 @@ void dialog_freeroute_exchange::OnCloseWindow( wxCloseEvent& event )
m_FreerouteURLCommandString->GetValue() );
}
event.Skip();
Destroy();
}
......@@ -373,3 +381,17 @@ void dialog_freeroute_exchange::OnTextEditFrCmdUpdated( wxCommandEvent& event )
{
m_FreeRouteSetupChanged = true;
}
/*!
* wxEVT_INIT_DIALOG event handler for ID_DIALOG_FREEROUTE_EXCHANGE
*/
void dialog_freeroute_exchange::OnInitDialog( wxInitDialogEvent& event )
{
////@begin wxEVT_INIT_DIALOG event handler for ID_DIALOG_FREEROUTE_EXCHANGE in dialog_freeroute_exchange.
// Before editing this code, remove the block markers.
event.Skip();
////@end wxEVT_INIT_DIALOG event handler for ID_DIALOG_FREEROUTE_EXCHANGE in dialog_freeroute_exchange.
}
......@@ -42,7 +42,7 @@
#define ID_GOTO_FREEROUTE_WEB_SITE 10004
#define ID_TEXT_EDIT_FR_URL 10005
#define ID_TEXT_EDIT_FR_CMD 10006
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE wxCAPTION|wxRESIZE_BORDER|wxCLOSE_BOX|wxTAB_TRAVERSAL
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE _("dialog_freeroute_exchange")
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME ID_DIALOG_FREEROUTE_EXCHANGE
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE wxSize(400, 300)
......@@ -78,6 +78,9 @@ public:
////@begin dialog_freeroute_exchange event handler declarations
/// wxEVT_INIT_DIALOG event handler for ID_DIALOG_FREEROUTE_EXCHANGE
void OnInitDialog( wxInitDialogEvent& event );
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG_FREEROUTE_EXCHANGE
void OnCloseWindow( wxCloseEvent& event );
......@@ -90,8 +93,8 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE
void OnImportFreerouteDsnFileClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
void OnCloseClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_GOTO_FREEROUTE_WEB_SITE
void OnGotoFreerouteWebSiteClick( wxCommandEvent& event );
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment