Fix the most egregious style guide violations in the kdesktoplock plugin sources

No functional changes were made to the source
pull/2/head
Timothy Pearson 9 years ago
parent b45b9ed9b1
commit c54c4e7003

@ -1,8 +1,8 @@
//=========================================================================== //===========================================================================
// //
// This file is part of the KDE project // This file is part of the TDE project
// //
// Copyright (c) 2010 Timothy Pearson <kb9vqf@pearsoncomputing.net> // Copyright (c) 2010 - 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
#include <config.h> #include <config.h>
@ -74,10 +74,12 @@ InfoDlg::InfoDlg(LockProcess *parent)
setCaption(i18n("Information")); setCaption(i18n("Information"));
frame = new TQFrame( this ); frame = new TQFrame( this );
if (trinity_desktop_lock_use_system_modal_dialogs) if (trinity_desktop_lock_use_system_modal_dialogs) {
frame->setFrameStyle( TQFrame::NoFrame ); frame->setFrameStyle( TQFrame::NoFrame );
else }
else {
frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
}
frame->setLineWidth( 2 ); frame->setLineWidth( 2 );
mpixLabel = new TQLabel( frame, "pixlabel" ); mpixLabel = new TQLabel( frame, "pixlabel" );

@ -1,8 +1,8 @@
//=========================================================================== //===========================================================================
// //
// This file is part of the KDE project // This file is part of the TDE project
// //
// Copyright (c) 2010 Timothy Pearson <kb9vqf@pearsoncomputing.net> // Copyright (c) 2010 - 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
// //
#ifndef __INFODLG_H__ #ifndef __INFODLG_H__

