summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-01-25 17:48:38 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-01-25 17:48:38 +0000
commit6343111e00da93a8b792b4e6245184be31b8feff (patch)
tree531790bb8bebad377717a66f390f097da83a91de /rbutil
parent07894de36dd2af7054db87fc00dc953f73c72f0d (diff)
downloadrockbox-6343111e00da93a8b792b4e6245184be31b8feff.tar.gz
rockbox-6343111e00da93a8b792b4e6245184be31b8feff.zip
Remove "needsbootloader" configuration value as it is implicitly available from "bootloadermethod". Explicitly use bootloadermethod "none" if no bootloader is needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19855 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/rbsettings.cpp15
-rw-r--r--rbutil/rbutilqt/rbsettings.h13
-rw-r--r--rbutil/rbutilqt/rbutil.ini47
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp6
4 files changed, 19 insertions, 62 deletions
diff --git a/rbutil/rbutilqt/rbsettings.cpp b/rbutil/rbutilqt/rbsettings.cpp
index 28e507fd6a..45e61bee51 100644
--- a/rbutil/rbutilqt/rbsettings.cpp
+++ b/rbutil/rbutilqt/rbsettings.cpp
@@ -81,23 +81,12 @@ QString RbSettings::curVersion()
{
return userSettings->value("rbutil_version").toString();
}
-
+
bool RbSettings::cacheOffline()
{
return userSettings->value("offline").toBool();
}
-bool RbSettings::curNeedsBootloader()
-{
- QString result = deviceSettingCurGet("needsbootloader", "").toString();
- if( result == "no")
- {
- return false;
- }
- else
- return true;
-}
-
QString RbSettings::mountpoint()
{
return userSettings->value("mountpoint").toString();
@@ -228,7 +217,7 @@ QString RbSettings::curManual()
QString RbSettings::curBootloaderMethod()
{
- return deviceSettingCurGet("bootloadermethod").toString();
+ return deviceSettingCurGet("bootloadermethod", "none").toString();
}
QString RbSettings::curBootloaderName()
diff --git a/rbutil/rbutilqt/rbsettings.h b/rbutil/rbutilqt/rbsettings.h
index beea602977..afa1900e7b 100644
--- a/rbutil/rbutilqt/rbsettings.h
+++ b/rbutil/rbutilqt/rbsettings.h
@@ -79,7 +79,7 @@ class RbSettings : public QObject
int encoderComplexity(QString enc);
double encoderVolume(QString enc);
bool encoderNarrowband(QString enc);
-
+
QStringList allPlatforms();
QString name(QString plattform);
QString brand(QString plattform);
@@ -88,8 +88,7 @@ class RbSettings : public QObject
QMap<int, QString> usbIdMap();
QMap<int, QString> usbIdErrorMap();
QMap<int, QString> usbIdIncompatMap();
-
- bool curNeedsBootloader();
+
QString curBrand();
QString curName();
QString curPlatform();
@@ -135,21 +134,21 @@ class RbSettings : public QObject
void setEncoderNarrowband(QString enc,bool nb);
private:
-
+
//! helper function to get an entry in the current platform section
QVariant deviceSettingCurGet(QString entry,QString def="");
//! helper function to get an entry out of a group in the userSettings
QVariant userSettingsGroupGet(QString group,QString entry,QVariant def="");
//! helper function to set an entry in a group in the userSettings
void userSettingsGroupSet(QString group,QString entry,QVariant value);
-
-
+
+
//! private copy constructors to prvent copying
RbSettings& operator= (const RbSettings& other)
{ (void)other; return *this; }
RbSettings(const RbSettings& other) :QObject()
{ (void)other; }
-
+
//! pointers to our setting objects
QSettings *devices;
QSettings *userSettings;
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini
index fb500d4345..8bd93f0ca1 100644
--- a/rbutil/rbutilqt/rbutil.ini
+++ b/rbutil/rbutilqt/rbutil.ini
@@ -52,8 +52,7 @@ platform60=mrobe100
[player]
name="Jukebox Player 6000 / Jukebox Studio 5 / 10 / 20"
platform=player
-needsbootloader=no
-bootloadermethod=
+bootloadermethod=none
bootloadername=
resolution=11x2x1
manualname=
@@ -65,8 +64,7 @@ encoder=lame
[recorder]
name="Jukebox Recorder 6 / 10 / 15 / 20"
platform=recorder
-needsbootloader=no
-bootloadermethod=
+bootloadermethod=none
bootloadername=
resolution=112x64x1
manualname=
@@ -78,8 +76,7 @@ encoder=lame
[recorder8mb]
name="Jukebox Recorder 6 / 10 / 15 / 20 (with 8MiB memory)"
platform=recorder8mb
-needsbootloader=no
-bootloadermethod=
+bootloadermethod=none
bootloadername=
resolution=112x64x1
manualname=rockbox-recorder
@@ -91,8 +88,7 @@ encoder=lame
[recorderv2]
name="Jukebox Recorder v2 (20GB)"
platform=recorderv2
-needsbootloader=no
-bootloadermethod=
+bootloadermethod=none
bootloadername=
resolution=112x64x1
manualname=
@@ -104,8 +100,7 @@ encoder=lame
[fmrecorder]
name="Jukebox Recorder FM"
platform=fmrecorder
-needsbootloader=no
-bootloadermethod=
+bootloadermethod=none
bootloadername=
resolution=112x64x1
manualname=
@@ -117,8 +112,7 @@ encoder=lame
[fmrecorder8mb]
name="Jukebox Recorder FM (with 8MiB memory)"
platform=fmrecorder8mb
-needsbootloader=no
-bootloadermethod=
+bootloadermethod=none
bootloadername=
resolution=112x64x1
manualname=rockbox-fmrecorder
@@ -130,8 +124,7 @@ encoder=lame
[ondiosp]
name="Ondio SP"
platform=ondiosp
-needsbootloader=no
-bootloadermethod=
+bootloadermethod=none
bootloadername=
resolution=112x64x1
manualname=
@@ -143,8 +136,7 @@ encoder=lame
[ondiofm]
name="Ondio FM"
platform=ondiofm
-needsbootloader=no
-bootloadermethod=
+bootloadermethod=none
bootloadername=
resolution=112x64x1
manualname=
@@ -156,7 +148,6 @@ encoder=lame
[h100]
name="iHP100 / iHP110"
platform=h100
-needsbootloader=yes
bootloadermethod=hex
bootloadername=/iriver/bootloader-h100.bin
bootloaderfile=/ihp_100.hex
@@ -171,7 +162,6 @@ encoder=rbspeex
[h120]
name="iHP120 / iHP140 / H120 / H140"
platform=h120
-needsbootloader=yes
bootloadermethod=hex
bootloadername=/iriver/bootloader-h120.bin
bootloaderfile=/ihp_120.hex
@@ -186,7 +176,6 @@ encoder=rbspeex
[h300]
name="H320 / H340"
platform=h300
-needsbootloader=yes
bootloadermethod=hex
bootloadername=/iriver/bootloader-h300.bin
bootloaderfile=/H300.hex
@@ -201,7 +190,6 @@ encoder=rbspeex
[h10_5gbums]
name="H10 (5 / 6GB) UMS"
platform=h10_5gb
-needsbootloader=yes
bootloadermethod=mi4
bootloadername=/iriver/H10.mi4
bootloaderfile=/System/H10.mi4
@@ -216,7 +204,6 @@ encoder=rbspeex
[h10_5gbmtp]
name="H10 (5 / 6GB) MTP"
platform=h10_5gb
-needsbootloader=yes
bootloadermethod=mi4
bootloadername=/iriver/H10_5GB-MTP/H10.mi4
bootloaderfile=/System/H10.mi4
@@ -231,7 +218,6 @@ encoder=rbspeex
[h10]
name="H10 (20GB)"
platform=h10
-needsbootloader=yes
bootloadermethod=mi4
bootloadername=/iriver/H10_20GC.mi4
bootloaderfile=/System/H10_20GC.mi4
@@ -247,7 +233,6 @@ encoder=rbspeex
[ipod1g2g]
name="Ipod (1st / 2nd gen)"
platform=ipod1g2g
-needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipod1g2g.ipod
resolution=160x128x2
@@ -260,7 +245,6 @@ encoder=rbspeex
[ipodcolor]
name="Ipod Colour / Photo / U2 (4th gen)"
platform=ipodcolor
-needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodcolor.ipod
resolution=220x176x16
@@ -273,7 +257,6 @@ encoder=rbspeex
[ipodnano]
name="Ipod Nano (1st gen)"
platform=ipodnano
-needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodnano.ipod
resolution=176x132x16
@@ -287,7 +270,6 @@ encoder=rbspeex
[ipod4gray]
name="Ipod (4th gen, greyscale)"
platform=ipod4gray
-needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipod4g.ipod
resolution=160x128x2
@@ -300,7 +282,6 @@ encoder=rbspeex
[ipodvideo]
name="Ipod Video (5th gen) 30GB"
platform=ipodvideo
-needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodvideo.ipod
resolution=320x240x16
@@ -313,7 +294,6 @@ encoder=rbspeex
[ipodvideo64mb]
name="Ipod Video (5th gen) 60/80GB"
platform=ipodvideo64mb
-needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodvideo.ipod
resolution=320x240x16
@@ -327,7 +307,6 @@ encoder=rbspeex
[ipod3g]
name="Ipod (3rd gen)"
platform=ipod3g
-needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipod3g.ipod
resolution=160x128x2
@@ -341,7 +320,6 @@ encoder=rbspeex
[ipodmini1g]
name="Ipod Mini (1st gen)"
platform=ipodmini1g
-needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodmini.ipod
resolution=138x110x2
@@ -354,7 +332,6 @@ encoder=rbspeex
[ipodmini2g]
name="Ipod Mini (2nd gen)"
platform=ipodmini2g
-needsbootloader=yes
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodmini2g.ipod
resolution=138x110x2
@@ -367,7 +344,6 @@ encoder=rbspeex
[iaudiox5]
name="iAudio X5 / X5L"
platform=iaudiox5
-needsbootloader=yes
bootloadermethod=file
bootloadername=/iaudio/x5_fw.bin
bootloaderfile=/FIRMWARE/x5_fw.bin
@@ -382,7 +358,6 @@ encoder=rbspeex
[iaudiox5v]
name="iAudio X5V"
platform=iaudiox5
-needsbootloader=yes
bootloadermethod=file
bootloadername=/iaudio/x5v_fw.bin
bootloaderfile=/FIRMWARE/x5v_fw.bin
@@ -396,7 +371,6 @@ encoder=rbspeex
[iaudiom5]
name="iAudio M5 / M5L"
platform=iaudiom5
-needsbootloader=yes
bootloadermethod=file
bootloadername=/iaudio/m5_fw.bin
bootloaderfile=/FIRMWARE/m5_fw.bin
@@ -411,7 +385,6 @@ encoder=rbspeex
[iaudiom3]
name="iAudio M3 / M3L"
platform=iaudiom3
-needsbootloader=yes
bootloadermethod=file
bootloadername=/iaudio/cowon_m3.bin
bootloaderfile=/FIRMWARE/cowon_m3.bin
@@ -426,7 +399,6 @@ encoder=rbspeex
[gigabeatf]
name="Gigabeat F / X"
platform=gigabeatf
-needsbootloader=yes
bootloadermethod=file
bootloadername=/gigabeat/FWIMG01.DAT
bootloaderfile=/GBSYSTEM/FWIMG/FWIMG01.DAT
@@ -441,7 +413,6 @@ encoder=rbspeex
[sansae200]
name="Sansa E200"
platform=sansae200
-needsbootloader=yes
bootloadermethod=sansa
bootloadername=/sandisk-sansa/e200/PP5022.mi4
resolution=176x220x16
@@ -457,7 +428,6 @@ encoder=rbspeex
[sansac200]
name="Sansa C200"
platform=sansac200
-needsbootloader=yes
bootloadermethod=sansa
bootloadername=/sandisk-sansa/c200/firmware.mi4
resolution=132x80x16
@@ -471,7 +441,6 @@ encoder=rbspeex
[mrobe100]
name="m:robe100"
platform=mrobe100
-needsbootloader=yes
bootloadermethod=mi4
bootloadername=/olympus/mrobe100/pp5020.mi4
bootloaderfile=/System/pp5020.mi4
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 5ef43b6732..585ea17e78 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -315,7 +315,7 @@ void RbUtilQt::updateSettings()
void RbUtilQt::updateDevice()
{
- if(!settings->curNeedsBootloader() ) {
+ if(settings->curBootloaderMethod() == "none" ) {
ui.buttonBootloader->setEnabled(false);
ui.buttonRemoveBootloader->setEnabled(false);
ui.labelBootloader->setEnabled(false);
@@ -333,7 +333,7 @@ void RbUtilQt::updateDevice()
ui.buttonRemoveBootloader->setEnabled(true);
}
}
-
+
// displayed device info
QString mountpoint = settings->mountpoint();
QString brand = settings->curBrand();
@@ -457,7 +457,7 @@ bool RbUtilQt::smallInstallInner()
return true;
}
// Bootloader
- if(settings->curNeedsBootloader())
+ if(settings->curBootloaderMethod() != "none")
{
m_error = false;
m_installed = false;