-rw-r--r-- | core/launcher/mediummountgui.cpp | 24 | ||||
-rw-r--r-- | core/launcher/mediummountgui.h | 10 |
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 | |||
@@ -145,5 +145,5 @@ void MediumMountGui::startGui() { | |||
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 |
@@ -155,4 +155,5 @@ void MediumMountGui::startGui() { | |||
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 |
@@ -172,18 +173,7 @@ void MediumMountGui::startGui() { | |||
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 | ||
@@ -197,8 +187,8 @@ void MediumMountGui::deactivateOthers() { | |||
197 | } | 187 | } |
198 | 188 | ||
199 | void MediumMountGui::yesPressed() { | 189 | void 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 | ||
@@ -208,7 +198,7 @@ QStringList MediumMountGui::mimeTypes() { | |||
208 | } | 198 | } |
209 | 199 | ||
210 | void MediumMountGui::noPressed() { | 200 | void MediumMountGui::reject() { |
211 | writeConfig( false ); | 201 | writeConfig( false ); |
212 | reject(); | 202 | QDialog::reject(); |
213 | } | 203 | } |
214 | 204 | ||
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 | |||
@@ -19,10 +19,8 @@ class MediumMountGui : public QDialog { | |||
19 | 19 | ||
20 | public: | 20 | public: |
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 | ||
24 | protected: | 24 | protected: |
25 | QPushButton* quit; | ||
26 | QPushButton* quit_2; | ||
27 | QLabel* DirSelectText_2; | 25 | QLabel* DirSelectText_2; |
28 | QLineEdit* LineEdit1; | 26 | QLineEdit* LineEdit1; |
@@ -40,5 +38,4 @@ protected: | |||
40 | QCheckBox* AskBox; | 38 | QCheckBox* AskBox; |
41 | 39 | ||
42 | |||
43 | public: | 40 | public: |
44 | bool check(); | 41 | bool check(); |
@@ -51,10 +48,9 @@ private: | |||
51 | 48 | ||
52 | private slots: | 49 | private 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; |