From f2e8fdf06715d274cebbeb6fc609e100f6e63bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 20 Mar 2010 13:58:19 +0000 Subject: [PATCH] Use radiobuttons instead of checkboxes in opacity user actions menu. Thanks to Glen Kaukola for the patch. FEATURE: 227540 svn path=/trunk/KDE/kdebase/workspace/; revision=1105530 --- useractions.cpp | 2 ++ workspace.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/useractions.cpp b/useractions.cpp index 019fb1555b..5f71163712 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -121,12 +121,14 @@ QMenu* Workspace::clientPopup() trans_popup = new QMenu( popup ); trans_popup->setFont(KGlobalSettings::menuFont()); connect( trans_popup, SIGNAL( triggered(QAction*) ), this, SLOT( setPopupClientOpacity(QAction*))); + trans_popup_group = new QActionGroup(trans_popup); const int levels[] = { 100, 90, 75, 50, 25, 10 }; for( unsigned int i = 0; i < sizeof( levels ) / sizeof( levels[ 0 ] ); ++i ) { action = trans_popup->addAction( QString::number( levels[ i ] ) + "%" ); + action->setActionGroup( trans_popup_group ); action->setCheckable( true ); action->setData( levels[ i ] ); } diff --git a/workspace.h b/workspace.h index 88cf696d07..80b53d21d0 100644 --- a/workspace.h +++ b/workspace.h @@ -43,6 +43,7 @@ along with this program. If not, see . // TODO: Cleanup the order of things in this .h file class QMenu; +class QActionGroup; class KConfig; class KActionCollection; class KStartupInfo; @@ -857,6 +858,7 @@ class Workspace : public QObject, public KDecorationDefines QMenu* popup; QMenu* advanced_popup; QMenu* trans_popup; + QActionGroup* trans_popup_group; QMenu* desk_popup; QMenu* add_tabs_popup; // Menu to add the group to other group QMenu* switch_to_tab_popup; // Menu to change tab