summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/lockdlg.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-15 07:33:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-15 07:33:07 +0000
commit1039f2df32eb011fd4013167ac20ecdc607e1c7b (patch)
treedfded40b0c1cc3f8bba06c4c2086960121f73608 /kdesktop/lock/lockdlg.cc
parentf6af340515ca0f5405ee4b893e24630450e07d4a (diff)
downloadtdebase-1039f2df32eb011fd4013167ac20ecdc607e1c7b.tar.gz
tdebase-1039f2df32eb011fd4013167ac20ecdc607e1c7b.zip
Enhance SAK appearance
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1253791 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/lock/lockdlg.cc')
-rw-r--r--kdesktop/lock/lockdlg.cc48
1 files changed, 36 insertions, 12 deletions
diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc
index 8059a28c7..fee47dfdb 100644
--- a/kdesktop/lock/lockdlg.cc
+++ b/kdesktop/lock/lockdlg.cc
@@ -96,13 +96,24 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin)
frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
frame->setLineWidth( 2 );
- TQLabel *pixLabel = new TQLabel( frame, "pixlabel" );
- pixLabel->setPixmap(DesktopIcon("lock"));
+ TQLabel *pixLabel;
+ if (!trinity_desktop_lock_use_system_modal_dialogs) {
+ pixLabel = new TQLabel( frame, "pixlabel" );
+ pixLabel->setPixmap(DesktopIcon("lock"));
+ }
KUser user;
- TQLabel *greetLabel = new TQLabel( user.fullName().isEmpty() ?
- i18n("<nobr><b>The session is locked</b><br>") :
- i18n("<nobr><b>The session was locked by %1</b><br>").arg( user.fullName() ), frame );
+ TQLabel *greetLabel;
+ if (trinity_desktop_lock_use_system_modal_dialogs) {
+ greetLabel = new TQLabel( user.fullName().isEmpty() ?
+ "<b>" + i18n("This computer is in use and has been locked.") + "</b>" :
+ "<b>" + i18n("This computer is in use and has been locked.") + "</b><br><nobr>" + i18n("Only '%1' may unlock this session.").arg( user.fullName() ), frame );
+ }
+ else {
+ greetLabel = new TQLabel( user.fullName().isEmpty() ?
+ i18n("<nobr><b>The session is locked</b><br>") :
+ i18n("<nobr><b>The session was locked by %1</b><br>").arg( user.fullName() ), frame );
+ }
mStatusLabel = new TQLabel( "<b> </b>", frame );
mStatusLabel->tqsetAlignment( TQLabel::AlignCenter );
@@ -134,13 +145,26 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin)
layButtons->addWidget( ok );
layButtons->addWidget( cancel );
- frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
- frameLayout->addMultiCellWidget( pixLabel, 0, 2, 0, 0, Qt::AlignTop );
- frameLayout->addWidget( greetLabel, 0, 1 );
- frameLayout->addItem( greet->getLayoutItem(), 1, 1 );
- frameLayout->addLayout( layStatus, 2, 1 );
- frameLayout->addMultiCellWidget( sep, 3, 3, 0, 1 );
- frameLayout->addMultiCellLayout( layButtons, 4, 4, 0, 1 );
+ if (trinity_desktop_lock_use_system_modal_dialogs) {
+ KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame );
+
+ frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
+ frameLayout->addMultiCellWidget( theader, 0, 0, 0, 2, Qt::AlignTop );
+ frameLayout->addWidget( greetLabel, 1, 1 );
+ frameLayout->addItem( greet->getLayoutItem(), 2, 1 );
+ frameLayout->addLayout( layStatus, 3, 1 );
+ frameLayout->addMultiCellWidget( sep, 4, 4, 0, 1 );
+ frameLayout->addMultiCellLayout( layButtons, 5, 5, 0, 1 );
+ }
+ else {
+ frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() );
+ frameLayout->addMultiCellWidget( pixLabel, 0, 2, 0, 0, Qt::AlignTop );
+ frameLayout->addWidget( greetLabel, 0, 1 );
+ frameLayout->addItem( greet->getLayoutItem(), 1, 1 );
+ frameLayout->addLayout( layStatus, 2, 1 );
+ frameLayout->addMultiCellWidget( sep, 3, 3, 0, 1 );
+ frameLayout->addMultiCellLayout( layButtons, 4, 4, 0, 1 );
+ }
setTabOrder( ok, cancel );
setTabOrder( cancel, mNewSessButton );