summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-07-26 00:45:18 (UTC)
committer llornkcor <llornkcor>2002-07-26 00:45:18 (UTC)
commitcf32a5b8d6886b357d0f4a6ecdc5b10f78a6a041 (patch) (side-by-side diff)
tree1761b748606385d299063ce00fc2d32baea1189d
parentf3556b164b79fc2a9607681bd6bdf2a4c8522d5e (diff)
downloadopie-cf32a5b8d6886b357d0f4a6ecdc5b10f78a6a041.zip
opie-cf32a5b8d6886b357d0f4a6ecdc5b10f78a6a041.tar.gz
opie-cf32a5b8d6886b357d0f4a6ecdc5b10f78a6a041.tar.bz2
fix size limit config
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index 99fccf7..010e0af 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -48,98 +48,100 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
Config cfg("Vmemo");
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
AlertCheckBox->setChecked(cfg.readBoolEntry("Alert"));
cfg.setGroup("Record");
int rate=config.readNumEntry("SampleRate", 22050);
if(rate == 8000)
sampleRate->setCurrentItem(0);
else if(rate == 11025)
sampleRate->setCurrentItem(1);
else if(rate == 22050)
sampleRate->setCurrentItem(2);
else if(rate == 33075)
sampleRate->setCurrentItem(3);
else if(rate==44100)
sampleRate->setCurrentItem(4);
stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only
#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) //since ipaq and zaurus have particular
//devices
bool systemZaurus=FALSE;
struct utsname name; /* check for embedix kernel running on the zaurus*/
if (uname(&name) != -1) {// TODO change this here,...
QString release=name.release;
if( release.find("embedix",0,TRUE) != -1) {
qDebug("IS System Zaurus");
systemZaurus=TRUE;
}
}
if(!systemZaurus) {
stereoCheckBox->setChecked(TRUE);
}
stereoCheckBox->setEnabled(FALSE);
sixteenBitCheckBox->setEnabled(FALSE);
#else
#endif
int sRate=cfg.readNumEntry("SizeLimit", 30);
qDebug("%d",sRate);
if(sRate ==30)
timeLimitComboBox->setCurrentItem(0);
else if(sRate==20)
timeLimitComboBox->setCurrentItem(1);
else if(sRate == 15)
timeLimitComboBox->setCurrentItem(2);
else if(sRate == 10)
timeLimitComboBox->setCurrentItem(3);
- else
+ else if(sRate == 5)
timeLimitComboBox->setCurrentItem(4);
+ else
+ timeLimitComboBox->setCurrentItem(5);
sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1));
cfg.setGroup("Defaults");
keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") );
updateStorageCombo();
connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &)));
connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT( setKeyButton(const QString &)));
connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT( setSizeLimitButton(const QString &)));
// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
}
void SoundSettings::updateStorageCombo() {
Config config( "Vmemo" );
config.setGroup( "System" );
QString loc = config.readEntry("RecLocation","/");
int i=0;
int set=0;
StorageInfo storageInfo;
QString sName, sPath;
QStringList list;
list << "Documents : "+QPEApplication::documentDir();
list << "tmp : /tmp";
const QList<FileSystem> &fs = storageInfo.fileSystems();
QListIterator<FileSystem> it ( fs );
for( ; it.current(); ++it ){
const QString name = (*it)->name();
const QString path = (*it)->path();
qDebug("storage name "+name +" storage path is "+path);
list << name + ": " +path;
if( loc.find( path,0,TRUE) != -1)
set = i;
// if(dit.current()->file().find(path) != -1 ) storage=name;
i++;
}
LocationComboBox->insertStringList(list);
qDebug("set item %d", set);
LocationComboBox->setCurrentItem(set);
}
void SoundSettings::setLocation(const QString & string) {
Config config( "Vmemo" );
config.setGroup( "System" );
config.writeEntry("RecLocation",string);
qDebug("set location "+string);