summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/securedlg.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-18 07:57:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-18 07:57:55 +0000
commit3df918cc405b2449b5c98479a0dbd0eb1a23cbe5 (patch)
tree35402080449f7ab7a455f604e386a15a5420eee9 /kdesktop/lock/securedlg.cc
parent2372baf4c670de9de85fc134fd31c8caaea0f79b (diff)
downloadtdebase-3df918cc405b2449b5c98479a0dbd0eb1a23cbe5.tar.gz
tdebase-3df918cc405b2449b5c98479a0dbd0eb1a23cbe5.zip
Use krootpixmap instead of the external krootbacking executable in kdesktop_lock
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1254228 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/lock/securedlg.cc')
-rw-r--r--kdesktop/lock/securedlg.cc25
1 files changed, 19 insertions, 6 deletions
diff --git a/kdesktop/lock/securedlg.cc b/kdesktop/lock/securedlg.cc
index ac3d3d113..4577f5784 100644
--- a/kdesktop/lock/securedlg.cc
+++ b/kdesktop/lock/securedlg.cc
@@ -104,28 +104,34 @@ SecureDlg::SecureDlg(LockProcess *parent)
mShutdownButton->setText(i18n("Logoff Menu"));
mShutdownButton->setEnabled(false); // FIXME
+ mSwitchButton = new TQPushButton( frame );
+ mSwitchButton->setText(i18n("Switch User"));
+ mSwitchButton->setEnabled(false); // FIXME
+
TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this );
unlockDialogLayout->addWidget( frame );
TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
layStatus->addWidget( mLogonStatus );
- TQHBoxLayout *layPBRow1 = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
- layPBRow1->addWidget( mLockButton );
- layPBRow1->addWidget( mTaskButton );
- layPBRow1->addWidget( mShutdownButton );
- layPBRow1->addWidget( mCancelButton );
+ TQGridLayout *layPBGrid = new TQGridLayout( 0, 0, KDialog::spacingHint());
+ layPBGrid->addWidget( mLockButton, 0, 0 );
+ layPBGrid->addWidget( mTaskButton, 0, 1 );
+ layPBGrid->addWidget( mShutdownButton, 0, 2 );
+ layPBGrid->addWidget( mCancelButton, 0, 3 );
+ layPBGrid->addWidget( mSwitchButton, 1, 0 );
frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
frameLayout->addMultiCellWidget( theader, 0, 0, 0, 1, AlignTop | AlignLeft );
frameLayout->addMultiCellLayout( layStatus, 1, 1, 0, 1, AlignLeft | AlignVCenter);
frameLayout->addMultiCellWidget( sep, 2, 2, 0, 1 );
- frameLayout->addMultiCellLayout( layPBRow1, 3, 3, 0, 1, AlignLeft | AlignVCenter);
+ frameLayout->addMultiCellLayout( layPBGrid, 3, 3, 0, 1, AlignLeft | AlignVCenter);
connect(mCancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBtnCancel()));
connect(mLockButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBtnLock()));
connect(mTaskButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBtnTask()));
connect(mShutdownButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBtnShutdown()));
+ connect(mSwitchButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBtnSwitchUser()));
TQSize dlgSz = sizeHint();
int btnSize = dlgSz.width();
@@ -135,6 +141,7 @@ SecureDlg::SecureDlg(LockProcess *parent)
mTaskButton->setFixedWidth(btnSize);
mCancelButton->setFixedWidth(btnSize);
mShutdownButton->setFixedWidth(btnSize);
+ mSwitchButton->setFixedWidth(btnSize);
installEventFilter(this);
}
@@ -168,6 +175,12 @@ void SecureDlg::slotBtnShutdown()
hide();
}
+void SecureDlg::slotBtnSwitchUser()
+{
+ if (retInt) *retInt = 4;
+ hide();
+}
+
void SecureDlg::setRetInt(int *i)
{
retInt = i;