summaryrefslogtreecommitdiff
path: root/uui/source/logindlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'uui/source/logindlg.cxx')
-rwxr-xr-x[-rw-r--r--]uui/source/logindlg.cxx164
1 files changed, 70 insertions, 94 deletions
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index 53ea243c9577..d7ded58b5dde 100644..100755
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -47,12 +47,20 @@
//............................................................................
//............................................................................
+static void lcl_Move( Window &rWin, long nOffset )
+{
+ Point aTmp( rWin.GetPosPixel() );
+ aTmp.Y() -= nOffset;
+ rWin.SetPosPixel( aTmp );
+}
+
+
void LoginDialog::HideControls_Impl( USHORT nFlags )
{
- FASTBOOL bPathHide = FALSE;
- FASTBOOL bErrorHide = FALSE;
- FASTBOOL bAccountHide = FALSE;
- FASTBOOL bUseSysCredsHide = FALSE;
+ bool bPathHide = FALSE;
+ bool bErrorHide = FALSE;
+ bool bAccountHide = FALSE;
+ bool bUseSysCredsHide = FALSE;
if ( ( nFlags & LF_NO_PATH ) == LF_NO_PATH )
{
@@ -63,9 +71,8 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
}
else if ( ( nFlags & LF_PATH_READONLY ) == LF_PATH_READONLY )
{
- aPathED.Hide();
- aPathInfo.Show();
- aPathBtn.Hide();
+ aPathED.Enable( FALSE );
+ aPathBtn.Enable( FALSE );
}
if ( ( nFlags & LF_NO_USERNAME ) == LF_NO_USERNAME )
@@ -75,8 +82,7 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
}
else if ( ( nFlags & LF_USERNAME_READONLY ) == LF_USERNAME_READONLY )
{
- aNameED.Hide();
- aNameInfo.Show();
+ aNameED.Enable( FALSE );
}
if ( ( nFlags & LF_NO_PASSWORD ) == LF_NO_PASSWORD )
@@ -91,7 +97,8 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
if ( ( nFlags & LF_NO_ERRORTEXT ) == LF_NO_ERRORTEXT )
{
aErrorInfo.Hide();
- aErrorGB.Hide();
+ aErrorFT.Hide();
+ aLogin1FL.Hide();
bErrorHide = TRUE;
}
@@ -110,53 +117,26 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
if ( bErrorHide )
{
- long nOffset = aLoginGB.GetPosPixel().Y() -
- aErrorGB.GetPosPixel().Y();
- Point aNewPnt = aRequestInfo.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aRequestInfo.SetPosPixel( aNewPnt );
- aNewPnt = aPathFT.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aPathFT.SetPosPixel( aNewPnt );
- aNewPnt = aPathED.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aPathED.SetPosPixel( aNewPnt );
- aNewPnt = aPathInfo.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aPathInfo.SetPosPixel( aNewPnt );
- aNewPnt = aPathBtn.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aPathBtn.SetPosPixel( aNewPnt );
- aNewPnt = aNameFT.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aNameFT.SetPosPixel( aNewPnt );
- aNewPnt = aNameED.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aNameED.SetPosPixel( aNewPnt );
- aNewPnt = aNameInfo.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aNameInfo.SetPosPixel( aNewPnt );
- aNewPnt = aPasswordFT.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aPasswordFT.SetPosPixel( aNewPnt );
- aNewPnt = aPasswordED.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aPasswordED.SetPosPixel( aNewPnt );
- aNewPnt = aAccountFT.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aAccountFT.SetPosPixel( aNewPnt );
- aNewPnt = aAccountED.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aAccountED.SetPosPixel( aNewPnt );
- aNewPnt = aSavePasswdBtn.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aSavePasswdBtn.SetPosPixel( aNewPnt );
- aNewPnt = aUseSysCredsCB.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aUseSysCredsCB.SetPosPixel( aNewPnt );
- aNewPnt = aLoginGB.GetPosPixel();
- aNewPnt.Y() -= nOffset;
- aLoginGB.SetPosPixel( aNewPnt );
+ long nOffset = aRequestInfo.GetPosPixel().Y() -
+ aErrorFT.GetPosPixel().Y();
+ lcl_Move( aRequestInfo, nOffset );
+ lcl_Move( aLogin2FL, nOffset );
+ lcl_Move( aPathFT, nOffset );
+ lcl_Move( aPathED, nOffset );
+ lcl_Move( aPathBtn, nOffset );
+ lcl_Move( aNameFT, nOffset );
+ lcl_Move( aNameED, nOffset );
+ lcl_Move( aPasswordFT, nOffset );
+ lcl_Move( aPasswordED, nOffset );
+ lcl_Move( aAccountFT, nOffset );
+ lcl_Move( aAccountED, nOffset );
+ lcl_Move( aSavePasswdBtn, nOffset );
+ lcl_Move( aUseSysCredsCB, nOffset );
+ lcl_Move( aButtonsFL, nOffset );
+ lcl_Move( aOKBtn, nOffset );
+ lcl_Move( aCancelBtn, nOffset );
+ lcl_Move( aHelpBtn, nOffset );
+
Size aNewSiz = GetSizePixel();
aNewSiz.Height() -= nOffset;
SetSizePixel( aNewSiz );
@@ -166,24 +146,19 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
{
long nOffset = aNameED.GetPosPixel().Y() -
aPathED.GetPosPixel().Y();
+ lcl_Move( aNameFT, nOffset );
+ lcl_Move( aNameED, nOffset );
+ lcl_Move( aPasswordFT, nOffset );
+ lcl_Move( aPasswordED, nOffset );
+ lcl_Move( aAccountFT, nOffset );
+ lcl_Move( aAccountED, nOffset );
+ lcl_Move( aSavePasswdBtn, nOffset );
+ lcl_Move( aUseSysCredsCB, nOffset );
+ lcl_Move( aButtonsFL, nOffset );
+ lcl_Move( aOKBtn, nOffset );
+ lcl_Move( aCancelBtn, nOffset );
+ lcl_Move( aHelpBtn, nOffset );
- Point aTmpPnt1 = aNameFT.GetPosPixel();
- Point aTmpPnt2 = aPasswordFT.GetPosPixel();
- aNameFT.SetPosPixel( aPathFT.GetPosPixel() );
- aPasswordFT.SetPosPixel( aTmpPnt1 );
- aAccountFT.SetPosPixel( aTmpPnt2 );
- aTmpPnt1 = aNameED.GetPosPixel();
- aTmpPnt2 = aPasswordED.GetPosPixel();
- aNameED.SetPosPixel( aPathED.GetPosPixel() );
- aPasswordED.SetPosPixel( aTmpPnt1 );
- aAccountED.SetPosPixel( aTmpPnt2 );
- aNameInfo.SetPosPixel( aPathInfo.GetPosPixel() );
- aTmpPnt1 = aSavePasswdBtn.GetPosPixel();
- aTmpPnt1.Y() -= nOffset;
- aSavePasswdBtn.SetPosPixel( aTmpPnt1 );
- aTmpPnt1 = aUseSysCredsCB.GetPosPixel();
- aTmpPnt1.Y() -= nOffset;
- aUseSysCredsCB.SetPosPixel( aTmpPnt1 );
Size aNewSz = GetSizePixel();
aNewSz.Height() -= nOffset;
SetSizePixel( aNewSz );
@@ -191,14 +166,15 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
if ( bAccountHide )
{
- long nOffset = aAccountED.GetPosPixel().Y() - aPasswordED.GetPosPixel().Y();
-
- Point aTmpPnt = aSavePasswdBtn.GetPosPixel();
- aTmpPnt.Y() -= nOffset;
- aSavePasswdBtn.SetPosPixel( aTmpPnt );
- aTmpPnt = aUseSysCredsCB.GetPosPixel();
- aTmpPnt.Y() -= nOffset;
- aUseSysCredsCB.SetPosPixel( aTmpPnt );
+ long nOffset = aAccountED.GetPosPixel().Y() -
+ aPasswordED.GetPosPixel().Y();
+ lcl_Move( aSavePasswdBtn, nOffset );
+ lcl_Move( aUseSysCredsCB, nOffset );
+ lcl_Move( aButtonsFL, nOffset );
+ lcl_Move( aOKBtn, nOffset );
+ lcl_Move( aCancelBtn, nOffset );
+ lcl_Move( aHelpBtn, nOffset );
+
Size aNewSz = GetSizePixel();
aNewSz.Height() -= nOffset;
SetSizePixel( aNewSz );
@@ -208,6 +184,10 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
{
long nOffset = aUseSysCredsCB.GetPosPixel().Y() -
aSavePasswdBtn.GetPosPixel().Y();
+ lcl_Move( aButtonsFL, nOffset );
+ lcl_Move( aOKBtn, nOffset );
+ lcl_Move( aCancelBtn, nOffset );
+ lcl_Move( aHelpBtn, nOffset );
Size aNewSz = GetSizePixel();
aNewSz.Height() -= nOffset;
@@ -219,15 +199,13 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
void LoginDialog::EnableUseSysCredsControls_Impl( BOOL bUseSysCredsEnabled )
{
aErrorInfo.Enable( !bUseSysCredsEnabled );
- aErrorGB.Enable( !bUseSysCredsEnabled );
+ aErrorFT.Enable( !bUseSysCredsEnabled );
aRequestInfo.Enable( !bUseSysCredsEnabled );
aPathFT.Enable( !bUseSysCredsEnabled );
aPathED.Enable( !bUseSysCredsEnabled );
- aPathInfo.Enable( !bUseSysCredsEnabled );
aPathBtn.Enable( !bUseSysCredsEnabled );
aNameFT.Enable( !bUseSysCredsEnabled );
aNameED.Enable( !bUseSysCredsEnabled );
- aNameInfo.Enable( !bUseSysCredsEnabled );
aPasswordFT.Enable( !bUseSysCredsEnabled );
aPasswordED.Enable( !bUseSysCredsEnabled );
aAccountFT.Enable( !bUseSysCredsEnabled );
@@ -282,23 +260,23 @@ LoginDialog::LoginDialog
ModalDialog( pParent, ResId( DLG_UUI_LOGIN, *pResMgr ) ),
- aErrorInfo ( this, ResId( INFO_LOGIN_ERROR, *pResMgr ) ),
- aErrorGB ( this, ResId( GB_LOGIN_ERROR, *pResMgr ) ),
- aRequestInfo ( this, ResId( INFO_LOGIN_REQUEST, *pResMgr ) ),
+ aErrorFT ( this, ResId( FT_LOGIN_ERROR, *pResMgr ) ),
+ aErrorInfo ( this, ResId( FT_INFO_LOGIN_ERROR, *pResMgr ) ),
+ aLogin1FL ( this, ResId( FL_LOGIN_1, *pResMgr ) ),
+ aRequestInfo ( this, ResId( FT_INFO_LOGIN_REQUEST, *pResMgr ) ),
+ aLogin2FL ( this, ResId( FL_LOGIN_2, *pResMgr ) ),
aPathFT ( this, ResId( FT_LOGIN_PATH, *pResMgr ) ),
aPathED ( this, ResId( ED_LOGIN_PATH, *pResMgr ) ),
- aPathInfo ( this, ResId( INFO_LOGIN_PATH, *pResMgr ) ),
aPathBtn ( this, ResId( BTN_LOGIN_PATH, *pResMgr ) ),
aNameFT ( this, ResId( FT_LOGIN_USERNAME, *pResMgr ) ),
aNameED ( this, ResId( ED_LOGIN_USERNAME, *pResMgr ) ),
- aNameInfo ( this, ResId( INFO_LOGIN_USERNAME, *pResMgr ) ),
aPasswordFT ( this, ResId( FT_LOGIN_PASSWORD, *pResMgr ) ),
aPasswordED ( this, ResId( ED_LOGIN_PASSWORD, *pResMgr ) ),
aAccountFT ( this, ResId( FT_LOGIN_ACCOUNT, *pResMgr ) ),
aAccountED ( this, ResId( ED_LOGIN_ACCOUNT, *pResMgr ) ),
aSavePasswdBtn ( this, ResId( CB_LOGIN_SAVEPASSWORD, *pResMgr ) ),
aUseSysCredsCB ( this, ResId( CB_LOGIN_USESYSCREDS, *pResMgr ) ),
- aLoginGB ( this, ResId( GB_LOGIN_LOGIN, *pResMgr ) ),
+ aButtonsFL ( this, ResId( FL_BUTTONS, *pResMgr ) ),
aOKBtn ( this, ResId( BTN_LOGIN_OK, *pResMgr ) ),
aCancelBtn ( this, ResId( BTN_LOGIN_CANCEL, *pResMgr ) ),
aHelpBtn ( this, ResId( BTN_LOGIN_HELP, *pResMgr ) )
@@ -333,10 +311,8 @@ LoginDialog::LoginDialog
// -----------------------------------------------------------------------
-void LoginDialog::SetName( const String& rNewName )
+LoginDialog::~LoginDialog()
{
- aNameED.SetText( rNewName );
- aNameInfo.SetText( rNewName );
}
// -----------------------------------------------------------------------