diff --git a/rbutil/credits.h b/rbutil/credits.h index 5a948f7cf6..5dd6c6432f 100644 --- a/rbutil/credits.h +++ b/rbutil/credits.h @@ -22,7 +22,7 @@ #define CREDITS_H_INCLUDED #define RBUTIL_FULLNAME "The Rockbox Utility" -#define RBUTIL_VERSION "Version 0.3.2.3" +#define RBUTIL_VERSION "Version 0.3.2.4" static const wxString rbutil_developers[] = { wxT("Christi Alice Scarborough"), diff --git a/rbutil/install_dialogs.cpp b/rbutil/install_dialogs.cpp index 80ce618989..40f1ea0588 100644 --- a/rbutil/install_dialogs.cpp +++ b/rbutil/install_dialogs.cpp @@ -106,7 +106,7 @@ bool bootloaderInstallDlg::TransferDataFromWindow() return false; } } - + return true; } @@ -653,7 +653,7 @@ bool rockboxInstallDlg::TransferDataToWindow() wxRadioBox* BuildRadioBox = (wxRadioBox*) FindWindow(ID_BUILD_BOX); int index =gv->plat_id.Index(gv->curplat); - + wxCommandEvent updateradiobox(wxEVT_COMMAND_RADIOBOX_SELECTED, ID_BUILD_BOX); @@ -663,7 +663,7 @@ bool rockboxInstallDlg::TransferDataToWindow() BuildRadioBox->SetSelection(BUILD_RELEASE); } else { BuildRadioBox->Enable(BUILD_RELEASE, false); - BuildRadioBox->SetSelection(BUILD_DAILY); + BuildRadioBox->SetSelection(BUILD_BLEEDING); } wxPostEvent(this, updateradiobox); diff --git a/rbutil/rbutil-rc.rc b/rbutil/rbutil-rc.rc index 59ec6d27e4..0182338d1e 100644 --- a/rbutil/rbutil-rc.rc +++ b/rbutil/rbutil-rc.rc @@ -1,8 +1,8 @@ #define RBUTIL 1 #include RBUTIL VERSIONINFO -FILEVERSION 0,3,2,3 -PRODUCTVERSION 0,3,2,3 +FILEVERSION 0,3,2,4 +PRODUCTVERSION 0,3,2,4 FILEOS 0x00000004 FILETYPE 0x00000001 BEGIN @@ -10,8 +10,8 @@ BEGIN BEGIN BLOCK "FFFF0000" BEGIN - VALUE "FileVersion", "0.3.2.3\0" - VALUE "ProductVersion", "0.3.2.3\0" + VALUE "FileVersion", "0.3.2.4\0" + VALUE "ProductVersion", "0.3.2.4\0" VALUE "CompanyName", "Rockbox Team\0" VALUE "FileDescription", "Rockbox Utility\0" VALUE "InternalName", "rbutil\0" diff --git a/rbutil/rbutilApp.cpp b/rbutil/rbutilApp.cpp index 8233554e23..71e63884fb 100644 --- a/rbutil/rbutilApp.cpp +++ b/rbutil/rbutilApp.cpp @@ -123,20 +123,19 @@ bool rbutilFrmApp::ReadGlobalConfig(rbutilFrm* myFrame) wxLogVerbose(wxT("=== begin rbutilFrmApp::ReadGlobalConfig(%p)"), (void*) myFrame); - // Cross-platform compatibility: look for rbutil.ini in the same dir as the - // executable before trying the standard data directory. On Windows these - // are of course the same directory. - buf.Printf(wxT("%s" PATH_SEP "rbutil.ini"), gv->AppDir.c_str() ); + // Cross-platform compatibility: look for rbutil.ini in then in the app dir + // then in the user config dir (linux ~/) and + // then config dir (linux /etc/ ) -// if (! wxFileExists(buf) ) -// { -// gv->ResourceDir = gv->stdpaths->GetResourcesDir(); -// buf.Printf(wxT("%s" PATH_SEP "rbutil.ini"), -// gv->ResourceDir.c_str() ); -// } else -// { -// gv->ResourceDir = gv->AppDir; -// } + buf.Printf(wxT("%s" PATH_SEP "rbutil.ini"), gv->AppDir.c_str() ); + if (! wxFileExists(buf) ) + { + buf.Printf(wxT("%s" PATH_SEP ".rbutil" PATH_SEP "rbutil.ini"), gv->stdpaths->GetUserConfigDir().c_str() ); + if (! wxFileExists(buf) ) + { + buf.Printf(wxT("%s" PATH_SEP "rbutil.ini"), gv->stdpaths->GetConfigDir().c_str() ); + } + } wxFileInputStream* cfgis = new wxFileInputStream(buf); diff --git a/rbutil/rbutilCtrls.cpp b/rbutil/rbutilCtrls.cpp index 007bd6e17d..aef37fd0d3 100644 --- a/rbutil/rbutilCtrls.cpp +++ b/rbutil/rbutilCtrls.cpp @@ -52,17 +52,17 @@ wxSize ImageCtrl::DoGetBestSize() const //// Theme Control ////////////////////////////////////////////// -BEGIN_EVENT_TABLE(ThemeCtrl, wxControl) +BEGIN_EVENT_TABLE(ThemeCtrl, wxPanel) EVT_LISTBOX(ID_THEME_LST, ThemeCtrl::OnThemesLst) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(ThemeCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(ThemeCtrl, wxPanel) bool ThemeCtrl::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, - const wxValidator& validator) + const wxString title ) { - if (!wxControl::Create(parent, id, pos, size, style, validator)) return false; + if (!wxPanel::Create(parent, id, pos, size, style, title)) return false; CreateControls(); @@ -291,17 +291,17 @@ void ThemeCtrl::OnThemesLst(wxCommandEvent& event) //// Ok Cancel Control ////////////////////////////////////////////// -BEGIN_EVENT_TABLE(OkCancelCtrl, wxControl) +BEGIN_EVENT_TABLE(OkCancelCtrl, wxPanel) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(OkCancelCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(OkCancelCtrl, wxPanel) bool OkCancelCtrl::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, - const wxValidator& validator) + const wxString title) { - if (!wxControl::Create(parent, id, pos, size, style, validator)) return false; + if (!wxPanel::Create(parent, id, pos, size, style, title)) return false; CreateControls(); GetSizer()->Fit(this); @@ -333,23 +333,23 @@ void OkCancelCtrl::CreateControls() //// Device Selector ////////////////////////////////////////////// -BEGIN_EVENT_TABLE(DeviceSelectorCtrl, wxControl) +BEGIN_EVENT_TABLE(DeviceSelectorCtrl, wxPanel) EVT_BUTTON(ID_AUTODETECT_BTN, DeviceSelectorCtrl::OnAutoDetect) EVT_COMBOBOX(ID_DEVICE_CBX,DeviceSelectorCtrl::OnComboBox) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(DeviceSelectorCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(DeviceSelectorCtrl, wxPanel) bool DeviceSelectorCtrl::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, - const wxValidator& validator) + const wxString title) { - if (!wxControl::Create(parent, id, pos, size, style, validator)) return false; + if (!wxPanel::Create(parent, id, pos, size, style, title)) return false; CreateControls(); GetSizer()->Fit(this); GetSizer()->SetSizeHints(this); -return true; + return true; } void DeviceSelectorCtrl::CreateControls() @@ -358,8 +358,7 @@ void DeviceSelectorCtrl::CreateControls() wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL); this->SetSizer(topSizer); - //Device Selection - + //Device Selection wxBoxSizer* horizontalSizer = new wxBoxSizer(wxHORIZONTAL); topSizer->Add(horizontalSizer, 0, wxALIGN_LEFT|wxALL, 5); m_desc = new wxStaticText( this, wxID_STATIC, @@ -367,7 +366,7 @@ void DeviceSelectorCtrl::CreateControls() wxDefaultSize, 0 ); horizontalSizer->Add(m_desc, 0, wxALIGN_LEFT|wxALL, 5); - m_deviceCbx = new wxComboBox(this, ID_DEVICE_CBX,wxT(""), + m_deviceCbx = new wxComboBox(this, ID_DEVICE_CBX,wxT("Select your Device"), wxDefaultPosition,wxDefaultSize,gv->plat_name,wxCB_READONLY); m_deviceCbx->SetToolTip(wxT("Select your Device.")); @@ -379,8 +378,9 @@ void DeviceSelectorCtrl::CreateControls() wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, wxT("AutodetectBtn")); - m_autodetectBtn->SetToolTip(wxT("Autodetection of the Device.")); + m_autodetectBtn->SetToolTip(wxT("Click here to autodetect your Device.")); m_autodetectBtn->SetHelpText(wxT("Autodetection of the Device.")); + // m_autodetectBtn->SetFocus(); horizontalSizer->Add(m_autodetectBtn,0,wxGROW | wxALL,5); Layout(); @@ -457,17 +457,17 @@ void DeviceSelectorCtrl::OnAutoDetect(wxCommandEvent& event) //// DevicePosition Selector ////////////////////////////////////////////// -BEGIN_EVENT_TABLE(DevicePositionCtrl, wxControl) +BEGIN_EVENT_TABLE(DevicePositionCtrl, wxPanel) EVT_BUTTON(ID_BROWSE_BTN, DevicePositionCtrl::OnBrowseBtn) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(DevicePositionCtrl, wxControl) +IMPLEMENT_DYNAMIC_CLASS(DevicePositionCtrl, wxPanel) bool DevicePositionCtrl::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, - const wxValidator& validator) + const wxString title) { - if (!wxControl::Create(parent, id, pos, size, style, validator)) return false; + if (!wxPanel::Create(parent, id, pos, size, style, title)) return false; CreateControls(); GetSizer()->Fit(this); @@ -491,8 +491,8 @@ void DevicePositionCtrl::CreateControls() topSizer->Add(horizontalSizer, 0, wxGROW|wxALL, 5); m_devicePos = new wxTextCtrl(this,wxID_ANY,gv->curdestdir); - m_devicePos->SetToolTip(wxT("Select your Devicefolder")); - m_devicePos->SetHelpText(wxT("Select your Devicefolder")); + m_devicePos->SetToolTip(wxT("Type the folder where your Device is here")); + m_devicePos->SetHelpText(wxT("Type the folder where your Device is here")); horizontalSizer->Add(m_devicePos,0,wxGROW | wxALL,5); m_browseBtn = new wxButton(this, ID_BROWSE_BTN, wxT("Browse"), @@ -534,7 +534,7 @@ void DevicePositionCtrl::OnBrowseBtn(wxCommandEvent& event) //// FirmwarePosition Selector ////////////////////////////////////////////// -BEGIN_EVENT_TABLE(FirmwarePositionCtrl, wxControl) +BEGIN_EVENT_TABLE(FirmwarePositionCtrl, wxPanel) EVT_BUTTON(ID_BROWSE_BTN, FirmwarePositionCtrl::OnBrowseBtn) END_EVENT_TABLE() @@ -542,9 +542,9 @@ IMPLEMENT_DYNAMIC_CLASS(FirmwarePositionCtrl, wxControl) bool FirmwarePositionCtrl::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, - const wxValidator& validator) + const wxString title) { - if (!wxControl::Create(parent, id, pos, size, style, validator)) return false; + if (!wxPanel::Create(parent, id, pos, size, style, title)) return false; CreateControls(); GetSizer()->Fit(this); @@ -568,8 +568,8 @@ void FirmwarePositionCtrl::CreateControls() topSizer->Add(horizontalSizer, 0, wxALIGN_LEFT|wxALL, 5); m_firmwarePos = new wxTextCtrl(this,wxID_ANY,gv->curdestdir); - m_firmwarePos->SetToolTip(wxT("Select the original Firmware")); - m_firmwarePos->SetHelpText(wxT("Select the original Firmware")); + m_firmwarePos->SetToolTip(wxT("Type the folder where the original Firmware is here")); + m_firmwarePos->SetHelpText(wxT("Type the folder where the original Firmware is here")); horizontalSizer->Add(m_firmwarePos,0,wxGROW | wxALL,5); m_browseBtn = new wxButton(this, ID_BROWSE_BTN, wxT("Browse"), diff --git a/rbutil/rbutilCtrls.h b/rbutil/rbutilCtrls.h index 89e2b0b3d1..1b084a88d9 100644 --- a/rbutil/rbutilCtrls.h +++ b/rbutil/rbutilCtrls.h @@ -39,7 +39,7 @@ protected: }; -class ThemeCtrl: public wxControl +class ThemeCtrl: public wxPanel { DECLARE_DYNAMIC_CLASS(ThemeCtrl) DECLARE_EVENT_TABLE() @@ -58,18 +58,18 @@ public: ThemeCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")) { Init(); - Create(parent, id, pos, size, style, validator); + Create(parent, id, pos, size, style, title); } // Creation bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")); // Creates the controls and sizers void CreateControls(); @@ -100,7 +100,7 @@ protected: }; -class OkCancelCtrl: public wxControl +class OkCancelCtrl: public wxPanel { DECLARE_DYNAMIC_CLASS(OkCancelCtrl) DECLARE_EVENT_TABLE() @@ -111,18 +111,18 @@ public: OkCancelCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")) { Init(); - Create(parent, id, pos, size, style, validator); + Create(parent, id, pos, size, style, title); } // Creation bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")); // Creates the controls and sizers void CreateControls(); @@ -135,7 +135,7 @@ protected: }; -class DeviceSelectorCtrl: public wxControl +class DeviceSelectorCtrl: public wxPanel { DECLARE_DYNAMIC_CLASS(DeviceSelectorCtrl) DECLARE_EVENT_TABLE() @@ -151,17 +151,17 @@ public: DeviceSelectorCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")) { - Create(parent, id, pos, size, style, validator); + Create(parent, id, pos, size, style, title); } // Creation bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")); // Creates the controls and sizers void CreateControls(); @@ -181,7 +181,7 @@ protected: }; -class DevicePositionCtrl: public wxControl +class DevicePositionCtrl: public wxPanel { DECLARE_DYNAMIC_CLASS(DevicePositionCtrl) DECLARE_EVENT_TABLE() @@ -196,18 +196,18 @@ public: DevicePositionCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")) { Init(); - Create(parent, id, pos, size, style, validator); + Create(parent, id, pos, size, style, title); } // Creation bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")); // Creates the controls and sizers void CreateControls(); @@ -228,7 +228,7 @@ protected: }; -class FirmwarePositionCtrl: public wxControl +class FirmwarePositionCtrl: public wxPanel { DECLARE_DYNAMIC_CLASS(FirmwarePositionCtrl) DECLARE_EVENT_TABLE() @@ -243,300 +243,18 @@ public: FirmwarePositionCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")) { Init(); - Create(parent, id, pos, size, style, validator); + Create(parent, id, pos, size, style, title); } // Creation bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); - - // Creates the controls and sizers - void CreateControls(); - // Common initialization - void Init() { } - // Event handlers - void OnBrowseBtn(wxCommandEvent& event); - // Accessors - wxString getFirmwarePos(); - void setDefault(); - -protected: - wxTextCtrl* m_firmwarePos; - wxStaticText* m_desc; - wxButton* m_browseBtn; - -}; - - - -#endif - -#ifndef RBUTILCTRLS_H_INCLUDED -#define RBUTILCTRLS_H_INCLUDED - -#include "rbutil.h" - - -class ImageCtrl: public wxControl -{ -DECLARE_DYNAMIC_CLASS(ImageCtrl) -DECLARE_EVENT_TABLE() - -public: - // Constructors - ImageCtrl() { } - ImageCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) - { - Create(parent, id, pos, size, style, validator); - } - // Creation - bool Create(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); - - // Event handlers - void OnPaint(wxPaintEvent& event); - - wxSize DoGetBestSize() const ; - - void SetBitmap(wxBitmap bmp); - -protected: - wxBitmap m_bitmap; - -}; - -class ThemeCtrl: public wxControl -{ -DECLARE_DYNAMIC_CLASS(ThemeCtrl) -DECLARE_EVENT_TABLE() -public: -enum { - ID_DESC = 10001, - ID_FILESIZE= 10002, - ID_INSTALLCHECKBOX= 10003, - ID_PREVIEW_BITMAP = 10004, - ID_THEME_LST = 10005, - }; //End of Enum - -public: - // Constructors - ThemeCtrl() { Init(); } - ThemeCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) - { - Init(); - Create(parent, id, pos, size, style, validator); - } - // Creation - bool Create(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); - - // Creates the controls and sizers - void CreateControls(); - // Common initialization - void Init(); - // Event handlers - void OnThemesLst(wxCommandEvent& event); - void OnCheckBox(wxCommandEvent& event); - - void setDevice(wxString device); - wxArrayString getThemesToInstall(); - -protected: - wxString m_currentimage; - wxString m_currentResolution; - - wxStaticText* m_desc; - wxListBox* m_themeList; - wxStaticText* m_size; - wxStaticText* m_themedesc; - ImageCtrl* m_PreviewBitmap; - - wxArrayString m_Themes; - wxArrayString m_Themes_path; - wxArrayString m_Themes_size; - wxArrayString m_Themes_image; - wxArrayString m_Themes_desc; - - wxCriticalSection m_setDeviceSection; - wxCriticalSection m_ThemeSelectSection; - -}; - -class OkCancelCtrl: public wxControl -{ -DECLARE_DYNAMIC_CLASS(OkCancelCtrl) -DECLARE_EVENT_TABLE() - -public: - // Constructors - OkCancelCtrl() { Init(); } - OkCancelCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) - { - Init(); - Create(parent, id, pos, size, style, validator); - } - // Creation - bool Create(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); - - // Creates the controls and sizers - void CreateControls(); - // Common initialization - void Init() { } - -protected: - wxButton* m_OkBtn; - wxButton* m_CancelBtn; - -}; - -class DeviceSelectorCtrl: public wxControl -{ -DECLARE_DYNAMIC_CLASS(DeviceSelectorCtrl) -DECLARE_EVENT_TABLE() -public: -enum { - ID_DEVICE_CBX = 10001, - ID_AUTODETECT_BTN= 10002, - }; //End of Enum - -public: - // Constructors - DeviceSelectorCtrl() { } - DeviceSelectorCtrl(wxWindow* parent, wxWindowID id,bool bootmode, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) - { - Create(parent, id,bootmode, pos, size, style, validator); - } - // Creation - bool Create(wxWindow* parent, wxWindowID id,bool bootmode, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); - - // Creates the controls and sizers - void CreateControls(bool bootmode); - // Event handlers - void OnAutoDetect(wxCommandEvent& event); - void OnComboBox(wxCommandEvent& event); - // Accessors - wxString getDevice(); - void setDefault(); - -protected: - wxString m_currentDevice; - wxComboBox* m_deviceCbx; - wxStaticText* m_desc; - wxButton* m_autodetectBtn; - -}; - - -class DevicePositionCtrl: public wxControl -{ -DECLARE_DYNAMIC_CLASS(DevicePositionCtrl) -DECLARE_EVENT_TABLE() -public: -enum { - ID_BROWSE_BTN = 10003, - }; //End of Enum - -public: - // Constructors - DevicePositionCtrl() { Init(); } - DevicePositionCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) - { - Init(); - Create(parent, id, pos, size, style, validator); - } - // Creation - bool Create(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); - - // Creates the controls and sizers - void CreateControls(); - // Common initialization - void Init() { } - // Event handlers - void OnBrowseBtn(wxCommandEvent& event); - // Accessors - wxString getDevicePos(); - - void setDefault(); - -protected: - wxTextCtrl* m_devicePos; - wxStaticText* m_desc; - wxButton* m_browseBtn; - -}; - - -class FirmwarePositionCtrl: public wxControl -{ -DECLARE_DYNAMIC_CLASS(FirmwarePositionCtrl) -DECLARE_EVENT_TABLE() -public: -enum { - ID_BROWSE_BTN = 10004, - }; //End of Enum - -public: - // Constructors - FirmwarePositionCtrl() { Init(); } - FirmwarePositionCtrl(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator) - { - Init(); - Create(parent, id, pos, size, style, validator); - } - // Creation - bool Create(wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER, - const wxValidator& validator = wxDefaultValidator); + long style = wxNO_BORDER|wxTAB_TRAVERSAL, + const wxString title = wxT("")); // Creates the controls and sizers void CreateControls(); diff --git a/rbutil/rbutilFrm.cpp b/rbutil/rbutilFrm.cpp index d49faee895..fd9558905b 100644 --- a/rbutil/rbutilFrm.cpp +++ b/rbutil/rbutilFrm.cpp @@ -89,12 +89,15 @@ void rbutilFrm::CreateGUIControls(void) wxBitmap rockboxbmp(rblogo_xpm); ImageCtrl* rockboxbmpCtrl = new ImageCtrl(mainPanel,wxID_ANY); rockboxbmpCtrl->SetBitmap(rockboxbmp); + WxBoxSizer0->Add(rockboxbmpCtrl,0,wxALIGN_CENTER_HORIZONTAL | wxALL,5); myDeviceSelector = new DeviceSelectorCtrl(mainPanel,wxID_ANY); myDeviceSelector->setDefault(); WxBoxSizer0->Add(myDeviceSelector,0,wxGROW|wxALL,5); + + wxNotebook* tabwindow = new wxNotebook(mainPanel,wxID_ANY); WxBoxSizer0->Add(tabwindow,1,wxGROW|wxALL,5); @@ -128,8 +131,7 @@ void rbutilFrm::CreateGUIControls(void) WxBitmapButton4 = new wxBitmapButton(installpage, ID_BOOTLOADER_BTN, BootloaderInstallButton, wxPoint(0,0), wxSize(64,54), wxRAISED_BORDER | wxBU_AUTODRAW); - WxBitmapButton4->SetToolTip(wxT("Instructions for installing the " - "Rockbox bootloader on your audio device")); + WxBitmapButton4->SetToolTip(wxT("Click here to install the Rockbox bootloader")); WxFlexGridSizer1->Add(WxBitmapButton4, 0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); @@ -146,7 +148,7 @@ void rbutilFrm::CreateGUIControls(void) WxBitmapButton1_BITMAP, wxPoint(0,0), wxSize(64,54), wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator, wxT("WxBitmapButton1")); - WxBitmapButton1->SetToolTip(wxT("Install Rockbox")); + WxBitmapButton1->SetToolTip(wxT("Click here to install Rockbox")); WxFlexGridSizer1->Add(WxBitmapButton1,0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); @@ -176,7 +178,7 @@ void rbutilFrm::CreateGUIControls(void) WxBitmapButton3 = new wxBitmapButton(themepage, ID_FONT_BTN, FontInstallButton, wxPoint(0,0), wxSize(64,54), wxRAISED_BORDER | wxBU_AUTODRAW); - WxBitmapButton3->SetToolTip(wxT("Download the most up to date " + WxBitmapButton3->SetToolTip(wxT("Click here to install the most up to date " "Rockbox fonts.")); WxFlexGridSizer2->Add(WxBitmapButton3, 0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); @@ -193,7 +195,7 @@ void rbutilFrm::CreateGUIControls(void) WxBitmapButton5 = new wxBitmapButton(themepage, ID_THEMES_BTN, ThemesInstallButton, wxPoint(0,0), wxSize(64,54), wxRAISED_BORDER | wxBU_AUTODRAW); - WxBitmapButton5->SetToolTip(wxT("Download other Themes for Rockbox.")); + WxBitmapButton5->SetToolTip(wxT("Click here to install themes for Rockbox.")); WxFlexGridSizer2->Add(WxBitmapButton5, 0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); @@ -207,7 +209,7 @@ void rbutilFrm::CreateGUIControls(void) WxBitmapButton6 = new wxBitmapButton(themepage, ID_DOOM_BTN, DoomInstallButton, wxPoint(0,0), wxSize(64,54), wxRAISED_BORDER | wxBU_AUTODRAW); - WxBitmapButton6->SetToolTip(wxT("Download freedoom wad files.")); + WxBitmapButton6->SetToolTip(wxT("Click here to install the freedoom wad files.")); WxFlexGridSizer2->Add(WxBitmapButton6, 0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); @@ -238,7 +240,7 @@ void rbutilFrm::CreateGUIControls(void) WxBitmapButton2_BITMAP, wxPoint(0,0), wxSize(64,54), wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator, wxT("WxBitmapButton2")); - WxBitmapButton2->SetToolTip(wxT("Uninstall Rockbox")); + WxBitmapButton2->SetToolTip(wxT("Click here to uninstall Rockbox")); WxFlexGridSizer3->Add(WxBitmapButton2,0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); @@ -252,7 +254,7 @@ void rbutilFrm::CreateGUIControls(void) WxBitmapButton4_BITMAP, wxPoint(0,0), wxSize(64,54), wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator, wxT("WxBitmapButton4")); - WxBitmapButton4->SetToolTip(wxT("Uninstall Bootloader")); + WxBitmapButton4->SetToolTip(wxT("Click here to uninstall the Bootloader")); WxFlexGridSizer3->Add(WxBitmapButton4,0, wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); diff --git a/rbutil/rbutilFrm.h b/rbutil/rbutilFrm.h index a560ff6b86..f33adc13f1 100644 --- a/rbutil/rbutilFrm.h +++ b/rbutil/rbutilFrm.h @@ -56,12 +56,12 @@ public: wxMINIMIZE_BOX|wxMAXIMIZE_BOX | wxCLOSE_BOX); virtual ~rbutilFrm(); public: - DeviceSelectorCtrl* myDeviceSelector; - wxHyperlinkCtrl* manuallink; - wxHtmlWindow* manual; - wxString curManualDevice; + DeviceSelectorCtrl* myDeviceSelector; + wxHyperlinkCtrl* manuallink; + wxHtmlWindow* manual; + wxString curManualDevice; - wxMenuBar *WxMenuBar1; + wxMenuBar *WxMenuBar1; wxStaticText *WxStaticText3; wxBitmapButton *WxBitmapButton2; wxStaticText *WxStaticText2; @@ -91,16 +91,16 @@ public: ID_WXSTATICTEXT2 = 1029, ID_INSTALL_BTN = 1028, ID_WXSTATICBITMAP1 = 1053, - ID_FONT_BTN = 1128, - ID_THEMES_BTN = 1139, - ID_DOOM_BTN = 1140, - ID_BOOTLOADER_BTN = 1129, + ID_FONT_BTN = 1128, + ID_THEMES_BTN = 1139, + ID_DOOM_BTN = 1140, + ID_BOOTLOADER_BTN = 1129, ID_WXPANEL1 = 1064, - ID_MANUAL = 1065, - ID_FILE_PROXY = 1066, + ID_MANUAL = 1065, + ID_FILE_PROXY = 1066, - ID_DUMMY_VALUE_ + ID_DUMMY_VALUE_ }; //End of Enum public: void rbutilFrmClose(wxCloseEvent& event); @@ -116,9 +116,9 @@ public: void OnBootloaderBtn(wxCommandEvent& event); void OnPortableInstall(wxCommandEvent& event); void OnBootloaderRemoveBtn(wxCommandEvent& event); - void OnManualUpdate(wxUpdateUIEvent& event); - void OnFileProxy(wxCommandEvent& event); - void OnDoomBtn(wxCommandEvent& event); + void OnManualUpdate(wxUpdateUIEvent& event); + void OnFileProxy(wxCommandEvent& event); + void OnDoomBtn(wxCommandEvent& event); };