summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sound/opie-sound.control10
-rw-r--r--noncore/settings/sound/soundsettings.cpp48
-rw-r--r--noncore/settings/sound/soundsettings.h4
-rw-r--r--noncore/settings/sound/soundsettingsbase.cpp10
-rw-r--r--noncore/settings/sound/soundsettingsbase.h2
5 files changed, 44 insertions, 30 deletions
diff --git a/noncore/settings/sound/opie-sound.control b/noncore/settings/sound/opie-sound.control
deleted file mode 100644
index 3d42ca0..0000000
--- a/noncore/settings/sound/opie-sound.control
+++ b/dev/null
@@ -1,10 +0,0 @@
1Files: bin/sound apps/Settings/Sound.desktop
2Priority: optional
3Section: opie/settings
4Maintainer: L.J. Potter
5Architecture: arm
6Arch: iPAQ
7Version: $QPE_VERSION-$SUB_VERSION.2
8Depends: opie-base ($QPE_VERSION)
9Description: Sound settings dialog
10 For the Opie environment.
diff --git a/noncore/settings/sound/soundsettings.cpp b/noncore/settings/sound/soundsettings.cpp
index 20f0dab..dd341c0 100644
--- a/noncore/settings/sound/soundsettings.cpp
+++ b/noncore/settings/sound/soundsettings.cpp
@@ -34,2 +34,3 @@
34#include <qcombobox.h> 34#include <qcombobox.h>
35#include <qlabel.h>
35 36
@@ -42,2 +43,3 @@
42 43
44
43SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl ) 45SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
@@ -46,3 +48,3 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
46 keyReset=FALSE; 48 keyReset=FALSE;
47 49 noWarning=false;
48 Config config( "qpe"); 50 Config config( "qpe");
@@ -66,5 +68,7 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
66 68
67 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0)); //TODO hide if zaurus- mono only 69 stereoCheckBox->setChecked(cfg.readNumEntry("Stereo", 0));
70//TODO hide if zaurus- mono only
68 71
69#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX) //since ipaq and zaurus have particular 72#if defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
73//since ipaq and zaurus have particular
70 //devices 74 //devices
@@ -108,5 +112,10 @@ SoundSettings::SoundSettings( QWidget* parent, const char* objname, WFlags fl )
108 updateStorageCombo(); 112 updateStorageCombo();
109 connect( LocationComboBox,SIGNAL(activated(const QString &)),this,SLOT( setLocation(const QString &))); 113 connect( LocationComboBox,SIGNAL(activated(const QString &)), this,
110 connect( keyComboBox,SIGNAL(activated(const QString &)),this,SLOT( setKeyButton(const QString &))); 114 SLOT( setLocation(const QString &)));
111 connect( timeLimitComboBox,SIGNAL(activated( const QString &)),this,SLOT( setSizeLimitButton(const QString &))); 115 connect( keyComboBox,SIGNAL(activated( int)), this,
116 SLOT( setKeyButton( int)));
117 connect( timeLimitComboBox,SIGNAL(activated( const QString &)), this,
118 SLOT( setSizeLimitButton(const QString &)));
119 connect( restartCheckBox,SIGNAL( toggled( bool)), this,
120 SLOT( restartOpie( bool)));
112// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 121// connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
@@ -162,10 +171,4 @@ void SoundSettings::cleanUp() {
162 171
163 if(keyReset) { 172 if(keyReset && noWarning) {
164 switch ( QMessageBox::warning(this,tr("Restart"),
165 tr("To implement a new key switch\nOpie will have to be restarted./n<B>Restart</B> Opie now?"),
166 tr("Yes"),tr("No"),0,1,1) ) {
167 case 0:
168 QCopEnvelope ("QPE/System", "restart()"); 173 QCopEnvelope ("QPE/System", "restart()");
169 break;
170 };
171 } 174 }
@@ -173,13 +176,15 @@ void SoundSettings::cleanUp() {
173 176
174void SoundSettings::setKeyButton(const QString &name) { 177void SoundSettings::setKeyButton( int index) {
175 Config cfg("Vmemo"); 178 Config cfg("Vmemo");
176 cfg.setGroup("Defaults"); 179 cfg.setGroup("Defaults");
177 cfg.writeEntry( "toggleKey", keyComboBox->currentItem() ); 180 cfg.writeEntry( "toggleKey", index );
178 keyReset = TRUE; 181 keyReset = TRUE;
179 if(keyComboBox->currentItem() == 1) 182 if( index == 1) {
180 cfg.writeEntry( "hideIcon", 0 ); 183 cfg.writeEntry( "hideIcon", 0 );
181 else 184 keyLabel->setText(tr("Shows icon"));
185 }
186 else {
182 cfg.writeEntry( "hideIcon", 1); 187 cfg.writeEntry( "hideIcon", 1);
183 188 keyLabel->setText(tr("Hides icon"));
184 189 }
185 cfg.write(); 190 cfg.write();
@@ -201 +206,6 @@ void SoundSettings::setSizeLimitButton(const QString &index) {
201} 206}
207
208void SoundSettings::restartOpie(bool b) {
209 noWarning=b;
210}
211
diff --git a/noncore/settings/sound/soundsettings.h b/noncore/settings/sound/soundsettings.h
index 6b8b835..0f3605e 100644
--- a/noncore/settings/sound/soundsettings.h
+++ b/noncore/settings/sound/soundsettings.h
@@ -34,2 +34,3 @@ public:
34protected: 34protected:
35 bool noWarning;
35/* void accept(); */ 36/* void accept(); */
@@ -40,3 +41,3 @@ protected:
40private slots: 41private slots:
41 void setKeyButton(const QString &); 42 void setKeyButton( int);
42 void setSizeLimitButton(const QString &); 43 void setSizeLimitButton(const QString &);
@@ -44,2 +45,3 @@ private slots:
44 void cleanUp(); 45 void cleanUp();
46 void restartOpie(bool);
45}; 47};
diff --git a/noncore/settings/sound/soundsettingsbase.cpp b/noncore/settings/sound/soundsettingsbase.cpp
index 05b4b7e..1a60109 100644
--- a/noncore/settings/sound/soundsettingsbase.cpp
+++ b/noncore/settings/sound/soundsettingsbase.cpp
@@ -149,2 +149,5 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
149 149
150 keyLabel= new QLabel( this, "keyLabel" );
151 SoundSettingsBaseLayout->addMultiCellWidget( keyLabel , 6, 6, 0, 2, 3);
152
150 QLabel *timeLimitLabel; 153 QLabel *timeLimitLabel;
@@ -164,2 +167,9 @@ SoundSettingsBase::SoundSettingsBase( QWidget* parent, const char* name, bool m
164 167
168
169 restartCheckBox= new QCheckBox( this, "restartCheck" );
170 restartCheckBox->setText( tr( "Restart Opie if needed" ) );
171
172 SoundSettingsBaseLayout->addMultiCellWidget( restartCheckBox , 9, 9, 0, 0, 1);
173
174
165 QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); 175 QSpacerItem* spacer4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
diff --git a/noncore/settings/sound/soundsettingsbase.h b/noncore/settings/sound/soundsettingsbase.h
index 30f32ca..e6bc186 100644
--- a/noncore/settings/sound/soundsettingsbase.h
+++ b/noncore/settings/sound/soundsettingsbase.h
@@ -34,2 +34,3 @@ public:
34 QLabel* TextLabel1_2; 34 QLabel* TextLabel1_2;
35 QLabel *keyLabel;
35/* QLabel* volLabel; */ 36/* QLabel* volLabel; */
@@ -50,2 +51,3 @@ public:
50 QComboBox* timeLimitComboBox; 51 QComboBox* timeLimitComboBox;
52 QCheckBox *restartCheckBox;
51 bool keyReset; 53 bool keyReset;