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,
QLabel* matchLabel = new QLabel(i18n("Match with:"), matchBox);
matchLayout->addWidget(matchLabel);
QPushButton* lengthButton = new QPushButton(i18n("&Length"), matchBox);
lengthButton->setAutoDefault(false);
matchLayout->addWidget(lengthButton);
QPushButton* trackButton = new QPushButton(i18n("T&rack"), matchBox);
trackButton->setAutoDefault(false);
matchLayout->addWidget(trackButton);
QPushButton* titleButton = new QPushButton(i18n("&Title"), matchBox);
titleButton->setAutoDefault(false);
matchLayout->addWidget(titleButton);
vlayout->addWidget(matchBox);
......@@ -192,10 +195,13 @@ ImportDialog::ImportDialog(QWidget* parent, QString& caption,
QSpacerItem* hspacer = new QSpacerItem(16, 0, QSizePolicy::Expanding,
QSizePolicy::Minimum);
QPushButton* helpButton = new QPushButton(i18n("&Help"), this);
helpButton->setAutoDefault(false);
QPushButton* saveButton = new QPushButton(i18n("&Save Settings"), this);
saveButton->setAutoDefault(false);
QPushButton* okButton = new QPushButton(i18n("&OK"), this);
okButton->setAutoDefault(false);
QPushButton* cancelButton = new QPushButton(i18n("&Cancel"), this);
if (hlayout && helpButton && okButton && saveButton && cancelButton) {
cancelButton->setAutoDefault(false);
hlayout->addWidget(helpButton);
hlayout->addWidget(saveButton);
hlayout->addItem(hspacer);
......@@ -206,7 +212,6 @@ ImportDialog::ImportDialog(QWidget* parent, QString& caption,
connect(okButton, SIGNAL(clicked()), this, SLOT(onOkButtonClicked()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
vlayout->addLayout(hlayout);
}
}
/**
......
......@@ -82,19 +82,24 @@ TextImportDialog::TextImportDialog(QWidget* parent,
QHBoxLayout* buttonLayout = new QHBoxLayout;
QPushButton* helpButton = new QPushButton(i18n("&Help"), this);
helpButton->setAutoDefault(false);
buttonLayout->addWidget(helpButton);
connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));
QPushButton* saveButton = new QPushButton(i18n("&Save Settings"), this);
saveButton->setAutoDefault(false);
buttonLayout->addWidget(saveButton);
connect(saveButton, SIGNAL(clicked()), this, SLOT(saveConfig()));
buttonLayout->addStretch();
QPushButton* fileButton = new QPushButton(i18n("From F&ile"), this);
fileButton->setAutoDefault(false);
buttonLayout->addWidget(fileButton);
connect(fileButton, SIGNAL(clicked()), this, SLOT(fromFile()));
QPushButton* clipButton = new QPushButton(i18n("From Clip&board"), this);
clipButton->setAutoDefault(false);
buttonLayout->addWidget(clipButton);
connect(clipButton, SIGNAL(clicked()), this, SLOT(fromClipboard()));
QPushButton* closeButton = new QPushButton(i18n("&Close"), this);
closeButton->setAutoDefault(false);
buttonLayout->addWidget(closeButton);
connect(closeButton, SIGNAL(clicked()), this, SLOT(accept()));
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