Diffstat (limited to 'core/launcher/mediummountgui.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/mediummountgui.cpp | 24 |
1 files changed, 7 insertions, 17 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() { mimeLayout->addWidget( CheckBoxAll, 2, 0 ); mimeLayout->addWidget( CheckBoxLink, 2, 1 ); connect( CheckBoxAll, SIGNAL( clicked() ), this, SLOT( deactivateOthers() ) ); QVBox* dirBox = new QVBox( this ); - dirBox->setMargin( 4 ); + dirBox->setMargin( 5 ); // select dirs DirSelectText = new QLabel( dirBox, "DirSelectText" ); DirSelectText->setText( tr( "Limit search to dir: (not used yet)" ) ); QHBox* dirLineBox = new QHBox( dirBox ); LineEdit1 = new QLineEdit( dirLineBox ); PushButton3 = new QPushButton( dirLineBox ); PushButton3->setText( tr( "Add" ) ); + PushButton3->setFocus(); // decision DirSelectText_2 = new QLabel( dirBox ); DirSelectText_2->setText( tr( "Your decision will be stored on the medium." ) ); // ask again @@ -168,50 +169,39 @@ void MediumMountGui::startGui() { CheckBoxImage->setChecked( checkmimeimage ); CheckBoxText->setChecked( checkmimetext ); CheckBoxVideo->setChecked( checkmimevideo ); CheckBoxAll->setChecked( checkmimeall ); 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 ); } void MediumMountGui::deactivateOthers() { bool mod = !( CheckBoxAll->isChecked() ); CheckBoxVideo->setEnabled( mod ); CheckBoxAudio->setEnabled( mod ); CheckBoxText->setEnabled( mod ); CheckBoxImage->setEnabled( mod ); } -void MediumMountGui::yesPressed() { +void MediumMountGui::accept() { writeConfig( true ); // and do something - accept(); + QDialog::accept(); } QStringList MediumMountGui::mimeTypes() { return mimeTypeList; } -void MediumMountGui::noPressed() { +void MediumMountGui::reject() { writeConfig( false ); - reject(); + QDialog::reject(); } MediumMountGui::~MediumMountGui() { } |