Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
kdebase4-workspace
plasma-lock_logout_order.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File plasma-lock_logout_order.diff of Package kdebase4-workspace
Index: plasma/applets/lock_logout/Messages.sh =================================================================== --- plasma/applets/lock_logout/Messages.sh (revision 1011046) +++ plasma/applets/lock_logout/Messages.sh (working copy) @@ -1,4 +1,6 @@ #! /usr/bin/env bash +$XGETTEXT *.cpp -o $podir/plasma_applet_lock_logout.pot +#! /usr/bin/env bash $EXTRACTRC *.ui >> rc.cpp $XGETTEXT *.cpp -o $podir/plasma_applet_lockout.pot rm -f rc.cpp Index: plasma/applets/lock_logout/lockout.cpp =================================================================== --- plasma/applets/lock_logout/lockout.cpp (revision 1011046) +++ plasma/applets/lock_logout/lockout.cpp (working copy) @@ -66,6 +66,7 @@ KConfigGroup cg = config(); m_showLockButton = cg.readEntry("showLockButton", true); m_showLogoutButton = cg.readEntry("showLogoutButton", true); + m_alternateButtonOrder = cg.readEntry("AlternateButtonOrder", false); #endif //Tooltip strings maybe should be different (eg. "Leave..."->"Logout")? @@ -195,6 +196,12 @@ changed = true; } + if (m_alternateButtonOrder != ui.checkBox_alternate_button_order->isChecked()) { + m_alternateButtonOrder = !m_alternateButtonOrder; + cg.writeEntry("AlternateButtonOrder", m_alternateButtonOrder); + changed = true; + } + if (changed) { showButtons(); emit configNeedsSaving(); @@ -213,6 +220,7 @@ ui.checkBox_lock->setChecked(m_showLockButton); ui.checkBox_logout->setChecked(m_showLogoutButton); + ui.checkBox_alternate_button_order->setChecked(m_alternateButtonOrder); #endif } @@ -226,7 +234,20 @@ m_layout->removeItem(m_iconLock); m_layout->removeItem(m_iconLogout); - if (m_showLockButton) { + if (m_showLockButton && m_showLogoutButton) { + m_iconLock->setVisible(true); + m_iconLogout->setVisible(true); + if (m_alternateButtonOrder) { + m_layout->addItem(m_iconLock); + m_layout->addItem(m_iconLogout); + } + else { + m_layout->addItem(m_iconLogout); + m_layout->addItem(m_iconLock); + } + } + else { + if (m_showLockButton) { m_iconLock->setVisible(true); m_layout->addItem(m_iconLock); } else { @@ -240,6 +261,7 @@ m_iconLogout->setVisible(false); } + } setConfigurationRequired(!m_showLockButton && !m_showLogoutButton); checkLayout(); #endif // !Q_OS_WIN Index: plasma/applets/lock_logout/lockoutConfig.ui =================================================================== --- plasma/applets/lock_logout/lockoutConfig.ui (revision 1011046) +++ plasma/applets/lock_logout/lockoutConfig.ui (working copy) @@ -28,6 +28,13 @@ </widget> </item> <item row="2" column="0" > + <widget class="QCheckBox" name="checkBox_alternate_button_order" > + <property name="text" > + <string>Alternative button order</string> + </property> + </widget> + </item> + <item row="3" column="0" > <spacer name="verticalSpacer" > <property name="orientation" > <enum>Qt::Vertical</enum> Index: plasma/applets/lock_logout/lockout.h =================================================================== --- plasma/applets/lock_logout/lockout.h (revision 1011046) +++ plasma/applets/lock_logout/lockout.h (working copy) @@ -58,6 +58,7 @@ Ui::lockoutConfig ui; bool m_showLockButton; bool m_showLogoutButton; + bool m_alternateButtonOrder; #endif Plasma::IconWidget *m_iconLock; Plasma::IconWidget *m_iconLogout;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor