summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-11-04 20:06:58 (UTC)
committer harlekin <harlekin>2002-11-04 20:06:58 (UTC)
commit222d1d8b75494d520b5373fbaf64518afcdfcf89 (patch) (unidiff)
tree77faff83517567d4a8ce562a644f8582b57e8737
parent3c2605811571b5c8ccfbe2bdb1a03ec7a9c9f1c1 (diff)
downloadopie-222d1d8b75494d520b5373fbaf64518afcdfcf89.zip
opie-222d1d8b75494d520b5373fbaf64518afcdfcf89.tar.gz
opie-222d1d8b75494d520b5373fbaf64518afcdfcf89.tar.bz2
removed extra buttons - why double when they are in the titelbar
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/mediummountgui.cpp24
-rw-r--r--core/launcher/mediummountgui.h10
2 files changed, 10 insertions, 24 deletions
diff --git a/core/launcher/mediummountgui.cpp b/core/launcher/mediummountgui.cpp
index 6d60ce4..b0a1b10 100644
--- a/core/launcher/mediummountgui.cpp
+++ b/core/launcher/mediummountgui.cpp
@@ -141,22 +141,23 @@ void MediumMountGui::startGui() {
141 mimeLayout->addWidget( CheckBoxAll, 2, 0 ); 141 mimeLayout->addWidget( CheckBoxAll, 2, 0 );
142 mimeLayout->addWidget( CheckBoxLink, 2, 1 ); 142 mimeLayout->addWidget( CheckBoxLink, 2, 1 );
143 143
144 connect( CheckBoxAll, SIGNAL( clicked() ), this, SLOT( deactivateOthers() ) ); 144 connect( CheckBoxAll, SIGNAL( clicked() ), this, SLOT( deactivateOthers() ) );
145 145
146 QVBox* dirBox = new QVBox( this ); 146 QVBox* dirBox = new QVBox( this );
147 dirBox->setMargin( 4 ); 147 dirBox->setMargin( 5 );
148 148
149 // select dirs 149 // select dirs
150 DirSelectText = new QLabel( dirBox, "DirSelectText" ); 150 DirSelectText = new QLabel( dirBox, "DirSelectText" );
151 DirSelectText->setText( tr( "Limit search to dir: (not used yet)" ) ); 151 DirSelectText->setText( tr( "Limit search to dir: (not used yet)" ) );
152 152
153 QHBox* dirLineBox = new QHBox( dirBox ); 153 QHBox* dirLineBox = new QHBox( dirBox );
154 LineEdit1 = new QLineEdit( dirLineBox ); 154 LineEdit1 = new QLineEdit( dirLineBox );
155 PushButton3 = new QPushButton( dirLineBox ); 155 PushButton3 = new QPushButton( dirLineBox );
156 PushButton3->setText( tr( "Add" ) ); 156 PushButton3->setText( tr( "Add" ) );
157 PushButton3->setFocus();
157 158
158 // decision 159 // decision
159 DirSelectText_2 = new QLabel( dirBox ); 160 DirSelectText_2 = new QLabel( dirBox );
160 DirSelectText_2->setText( tr( "Your decision will be stored on the medium." ) ); 161 DirSelectText_2->setText( tr( "Your decision will be stored on the medium." ) );
161 162
162 // ask again 163 // ask again
@@ -168,50 +169,39 @@ void MediumMountGui::startGui() {
168 CheckBoxImage->setChecked( checkmimeimage ); 169 CheckBoxImage->setChecked( checkmimeimage );
169 CheckBoxText->setChecked( checkmimetext ); 170 CheckBoxText->setChecked( checkmimetext );
170 CheckBoxVideo->setChecked( checkmimevideo ); 171 CheckBoxVideo->setChecked( checkmimevideo );
171 CheckBoxAll->setChecked( checkmimeall ); 172 CheckBoxAll->setChecked( checkmimeall );
172 deactivateOthers(); 173 deactivateOthers();
173 174
174 QHBox* buttonBox = new QHBox( this );
175 // buttons
176 quit = new QPushButton( buttonBox );
177 quit->setFocus();
178 quit->setText( tr( "Yes" ) );
179 quit_2 = new QPushButton( buttonBox );
180 quit_2->setText( tr( "No" ) );
181
182 mainLayout->addWidget( GroupBox1 ); 175 mainLayout->addWidget( GroupBox1 );
183 mainLayout->addWidget( dirBox ); 176 mainLayout->addWidget( dirBox );
184 mainLayout->addWidget( buttonBox ); 177 mainLayout->addStretch( 0 );
185
186 connect( quit, SIGNAL( clicked() ), this, SLOT( yesPressed() ) );
187 connect( quit_2, SIGNAL( clicked() ), this, SLOT( noPressed() ) );
188} 178}
189 179
190 180
191void MediumMountGui::deactivateOthers() { 181void MediumMountGui::deactivateOthers() {
192 bool mod = !( CheckBoxAll->isChecked() ); 182 bool mod = !( CheckBoxAll->isChecked() );
193 CheckBoxVideo->setEnabled( mod ); 183 CheckBoxVideo->setEnabled( mod );
194 CheckBoxAudio->setEnabled( mod ); 184 CheckBoxAudio->setEnabled( mod );
195 CheckBoxText->setEnabled( mod ); 185 CheckBoxText->setEnabled( mod );
196 CheckBoxImage->setEnabled( mod ); 186 CheckBoxImage->setEnabled( mod );
197} 187}
198 188
199void MediumMountGui::yesPressed() { 189void MediumMountGui::accept() {
200 writeConfig( true ); 190 writeConfig( true );
201 // and do something 191 // and do something
202 accept(); 192 QDialog::accept();
203} 193}
204 194
205 195
206QStringList MediumMountGui::mimeTypes() { 196QStringList MediumMountGui::mimeTypes() {
207 return mimeTypeList; 197 return mimeTypeList;
208} 198}
209 199
210void MediumMountGui::noPressed() { 200void MediumMountGui::reject() {
211 writeConfig( false ); 201 writeConfig( false );
212 reject(); 202 QDialog::reject();
213} 203}
214 204
215MediumMountGui::~MediumMountGui() { 205MediumMountGui::~MediumMountGui() {
216} 206}
217 207
diff --git a/core/launcher/mediummountgui.h b/core/launcher/mediummountgui.h
index 39f9a52..d5c0fe7 100644
--- a/core/launcher/mediummountgui.h
+++ b/core/launcher/mediummountgui.h
@@ -15,18 +15,16 @@ class QPushButton;
15class Config; 15class Config;
16 16
17class MediumMountGui : public QDialog { 17class MediumMountGui : public QDialog {
18 Q_OBJECT 18 Q_OBJECT
19 19
20public: 20public:
21 MediumMountGui( Config *cfg, const QString &path = "tmp/", QWidget* parent = 0, const char* name = 0, bool modal = FALSE ,WFlags fl = 0 ); 21 MediumMountGui( Config *cfg, const QString &path = "tmp/", QWidget* parent = 0, const char* name = 0, bool modal = FALSE ,WFlags fl = 0 );
22 ~MediumMountGui(); 22 ~MediumMountGui();
23 23
24protected: 24protected:
25 QPushButton* quit;
26 QPushButton* quit_2;
27 QLabel* DirSelectText_2; 25 QLabel* DirSelectText_2;
28 QLineEdit* LineEdit1; 26 QLineEdit* LineEdit1;
29 QPushButton* PushButton3; 27 QPushButton* PushButton3;
30 QLabel* DirSelectText; 28 QLabel* DirSelectText;
31 QLabel* Text_2; 29 QLabel* Text_2;
32 QLabel* Text; 30 QLabel* Text;
@@ -36,29 +34,27 @@ protected:
36 QCheckBox* CheckBoxText; 34 QCheckBox* CheckBoxText;
37 QCheckBox* CheckBoxVideo; 35 QCheckBox* CheckBoxVideo;
38 QCheckBox* CheckBoxAll; 36 QCheckBox* CheckBoxAll;
39 QCheckBox* CheckBoxLink; 37 QCheckBox* CheckBoxLink;
40 QCheckBox* AskBox; 38 QCheckBox* AskBox;
41 39
42
43public: 40public:
44 bool check(); 41 bool check();
45 QStringList mimeTypes(); 42 QStringList mimeTypes();
46 QStringList dirs(); 43 QStringList dirs();
47private: 44private:
48 void startGui(); 45 void startGui();
49 void readConfig(); 46 void readConfig();
50 void writeConfig( bool checkagain ); 47 void writeConfig( bool checkagain );
51 48
52private slots: 49private slots:
53 void yesPressed(); 50 void accept();
54 void noPressed(); 51 void reject();
55 void deactivateOthers(); 52 void deactivateOthers();
56 private: 53 private:
57 QString mediumPath; 54 QString mediumPath;
58
59 bool checkagain:1; 55 bool checkagain:1;
60 bool checkmimeaudio:1; 56 bool checkmimeaudio:1;
61 bool checkmimeimage:1; 57 bool checkmimeimage:1;
62 bool checkmimetext:1; 58 bool checkmimetext:1;
63 bool checkmimevideo:1; 59 bool checkmimevideo:1;
64 bool checkmimeall:1; 60 bool checkmimeall:1;