summaryrefslogtreecommitdiff
path: root/rbutil/install_dialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/install_dialogs.cpp')
-rw-r--r--rbutil/install_dialogs.cpp107
1 files changed, 12 insertions, 95 deletions
diff --git a/rbutil/install_dialogs.cpp b/rbutil/install_dialogs.cpp
index 2cb754a482..6f62cac083 100644
--- a/rbutil/install_dialogs.cpp
+++ b/rbutil/install_dialogs.cpp
@@ -106,20 +106,21 @@ bool bootloaderInstallDlg::TransferDataFromWindow()
106 return false; 106 return false;
107 } 107 }
108 } 108 }
109 return true; 109
110
110} 111}
111 112
112// tranver data to the controls 113// tranver data to the controls
113bool bootloaderInstallDlg::TransferDataToWindow() 114bool bootloaderInstallDlg::TransferDataToWindow()
114{ 115{
115 if(gv->curplat == wxT("")) 116 if(gv->curplat == wxT(""))
116 { 117 {
117 WARN_DIALOG(wxT("You have not selected a audio device"), 118 WARN_DIALOG(wxT("You have not selected a audio device"),
118 wxT("Select a Device")); 119 wxT("Select a Device"));
119 return false; 120 return false;
120 } 121 }
121 int index = gv->plat_id.Index(gv->curplat); 122 int index = gv->plat_id.Index(gv->curplat);
122 123
123 if(!gv->plat_needsbootloader[index]) 124 if(!gv->plat_needsbootloader[index])
124 { 125 {
125 WARN_DIALOG(wxT("This Device doesnt need a Bootloader"), 126 WARN_DIALOG(wxT("This Device doesnt need a Bootloader"),
@@ -147,90 +148,6 @@ bool bootloaderInstallDlg::TransferDataToWindow()
147 return true; 148 return true;
148} 149}
149 150
150////////////////////////////////////////////////
151//// Bootloader Deinstallation
152/////////////////////////////////////////////////
153
154IMPLEMENT_CLASS( bootloaderDeInstallDlg, wxDialog )
155
156BEGIN_EVENT_TABLE( bootloaderDeInstallDlg, wxDialog )
157
158END_EVENT_TABLE()
159
160bootloaderDeInstallDlg::bootloaderDeInstallDlg( )
161{
162 Init();
163}
164
165bootloaderDeInstallDlg::bootloaderDeInstallDlg( wxWindow* parent,
166 wxWindowID id, const wxString& caption,
167 const wxPoint& pos, const wxSize& size, long style )
168{
169 Init();
170 Create(parent, id, caption, pos, size, style);
171}
172
173void bootloaderDeInstallDlg::CreateControls()
174{
175 // A top-level sizer
176 wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL);
177 this->SetSizer(topSizer);
178
179 wxBoxSizer* wxBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
180 topSizer->Add(wxBoxSizer2, 0, wxALIGN_LEFT|wxALL, 5);
181
182 // bitmap
183 wxBitmap sidebmp(wizard_xpm);
184
185 ImageCtrl* sideimage = new ImageCtrl(this,wxID_ANY);
186 sideimage->SetBitmap(sidebmp);
187 wxBoxSizer2->Add(sideimage,0,wxALIGN_LEFT | wxALL,5);
188
189 wxBoxSizer* wxBoxSizer3 = new wxBoxSizer(wxVERTICAL);
190 wxBoxSizer2->Add(wxBoxSizer3, 0, wxALIGN_LEFT|wxALL, 5);
191
192 // controls at the bottom
193 OkCancelCtrl* okCancel = new OkCancelCtrl(this,wxID_ANY);
194 topSizer->Add(okCancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
195}
196
197//init the local variables
198void bootloaderDeInstallDlg::Init()
199{
200
201}
202
203// create the window
204bool bootloaderDeInstallDlg::Create( wxWindow* parent,
205 wxWindowID id, const wxString& caption,
206 const wxPoint& pos, const wxSize& size, long style )
207{
208 if (!wxDialog::Create( parent, id, caption, pos, size, style ))
209 return false;
210 CreateControls();
211 GetSizer()->Fit(this);
212 GetSizer()->SetSizeHints(this);
213 Centre();
214 return true;
215}
216
217// tranver data from the controls
218bool bootloaderDeInstallDlg::TransferDataFromWindow()
219{
220 return true;
221}
222
223// tranver data to the controls
224bool bootloaderDeInstallDlg::TransferDataToWindow()
225{
226 if(gv->curplat == wxT(""))
227 {
228 WARN_DIALOG(wxT("You have not selected a audio device"),
229 wxT("Select a Device"));
230 return false;
231 }
232 return true;
233}
234 151
235//////////////////////////////////////////////// 152////////////////////////////////////////////////
236//// Font Installation 153//// Font Installation
@@ -451,7 +368,7 @@ bool rockboxDeInstallDlg::TransferDataToWindow()
451IMPLEMENT_CLASS( themesInstallDlg, wxDialog ) 368IMPLEMENT_CLASS( themesInstallDlg, wxDialog )
452 369
453BEGIN_EVENT_TABLE( themesInstallDlg, wxDialog ) 370BEGIN_EVENT_TABLE( themesInstallDlg, wxDialog )
454 371
455END_EVENT_TABLE() 372END_EVENT_TABLE()
456 373
457themesInstallDlg::themesInstallDlg( ) 374themesInstallDlg::themesInstallDlg( )
@@ -524,7 +441,7 @@ bool themesInstallDlg::Create( wxWindow* parent,
524// tranver data from the controls 441// tranver data from the controls
525bool themesInstallDlg::TransferDataFromWindow() 442bool themesInstallDlg::TransferDataFromWindow()
526{ 443{
527 444
528 gv->curdestdir = m_devicepos->getDevicePos(); 445 gv->curdestdir = m_devicepos->getDevicePos();
529 if(!wxDirExists(gv->curdestdir)) 446 if(!wxDirExists(gv->curdestdir))
530 { 447 {
@@ -555,7 +472,7 @@ bool themesInstallDlg::TransferDataToWindow()
555 wxT("Select a Device")); 472 wxT("Select a Device"));
556 return false; 473 return false;
557 } 474 }
558 475
559 m_devicepos->setDefault(); 476 m_devicepos->setDefault();
560 m_theme->setDevice(gv->curplat); 477 m_theme->setDevice(gv->curplat);
561 return true; 478 return true;
@@ -724,18 +641,18 @@ bool rockboxInstallDlg::TransferDataFromWindow()
724bool rockboxInstallDlg::TransferDataToWindow() 641bool rockboxInstallDlg::TransferDataToWindow()
725{ 642{
726 m_devicepos->setDefault(); 643 m_devicepos->setDefault();
727 644
728 if(gv->curplat == wxT("")) 645 if(gv->curplat == wxT(""))
729 { 646 {
730 WARN_DIALOG(wxT("You have not selected a audio device"), 647 WARN_DIALOG(wxT("You have not selected a audio device"),
731 wxT("Select a Device")); 648 wxT("Select a Device"));
732 return false; 649 return false;
733 } 650 }
734 651
735 wxRadioBox* BuildRadioBox = (wxRadioBox*) FindWindow(ID_BUILD_BOX); 652 wxRadioBox* BuildRadioBox = (wxRadioBox*) FindWindow(ID_BUILD_BOX);
736 653
737 int index =gv->plat_id.Index(gv->curplat); 654 int index =gv->plat_id.Index(gv->curplat);
738 655
739 wxCommandEvent updateradiobox(wxEVT_COMMAND_RADIOBOX_SELECTED, 656 wxCommandEvent updateradiobox(wxEVT_COMMAND_RADIOBOX_SELECTED,
740 ID_BUILD_BOX); 657 ID_BUILD_BOX);
741 658