summaryrefslogtreecommitdiff
Unidiff
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
@@ -144,7 +144,7 @@ void MediumMountGui::startGui() {
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" );
@@ -154,6 +154,7 @@ void MediumMountGui::startGui() {
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 );
@@ -171,20 +172,9 @@ void MediumMountGui::startGui() {
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
@@ -196,10 +186,10 @@ void MediumMountGui::deactivateOthers() {
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
@@ -207,9 +197,9 @@ QStringList 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() {
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
@@ -18,12 +18,10 @@ class 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;
@@ -39,7 +37,6 @@ protected:
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();
@@ -50,12 +47,11 @@ private:
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;