author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/settings/sound | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
-rw-r--r-- | noncore/settings/sound/soundsettings.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp index 4bc86fa..8ad0a3f 100644 --- a/noncore/settings/sound/soundsettings.cpp +++ b/noncore/settings/sound/soundsettings.cpp | |||
@@ -66,106 +66,106 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) | |||
66 | //TODO hide if zaurus- mono only | 66 | //TODO hide if zaurus- mono only |
67 | 67 | ||
68 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) | 68 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) |
69 | //since ipaq and zaurus have particular | 69 | //since ipaq and zaurus have particular |
70 | //devices | 70 | //devices |
71 | bool systemZaurus=FALSE; | 71 | bool systemZaurus=FALSE; |
72 | struct utsname name; /* check for embedix kernel running on the zaurus*/ | 72 | struct utsname name; /* check for embedix kernel running on the zaurus*/ |
73 | if (uname(&name) != -1) {// TODO change this here,... | 73 | if (uname(&name) != -1) {// TODO change this here,... |
74 | QString release=name.release; | 74 | QString release=name.release; |
75 | if( release.find("embedix",0,TRUE) != -1) { | 75 | if( release.find("embedix",0,TRUE) != -1) { |
76 | qDebug("IS System Zaurus"); | 76 | qDebug("IS System Zaurus"); |
77 | systemZaurus=TRUE; | 77 | systemZaurus=TRUE; |
78 | } | 78 | } |
79 | } | 79 | } |
80 | if(!systemZaurus) { | 80 | if(!systemZaurus) { |
81 | stereoCheckBox->setChecked(TRUE); | 81 | stereoCheckBox->setChecked(TRUE); |
82 | } | 82 | } |
83 | stereoCheckBox->setEnabled(FALSE); | 83 | stereoCheckBox->setEnabled(FALSE); |
84 | sixteenBitCheckBox->setEnabled(FALSE); | 84 | sixteenBitCheckBox->setEnabled(FALSE); |
85 | #else | 85 | #else |
86 | #endif | 86 | #endif |
87 | int sRate=cfg.readNumEntry("SizeLimit", 30); | 87 | int sRate=cfg.readNumEntry("SizeLimit", 30); |
88 | qDebug("%d",sRate); | 88 | qDebug("%d",sRate); |
89 | 89 | ||
90 | if(sRate ==30) | 90 | if(sRate ==30) |
91 | timeLimitComboBox->setCurrentItem(0); | 91 | timeLimitComboBox->setCurrentItem(0); |
92 | else if(sRate==20) | 92 | else if(sRate==20) |
93 | timeLimitComboBox->setCurrentItem(1); | 93 | timeLimitComboBox->setCurrentItem(1); |
94 | else if(sRate == 15) | 94 | else if(sRate == 15) |
95 | timeLimitComboBox->setCurrentItem(2); | 95 | timeLimitComboBox->setCurrentItem(2); |
96 | else if(sRate == 10) | 96 | else if(sRate == 10) |
97 | timeLimitComboBox->setCurrentItem(3); | 97 | timeLimitComboBox->setCurrentItem(3); |
98 | else if(sRate == 5) | 98 | else if(sRate == 5) |
99 | timeLimitComboBox->setCurrentItem(4); | 99 | timeLimitComboBox->setCurrentItem(4); |
100 | else | 100 | else |
101 | timeLimitComboBox->setCurrentItem(5); | 101 | timeLimitComboBox->setCurrentItem(5); |
102 | 102 | ||
103 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); | 103 | sixteenBitCheckBox->setChecked(cfg.readNumEntry("SixteenBit", 1)); |
104 | 104 | ||
105 | cfg.setGroup("Defaults"); | 105 | cfg.setGroup("Defaults"); |
106 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); | 106 | keyComboBox->setCurrentItem(cfg.readNumEntry("toggleKey") ); |
107 | 107 | ||
108 | updateStorageCombo(); | 108 | updateStorageCombo(); |
109 | 109 | ||
110 | Config vmCfg("Vmemo"); | 110 | Config vmCfg("Vmemo"); |
111 | vmCfg.setGroup("Defaults"); | 111 | vmCfg.setGroup("Defaults"); |
112 | adpcmCheckBox->setChecked( vmCfg.readBoolEntry("use_ADPCM", 0)); | 112 | adpcmCheckBox->setChecked( vmCfg.readBoolEntry("use_ADPCM", 0)); |
113 | 113 | ||
114 | connect( LocationComboBox,SIGNAL(activated(const QString &)), this, | 114 | connect( LocationComboBox,SIGNAL(activated(const QString&)), this, |
115 | SLOT( setLocation(const QString &))); | 115 | SLOT( setLocation(const QString&))); |
116 | connect( keyComboBox,SIGNAL(activated( int)), this, | 116 | connect( keyComboBox,SIGNAL(activated(int)), this, |
117 | SLOT( setKeyButton( int))); | 117 | SLOT( setKeyButton(int))); |
118 | connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this, | 118 | connect( timeLimitComboBox,SIGNAL(activated(const QString&)), this, |
119 | SLOT( setSizeLimitButton(const QString &))); | 119 | SLOT( setSizeLimitButton(const QString&))); |
120 | connect( restartCheckBox,SIGNAL( toggled( bool)), this, | 120 | connect( restartCheckBox,SIGNAL( toggled(bool)), this, |
121 | SLOT( restartOpie( bool))); | 121 | SLOT( restartOpie(bool))); |
122 | connect( adpcmCheckBox,SIGNAL( toggled( bool)), this, | 122 | connect( adpcmCheckBox,SIGNAL( toggled(bool)), this, |
123 | SLOT( slotAdpcm( bool))); | 123 | SLOT( slotAdpcm(bool))); |
124 | 124 | ||
125 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); | 125 | // connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); |
126 | } | 126 | } |
127 | 127 | ||
128 | void SoundSettings::updateStorageCombo() { | 128 | void SoundSettings::updateStorageCombo() { |
129 | 129 | ||
130 | Config config( "Vmemo" ); | 130 | Config config( "Vmemo" ); |
131 | config.setGroup( "System" ); | 131 | config.setGroup( "System" ); |
132 | QString loc = config.readEntry("RecLocation","/"); | 132 | QString loc = config.readEntry("RecLocation","/"); |
133 | int i=0; | 133 | int i=0; |
134 | int set=0; | 134 | int set=0; |
135 | StorageInfo storageInfo; | 135 | StorageInfo storageInfo; |
136 | QString sName, sPath; | 136 | QString sName, sPath; |
137 | QStringList list; | 137 | QStringList list; |
138 | list << "Documents : "+QPEApplication::documentDir(); | 138 | list << "Documents : "+QPEApplication::documentDir(); |
139 | list << "tmp : /tmp"; | 139 | list << "tmp : /tmp"; |
140 | 140 | ||
141 | const QList<FileSystem> &fs = storageInfo.fileSystems(); | 141 | const QList<FileSystem> &fs = storageInfo.fileSystems(); |
142 | QListIterator<FileSystem> it ( fs ); | 142 | QListIterator<FileSystem> it ( fs ); |
143 | for( ; it.current(); ++it ){ | 143 | for( ; it.current(); ++it ){ |
144 | const QString name = (*it)->name(); | 144 | const QString name = (*it)->name(); |
145 | const QString path = (*it)->path(); | 145 | const QString path = (*it)->path(); |
146 | qDebug("storage name "+name +" storage path is "+path); | 146 | qDebug("storage name "+name +" storage path is "+path); |
147 | list << name + ": " +path; | 147 | list << name + ": " +path; |
148 | if( loc.find( path,0,TRUE) != -1) | 148 | if( loc.find( path,0,TRUE) != -1) |
149 | set = i; | 149 | set = i; |
150 | // if(dit.current()->file().find(path) != -1 ) storage=name; | 150 | // if(dit.current()->file().find(path) != -1 ) storage=name; |
151 | i++; | 151 | i++; |
152 | } | 152 | } |
153 | 153 | ||
154 | LocationComboBox->insertStringList(list); | 154 | LocationComboBox->insertStringList(list); |
155 | qDebug("set item %d", set); | 155 | qDebug("set item %d", set); |
156 | LocationComboBox->setCurrentItem(set); | 156 | LocationComboBox->setCurrentItem(set); |
157 | } | 157 | } |
158 | 158 | ||
159 | void SoundSettings::setLocation(const QString & string) { | 159 | void SoundSettings::setLocation(const QString & string) { |
160 | Config config( "Vmemo" ); | 160 | Config config( "Vmemo" ); |
161 | config.setGroup( "System" ); | 161 | config.setGroup( "System" ); |
162 | config.writeEntry("RecLocation",string); | 162 | config.writeEntry("RecLocation",string); |
163 | qDebug("set location "+string); | 163 | qDebug("set location "+string); |
164 | config.write(); | 164 | config.write(); |
165 | } | 165 | } |
166 | 166 | ||
167 | void SoundSettings::cleanUp() { | 167 | void SoundSettings::cleanUp() { |
168 | Config cfg("Vmemo"); | 168 | Config cfg("Vmemo"); |
169 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); | 169 | cfg.writeEntry("Alert",AlertCheckBox->isChecked()); |
170 | 170 | ||
171 | cfg.setGroup("Record"); | 171 | cfg.setGroup("Record"); |