-rw-r--r-- | core/launcher/mediummountgui.cpp | 24 | ||||
-rw-r--r-- | core/launcher/mediummountgui.h | 8 |
2 files changed, 9 insertions, 23 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() { QVBox* dirBox = new QVBox( this ); - dirBox->setMargin( 4 ); + dirBox->setMargin( 5 ); // select dirs @@ -155,4 +155,5 @@ void MediumMountGui::startGui() { PushButton3 = new QPushButton( dirLineBox ); PushButton3->setText( tr( "Add" ) ); + PushButton3->setFocus(); // decision @@ -172,18 +173,7 @@ void MediumMountGui::startGui() { deactivateOthers(); - QHBox* buttonBox = new QHBox( this ); - // buttons - quit = new QPushButton( buttonBox ); - quit->setFocus(); - quit->setText( tr( "Yes" ) ); - quit_2 = new QPushButton( buttonBox ); - quit_2->setText( tr( "No" ) ); - mainLayout->addWidget( GroupBox1 ); mainLayout->addWidget( dirBox ); - mainLayout->addWidget( buttonBox ); - - connect( quit, SIGNAL( clicked() ), this, SLOT( yesPressed() ) ); - connect( quit_2, SIGNAL( clicked() ), this, SLOT( noPressed() ) ); + mainLayout->addStretch( 0 ); } @@ -197,8 +187,8 @@ void MediumMountGui::deactivateOthers() { } -void MediumMountGui::yesPressed() { +void MediumMountGui::accept() { writeConfig( true ); // and do something - accept(); + QDialog::accept(); } @@ -208,7 +198,7 @@ QStringList MediumMountGui::mimeTypes() { } -void MediumMountGui::noPressed() { +void MediumMountGui::reject() { writeConfig( false ); - reject(); + QDialog::reject(); } 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 @@ -23,6 +23,4 @@ public: protected: - QPushButton* quit; - QPushButton* quit_2; QLabel* DirSelectText_2; QLineEdit* LineEdit1; @@ -40,5 +38,4 @@ protected: QCheckBox* AskBox; - public: bool check(); @@ -51,10 +48,9 @@ private: private slots: - void yesPressed(); - void noPressed(); + void accept(); + void reject(); void deactivateOthers(); private: QString mediumPath; - bool checkagain:1; bool checkmimeaudio:1; |