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
icc-effect-5.14.5
Martin Gräßlin 2010-03-20 13:58:19 +00:00
parent 1d7eb98180
commit f2e8fdf067
2 changed files with 4 additions and 0 deletions

View File

@ -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 ] );
}

View File

@ -43,6 +43,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 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