@ -1,10 +1,11 @@
//=========================================================================== //===========================================================================
// //
// This file is part of the KDE project // This file is part of the TDE project
// //
// Copyright (c) 1999 Martin R. Jones <mjones@kde.org> // Copyright (c) 1999 Martin R. Jones <mjones@kde.org>
// Copyright (c) 2003 Chris Howells <howells@kde.org> // Copyright (c) 2003 Chris Howells <howells@kde.org>
// Copyright (c) 2003 Oswald Buddenhagen <ossi@kde.org> // Copyright (c) 2003 Oswald Buddenhagen <ossi@kde.org>
// Copyright (c) 2010 - 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
#include <config.h> #include <config.h>
@ -110,10 +111,12 @@ void PasswordDlg::init(GreeterPluginHandle *plugin)
setCaption(i18n("Desktop Session Locked")); setCaption(i18n("Desktop Session Locked"));
frame = new TQFrame( this ); frame = new TQFrame( this );
if (trinity_desktop_lock_use_system_modal_dialogs) if (trinity_desktop_lock_use_system_modal_dialogs) {
frame->setFrameStyle( TQFrame::NoFrame ); frame->setFrameStyle( TQFrame::NoFrame );
else }
else {
frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
}
frame->setLineWidth( 2 ); frame->setLineWidth( 2 );
TQLabel *pixLabel = NULL; TQLabel *pixLabel = NULL;
@ -152,13 +155,15 @@ void PasswordDlg::init(GreeterPluginHandle *plugin)
ok = new KPushButton( i18n("Unl&ock"), frame ); ok = new KPushButton( i18n("Unl&ock"), frame );
ok->setDefault(true); ok->setDefault(true);
bool show_cancel_button = !trinity_desktop_lock_hide_cancel_button || bool show_cancel_button = !trinity_desktop_lock_hide_cancel_button
trinity_desktop_lock_use_sak || || trinity_desktop_lock_use_sak
!trinity_desktop_lock_use_system_modal_dialogs; || !trinity_desktop_lock_use_system_modal_dialogs;
if (show_cancel_button) if (show_cancel_button) {
cancel = new KPushButton( KStdGuiItem::cancel(), frame ); cancel = new KPushButton( KStdGuiItem::cancel(), frame );
else }
else {
cancel = NULL; cancel = NULL;
}
greet = plugin->info->create( this, 0, this, mLayoutButton, TQString::null, greet = plugin->info->create( this, 0, this, mLayoutButton, TQString::null,
KGreeterPlugin::Authenticate, KGreeterPlugin::ExUnlock ); KGreeterPlugin::Authenticate, KGreeterPlugin::ExUnlock );
@ -174,8 +179,9 @@ void PasswordDlg::init(GreeterPluginHandle *plugin)
layButtons->addWidget( mNewSessButton ); layButtons->addWidget( mNewSessButton );
layButtons->addStretch(); layButtons->addStretch();
layButtons->addWidget(ok); layButtons->addWidget(ok);
if (show_cancel_button) if (show_cancel_button) {
layButtons->addWidget(cancel); layButtons->addWidget(cancel);
}
if (trinity_desktop_lock_use_system_modal_dialogs) { if (trinity_desktop_lock_use_system_modal_dialogs) {
KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame ); KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame );
@ -210,27 +216,25 @@ void PasswordDlg::init(GreeterPluginHandle *plugin)
frameLayout->addMultiCellLayout( layButtons, 4, 4, 0, 1 ); frameLayout->addMultiCellLayout( layButtons, 4, 4, 0, 1 );
} }
if (show_cancel_button) if (show_cancel_button) {
{
setTabOrder( ok, cancel ); setTabOrder( ok, cancel );
setTabOrder( cancel, mNewSessButton ); setTabOrder( cancel, mNewSessButton );
} }
else else {
{
setTabOrder( ok, mNewSessButton ); setTabOrder( ok, mNewSessButton );
} }
setTabOrder( mNewSessButton, mLayoutButton ); setTabOrder( mNewSessButton, mLayoutButton );
connect(mLayoutButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(layoutClicked())); connect(mLayoutButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(layoutClicked()));
if (show_cancel_button) if (show_cancel_button) {
{
connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
} }
connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(slotOK())); connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(slotOK()));
connect(mNewSessButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSwitchUser())); connect(mNewSessButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSwitchUser()));
if (!DM().isSwitchable() || !kapp->authorize("switch_user")) if (!DM().isSwitchable() || !kapp->authorize("switch_user")) {
mNewSessButton->hide(); mNewSessButton->hide();
}
installEventFilter(this); installEventFilter(this);
setFixedSize( sizeHint() ); setFixedSize( sizeHint() );
@ -258,9 +262,12 @@ void PasswordDlg::init(GreeterPluginHandle *plugin)
setLayoutText("err"); setLayoutText("err");
else else
setLayoutText(*currLayout); setLayoutText(*currLayout);
} else }
else {
mLayoutButton->hide(); mLayoutButton->hide();
} else { }
}
else {
mLayoutButton->hide(); // no kxkb running mLayoutButton->hide(); // no kxkb running
} }
capsLocked(); capsLocked();
@ -275,18 +282,19 @@ PasswordDlg::~PasswordDlg()
void PasswordDlg::reject() void PasswordDlg::reject()
{ {
if (!trinity_desktop_lock_hide_cancel_button || trinity_desktop_lock_use_sak || if (!trinity_desktop_lock_hide_cancel_button
!trinity_desktop_lock_use_system_modal_dialogs || trinity_desktop_lock_autohide_lockdlg) || trinity_desktop_lock_use_sak
{ || !trinity_desktop_lock_use_system_modal_dialogs
|| trinity_desktop_lock_autohide_lockdlg) {
TQDialog::reject(); TQDialog::reject();
} }
} }
void PasswordDlg::layoutClicked() void PasswordDlg::layoutClicked()
{ {
if( ++currLayout == layoutsList.end() ) {
if( ++currLayout == layoutsList.end() )
currLayout = layoutsList.begin(); currLayout = layoutsList.begin();
}
DCOPRef kxkb("kxkb", "kxkb"); DCOPRef kxkb("kxkb", "kxkb");
setLayoutText( kxkb.call("setLayout", *currLayout) ? *currLayout : "err" ); setLayoutText( kxkb.call("setLayout", *currLayout) ? *currLayout : "err" );
@ -303,21 +311,17 @@ void PasswordDlg::setLayoutText( const TQString &txt )
void PasswordDlg::updateLabel() void PasswordDlg::updateLabel()
{ {
if (mUnlockingFailed) if (mUnlockingFailed) {
{
mStatusLabel->setPaletteForegroundColor(Qt::black); mStatusLabel->setPaletteForegroundColor(Qt::black);
mStatusLabel->setText(i18n("<b>Unlocking failed</b>")); mStatusLabel->setText(i18n("<b>Unlocking failed</b>"));
// mStatusLabel->show(); // mStatusLabel->show();
} }
else else if (mCapsLocked) {
if (mCapsLocked)
{
mStatusLabel->setPaletteForegroundColor(Qt::red); mStatusLabel->setPaletteForegroundColor(Qt::red);
mStatusLabel->setText(i18n("<b>Warning: Caps Lock on</b>")); mStatusLabel->setText(i18n("<b>Warning: Caps Lock on</b>"));
// mStatusLabel->show(); // mStatusLabel->show();
} }
else else {
{
mStatusLabel->setText("<b> </b>"); mStatusLabel->setText("<b> </b>");
// mStatusLabel->hide(); // mStatusLabel->hide();
} }
@ -329,27 +333,25 @@ void PasswordDlg::updateLabel()
// //
void PasswordDlg::timerEvent(TQTimerEvent *ev) void PasswordDlg::timerEvent(TQTimerEvent *ev)
{ {
if (ev->timerId() == mTimeoutTimerId) if (ev->timerId() == mTimeoutTimerId) {
{ if (trinity_desktop_lock_autohide_lockdlg) {
if (trinity_desktop_lock_autohide_lockdlg)
{
// Force dialog rejection regardless of the value of trinity_desktop_lock_hide_cancel_button // Force dialog rejection regardless of the value of trinity_desktop_lock_hide_cancel_button
TQDialog::reject(); TQDialog::reject();
} }
else else {
{
slotActivity(); slotActivity();
} }
} }
else if (ev->timerId() == mFailedTimerId) else if (ev->timerId() == mFailedTimerId) {
{
killTimer(mFailedTimerId); killTimer(mFailedTimerId);
mFailedTimerId = 0; mFailedTimerId = 0;
// Show the normal password prompt. // Show the normal password prompt.
mUnlockingFailed = false; mUnlockingFailed = false;
updateLabel(); updateLabel();
ok->setEnabled(true); ok->setEnabled(true);
if (cancel) cancel->setEnabled(true); if (cancel) {
cancel->setEnabled(true);
}
mNewSessButton->setEnabled( true ); mNewSessButton->setEnabled( true );
greet->revive(); greet->revive();
greet->start(); greet->start();
@ -358,8 +360,9 @@ void PasswordDlg::timerEvent(TQTimerEvent *ev)
bool PasswordDlg::eventFilter(TQObject *, TQEvent *ev) bool PasswordDlg::eventFilter(TQObject *, TQEvent *ev)
{ {
if (ev->type() == TQEvent::KeyPress || ev->type() == TQEvent::KeyRelease) if (ev->type() == TQEvent::KeyPress || ev->type() == TQEvent::KeyRelease) {
capsLocked(); capsLocked();
}
return false; return false;
} }
@ -381,14 +384,17 @@ int PasswordDlg::Reader (void *buf, int count)
dord: dord:
ret = ::read (sFd, (void *)((char *)buf + rlen), count - rlen); ret = ::read (sFd, (void *)((char *)buf + rlen), count - rlen);
if (ret < 0) { if (ret < 0) {
if (errno == EINTR) if (errno == EINTR) {
goto dord; goto dord;
if (errno == EAGAIN) }
if (errno == EAGAIN) {
break; break;
}
return -1; return -1;
} }
if (!ret) if (!ret) {
break; break;
}
rlen += ret; rlen += ret;
} }
return rlen; return rlen;
@ -430,14 +436,16 @@ bool PasswordDlg::GRecvArr (char **ret)
int len; int len;
char *buf; char *buf;
if (!GRecvInt(&len)) if (!GRecvInt(&len)) {
return false; return false;
}
if (!len) { if (!len) {
*ret = 0; *ret = 0;
return true; return true;
} }
if (!(buf = (char *)::malloc (len))) if (!(buf = (char *)::malloc (len))) {
return false; return false;
}
*ret = buf; *ret = buf;
return GRead (buf, len); return GRead (buf, len);
} }
@ -464,7 +472,9 @@ void PasswordDlg::reapVerify()
updateLabel(); updateLabel();
mFailedTimerId = startTimer(1500); mFailedTimerId = startTimer(1500);
ok->setEnabled(false); ok->setEnabled(false);
if (cancel) cancel->setEnabled(false); if (cancel) {
cancel->setEnabled(false);
}
mNewSessButton->setEnabled( false ); mNewSessButton->setEnabled( false );
return; return;
case AuthAbort: case AuthAbort:
@ -532,8 +542,9 @@ void PasswordDlg::handleVerify()
void PasswordDlg::gplugReturnText( const char *text, int tag ) void PasswordDlg::gplugReturnText( const char *text, int tag )
{ {
GSendStr( text ); GSendStr( text );
if (text) if (text) {
GSendInt( tag ); GSendInt( tag );
}
handleVerify(); handleVerify();
} }
@ -542,12 +553,16 @@ void PasswordDlg::gplugReturnBinary( const char *data )
if (data) { if (data) {
unsigned const char *up = (unsigned const char *)data; unsigned const char *up = (unsigned const char *)data;
int len = up[3] | (up[2] << 8) | (up[1] << 16) | (up[0] << 24); int len = up[3] | (up[2] << 8) | (up[1] << 16) | (up[0] << 24);
if (!len) if (!len) {
GSendArr( 4, data ); GSendArr( 4, data );
else }
else {
GSendArr( len, data ); GSendArr( len, data );
} else }
}
else {
GSendArr( 0, 0 ); GSendArr( 0, 0 );
}
handleVerify(); handleVerify();
} }
@ -617,10 +632,12 @@ void PasswordDlg::gplugMsgBox( TQMessageBox::Icon type, const TQString &text )
} }
dialog.setCaption(i18n("Authentication Subsystem Notice")); dialog.setCaption(i18n("Authentication Subsystem Notice"));
TQFrame *winFrame = new TQFrame( &dialog ); TQFrame *winFrame = new TQFrame( &dialog );
if (trinity_desktop_lock_use_system_modal_dialogs) if (trinity_desktop_lock_use_system_modal_dialogs) {
winFrame->setFrameStyle( TQFrame::NoFrame ); winFrame->setFrameStyle( TQFrame::NoFrame );
else }
else {
winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
}
winFrame->setLineWidth( 2 ); winFrame->setLineWidth( 2 );
TQVBoxLayout *vbox = new TQVBoxLayout( &dialog ); TQVBoxLayout *vbox = new TQVBoxLayout( &dialog );
vbox->addWidget( winFrame ); vbox->addWidget( winFrame );
@ -675,18 +692,19 @@ void PasswordDlg::slotStartNewSession()
dialog->setCaption(i18n("New Session")); dialog->setCaption(i18n("New Session"));
TQFrame *winFrame = new TQFrame( dialog ); TQFrame *winFrame = new TQFrame( dialog );
if (trinity_desktop_lock_use_system_modal_dialogs) if (trinity_desktop_lock_use_system_modal_dialogs) {
winFrame->setFrameStyle( TQFrame::NoFrame ); winFrame->setFrameStyle( TQFrame::NoFrame );
else }
else {
winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
}
winFrame->setLineWidth( 2 ); winFrame->setLineWidth( 2 );
TQVBoxLayout *vbox = new TQVBoxLayout( dialog ); TQVBoxLayout *vbox = new TQVBoxLayout( dialog );
vbox->addWidget( winFrame ); vbox->addWidget( winFrame );
TQLabel *label1 = new TQLabel( winFrame ); TQLabel *label1 = new TQLabel( winFrame );
label1->setPixmap( TQMessageBox::standardIcon( TQMessageBox::Warning ) ); label1->setPixmap( TQMessageBox::standardIcon( TQMessageBox::Warning ) );
TQString qt_text = TQString qt_text = i18n("You have chosen to open another desktop session "
i18n("You have chosen to open another desktop session "
"instead of resuming the current one.<br>" "instead of resuming the current one.<br>"
"The current session will be hidden " "The current session will be hidden "
"and a new login screen will be displayed.<br>" "and a new login screen will be displayed.<br>"
@ -733,23 +751,22 @@ void PasswordDlg::slotStartNewSession()
rt.setWidth(pref_width); rt.setWidth(pref_width);
int used_width = rt.widthUsed(); int used_width = rt.widthUsed();
pref_height = rt.height(); pref_height = rt.height();
if (used_width <= pref_width) if (used_width <= pref_width) {
{ while(true) {
while(true)
{
int new_width = (used_width * 9) / 10; int new_width = (used_width * 9) / 10;
rt.setWidth(new_width); rt.setWidth(new_width);
int new_height = rt.height(); int new_height = rt.height();
if (new_height > pref_height) if (new_height > pref_height) {
break; break;
}
used_width = rt.widthUsed(); used_width = rt.widthUsed();
if (used_width > new_width) if (used_width > new_width) {
break; break;
} }
}
pref_width = used_width; pref_width = used_width;
} }
else else {
{
if (used_width > (pref_width *2)) if (used_width > (pref_width *2))
pref_width = pref_width *2; pref_width = pref_width *2;
else else
@ -763,8 +780,9 @@ void PasswordDlg::slotStartNewSession()
delete dialog; delete dialog;
if (ret == TQDialog::Accepted) { if (ret == TQDialog::Accepted) {
if (cb->isChecked()) if (cb->isChecked()) {
KMessageBox::saveDontShowAgainContinue( ":confirmNewSession" ); KMessageBox::saveDontShowAgainContinue( ":confirmNewSession" );
}
DM().startReserve(); DM().startReserve();
} }
@ -773,9 +791,7 @@ void PasswordDlg::slotStartNewSession()
class LockListViewItem : public TQListViewItem { class LockListViewItem : public TQListViewItem {
public: public:
LockListViewItem( TQListView *parent, LockListViewItem( TQListView *parent, const TQString &sess, const TQString &loc, int _vt ) : TQListViewItem( parent )
const TQString &sess, const TQString &loc, int _vt )
: TQListViewItem( parent )
, vt( _vt ) , vt( _vt )
{ {
setText( 0, sess ); setText( 0, sess );
@ -801,10 +817,12 @@ void PasswordDlg::slotSwitchUser()
dialog.setCaption(i18n("Switch User")); dialog.setCaption(i18n("Switch User"));
TQFrame *winFrame = new TQFrame( &dialog ); TQFrame *winFrame = new TQFrame( &dialog );
if (trinity_desktop_lock_use_system_modal_dialogs) if (trinity_desktop_lock_use_system_modal_dialogs) {
winFrame->setFrameStyle( TQFrame::NoFrame ); winFrame->setFrameStyle( TQFrame::NoFrame );
else }
else {
winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
}
winFrame->setLineWidth( 2 ); winFrame->setLineWidth( 2 );
TQBoxLayout *vbox = new TQVBoxLayout( &dialog ); TQBoxLayout *vbox = new TQVBoxLayout( &dialog );
vbox->addWidget( winFrame ); vbox->addWidget( winFrame );
@ -818,7 +836,6 @@ void PasswordDlg::slotSwitchUser()
SessList sess; SessList sess;
if (dm.localSessions( sess )) { if (dm.localSessions( sess )) {
lv = new TQListView( winFrame ); lv = new TQListView( winFrame );
connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), TQT_SLOT(slotSessionActivated()) ); connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), TQT_SLOT(slotSessionActivated()) );
connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), &dialog, TQT_SLOT(accept()) ); connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), &dialog, TQT_SLOT(accept()) );
@ -833,8 +850,9 @@ void PasswordDlg::slotSwitchUser()
for (SessList::ConstIterator it = sess.begin(); it != sess.end(); ++it) { for (SessList::ConstIterator it = sess.begin(); it != sess.end(); ++it) {
DM::sess2Str2( *it, user, loc ); DM::sess2Str2( *it, user, loc );
itm = new LockListViewItem( lv, user, loc, (*it).vt ); itm = new LockListViewItem( lv, user, loc, (*it).vt );
if (!(*it).vt) if (!(*it).vt) {
itm->setEnabled( false ); itm->setEnabled( false );
}
if ((*it).self) { if ((*it).self) {
lv->setCurrentItem( itm ); lv->setCurrentItem( itm );
itm->setSelected( true ); itm->setSelected( true );
@ -857,8 +875,7 @@ void PasswordDlg::slotSwitchUser()
vbox2->addStretch( 2 ); vbox2->addStretch( 2 );
} }
if (kapp->authorize("start_new_session") && (p = dm.numReserve()) >= 0) if (kapp->authorize("start_new_session") && (p = dm.numReserve()) >= 0) {
{
btn = new KPushButton( KGuiItem(i18n("Start &New Session"), "fork"), winFrame ); btn = new KPushButton( KGuiItem(i18n("Start &New Session"), "fork"), winFrame );
connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotStartNewSession()) ); connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotStartNewSession()) );
connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(accept()) ); connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(accept()) );
@ -883,9 +900,10 @@ void PasswordDlg::slotSwitchUser()
void PasswordDlg::slotSessionActivated() void PasswordDlg::slotSessionActivated()
{ {
LockListViewItem *itm = (LockListViewItem *)lv->currentItem(); LockListViewItem *itm = (LockListViewItem *)lv->currentItem();
if (itm && itm->vt > 0) if (itm && itm->vt > 0) {
DM().switchVT( itm->vt ); DM().switchVT( itm->vt );
} }
}
void PasswordDlg::capsLocked() void PasswordDlg::capsLocked()
{ {

@ -1,9 +1,10 @@
//=========================================================================== //===========================================================================
// //
// This file is part of the KDE project // This file is part of the TDE project
// //
// Copyright (c) 1999 Martin R. Jones <mjones@kde.org> // Copyright (c) 1999 Martin R. Jones <mjones@kde.org>
// Copyright (c) 2003 Oswald Buddenhagen <ossi@kde.org> // Copyright (c) 2003 Oswald Buddenhagen <ossi@kde.org>
// Copyright (c) 2010 - 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
// //
#ifndef __LOCKDLG_H__ #ifndef __LOCKDLG_H__

@ -1,8 +1,8 @@
//=========================================================================== //===========================================================================
// //
// This file is part of the KDE project // This file is part of the TDE project
// //
// Copyright (c) 2010 Timothy Pearson <kb9vqf@pearsoncomputing.net> // Copyright (c) 2010 - 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
#include <config.h> #include <config.h>
@ -74,10 +74,12 @@ QueryDlg::QueryDlg(LockProcess *parent)
setCaption(i18n("Information Needed")); setCaption(i18n("Information Needed"));
frame = new TQFrame( this ); frame = new TQFrame( this );
if (trinity_desktop_lock_use_system_modal_dialogs) if (trinity_desktop_lock_use_system_modal_dialogs) {
frame->setFrameStyle( TQFrame::NoFrame ); frame->setFrameStyle( TQFrame::NoFrame );
else }
else {
frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
}
frame->setLineWidth( 2 ); frame->setLineWidth( 2 );
mpixLabel = new TQLabel( frame, "pixlabel" ); mpixLabel = new TQLabel( frame, "pixlabel" );

@ -1,8 +1,8 @@
//=========================================================================== //===========================================================================
// //
// This file is part of the KDE project // This file is part of the TDE project
// //
// Copyright (c) 2010 Timothy Pearson <kb9vqf@pearsoncomputing.net> // Copyright (c) 2010 - 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
// //
#ifndef __QUERYDLG_H__ #ifndef __QUERYDLG_H__

@ -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> #include <config.h>
@ -76,10 +76,12 @@ SAKDlg::SAKDlg(LockProcess *parent)
setCaption(i18n("Desktop Session Locked")); setCaption(i18n("Desktop Session Locked"));
frame = new TQFrame( this ); frame = new TQFrame( this );
if (trinity_desktop_lock_use_system_modal_dialogs) if (trinity_desktop_lock_use_system_modal_dialogs) {
frame->setFrameStyle( TQFrame::NoFrame ); frame->setFrameStyle( TQFrame::NoFrame );
else }
else {
frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
}
frame->setLineWidth( 2 ); frame->setLineWidth( 2 );
KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame ); KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame );
@ -113,7 +115,9 @@ SAKDlg::SAKDlg(LockProcess *parent)
void SAKDlg::slotSAKProcessExited() void SAKDlg::slotSAKProcessExited()
{ {
int retcode = mSAKProcess->exitStatus(); int retcode = mSAKProcess->exitStatus();
if (retcode != 0) trinity_desktop_lock_use_sak = false; if (retcode != 0) {
trinity_desktop_lock_use_sak = false;
}
hide(); hide();
} }

