summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-05-05 18:28:18 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-05-05 18:28:18 +0000
commit5e7b140a0935415a965ac13ea09f86363e651cd7 (patch)
treef352df44114c3555d7ff1d72fb1ddd3903185fa1 /rbutil
parente9f08dc19393ecc737fed1abac1724fb02e804b6 (diff)
downloadrockbox-5e7b140a0935415a965ac13ea09f86363e651cd7.tar.gz
rockbox-5e7b140a0935415a965ac13ea09f86363e651cd7.tar.bz2
rockbox-5e7b140a0935415a965ac13ea09f86363e651cd7.zip
integrated Manual for rbutil
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13329 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/credits.h2
-rw-r--r--rbutil/rbutil-rc.rc8
-rw-r--r--rbutil/rbutil.h3
-rw-r--r--rbutil/rbutil.ini1
-rw-r--r--rbutil/rbutilApp.cpp3
-rw-r--r--rbutil/rbutilCtrls.cpp6
-rw-r--r--rbutil/rbutilFrm.cpp85
-rw-r--r--rbutil/rbutilFrm.h12
8 files changed, 95 insertions, 25 deletions
diff --git a/rbutil/credits.h b/rbutil/credits.h
index 1d6542bfbf..b3ac0b9f0f 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.1"
+#define RBUTIL_VERSION "Version 0.3.2.2"
static const wxString rbutil_developers[] = {
wxT("Christi Alice Scarborough"),
diff --git a/rbutil/rbutil-rc.rc b/rbutil/rbutil-rc.rc
index d76ef0f045..2dfe024f7f 100644
--- a/rbutil/rbutil-rc.rc
+++ b/rbutil/rbutil-rc.rc
@@ -1,8 +1,8 @@
#define RBUTIL 1
#include <wx/msw/wx.rc>
RBUTIL VERSIONINFO
-FILEVERSION 0,3,2,1
-PRODUCTVERSION 0,3,2,1
+FILEVERSION 0,3,2,2
+PRODUCTVERSION 0,3,2,2
FILEOS 0x00000004
FILETYPE 0x00000001
BEGIN
@@ -10,8 +10,8 @@ BEGIN
BEGIN
BLOCK "FFFF0000"
BEGIN
- VALUE "FileVersion", "0.3.2.1\0"
- VALUE "ProductVersion", "0.3.2.1\0"
+ VALUE "FileVersion", "0.3.2.2\0"
+ VALUE "ProductVersion", "0.3.2.2\0"
VALUE "CompanyName", "Rockbox Team\0"
VALUE "FileDescription", "Rockbox Utility\0"
VALUE "InternalName", "rbutil\0"
diff --git a/rbutil/rbutil.h b/rbutil/rbutil.h
index 74e626407a..47a2803981 100644
--- a/rbutil/rbutil.h
+++ b/rbutil/rbutil.h
@@ -57,6 +57,8 @@
#include <wx/regex.h>
#include <wx/tokenzr.h>
#include <wx/notebook.h>
+#include <wx/html/htmlwin.h>
+#include <wx/hyperlink.h>
#ifdef __WXMSW__
#define PATH_SEP "\\"
@@ -104,6 +106,7 @@ public:
wxString prog_name;
wxString bootloader_url;
wxString themes_url;
+ wxString manual_url;
// User configuration data.
wxString curplat;
diff --git a/rbutil/rbutil.ini b/rbutil/rbutil.ini
index 42b74dea49..26988c3c6f 100644
--- a/rbutil/rbutil.ini
+++ b/rbutil/rbutil.ini
@@ -8,6 +8,7 @@ last_release=2.5
prog_name=rockbox
bootloader_url=http://download.rockbox.org/bootloader
themes_url=http://www.rockbox-themes.org/
+manual_url=http://download.rockbox.org/manual/rockbox-
[platforms]
platform1=player
diff --git a/rbutil/rbutilApp.cpp b/rbutil/rbutilApp.cpp
index 2005e6c6f0..15b012d041 100644
--- a/rbutil/rbutilApp.cpp
+++ b/rbutil/rbutilApp.cpp
@@ -212,6 +212,9 @@ bool rbutilFrmApp::ReadGlobalConfig(rbutilFrm* myFrame)
gv->GlobalConfig->Read(wxT("themes_url"), &tmpstr);
gv->themes_url = tmpstr;
+ gv->GlobalConfig->Read(wxT("manual_url"), &tmpstr);
+ gv->manual_url = tmpstr;
+
#ifdef __WXMSW__
gv->curdestdir = wxT("D:\\");
#else
diff --git a/rbutil/rbutilCtrls.cpp b/rbutil/rbutilCtrls.cpp
index fe89ca84f4..6556466d68 100644
--- a/rbutil/rbutilCtrls.cpp
+++ b/rbutil/rbutilCtrls.cpp
@@ -402,7 +402,11 @@ void DeviceSelectorCtrl::setDefault()
void DeviceSelectorCtrl::OnComboBox(wxCommandEvent& event)
{
int index = gv->plat_name.Index(m_deviceCbx->GetValue());
- if(index == -1) m_currentDevice = wxT("");
+ if(index == -1)
+ {
+ m_currentDevice = wxT("");
+ return;
+ }
gv->curplat = gv->plat_id[index];
}
diff --git a/rbutil/rbutilFrm.cpp b/rbutil/rbutilFrm.cpp
index d46352c307..5db93b3996 100644
--- a/rbutil/rbutilFrm.cpp
+++ b/rbutil/rbutilFrm.cpp
@@ -51,6 +51,9 @@ BEGIN_EVENT_TABLE(rbutilFrm,wxFrame)
EVT_MENU(ID_FILE_ABOUT, rbutilFrm::OnFileAbout)
EVT_MENU(ID_FILE_WIPECACHE, rbutilFrm::OnFileWipeCache)
EVT_MENU(ID_PORTABLE_INSTALL, rbutilFrm::OnPortableInstall)
+
+ EVT_UPDATE_UI (ID_MANUAL, rbutilFrm::OnManualUpdate)
+
END_EVENT_TABLE()
rbutilFrm::rbutilFrm( wxWindow *parent, wxWindowID id, const wxString &title,
@@ -78,24 +81,26 @@ void rbutilFrm::CreateGUIControls(void)
mainPanel->SetSizer(WxBoxSizer0);
mainPanel->SetAutoLayout(TRUE);
- wxBitmap rockboxbmp(rblogo_xpm);
- ImageCtrl* rockboxbmpCtrl = new ImageCtrl(mainPanel,wxID_ANY);
- rockboxbmpCtrl->SetBitmap(rockboxbmp);
- WxBoxSizer0->Add(rockboxbmpCtrl,0,wxALIGN_CENTER_HORIZONTAL | wxALL,5);
+ 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,wxALL,5);
- wxNotebook* tabwindow = new wxNotebook(mainPanel,wxID_ANY);
- WxBoxSizer0->Add(tabwindow,0,wxALL,5);
+ wxNotebook* tabwindow = new wxNotebook(mainPanel,wxID_ANY);
+ WxBoxSizer0->Add(tabwindow,0,wxALL,5);
- wxPanel* installpage = new wxPanel(tabwindow,wxID_ANY);
- wxPanel* themepage = new wxPanel(tabwindow,wxID_ANY);
- wxPanel* uninstallpage = new wxPanel(tabwindow,wxID_ANY);
- tabwindow->AddPage(installpage,wxT("Installation"),true);
- tabwindow->AddPage(themepage,wxT("Themes"));
- tabwindow->AddPage(uninstallpage,wxT("Uninstallation"));
+ wxPanel* installpage = new wxPanel(tabwindow,wxID_ANY);
+ wxPanel* themepage = new wxPanel(tabwindow,wxID_ANY);
+ wxPanel* uninstallpage = new wxPanel(tabwindow,wxID_ANY);
+ wxPanel* manualpage = new wxPanel(tabwindow,wxID_ANY);
+ tabwindow->AddPage(installpage,wxT("Installation"),true);
+ tabwindow->AddPage(themepage,wxT("Themes"));
+ tabwindow->AddPage(uninstallpage,wxT("Uninstallation"));
+ tabwindow->AddPage(manualpage,wxT("Manual"));
/*********************
Install Page
@@ -114,16 +119,16 @@ void rbutilFrm::CreateGUIControls(void)
wxFlexGridSizer* WxFlexGridSizer1 = new wxFlexGridSizer(2,2,0,0);
WxStaticBoxSizer3->Add(WxFlexGridSizer1,0,wxGROW | wxALL,0);
- wxBitmap BootloaderInstallButton (tools2_3d_xpm);
- WxBitmapButton4 = new wxBitmapButton(installpage, ID_BOOTLOADER_BTN,
+ wxBitmap BootloaderInstallButton (tools2_3d_xpm);
+ 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 "
+ WxBitmapButton4->SetToolTip(wxT("Instructions for installing the "
"Rockbox bootloader on your audio device"));
- WxFlexGridSizer1->Add(WxBitmapButton4, 0,
+ WxFlexGridSizer1->Add(WxBitmapButton4, 0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
- wxStaticText* WxStaticText5 = new wxStaticText(installpage, wxID_ANY,
+ wxStaticText* WxStaticText5 = new wxStaticText(installpage, wxID_ANY,
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 "
@@ -239,6 +244,26 @@ void rbutilFrm::CreateGUIControls(void)
WxFlexGridSizer3->Add(WxStaticText4,0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
+
+ /*****************
+ * Manual Page
+ ******************/
+
+ wxBoxSizer* WxBoxSizer5 = new wxBoxSizer(wxVERTICAL);
+ manualpage->SetSizer(WxBoxSizer5);
+ manualpage->SetAutoLayout(TRUE);
+
+ manuallink = new wxHyperlinkCtrl(manualpage,wxID_ANY,wxT("Rockbox PDF Manual"),wxT("http://www.rockbox.org"));
+ WxBoxSizer5->Add(manuallink,1,wxGROW | wxALL, 5);
+
+ manual =new wxHtmlWindow(manualpage,ID_MANUAL);
+ WxBoxSizer5->Add(manual,10,wxGROW | wxALL, 5);
+
+
+ /**********
+ ** rest of the controls
+ **********/
+
WxMenuBar1 = new wxMenuBar();
wxMenu *ID_FILE_MENU_Mnu_Obj = new wxMenu(0);
WxMenuBar1->Append(ID_FILE_MENU_Mnu_Obj, wxT("&File"));
@@ -274,6 +299,32 @@ void rbutilFrm::CreateGUIControls(void)
wxLogVerbose(wxT("=== end rbutilFrm::CreateGUIControls"));
}
+
+void rbutilFrm::OnManualUpdate(wxUpdateUIEvent& event)
+{
+ wxString tmp = gv->curplat;
+
+ if(tmp == wxT("h120")) tmp = wxT("h100"); //h120 has the h100 manual
+
+ if( tmp == curManualDevice)
+ return;
+
+ curManualDevice = tmp;
+
+ // construct link to pdf
+ wxString pdflink;
+ pdflink.Printf(wxT("%s%s.pdf"),gv->manual_url.c_str(),curManualDevice.c_str());
+ manuallink->SetURL(pdflink);
+
+ // construct link to html
+ wxString htmllink;
+ htmllink.Printf(wxT("%s%s/rockbox-build.html"),gv->manual_url.c_str(),curManualDevice.c_str());
+ manual->LoadPage(htmllink);
+
+
+}
+
+
void rbutilFrm::rbutilFrmClose(wxCloseEvent& event)
{
wxLogVerbose(wxT("=== begin rbutilFrm::rbutilFrmClose(event)"));
diff --git a/rbutil/rbutilFrm.h b/rbutil/rbutilFrm.h
index bf4205be10..ed7db30a20 100644
--- a/rbutil/rbutilFrm.h
+++ b/rbutil/rbutilFrm.h
@@ -57,7 +57,11 @@ public:
virtual ~rbutilFrm();
public:
DeviceSelectorCtrl* myDeviceSelector;
- wxMenuBar *WxMenuBar1;
+ wxHyperlinkCtrl* manuallink;
+ wxHtmlWindow* manual;
+ wxString curManualDevice;
+
+ wxMenuBar *WxMenuBar1;
wxStaticText *WxStaticText3;
wxBitmapButton *WxBitmapButton2;
wxStaticText *WxStaticText2;
@@ -92,6 +96,8 @@ public:
ID_BOOTLOADER_BTN = 1129,
ID_WXPANEL1 = 1064,
+ ID_MANUAL = 1065,
+
ID_DUMMY_VALUE_
}; //End of Enum
public:
@@ -108,7 +114,9 @@ public:
void OnBootloaderBtn(wxCommandEvent& event);
void OnPortableInstall(wxCommandEvent& event);
void OnBootloaderRemoveBtn(wxCommandEvent& event);
-
+
+ void OnManualUpdate(wxUpdateUIEvent& event);
+
};
#endif