author | llornkcor <llornkcor> | 2002-06-23 18:41:55 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-23 18:41:55 (UTC) |
commit | 25fbcaaa768b83cf0518aced5a76479617959769 (patch) (unidiff) | |
tree | 2071a23f30f600bacd0398c84a6fb81dff34ce8d | |
parent | 2e8b8787a154d9c783b752edb577b42b6e29fd6b (diff) | |
download | opie-25fbcaaa768b83cf0518aced5a76479617959769.zip opie-25fbcaaa768b83cf0518aced5a76479617959769.tar.gz opie-25fbcaaa768b83cf0518aced5a76479617959769.tar.bz2 |
reading correct config file
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index 3ceaf0c..759a469 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -55,57 +55,58 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | |||
55 | 55 | ||
56 | cfg.setGroup("Record"); | 56 | cfg.setGroup("Record"); |
57 | int rate=config.readNumEntry("SampleRate", 22050); | 57 | int rate=config.readNumEntry("SampleRate", 22050); |
58 | if(rate == 8000) | 58 | if(rate == 8000) |
59 | sampleRate->setCurrentItem(0); | 59 | sampleRate->setCurrentItem(0); |
60 | else if(rate == 11025) | 60 | else if(rate == 11025) |
61 | sampleRate->setCurrentItem(1); | 61 | sampleRate->setCurrentItem(1); |
62 | else if(rate == 22050) | 62 | else if(rate == 22050) |
63 | sampleRate->setCurrentItem(2); | 63 | sampleRate->setCurrentItem(2); |
64 | else if(rate == 33075) | 64 | else if(rate == 33075) |
65 | sampleRate->setCurrentItem(3); | 65 | sampleRate->setCurrentItem(3); |
66 | else if(rate==44100) | 66 | else if(rate==44100) |
67 | sampleRate->setCurrentItem(4); | 67 | sampleRate->setCurrentItem(4); |
68 | 68 | ||
69 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only | 69 | stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only |
70 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 70 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
71 | if (uname(&name) != -1) { | 71 | if (uname(&name) != -1) { |
72 | QString release=name.release; | 72 | QString release=name.release; |
73 | 73 | ||
74 | if( release.find("embedix",0,TRUE) !=-1) | 74 | if( release.find("embedix",0,TRUE) !=-1) |
75 | stereoCheckBox->hide(); | 75 | stereoCheckBox->hide(); |
76 | } | 76 | } |
77 | // else | 77 | // else |
78 | // stereoCheckBox->hide(); | 78 | // stereoCheckBox->hide(); |
79 | int sRate=config.readNumEntry("SizeLimit", 30); | 79 | int sRate=cfg.readNumEntry("SizeLimit", 30); |
80 | qDebug("%d",sRate); | ||
81 | |||
80 | if(sRate ==30) | 82 | if(sRate ==30) |
81 | timeLimitComboBox->setCurrentItem(0); | 83 | timeLimitComboBox->setCurrentItem(0); |
82 | else if(sRate==20) | 84 | else if(sRate==20) |
83 | timeLimitComboBox->setCurrentItem(1); | 85 | timeLimitComboBox->setCurrentItem(1); |
84 | else if(sRate == 15) | 86 | else if(sRate == 15) |
85 | timeLimitComboBox->setCurrentItem(2); | 87 | timeLimitComboBox->setCurrentItem(2); |
86 | else if(sRate == 10) | 88 | else if(sRate == 10) |
87 | |||
88 | timeLimitComboBox->setCurrentItem(3); | 89 | timeLimitComboBox->setCurrentItem(3); |
89 | else | 90 | else |
90 | timeLimitComboBox->setCurrentItem(4); | 91 | timeLimitComboBox->setCurrentItem(4); |
91 | 92 | ||
92 | 93 | ||
93 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); | 94 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); |
94 | 95 | ||
95 | cfg.setGroup("Defaults"); | 96 | cfg.setGroup("Defaults"); |
96 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); | 97 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); |
97 | 98 | ||
98 | updateStorageCombo(); | 99 | updateStorageCombo(); |
99 | 100 | ||
100 | connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); | 101 | connect(volume, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); |
101 | connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); | 102 | connect(mic, SIGNAL(valueChanged(int)), this, SLOT(setMic(int))); |
102 | connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); | 103 | connect(qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( volumeChanged(bool) ) ); |
103 | connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) ); | 104 | connect(qApp, SIGNAL( micChanged(bool) ), this, SLOT ( micChanged(bool) ) ); |
104 | connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); | 105 | connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); |
105 | connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &))); | 106 | connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT(setKeyButton(const QString &))); |
106 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT(setSizeLimitButton(const QString &))); | 107 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT(setSizeLimitButton(const QString &))); |
107 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 108 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
108 | } | 109 | } |
109 | 110 | ||
110 | // void SoundSettings::reject() | 111 | // void SoundSettings::reject() |
111 | // { | 112 | // { |