@ -1,8 +1,8 @@
//=========================================================================== //===========================================================================
// //
// This file is part of the KDE project // This file is part of the TDE project
// //
// Copyright (c) 2010 Timothy Pearson <kb9vqf@pearsoncomputing.net> // Copyright (c) 2010 - 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
// //
#ifndef __SAKDLG_H__ #ifndef __SAKDLG_H__

@ -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> #include <config.h>
@ -76,10 +76,12 @@ SecureDlg::SecureDlg(LockProcess *parent)
setCaption(i18n("Secure Desktop Area")); setCaption(i18n("Secure Desktop Area"));
frame = new TQFrame( this ); frame = new TQFrame( this );
if (trinity_desktop_lock_use_system_modal_dialogs) if (trinity_desktop_lock_use_system_modal_dialogs) {
frame->setFrameStyle( TQFrame::NoFrame ); frame->setFrameStyle( TQFrame::NoFrame );
else }
else {
frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
}
frame->setLineWidth( 2 ); frame->setLineWidth( 2 );
KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame ); KSMModalDialogHeader* theader = new KSMModalDialogHeader( frame );

@ -1,8 +1,8 @@
//=========================================================================== //===========================================================================
// //
// This file is part of the KDE project // This file is part of the TDE project
// //
// Copyright (c) 2010 Timothy Pearson <kb9vqf@pearsoncomputing.net> // Copyright (c) 2010 - 2015 Timothy Pearson <kb9vqf@pearsoncomputing.net>
// //
#ifndef __SECUREDLG_H__ #ifndef __SECUREDLG_H__

Loading…
Cancel
Save