Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 641060 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/configdialog/ConfigDialog.cpp (-4 / +9 lines)
Lines 70-84 Amarok2ConfigDialog::Amarok2ConfigDialog( QWidget *parent, const char* name, KCo Link Here
70
    addPage( scripts, i18n( "Scripts" ), "preferences-plugin-script", i18n( "Configure Scripts" ) );
70
    addPage( scripts, i18n( "Scripts" ), "preferences-plugin-script", i18n( "Configure Scripts" ) );
71
    //addPage( mediadevice, i18n( "Media Devices" ), "preferences-multimedia-player-amarok", i18n( "Configure Portable Player Support" ) );
71
    //addPage( mediadevice, i18n( "Media Devices" ), "preferences-multimedia-player-amarok", i18n( "Configure Portable Player Support" ) );
72
72
73
    QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Apply);
74
    QVBoxLayout *mainLayout = new QVBoxLayout;
73
    QVBoxLayout *mainLayout = new QVBoxLayout;
75
    setLayout(mainLayout);
74
    setLayout(mainLayout);
75
76
    // Don't change the used button box, this breaks the button handling inside the KConfigDialog
77
    QDialogButtonBox *buttonBox = this->buttonBox();
78
79
    // Make the ok button the default button and attach shortcut to it
76
    QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
80
    QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
77
    okButton->setDefault(true);
81
    okButton->setDefault(true);
78
    okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
82
    okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
79
    connect(buttonBox, &QDialogButtonBox::accepted, this, &Amarok2ConfigDialog::accept);
83
80
    connect(buttonBox, &QDialogButtonBox::rejected, this, &Amarok2ConfigDialog::reject);
84
    // Hide the restore defaults button, we don't support it
81
    setButtonBox(buttonBox);
85
    buttonBox->button(QDialogButtonBox::RestoreDefaults)->setVisible(false);
86
82
    KWindowConfig::restoreWindowSize(windowHandle(), Amarok::config( "ConfigDialog" ));
87
    KWindowConfig::restoreWindowSize(windowHandle(), Amarok::config( "ConfigDialog" ));
83
}
88
}
84
89

Return to bug 641060