summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilFrm.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-03-15 14:02:37 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-03-15 14:02:37 +0000
commit994a6d6c4c3cf580d663b65aadb50e99da06ab73 (patch)
tree04208011cf67dd305153c02398f38cf9799832ed /rbutil/rbutilFrm.cpp
parent1625c91fbd51cf7c0376995ae49db8af9ec6c49c (diff)
downloadrockbox-994a6d6c4c3cf580d663b65aadb50e99da06ab73.tar.gz
rockbox-994a6d6c4c3cf580d663b65aadb50e99da06ab73.zip
Support for Theme installing in rbUtil. FS#6709
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12781 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilFrm.cpp')
-rw-r--r--rbutil/rbutilFrm.cpp361
1 files changed, 214 insertions, 147 deletions
diff --git a/rbutil/rbutilFrm.cpp b/rbutil/rbutilFrm.cpp
index c90930c47a..35c34e8dc2 100644
--- a/rbutil/rbutilFrm.cpp
+++ b/rbutil/rbutilFrm.cpp
@@ -27,6 +27,8 @@
#include "fonts_3d.xpm"
#include "tools2_3d.xpm"
#include "rblogo.xpm"
+#include "untools2_3d.xpm"
+#include "themes_3d.xpm"
#include "bootloaders.h"
@@ -40,6 +42,7 @@ BEGIN_EVENT_TABLE(rbutilFrm,wxFrame)
EVT_BUTTON (ID_INSTALL_BTN, rbutilFrm::OnInstallBtn)
EVT_BUTTON (ID_REMOVE_BTN, rbutilFrm::OnRemoveBtn)
EVT_BUTTON (ID_FONT_BTN, rbutilFrm::OnFontBtn)
+ EVT_BUTTON (ID_THEMES_BTN, rbutilFrm::OnThemesBtn)
EVT_BUTTON (ID_BOOTLOADER_BTN, rbutilFrm::OnBootloaderBtn)
EVT_BUTTON (ID_BOOTLOADERREMOVE_BTN, rbutilFrm::OnBootloaderRemoveBtn)
@@ -83,7 +86,7 @@ void rbutilFrm::CreateGUIControls(void)
WxBoxSizer2->Add(WxStaticBitmap1,0,wxALIGN_CENTER_HORIZONTAL | wxALL,5);
wxStaticBox* WxStaticBoxSizer3_StaticBoxObj = new wxStaticBox(WxPanel1,
- wxID_ANY, _("Please choose an option"));
+ wxID_ANY, wxT("Please choose an option"));
wxStaticBoxSizer* WxStaticBoxSizer3 =
new wxStaticBoxSizer(WxStaticBoxSizer3_StaticBoxObj,wxHORIZONTAL);
WxBoxSizer2->Add(WxStaticBoxSizer3,1,wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
@@ -95,13 +98,13 @@ void rbutilFrm::CreateGUIControls(void)
WxBitmapButton4 = new wxBitmapButton(WxPanel1, ID_BOOTLOADER_BTN,
BootloaderInstallButton, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW);
- WxBitmapButton4->SetToolTip(_("Instructions for installing the "
+ WxBitmapButton4->SetToolTip(wxT("Instructions for installing the "
"Rockbox bootloader on your audio device"));
WxFlexGridSizer1->Add(WxBitmapButton4, 0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
wxStaticText* WxStaticText5 = new wxStaticText(WxPanel1, wxID_ANY,
- _("Bootloader installation instructions\n\n"
+ wxT("Bootloader installation instructions\n\n"
"Before Rockbox can be installed on your audio player, you "
"may have to\ninstall a bootloader. This can not currently "
"be done automatically, but is\nonly necessary the first time "
@@ -114,12 +117,12 @@ void rbutilFrm::CreateGUIControls(void)
WxBitmapButton1_BITMAP, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator,
wxT("WxBitmapButton1"));
- WxBitmapButton1->SetToolTip(_("Install Rockbox"));
+ WxBitmapButton1->SetToolTip(wxT("Install Rockbox"));
WxFlexGridSizer1->Add(WxBitmapButton1,0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
WxStaticText2 = new wxStaticText(WxPanel1, ID_WXSTATICTEXT2,
- _("Install Rockbox on your audio player"));
+ wxT("Install Rockbox on your audio player"));
WxFlexGridSizer1->Add(WxStaticText2,0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
@@ -127,13 +130,13 @@ void rbutilFrm::CreateGUIControls(void)
WxBitmapButton3 = new wxBitmapButton(WxPanel1, ID_FONT_BTN,
FontInstallButton, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW);
- WxBitmapButton3->SetToolTip(_("Download the most up to date "
+ WxBitmapButton3->SetToolTip(wxT("Download the most up to date "
"Rockbox fonts."));
WxFlexGridSizer1->Add(WxBitmapButton3, 0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
wxStaticText* WxStaticText4 = new wxStaticText(WxPanel1, wxID_ANY,
- _("Install the Rockbox fonts package\n\n"
+ wxT("Install the Rockbox fonts package\n\n"
"This step is only needed if you have installed "
"a daily build and want\nthe full set of Rockbox fonts. You "
"will not need to download these\nagain unless you uninstall "
@@ -141,48 +144,62 @@ void rbutilFrm::CreateGUIControls(void)
WxFlexGridSizer1->Add(WxStaticText4, 0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
+
+ wxBitmap ThemesInstallButton (themes_3d_xpm);
+ WxBitmapButton5 = new wxBitmapButton(WxPanel1, ID_THEMES_BTN,
+ ThemesInstallButton, wxPoint(0,0), wxSize(64,54),
+ wxRAISED_BORDER | wxBU_AUTODRAW);
+ WxBitmapButton5->SetToolTip(wxT("Download other Themes for Rockbox."));
+ WxFlexGridSizer1->Add(WxBitmapButton5, 0,
+ wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
+
+ wxStaticText* WxStaticText6 = new wxStaticText(WxPanel1, wxID_ANY,
+ wxT("Install more Themes for Rockbox.\n\n"));
+ WxFlexGridSizer1->Add(WxStaticText6, 0,
+ wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
+
wxBitmap WxBitmapButton2_BITMAP (uninstall_3d_xpm);
WxBitmapButton2 = new wxBitmapButton(WxPanel1, ID_REMOVE_BTN,
WxBitmapButton2_BITMAP, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator,
wxT("WxBitmapButton2"));
- WxBitmapButton2->SetToolTip(_("Uninstall Rockbox"));
+ WxBitmapButton2->SetToolTip(wxT("Uninstall Rockbox"));
WxFlexGridSizer1->Add(WxBitmapButton2,0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
WxStaticText3 = new wxStaticText(WxPanel1, ID_WXSTATICTEXT3,
- _("Remove Rockbox from your audio player"));
+ wxT("Remove Rockbox from your audio player"));
WxFlexGridSizer1->Add(WxStaticText3,0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
- wxBitmap WxBitmapButton4_BITMAP (uninstall_3d_xpm);
+ wxBitmap WxBitmapButton4_BITMAP (untools2_3d_xpm);
WxBitmapButton4 = new wxBitmapButton(WxPanel1, ID_BOOTLOADERREMOVE_BTN,
WxBitmapButton4_BITMAP, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator,
wxT("WxBitmapButton4"));
- WxBitmapButton4->SetToolTip(_("Uninstall Bootloader"));
+ WxBitmapButton4->SetToolTip(wxT("Uninstall Bootloader"));
WxFlexGridSizer1->Add(WxBitmapButton4,0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
WxStaticText4 = new wxStaticText(WxPanel1, ID_WXSTATICTEXT4,
- _("Remove Rockbox Bootloader from your audio player"));
+ wxT("Remove Rockbox Bootloader from your audio player"));
WxFlexGridSizer1->Add(WxStaticText4,0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
WxMenuBar1 = new wxMenuBar();
wxMenu *ID_FILE_MENU_Mnu_Obj = new wxMenu(0);
- WxMenuBar1->Append(ID_FILE_MENU_Mnu_Obj, _("&File"));
+ WxMenuBar1->Append(ID_FILE_MENU_Mnu_Obj, wxT("&File"));
ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_WIPECACHE,
- _("&Empty local download cache"), wxT(""), wxITEM_NORMAL);
+ wxT("&Empty local download cache"), wxT(""), wxITEM_NORMAL);
if (! gv->portable )
{
ID_FILE_MENU_Mnu_Obj->Append(ID_PORTABLE_INSTALL,
- _("&Install Rockbox Utility on device"), wxT(""), wxITEM_NORMAL);
+ wxT("&Install Rockbox Utility on device"), wxT(""), wxITEM_NORMAL);
}
- ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_ABOUT, _("&About"), wxT(""),
+ ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_ABOUT, wxT("&About"), wxT(""),
wxITEM_NORMAL);
- ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_EXIT, _("E&xit\tCtrl+X"), wxT(""),
+ ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_EXIT, wxT("E&xit\tCtrl+X"), wxT(""),
wxITEM_NORMAL);
this->SetMenuBar(WxMenuBar1);
@@ -191,24 +208,24 @@ void rbutilFrm::CreateGUIControls(void)
GetSizer()->SetSizeHints(this);
if (gv->portable)
{
- this->SetTitle(_("Rockbox Utility (portable)"));
+ this->SetTitle(wxT("Rockbox Utility (portable)"));
} else
{
- this->SetTitle(_("Rockbox Utility"));
+ this->SetTitle(wxT("Rockbox Utility"));
}
this->Center();
wxIcon rbutilFrm_ICON (rbutilFrm_XPM);
this->SetIcon(rbutilFrm_XPM);
this->SetToolTip(wxT("Install Rockbox"));
- wxLogVerbose("=== end rbutilFrm::CreateGUIControls");
+ wxLogVerbose(wxT("=== end rbutilFrm::CreateGUIControls"));
}
void rbutilFrm::rbutilFrmClose(wxCloseEvent& event)
{
- wxLogVerbose("=== begin rbutilFrm::rbutilFrmClose(event)");
+ wxLogVerbose(wxT("=== begin rbutilFrm::rbutilFrmClose(event)"));
Destroy();
- wxLogVerbose("=== end rbutilFrm::rbutilFrmClose");
+ wxLogVerbose(wxT("=== end rbutilFrm::rbutilFrmClose"));
}
@@ -217,9 +234,9 @@ void rbutilFrm::rbutilFrmClose(wxCloseEvent& event)
*/
void rbutilFrm::OnFileExit(wxCommandEvent& event)
{
- wxLogVerbose("=== begin rbutilFrm::OnFileExit(event)");
+ wxLogVerbose(wxT("=== begin rbutilFrm::OnFileExit(event)"));
Close();
- wxLogVerbose("=== end rbutilFrm::OnFileExit");
+ wxLogVerbose(wxT("=== end rbutilFrm::OnFileExit"));
}
// The routines this code uses are in the wxWidgets documentation, but
@@ -230,11 +247,11 @@ void rbutilFrm::OnFileAbout(wxCommandEvent& event)
/*
wxAboutDialogInfo *info = new wxAboutDialogInfo();
- info->SetName(_(RBUTIL_FULLNAME));
- info->SetVersion(_(RBUTIL_VERSION));
- info->SetCopyright(_(RBUTIL_COPYRIGHT));
- info->SetDescription(_(RBUTIL_DESCRIPTION));
- info->SetWebSite(_(RBUTIL_WEBSITE));
+ info->SetName(wxT(RBUTIL_FULLNAME));
+ info->SetVersion(wxT(RBUTIL_VERSION));
+ info->SetCopyright(wxT(RBUTIL_COPYRIGHT));
+ info->SetDescription(wxT(RBUTIL_DESCRIPTION));
+ info->SetWebSite(wxT(RBUTIL_WEBSITE));
long i = 0;
while (rbutil_developers[i] != "")
@@ -256,8 +273,8 @@ void rbutilFrm::OnFileWipeCache(wxCommandEvent& event)
datadir = gv->stdpaths->GetUserDataDir();
if (datadir == "")
{
- ERR_DIALOG(_("Can't locate user data directory. Unable to delete "
- "cache."), _("Delete download cache.") );
+ ERR_DIALOG(wxT("Can't locate user data directory. Unable to delete "
+ "cache."), wxT("Delete download cache.") );
return;
}
@@ -266,13 +283,13 @@ void rbutilFrm::OnFileWipeCache(wxCommandEvent& event)
if (! rm_rf(cacheloc) )
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("Local download cache has been deleted.")
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("Local download cache has been deleted.")
,"Cache deletion", wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else {
- MESG_DIALOG(_("Errors occured deleting the local download cache."));
+ MESG_DIALOG(wxT("Errors occured deleting the local download cache."));
}
wxMkdir(cacheloc, 0777);
@@ -280,10 +297,10 @@ void rbutilFrm::OnFileWipeCache(wxCommandEvent& event)
void rbutilFrm::OnBootloaderRemoveBtn(wxCommandEvent& event)
{
- wxLogVerbose("=== begin rbutilFrm::OnBootloaderRemoveBtn(event)");
+ wxLogVerbose(wxT("=== begin rbutilFrm::OnBootloaderRemoveBtn(event)"));
wxWizard *wizard = new wxWizard(this, wxID_ANY,
- _("Rockbox Bootloader Uninstallation Wizard"),
+ wxT("Rockbox Bootloader Uninstallation Wizard"),
wxBitmap(wizard_xpm),
wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@@ -302,83 +319,83 @@ void rbutilFrm::OnBootloaderRemoveBtn(wxCommandEvent& event)
if (wizard->RunWizard(page1) )
{
// uninstall the bootloader
- if(gv->curbootloadermethod == "ipodpatcher")
+ if(gv->curbootloadermethod == wxT("ipodpatcher"))
{
if(ipodpatcher(BOOTLOADER_REM))
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been uninstalled.")
- ,"Uninstallation", wxOK |wxICON_INFORMATION);
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been uninstalled.")
+ ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else
{
- MESG_DIALOG(_("The Uninstallation has failed.") );
+ MESG_DIALOG(wxT("The Uninstallation has failed.") );
}
}
- else if(gv->curbootloadermethod == "gigabeatf")
+ else if(gv->curbootloadermethod == wxT("gigabeatf"))
{
if(gigabeatf(BOOTLOADER_REM))
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been uninstalled.")
- ,"Uninstallation", wxOK |wxICON_INFORMATION);
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been uninstalled.")
+ ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else
- MESG_DIALOG(_("The Uninstallation has failed.") );
+ MESG_DIALOG(wxT("The Uninstallation has failed.") );
}
- else if(gv->curbootloadermethod == "h10")
+ else if(gv->curbootloadermethod == wxT("h10"))
{
if(h10(BOOTLOADER_REM))
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been uninstalled.")
- ,"Uninstallation", wxOK |wxICON_INFORMATION);
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been uninstalled.")
+ ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else
- MESG_DIALOG(_("The Uninstallation has failed.") );
+ MESG_DIALOG(wxT("The Uninstallation has failed.") );
}
- else if(gv->curbootloadermethod == "iaudio" )
+ else if(gv->curbootloadermethod == wxT("iaudio") )
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("To uninstall the Bootloader on this Device,\n"
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("To uninstall the Bootloader on this Device,\n"
"you need to download and install an Original Firmware from the Manufacturer.")
- ,"Uninstallation", wxOK |wxICON_INFORMATION);
+ ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
- else if(gv->curbootloadermethod == "fwpatcher" )
+ else if(gv->curbootloadermethod == wxT("fwpatcher") )
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("To uninstall the Bootloader on this Device,\n"
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("To uninstall the Bootloader on this Device,\n"
"you need to download and install an original Firmware from the Manufacturer.\n"
"To do this, you need to boot into the original Firmware.")
- ,"Uninstallation", wxOK |wxICON_INFORMATION);
+ ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else
{
- MESG_DIALOG(_("Unsupported Bootloader Method") );
+ MESG_DIALOG(wxT("Unsupported Bootloader Method") );
}
}
else
{
- MESG_DIALOG(_("The bootloader Uninstallation wizard was cancelled") );
+ MESG_DIALOG(wxT("The bootloader Uninstallation wizard was cancelled") );
}
- wxLogVerbose("=== end rbutilFrm::OnBootloaderRemoveBtn");
+ wxLogVerbose(wxT("=== end rbutilFrm::OnBootloaderRemoveBtn"));
}
void rbutilFrm::OnBootloaderBtn(wxCommandEvent& event)
{
- wxLogVerbose("=== begin rbutilFrm::OnBootloaderBtn(event)");
+ wxLogVerbose(wxT("=== begin rbutilFrm::OnBootloaderBtn(event)"));
wxWizard *wizard = new wxWizard(this, wxID_ANY,
- _("Rockbox Installation Wizard"),
+ wxT("Rockbox Installation Wizard"),
wxBitmap(wizard_xpm),
wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@@ -399,84 +416,84 @@ void rbutilFrm::OnBootloaderBtn(wxCommandEvent& event)
if (wizard->RunWizard(page1) )
{
// start installation depending on player
- if(gv->curbootloadermethod == "ipodpatcher")
+ if(gv->curbootloadermethod == wxT("ipodpatcher"))
{
if(ipodpatcher(BOOTLOADER_ADD))
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been installed on your device.")
- ,"Installation", wxOK |wxICON_INFORMATION);
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been installed on your device.")
+ ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else
{
- MESG_DIALOG(_("The installation has failed.") );
+ MESG_DIALOG(wxT("The installation has failed.") );
}
}
- else if(gv->curbootloadermethod == "gigabeatf")
+ else if(gv->curbootloadermethod == wxT("gigabeatf"))
{
if(gigabeatf(BOOTLOADER_ADD))
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been installed on your device.")
- ,"Installation", wxOK |wxICON_INFORMATION);
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been installed on your device.")
+ ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else
- MESG_DIALOG(_("The installation has failed.") );
+ MESG_DIALOG(wxT("The installation has failed.") );
}
- else if(gv->curbootloadermethod == "iaudio" )
+ else if(gv->curbootloadermethod == wxT("iaudio") )
{
if(iaudiox5(BOOTLOADER_ADD))
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been installed on your device.\n"
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been installed on your device.\n"
"Now turn OFF your Device, unplug USB,and insert Charger\n"
"Your Device will automatically upgrade the flash with the Rockbox bootloader")
- ,"Installation", wxOK |wxICON_INFORMATION);
+ ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else
- MESG_DIALOG(_("The installation has failed.") );
+ MESG_DIALOG(wxT("The installation has failed.") );
}
- else if(gv->curbootloadermethod == "fwpatcher")
+ else if(gv->curbootloadermethod == wxT("fwpatcher"))
{
if(fwpatcher(BOOTLOADER_ADD))
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been patched and copied on your device.\n"
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been patched and copied on your device.\n"
"Now use the Firmware upgrade option of your Device\n")
- ,"Installation", wxOK |wxICON_INFORMATION);
+ ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else
- MESG_DIALOG(_("The installation has failed.") );
+ MESG_DIALOG(wxT("The installation has failed.") );
}
- else if(gv->curbootloadermethod == "h10")
+ else if(gv->curbootloadermethod == wxT("h10"))
{
if(h10(BOOTLOADER_ADD))
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been patched and copied on your device.\n")
- ,"Installation", wxOK |wxICON_INFORMATION);
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been patched and copied on your device.\n")
+ ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
else
- MESG_DIALOG(_("The installation has failed.") );
+ MESG_DIALOG(wxT("The installation has failed.") );
}
else
{
- MESG_DIALOG(_("Unsupported Bootloader Method") );
+ MESG_DIALOG(wxT("Unsupported Bootloader Method") );
}
}
else
{
- MESG_DIALOG(_("The bootloader installation wizard was cancelled") );
+ MESG_DIALOG(wxT("The bootloader installation wizard was cancelled") );
}
- wxLogVerbose("=== end rbutilFrm::OnBootloaderBtn");
+ wxLogVerbose(wxT("=== end rbutilFrm::OnBootloaderBtn"));
}
@@ -485,13 +502,13 @@ void rbutilFrm::OnInstallBtn(wxCommandEvent& event)
wxString src, dest, buf;
wxDateTime date;
wxTimeSpan day(24);
- wxLogVerbose("=== begin rbutilFrm::OnInstallBtn(event)");
+ wxLogVerbose(wxT("=== begin rbutilFrm::OnInstallBtn(event)"));
wxFileSystem fs;
wxFileConfig* buildinfo;
wxDateSpan oneday;
wxWizard *wizard = new wxWizard(this, wxID_ANY,
- _("Rockbox Installation Wizard"),
+ wxT("Rockbox Installation Wizard"),
wxBitmap(wizard_xpm),
wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@@ -511,20 +528,20 @@ void rbutilFrm::OnInstallBtn(wxCommandEvent& event)
{
case BUILD_RELEASE:
// This is a URL - don't use PATH_SEP
- src.Printf("%s%s-%s-%s.zip",
+ src.Printf(wxT("%s%s-%s-%s.zip"),
gv->download_url.c_str(), gv->prog_name.c_str(),
gv->last_release.c_str(), gv->curplat.c_str());
- dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s-%s-%s.zip",
+ dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s-%s-%s.zip"),
gv->stdpaths->GetUserDataDir().c_str(),
gv->prog_name.c_str(), gv->last_release.c_str(),
gv->curplat.c_str());
break;
case BUILD_DAILY:
- dest.Printf("%s" PATH_SEP "download" PATH_SEP "build-info",
+ dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "build-info"),
gv->stdpaths->GetUserDataDir().c_str());
if (DownloadURL(gv->server_conf_url, dest)) {
- WARN_DIALOG(_("Unable to download build status."),
- _("Install"));
+ WARN_DIALOG(wxT("Unable to download build status."),
+ wxT("Install"));
buf = "";
} else
{
@@ -534,41 +551,41 @@ void rbutilFrm::OnInstallBtn(wxCommandEvent& event)
buildinfo->DeleteAll();
if (buf.Len() != 8) {
- dest.Printf(_("Invalid build date: %s"), buf.c_str());
- WARN_DIALOG(dest, _("Install"));
- buf = "";
+ dest.Printf(wxT("Invalid build date: %s"), buf.c_str());
+ WARN_DIALOG(dest, wxT("Install"));
+ buf = wxT("");
}
}
if (buf == "") {
- WARN_DIALOG(_("Can't get date of latest build from "
- "server. Using yesterday's date."), _("Install") );
+ WARN_DIALOG(wxT("Can't get date of latest build from "
+ "server. Using yesterday's date."), wxT("Install") );
date = wxDateTime::Now();
date.Subtract(oneday.Day());
buf = date.Format(wxT("%Y%m%d")); // yes, we want UTC
}
- src.Printf("%s%s/%s-%s-%s.zip",
+ src.Printf(wxT("%s%s/%s-%s-%s.zip"),
gv->daily_url.c_str(), gv->curplat.c_str(),
gv->prog_name.c_str(), gv->curplat.c_str(),
buf.c_str() );
- dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s-%s-%s.zip",
+ dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s-%s-%s.zip"),
gv->stdpaths->GetUserDataDir().c_str(),
gv->prog_name.c_str(),
gv->curplat.c_str(), buf.c_str() );
break;
case BUILD_BLEEDING:
- src.Printf("%s%s/%s.zip",
+ src.Printf(wxT("%s%s/%s.zip"),
gv->bleeding_url.c_str(), gv->curplat.c_str(),
gv->prog_name.c_str() );
- dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s.zip",
+ dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s.zip"),
gv->stdpaths->GetUserDataDir().c_str(),
gv->prog_name.c_str() );
break;
default:
- ERR_DIALOG(_("Something seriously odd has happened."),
- _("Install"));
+ ERR_DIALOG(wxT("Something seriously odd has happened."),
+ wxT("Install"));
return;
break;
}
@@ -578,30 +595,30 @@ void rbutilFrm::OnInstallBtn(wxCommandEvent& event)
if ( DownloadURL(src, dest) )
{
wxRemoveFile(dest);
- buf.Printf(_("Unable to download %s"), src.c_str() );
- ERR_DIALOG(buf, _("Install"));
+ buf.Printf(wxT("Unable to download %s"), src.c_str() );
+ ERR_DIALOG(buf, wxT("Install"));
return;
}
}
if ( !UnzipFile(dest, gv->curdestdir, true) )
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("Rockbox has been installed on your device.")
- ,"Installation", wxOK |wxICON_INFORMATION);
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("Rockbox has been installed on your device.")
+ ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
} else
{
wxRemoveFile(dest);
- buf.Printf(_("Unable to unzip %s"), dest.c_str() );
- ERR_DIALOG(buf, _("Install"));
+ buf.Printf(wxT("Unable to unzip %s"), dest.c_str() );
+ ERR_DIALOG(buf, wxT("Install"));
}
} else
{
- MESG_DIALOG(_("The installation wizard was cancelled") );
+ MESG_DIALOG(wxT("The installation wizard was cancelled") );
}
- wxLogVerbose("=== end rbutilFrm::OnInstallBtn");
+ wxLogVerbose(wxT("=== end rbutilFrm::OnInstallBtn"));
}
void rbutilFrm::OnFontBtn(wxCommandEvent& event)
@@ -609,13 +626,13 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
wxString src, dest, buf;
wxDateTime date;
wxTimeSpan day(24);
- wxLogVerbose("=== begin rbutilFrm::OnFontBtn(event)");
+ wxLogVerbose(wxT("=== begin rbutilFrm::OnFontBtn(event)"));
wxFileSystem fs;
wxFileConfig* buildinfo;
wxDateSpan oneday;
wxWizard *wizard = new wxWizard(this, wxID_ANY,
- _("Rockbox Font Installation Wizard"),
+ wxT("Rockbox Font Installation Wizard"),
wxBitmap(wizard_xpm),
wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@@ -628,9 +645,9 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
buf.Printf(wxT("%s" PATH_SEP ".rockbox"), gv->curdestdir.c_str()) ;
if (! wxDirExists(buf) )
{
- buf.Printf(_("Rockbox is not yet installed on %s - install "
+ buf.Printf(wxT("Rockbox is not yet installed on %s - install "
"Rockbox first."), buf.c_str() );
- WARN_DIALOG(buf, _("Can't install fonts") );
+ WARN_DIALOG(buf, wxT("Can't install fonts") );
return;
}
@@ -638,8 +655,8 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
gv->stdpaths->GetUserDataDir().c_str());
if (DownloadURL(gv->server_conf_url, dest))
{
- WARN_DIALOG(_("Unable to download build status."),
- _("Font Install"));
+ WARN_DIALOG(wxT("Unable to download build status."),
+ wxT("Font Install"));
buf = "";
} else
{
@@ -649,25 +666,25 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
buildinfo->DeleteAll();
if (buf.Len() != 8) {
- dest.Printf(_("Invalid build date: %s"), buf.c_str());
- WARN_DIALOG(dest, _("Font Install"));
+ dest.Printf(wxT("Invalid build date: %s"), buf.c_str());
+ WARN_DIALOG(dest, wxT("Font Install"));
buf = "";
}
}
if (buf == "") {
- WARN_DIALOG(_("Can't get date of latest build from "
+ WARN_DIALOG(wxT("Can't get date of latest build from "
"server. Using yesterday's date."),
- _("Font Install") );
+ wxT("Font Install") );
date = wxDateTime::Now();
date.Subtract(oneday.Day());
buf = date.Format(wxT("%Y%m%d")); // yes, we want UTC
}
- src.Printf("%s%s.zip", gv->font_url.c_str(), buf.c_str() );
+ src.Printf(wxT("%s%s.zip"), gv->font_url.c_str(), buf.c_str() );
- dest.Printf("%s" PATH_SEP "download" PATH_SEP
- "rockbox-fonts-%s.zip", gv->stdpaths->GetUserDataDir().c_str(),
+ dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP
+ "rockbox-fonts-%s.zip"), gv->stdpaths->GetUserDataDir().c_str(),
buf.c_str() );
if ( ! wxFileExists(dest) )
@@ -675,38 +692,88 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
if ( DownloadURL(src, dest) )
{
wxRemoveFile(dest);
- buf.Printf(_("Unable to download %s"), src.c_str() );
- ERR_DIALOG(buf, _("Font Install"));
+ buf.Printf(wxT("Unable to download %s"), src.c_str() );
+ ERR_DIALOG(buf, wxT("Font Install"));
return;
}
}
if ( !UnzipFile(dest, gv->curdestdir, true) )
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Rockbox fonts have been installed on your device.")
- ,"Installation", wxOK |wxICON_INFORMATION);
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Rockbox fonts have been installed on your device.")
+ ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
} else
{
wxRemoveFile(dest);
- buf.Printf(_("Unable to unzip %s"), dest.c_str() );
- ERR_DIALOG(buf, _("Font Install"));
+ buf.Printf(wxT("Unable to unzip %s"), dest.c_str() );
+ ERR_DIALOG(buf, wxT("Font Install"));
}
} else
{
- MESG_DIALOG(_("The font installation wizard was cancelled") );
+ MESG_DIALOG(wxT("The font installation wizard was cancelled") );
}
- wxLogVerbose("=== end rbutilFrm::OnFontBtn");
+ wxLogVerbose(wxT("=== end rbutilFrm::OnFontBtn"));
}
+
+void rbutilFrm::OnThemesBtn(wxCommandEvent& event)
+{
+ wxString src, dest, buf;
+ wxTimeSpan day(24);
+ wxLogVerbose(wxT("=== begin rbutilFrm::OnThemesBtn(event)"));
+
+ wxWizard *wizard = new wxWizard(this, wxID_ANY,
+ wxT("Rockbox Themes Installation Wizard"),
+ wxBitmap(wizard_xpm),
+ wxDefaultPosition,
+ wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
+ wxPlatformPage* page1 = new wxPlatformPage(wizard);
+ wxLocationPage* page2 = new wxLocationPage(wizard);
+ wxThemesPage* page3 = new wxThemesPage(wizard);
+ page1->SetNext(page2);
+ page2->SetPrev(page1);
+ page2->SetNext(page3);
+ page3->SetPrev(page2);
+
+ wizard->GetPageAreaSizer()->Add(page1);
+
+ if (wizard->RunWizard(page1) )
+ {
+ bool success=true;
+ for(int i=0 ;i < gv->themesToInstall.GetCount();i++)
+ {
+ if(!InstallTheme(gv->themesToInstall[i]))
+ {
+ MESG_DIALOG(wxT("The Themes installation has failed") );
+ success=false;
+ break;
+ }
+ }
+ if(success)
+ {
+ MESG_DIALOG(wxT("The Theme installation completed successfully.") );
+ }
+
+
+ }
+ else
+ {
+ MESG_DIALOG(wxT("The Themes installation wizard was cancelled") );
+ }
+
+ wxLogVerbose(wxT("=== end rbutilFrm::OnThemesBtn(event)"));
+}
+
+
void rbutilFrm::OnRemoveBtn(wxCommandEvent& event)
{
- wxLogVerbose("=== begin rbutilFrm::OnRemoveBtn(event)");
+ wxLogVerbose(wxT("=== begin rbutilFrm::OnRemoveBtn(event)"));
wxWizard *wizard = new wxWizard(this, wxID_ANY,
- _("Rockbox Uninstallation Wizard"),
+ wxT("Rockbox Uninstallation Wizard"),
wxBitmap(wizard_xpm),
wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@@ -722,33 +789,33 @@ void rbutilFrm::OnRemoveBtn(wxCommandEvent& event)
if (Uninstall(gv->curdestdir, gv->curisfull) )
{
MESG_DIALOG(
- _("The uninstallation wizard was cancelled or completed with "
+ wxT("The uninstallation wizard was cancelled or completed with "
"some errors.") );
} else {
- wxMessageDialog* msg = new wxMessageDialog(this, _("The uninstall wizard completed successfully\n"
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The uninstall wizard completed successfully\n"
"Depending on which Device you own, you also have to uninstall the Bootloader")
- ,"Uninstallation", wxOK |wxICON_INFORMATION);
+ ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
}
} else
{
- MESG_DIALOG(_("The uninstallation wizard was cancelled.") );
+ MESG_DIALOG(wxT("The uninstallation wizard was cancelled.") );
}
- wxLogVerbose("=== end rbutilFrm::OnRemoveBtn");
+ wxLogVerbose(wxT("=== end rbutilFrm::OnRemoveBtn"));
}
void rbutilFrm::OnPortableInstall(wxCommandEvent& event)
{
wxString src, dest, buf;
- wxLogVerbose("=== begin rbutilFrm::OnPortableInstall(event)");
+ wxLogVerbose(wxT("=== begin rbutilFrm::OnPortableInstall(event)"));
wxFileSystem fs;
wxFileConfig* buildinfo;
wxDateSpan oneday;
wxWizard *wizard = new wxWizard(this, wxID_ANY,
- _("Rockbox Utility Portable Installation Wizard"),
+ wxT("Rockbox Utility Portable Installation Wizard"),
wxBitmap(wizard_xpm),
wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@@ -760,24 +827,24 @@ void rbutilFrm::OnPortableInstall(wxCommandEvent& event)
{
if ( InstallRbutil(gv->curdestdir) )
{
- wxMessageDialog* msg = new wxMessageDialog(this, _("The Rockbox Utility has been installed on your device.")
- ,"Installation", wxOK |wxICON_INFORMATION);
+ wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Rockbox Utility has been installed on your device.")
+ ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal();
delete msg;
} else
{
- ERR_DIALOG(_("Installation failed"), _("Portable Install"));
+ ERR_DIALOG(wxT("Installation failed"), wxT("Portable Install"));
}
} else
{
- MESG_DIALOG(_("The portable installation wizard was cancelled") );
+ MESG_DIALOG(wxT("The portable installation wizard was cancelled") );
}
- wxLogVerbose("=== end rbutilFrm::OnUnstallPortable");
+ wxLogVerbose(wxT("=== end rbutilFrm::OnUnstallPortable"));
}
AboutDlg::AboutDlg(rbutilFrm* parent)
- : wxDialog(parent, -1, _("About"), wxDefaultPosition, wxDefaultSize,
+ : wxDialog(parent, -1, wxT("About"), wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE)
{
wxBoxSizer* WxBoxSizer1 = new wxBoxSizer(wxVERTICAL);
@@ -792,13 +859,13 @@ AboutDlg::AboutDlg(rbutilFrm* parent)
WxBoxSizer2->Add(WxStaticBitmap1, 0, wxALL | wxCENTER, 5);
wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY,
- _(RBUTIL_FULLNAME), wxDefaultPosition, wxDefaultSize,
+ wxT(RBUTIL_FULLNAME), wxDefaultPosition, wxDefaultSize,
wxALIGN_CENTER | wxST_NO_AUTORESIZE );
WxBoxSizer2->Add(WxStaticText1, 0, wxALL | wxCENTER, 5);
WxBoxSizer1->Add(WxBoxSizer2, 0, wxALL, 5);
wxStaticText* WxStaticText2 = new wxStaticText(this, wxID_ANY,
- _(RBUTIL_VERSION "\n" RBUTIL_DESCRIPTION "\n\n" RBUTIL_COPYRIGHT));
+ wxT(RBUTIL_VERSION "\n" RBUTIL_DESCRIPTION "\n\n" RBUTIL_COPYRIGHT));
WxStaticText2->Wrap(400);
WxBoxSizer1->Add(WxStaticText2, 0, wxALL, 5);
@@ -806,7 +873,7 @@ AboutDlg::AboutDlg(rbutilFrm* parent)
wxT(RBUTIL_WEBSITE), wxT(RBUTIL_WEBSITE) );
WxBoxSizer1->Add(WxHyperlink1, 0, wxALL, 5);
- wxStaticBox* WxStaticBox1 = new wxStaticBox(this, wxID_ANY, _("Contributors:"));
+ wxStaticBox* WxStaticBox1 = new wxStaticBox(this, wxID_ANY, wxT("Contributors:"));
wxStaticBoxSizer* WxStaticBoxSizer2 = new wxStaticBoxSizer(WxStaticBox1,
wxVERTICAL);
wxTextCtrl* WxTextCtrl1 = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
@@ -816,7 +883,7 @@ AboutDlg::AboutDlg(rbutilFrm* parent)
while ( rbutil_developers[i] != "")
{
WxTextCtrl1->AppendText(rbutil_developers[i++]);
- WxTextCtrl1->AppendText("\n");
+ WxTextCtrl1->AppendText(wxT("\n"));
}
WxBoxSizer1->Add(WxStaticBoxSizer2, 1, wxGROW | wxALL, 5);