summaryrefslogtreecommitdiff
path: root/core/opie-login/loginwindowimpl.cpp
authorzecke <zecke>2004-07-09 21:36:37 (UTC)
committer zecke <zecke>2004-07-09 21:36:37 (UTC)
commit944adb8bf2741a16cf627d19e08f51c08920ad89 (patch) (side-by-side diff)
tree5f9edc9784e0268a00fe68ec74d7151900c5183a /core/opie-login/loginwindowimpl.cpp
parentc5d3262afd775bce81b99c5dc06e74c4686cee2a (diff)
downloadopie-944adb8bf2741a16cf627d19e08f51c08920ad89.zip
opie-944adb8bf2741a16cf627d19e08f51c08920ad89.tar.gz
opie-944adb8bf2741a16cf627d19e08f51c08920ad89.tar.bz2
Add setting a root password if none is set to opie-login
If you directly start Opie-Taskbar or use AutoLogin you will not be presented by a set root password gui
Diffstat (limited to 'core/opie-login/loginwindowimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/opie-login/loginwindowimpl.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/opie-login/loginwindowimpl.cpp b/core/opie-login/loginwindowimpl.cpp
index 32f98f3..73c2cbe 100644
--- a/core/opie-login/loginwindowimpl.cpp
+++ b/core/opie-login/loginwindowimpl.cpp
@@ -44,12 +44,13 @@
#include <opie2/odevice.h>
#include <stdio.h>
#include <stdlib.h>
+#include "passworddialogimpl.h"
#include "loginwindowimpl.h"
#include "loginapplication.h"
#include "inputmethods.h"
using namespace Opie::Core;
@@ -87,22 +88,27 @@ LoginWindowImpl::LoginWindowImpl ( ) : LoginWindow ( 0, "LOGIN-WINDOW", WStyle_C
setBackgroundPixmap ( bgpix );
m_caption-> setBackgroundPixmap ( bgpix);
TextLabel1-> setBackgroundPixmap ( bgpix);
TextLabel2-> setBackgroundPixmap ( bgpix);
}
- m_caption-> setText ( tr("<center>Welcome to OPIE %1</center><center>& %2 %3</center>"). arg(QPE_VERSION). arg ( ODevice::inst ( )-> systemString ( )). arg ( ODevice::inst ( )-> systemVersionString ( )));
+// m_caption-> setText ( tr("<center>Welcome to OPIE %1</center><center>& %2 %3</center>"). arg(QPE_VERSION). arg ( ODevice::inst ( )-> systemString ( )). arg ( ODevice::inst ( )-> systemVersionString ( )));
Config cfg ( "opie-login" );
cfg. setGroup ( "General" );
QString last = cfg. readEntry ( "LastLogin" );
if ( !last. isEmpty ( ))
m_user-> setEditText ( last );
calcMaxWindowRect ( );
+
+ if ( PasswordDialogImpl::needDialog() )
+ QTimer::singleShot(10, this, SLOT(showPasswordDialog()) );
+
+
}
LoginWindowImpl::~LoginWindowImpl ( )
{
}
@@ -245,6 +251,12 @@ void LoginWindowImpl::login ( )
}
else {
QMessageBox::warning ( this, tr( "Wrong password" ), tr( "The given password is incorrect." ));
m_password-> clear ( );
}
}
+
+void LoginWindowImpl::showPasswordDialog() {
+ PasswordDialogImpl dia( this );
+ dia.showMaximized();
+ dia.exec();
+}