summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-07-26 00:48:09 (UTC)
committer llornkcor <llornkcor>2002-07-26 00:48:09 (UTC)
commitf3678966b4f08e9cc99b5f625c028e6f2d29a8ae (patch) (side-by-side diff)
treea9d3b94d3768d288f2de47660f55c56e4c3d6a07
parentcf32a5b8d6886b357d0f4a6ecdc5b10f78a6a041 (diff)
downloadopie-f3678966b4f08e9cc99b5f625c028e6f2d29a8ae.zip
opie-f3678966b4f08e9cc99b5f625c028e6f2d29a8ae.tar.gz
opie-f3678966b4f08e9cc99b5f625c028e6f2d29a8ae.tar.bz2
really fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sound/soundsettings.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index 010e0af..cddb478 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -90,99 +90,102 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
else if(sRate==20)
timeLimitComboBox->setCurrentItem(1);
else if(sRate == 15)
timeLimitComboBox->setCurrentItem(2);
else if(sRate == 10)
timeLimitComboBox->setCurrentItem(3);
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);
config.write();
}
void SoundSettings::cleanUp() {
Config cfg("Vmemo");
cfg.writeEntry("Alert",AlertCheckBox->isChecked());
cfg.setGroup("Record");
cfg.writeEntry("SampleRate",sampleRate->currentText());
cfg.writeEntry("Stereo",stereoCheckBox->isChecked());
cfg.writeEntry("SixteenBit",sixteenBitCheckBox->isChecked());
if(keyReset) QCopEnvelope ("QPE/System", "restart()");
}
void SoundSettings::setKeyButton(const QString &name) {
Config cfg("Vmemo");
cfg.setGroup("Defaults");
cfg.writeEntry( "toggleKey", keyComboBox->currentItem() );
keyReset = TRUE;
if(keyComboBox->currentItem() == 1)
cfg.writeEntry( "hideIcon", 0 );
else
cfg.writeEntry( "hideIcon", 1);
cfg.write();
}
void SoundSettings::updateLocationCombo() {
}
void SoundSettings::setSizeLimitButton(const QString &index) {
Config cfg("Vmemo");
cfg.setGroup("Record");
+ if(index.find("Unlimited",0,TRUE) != -1)
+ cfg.writeEntry("SizeLimit", -1);
+ else
cfg.writeEntry("SizeLimit", index);
cfg.write();
}