Commit 37d9d9b6 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

ImportDialog: No auto default buttons.

parent 03203fd0
...@@ -171,10 +171,13 @@ ImportDialog::ImportDialog(QWidget* parent, QString& caption, ...@@ -171,10 +171,13 @@ ImportDialog::ImportDialog(QWidget* parent, QString& caption,
QLabel* matchLabel = new QLabel(i18n("Match with:"), matchBox); QLabel* matchLabel = new QLabel(i18n("Match with:"), matchBox);
matchLayout->addWidget(matchLabel); matchLayout->addWidget(matchLabel);
QPushButton* lengthButton = new QPushButton(i18n("&Length"), matchBox); QPushButton* lengthButton = new QPushButton(i18n("&Length"), matchBox);
lengthButton->setAutoDefault(false);
matchLayout->addWidget(lengthButton); matchLayout->addWidget(lengthButton);
QPushButton* trackButton = new QPushButton(i18n("T&rack"), matchBox); QPushButton* trackButton = new QPushButton(i18n("T&rack"), matchBox);
trackButton->setAutoDefault(false);
matchLayout->addWidget(trackButton); matchLayout->addWidget(trackButton);
QPushButton* titleButton = new QPushButton(i18n("&Title"), matchBox); QPushButton* titleButton = new QPushButton(i18n("&Title"), matchBox);
titleButton->setAutoDefault(false);
matchLayout->addWidget(titleButton); matchLayout->addWidget(titleButton);
vlayout->addWidget(matchBox); vlayout->addWidget(matchBox);
...@@ -192,21 +195,23 @@ ImportDialog::ImportDialog(QWidget* parent, QString& caption, ...@@ -192,21 +195,23 @@ ImportDialog::ImportDialog(QWidget* parent, QString& caption,
QSpacerItem* hspacer = new QSpacerItem(16, 0, QSizePolicy::Expanding, QSpacerItem* hspacer = new QSpacerItem(16, 0, QSizePolicy::Expanding,
QSizePolicy::Minimum); QSizePolicy::Minimum);
QPushButton* helpButton = new QPushButton(i18n("&Help"), this); QPushButton* helpButton = new QPushButton(i18n("&Help"), this);
helpButton->setAutoDefault(false);
QPushButton* saveButton = new QPushButton(i18n("&Save Settings"), this); QPushButton* saveButton = new QPushButton(i18n("&Save Settings"), this);
saveButton->setAutoDefault(false);
QPushButton* okButton = new QPushButton(i18n("&OK"), this); QPushButton* okButton = new QPushButton(i18n("&OK"), this);
okButton->setAutoDefault(false);
QPushButton* cancelButton = new QPushButton(i18n("&Cancel"), this); QPushButton* cancelButton = new QPushButton(i18n("&Cancel"), this);
if (hlayout && helpButton && okButton && saveButton && cancelButton) { cancelButton->setAutoDefault(false);
hlayout->addWidget(helpButton); hlayout->addWidget(helpButton);
hlayout->addWidget(saveButton); hlayout->addWidget(saveButton);
hlayout->addItem(hspacer); hlayout->addItem(hspacer);
hlayout->addWidget(okButton); hlayout->addWidget(okButton);
hlayout->addWidget(cancelButton); hlayout->addWidget(cancelButton);
connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp())); connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));
connect(saveButton, SIGNAL(clicked()), this, SLOT(saveConfig())); connect(saveButton, SIGNAL(clicked()), this, SLOT(saveConfig()));
connect(okButton, SIGNAL(clicked()), this, SLOT(onOkButtonClicked())); connect(okButton, SIGNAL(clicked()), this, SLOT(onOkButtonClicked()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
vlayout->addLayout(hlayout); vlayout->addLayout(hlayout);
}
} }
/** /**
......
...@@ -82,19 +82,24 @@ TextImportDialog::TextImportDialog(QWidget* parent, ...@@ -82,19 +82,24 @@ TextImportDialog::TextImportDialog(QWidget* parent,
QHBoxLayout* buttonLayout = new QHBoxLayout; QHBoxLayout* buttonLayout = new QHBoxLayout;
QPushButton* helpButton = new QPushButton(i18n("&Help"), this); QPushButton* helpButton = new QPushButton(i18n("&Help"), this);
helpButton->setAutoDefault(false);
buttonLayout->addWidget(helpButton); buttonLayout->addWidget(helpButton);
connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp())); connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));
QPushButton* saveButton = new QPushButton(i18n("&Save Settings"), this); QPushButton* saveButton = new QPushButton(i18n("&Save Settings"), this);
saveButton->setAutoDefault(false);
buttonLayout->addWidget(saveButton); buttonLayout->addWidget(saveButton);
connect(saveButton, SIGNAL(clicked()), this, SLOT(saveConfig())); connect(saveButton, SIGNAL(clicked()), this, SLOT(saveConfig()));
buttonLayout->addStretch(); buttonLayout->addStretch();
QPushButton* fileButton = new QPushButton(i18n("From F&ile"), this); QPushButton* fileButton = new QPushButton(i18n("From F&ile"), this);
fileButton->setAutoDefault(false);
buttonLayout->addWidget(fileButton); buttonLayout->addWidget(fileButton);
connect(fileButton, SIGNAL(clicked()), this, SLOT(fromFile())); connect(fileButton, SIGNAL(clicked()), this, SLOT(fromFile()));
QPushButton* clipButton = new QPushButton(i18n("From Clip&board"), this); QPushButton* clipButton = new QPushButton(i18n("From Clip&board"), this);
clipButton->setAutoDefault(false);
buttonLayout->addWidget(clipButton); buttonLayout->addWidget(clipButton);
connect(clipButton, SIGNAL(clicked()), this, SLOT(fromClipboard())); connect(clipButton, SIGNAL(clicked()), this, SLOT(fromClipboard()));
QPushButton* closeButton = new QPushButton(i18n("&Close"), this); QPushButton* closeButton = new QPushButton(i18n("&Close"), this);
closeButton->setAutoDefault(false);
buttonLayout->addWidget(closeButton); buttonLayout->addWidget(closeButton);
connect(closeButton, SIGNAL(clicked()), this, SLOT(accept())); connect(closeButton, SIGNAL(clicked()), this, SLOT(accept()));
vboxLayout->addLayout(buttonLayout); vboxLayout->addLayout(buttonLayout);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment