summaryrefslogtreecommitdiff
path: root/rbutil/rbutilFrm.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-05-27 22:44:22 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-05-27 22:44:22 +0000
commit5f6832d082f20a1f58eb244dc922ac74786a7171 (patch)
tree816ef90af0562bc87a93e43cbdd04ffa31e52ba2 /rbutil/rbutilFrm.cpp
parent42698e4e470c0fa8fed3400dfb9244397e2e204f (diff)
Fix FS#7181 and make the main screen resizeable in rbutil
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13500 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilFrm.cpp')
-rw-r--r--rbutil/rbutilFrm.cpp67
1 files changed, 64 insertions, 3 deletions
diff --git a/rbutil/rbutilFrm.cpp b/rbutil/rbutilFrm.cpp
index 39f8365550..c2f35de43c 100644
--- a/rbutil/rbutilFrm.cpp
+++ b/rbutil/rbutilFrm.cpp
@@ -81,7 +81,7 @@ void rbutilFrm::CreateGUIControls(void)
this->SetAutoLayout(TRUE);
wxPanel* mainPanel = new wxPanel(this,wxID_ANY);
- WxBoxSizer1->Add(mainPanel,0,wxALL,0);
+ WxBoxSizer1->Add(mainPanel,1,wxGROW|wxALL,0);
wxBoxSizer* WxBoxSizer0 = new wxBoxSizer(wxVERTICAL);
mainPanel->SetSizer(WxBoxSizer0);
mainPanel->SetAutoLayout(TRUE);
@@ -93,10 +93,10 @@ void rbutilFrm::CreateGUIControls(void)
myDeviceSelector = new DeviceSelectorCtrl(mainPanel,wxID_ANY);
myDeviceSelector->setDefault();
- WxBoxSizer0->Add(myDeviceSelector,0,wxALL,5);
+ WxBoxSizer0->Add(myDeviceSelector,0,wxGROW|wxALL,5);
wxNotebook* tabwindow = new wxNotebook(mainPanel,wxID_ANY);
- WxBoxSizer0->Add(tabwindow,0,wxALL,5);
+ WxBoxSizer0->Add(tabwindow,1,wxGROW|wxALL,5);
wxPanel* installpage = new wxPanel(tabwindow,wxID_ANY);
wxPanel* themepage = new wxPanel(tabwindow,wxID_ANY);
@@ -442,6 +442,13 @@ void rbutilFrm::OnBootloaderRemoveBtn(wxCommandEvent& event)
wxLogVerbose(wxT("=== begin rbutilFrm::OnBootloaderRemoveBtn(event)"));
int index = gv->plat_id.Index(gv->curplat);
+ if(index < 0)
+ {
+ WARN_DIALOG(wxT("No Device selected"),
+ wxT("Select a Device"));
+ return;
+ }
+
wxString bootloadermethod = gv->plat_bootloadermethod[index];
if(!gv->plat_needsbootloader[index])
@@ -524,6 +531,12 @@ void rbutilFrm::OnBootloaderBtn(wxCommandEvent& event)
wxLogVerbose(wxT("=== begin rbutilFrm::OnBootloaderBtn(event)"));
int index = gv->plat_id.Index(gv->curplat);
+ if(index < 0)
+ {
+ WARN_DIALOG(wxT("No Device selected"),
+ wxT("Select a Device"));
+ return;
+ }
wxString bootloadermethod = gv->plat_bootloadermethod[index];
if(!gv->plat_needsbootloader[index])
@@ -633,6 +646,14 @@ void rbutilFrm::OnInstallBtn(wxCommandEvent& event)
wxFileConfig* buildinfo;
wxDateSpan oneday;
+ int index = gv->plat_id.Index(gv->curplat);
+ if(index < 0)
+ {
+ WARN_DIALOG(wxT("No Device selected"),
+ wxT("Select a Device"));
+ return;
+ }
+
// rockbox install dialog
rockboxInstallDlg dialog(NULL, wxID_ANY,
wxT("Rockbox Installation"));
@@ -749,6 +770,14 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
wxFileConfig* buildinfo;
wxDateSpan oneday;
+ int index = gv->plat_id.Index(gv->curplat);
+ if(index < 0)
+ {
+ WARN_DIALOG(wxT("No Device selected"),
+ wxT("Select a Device"));
+ return;
+ }
+
// font install dialog
fontInstallDlg dialog(NULL, wxID_ANY,
wxT("Font Installation"));
@@ -838,6 +867,14 @@ void rbutilFrm::OnDoomBtn(wxCommandEvent& event)
wxString src, dest, buf;
wxLogVerbose(wxT("=== begin rbutilFrm::OnDoomBtn(event)"));
+ int index = gv->plat_id.Index(gv->curplat);
+ if(index < 0)
+ {
+ WARN_DIALOG(wxT("No Device selected"),
+ wxT("Select a Device"));
+ return;
+ }
+
// font install dialog, reused
fontInstallDlg dialog(NULL, wxID_ANY,
wxT("Freedoom wad file Installation"));
@@ -897,6 +934,14 @@ void rbutilFrm::OnThemesBtn(wxCommandEvent& event)
wxString src, dest, buf;
wxLogVerbose(wxT("=== begin rbutilFrm::OnThemesBtn(event)"));
+ int index = gv->plat_id.Index(gv->curplat);
+ if(index < 0)
+ {
+ WARN_DIALOG(wxT("No Device selected"),
+ wxT("Select a Device"));
+ return;
+ }
+
// Theme install dialog
themesInstallDlg dialog(NULL, wxID_ANY,
wxT("Theme Installation"));
@@ -932,6 +977,14 @@ void rbutilFrm::OnRemoveBtn(wxCommandEvent& event)
{
wxLogVerbose(wxT("=== begin rbutilFrm::OnRemoveBtn(event)"));
+ int index = gv->plat_id.Index(gv->curplat);
+ if(index < 0)
+ {
+ WARN_DIALOG(wxT("No Device selected"),
+ wxT("Select a Device"));
+ return;
+ }
+
// Rockbox deinstall dialog
rockboxDeInstallDlg dialog(NULL, wxID_ANY,
wxT("Rockbox Deinstallation"));
@@ -967,6 +1020,14 @@ void rbutilFrm::OnPortableInstall(wxCommandEvent& event)
wxFileSystem fs;
wxDateSpan oneday;
+ int index = gv->plat_id.Index(gv->curplat);
+ if(index < 0)
+ {
+ WARN_DIALOG(wxT("No Device selected"),
+ wxT("Select a Device"));
+ return;
+ }
+
//portable install dialog ( reused font dialog)
fontInstallDlg dialog(NULL, wxID_ANY,
wxT("Rockbox Utility Portable Installation"));