Summary: | Burning dialog does not honour the "ButtonLayout" setting | ||
---|---|---|---|
Product: | [Applications] k3b | Reporter: | Francois Marier <francois> |
Component: | general | Assignee: | Sebastian Trueg <trueg> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Francois Marier
2007-07-11 23:00:52 UTC
I would love to fix this. All I need is a definition of this standard. Which number corresponds to what layout? Mathias responded with the following comment:
There seems to exist no documentation on this setting, but this is what I found
out by trial and error:
0 = OK, Apply, Cancel // KDE default layout
1 = Cancel, Apply, OK
2 = Apply, Cancel, OK // GTK default layout
3 = OK, Apply, Cancel (aligned to the left of the window)
4 = OK, Cancel, Apply (aligned to the left of the window)
>=5 = 0
SVN commit 690257 by trueg: Honor the ButtonLayout setting in the interaction dialogs. Button layout codes provided by Francois Marier. BUG: 147799 M +33 -3 k3binteractiondialog.cpp --- branches/extragear/kde3/multimedia/k3b/src/k3binteractiondialog.cpp #690256:690257 @@ -45,6 +45,7 @@ #include <kpushbutton.h> #include <kconfig.h> #include <kiconloader.h> +#include <kglobalsettings.h> K3bInteractionDialog::K3bInteractionDialog( QWidget* parent, @@ -116,14 +117,12 @@ QFont fnt( m_buttonStart->font() ); fnt.setBold(true); m_buttonStart->setFont( fnt ); - layout5->addWidget( m_buttonStart ); } else m_buttonStart = 0; if( buttonMask & SAVE_BUTTON ) { m_buttonSave = new KPushButton( KStdGuiItem::save(), this, "m_buttonSave" ); - layout5->addWidget( m_buttonSave ); } else m_buttonSave = 0; @@ -135,11 +134,42 @@ : KStdGuiItem::cancel(), this, "m_buttonCancel" ); - layout5->addWidget( m_buttonCancel ); } else m_buttonCancel = 0; + // we only handle some of the possible settings since + // our buttons are always to the right of the dialog + switch( KGlobalSettings::buttonLayout() ) { + case 0: // KDE default + default: + if ( m_buttonStart ) + layout5->addWidget( m_buttonStart ); + if ( m_buttonSave ) + layout5->addWidget( m_buttonSave ); + if ( m_buttonCancel ) + layout5->addWidget( m_buttonCancel ); + break; + + case 1: // something different + if ( m_buttonCancel ) + layout5->addWidget( m_buttonCancel ); + if ( m_buttonSave ) + layout5->addWidget( m_buttonSave ); + if ( m_buttonStart ) + layout5->addWidget( m_buttonStart ); + break; + + case 2: // GTK-Style + if ( m_buttonSave ) + layout5->addWidget( m_buttonSave ); + if ( m_buttonCancel ) + layout5->addWidget( m_buttonCancel ); + if ( m_buttonStart ) + layout5->addWidget( m_buttonStart ); + break; + } + mainGrid->addLayout( layout5, 2, 2 ); mainGrid->setRowStretch( 1, 1 ); |