summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/sakdlg.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop/lock/sakdlg.cc')
-rw-r--r--kdesktop/lock/sakdlg.cc100
1 files changed, 52 insertions, 48 deletions
diff --git a/kdesktop/lock/sakdlg.cc b/kdesktop/lock/sakdlg.cc
index 1bb8305ef..1ae946b6a 100644
--- a/kdesktop/lock/sakdlg.cc
+++ b/kdesktop/lock/sakdlg.cc
@@ -1,8 +1,8 @@
//===========================================================================
//
-// This file is part of the KDE project
+// This file is part of the TDE project
//
-// Copyright (c) 2010-2011 Timothy Pearson <kb9vqf@pearsoncomputing.net>
+// Copyright (c) 2010 - 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
#include <config.h>
@@ -64,71 +64,75 @@ extern bool trinity_desktop_lock_use_sak;
// Simple dialog for displaying an unlock status or recurring error message
//
SAKDlg::SAKDlg(LockProcess *parent)
- : TQDialog(parent, "information dialog", true, (trinity_desktop_lock_use_system_modal_dialogs?((WFlags)WStyle_StaysOnTop):((WFlags)WX11BypassWM))),
- mUnlockingFailed(false)
+ : TQDialog(parent, "information dialog", true, (trinity_desktop_lock_use_system_modal_dialogs?((WFlags)WStyle_StaysOnTop):((WFlags)WX11BypassWM))),
+ mUnlockingFailed(false)
{
- if (trinity_desktop_lock_use_system_modal_dialogs) {
- // Signal that we do not want any window controls to be shown at all
- Atom kde_wm_system_modal_notification;
- kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False);
- XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
- }
- setCaption(i18n("Desktop Session Locked"));
+ if (trinity_desktop_lock_use_system_modal_dialogs) {
+ // Signal that we do not want any window controls to be shown at all
+ Atom kde_wm_system_modal_notification;
+ kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_TDE_WM_MODAL_SYS_NOTIFICATION", False);
+ XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
+ }
+ setCaption(i18n("Desktop Session Locked"));
- frame = new TQFrame( this );
- if (trinity_desktop_lock_use_system_modal_dialogs)
- frame->setFrameStyle( TQFrame::NoFrame );
- else
- frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
- frame->setLineWidth( 2 );
+ frame = new TQFrame( this );
+ if (trinity_desktop_lock_use_system_modal_dialogs) {
+ frame->setFrameStyle( TQFrame::NoFrame );
+ }
+ else {
+ frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
+ }
+ frame->setLineWidth( 2 );
- KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame );
+ KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame );
- KUser user;
+ KUser user;
- mStatusLabel = new TQLabel( "<b> </b>", frame );
- mStatusLabel->setAlignment( TQLabel::AlignVCenter );
+ mStatusLabel = new TQLabel( "<b> </b>", frame );
+ mStatusLabel->setAlignment( TQLabel::AlignVCenter );
- TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this );
- unlockDialogLayout->addWidget( frame );
+ TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this );
+ unlockDialogLayout->addWidget( frame );
- TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
- layStatus->addWidget( mStatusLabel );
+ TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint());
+ layStatus->addWidget( mStatusLabel );
- 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 = 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);
- mStatusLabel->setText("<b>" + i18n("Press Ctrl+Alt+Del to begin.") + "</b><p>" + i18n("This process helps keep your password secure.") + "<br>" + i18n("It prevents unauthorized users from emulating the login screen."));
+ mStatusLabel->setText("<b>" + i18n("Press Ctrl+Alt+Del to begin.") + "</b><p>" + i18n("This process helps keep your password secure.") + "<br>" + i18n("It prevents unauthorized users from emulating the login screen."));
- installEventFilter(this);
- setFixedSize( sizeHint() );
+ installEventFilter(this);
+ setFixedSize( sizeHint() );
- mSAKProcess = new TDEProcess;
- *mSAKProcess << "tdmtsak";
- connect(mSAKProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSAKProcessExited()));
- mSAKProcess->start();
+ mSAKProcess = new TDEProcess;
+ *mSAKProcess << "tdmtsak";
+ connect(mSAKProcess, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotSAKProcessExited()));
+ mSAKProcess->start();
}
void SAKDlg::slotSAKProcessExited()
{
- int retcode = mSAKProcess->exitStatus();
- if (retcode != 0) trinity_desktop_lock_use_sak = false;
- hide();
+ int retcode = mSAKProcess->exitStatus();
+ if (retcode != 0) {
+ trinity_desktop_lock_use_sak = false;
+ }
+ hide();
}
SAKDlg::~SAKDlg()
{
- if ((mSAKProcess) && (mSAKProcess->isRunning())) {
- mSAKProcess->kill(SIGTERM);
- delete mSAKProcess;
- }
- hide();
+ if ((mSAKProcess) && (mSAKProcess->isRunning())) {
+ mSAKProcess->kill(SIGTERM);
+ delete mSAKProcess;
+ }
+ hide();
}
void SAKDlg::closeDialogForced()
{
- TQDialog::reject();
+ TQDialog::reject();
}
void SAKDlg::reject()
@@ -138,14 +142,14 @@ void SAKDlg::reject()
void SAKDlg::updateLabel(TQString &txt)
{
- mStatusLabel->setPaletteForegroundColor(Qt::black);
- mStatusLabel->setText("<b>" + txt + "</b>");
+ mStatusLabel->setPaletteForegroundColor(Qt::black);
+ mStatusLabel->setText("<b>" + txt + "</b>");
}
void SAKDlg::show()
{
- TQDialog::show();
- TQApplication::flushX();
+ TQDialog::show();
+ TQApplication::flushX();
}
#include "sakdlg.moc"