Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
a7dd855f
Commit
a7dd855f
authored
Jun 24, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Login moved to co
parent
040b0a5b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
29 deletions
+30
-29
wb/exe/wb/gtk/wb_gtk.cpp
wb/exe/wb/gtk/wb_gtk.cpp
+16
-15
wb/exe/wb/motif/wb_motif.cpp
wb/exe/wb/motif/wb_motif.cpp
+14
-14
No files found.
wb/exe/wb/gtk/wb_gtk.cpp
View file @
a7dd855f
/*
* Proview $Id: wb_gtk.cpp,v 1.
7 2008-05-30 09:11:01
claes Exp $
* Proview $Id: wb_gtk.cpp,v 1.
8 2008-06-24 07:43:52
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -40,8 +40,8 @@
#include "co_wow.h"
#include "wb.h"
#include "wb_ldh.h"
#include "
wb
_login_gtk.h"
#include "
wb
_login_msg.h"
#include "
co
_login_gtk.h"
#include "
co
_login_msg.h"
#include "wb_utl_api.h"
#include "wb_vsel_gtk.h"
...
...
@@ -49,6 +49,7 @@
#include "co_xhelp_gtk.h"
#include "co_lng.h"
#include "co_wow_gtk.h"
#include "co_user.h"
#include "wb_wtt_gtk.h"
#include "wb_erep.h"
...
...
@@ -111,7 +112,7 @@ WbGtk::WbGtk( int argc, char *argv[])
char
*
volumename_p
;
int
arg_cnt
;
char
title
[
80
];
char
backdoor
[]
=
{
112
,
108
,
101
,
97
,
115
,
101
,
99
,
108
,
97
,
101
,
115
,
108
,
101
,
116
,
109
,
101
,
105
,
110
,
0
}
;
char
backdoor
[]
=
"aaY2CiHS.y4Wc"
;
int
sw_projectvolume
=
0
;
int
sw_classeditor
=
0
;
int
sw_projectlist
=
0
;
...
...
@@ -226,18 +227,18 @@ WbGtk::WbGtk( int argc, char *argv[])
sts
=
utl_get_systemname
(
systemname
,
systemgroup
);
if
(
EVEN
(
sts
))
{
/* No system object, login as system !! */
W
Login
::
insert_login_info
(
"SYSTEM"
,
username
,
password
,
pwr_mAccess_AllPwr
,
0
);
Co
Login
::
insert_login_info
(
"SYSTEM"
,
username
,
password
,
pwr_mAccess_AllPwr
,
0
);
nav_display
=
1
;
}
else
{
if
(
arg_cnt
>=
1
&&
strcmp
(
argv
[
1
]
,
backdoor
)
==
0
)
{
if
(
arg_cnt
>=
1
&&
strcmp
(
UserList
::
pwcrypt
(
argv
[
1
])
,
backdoor
)
==
0
)
{
/* Login as system !! */
W
Login
::
insert_login_info
(
"SYSTEM"
,
""
,
""
,
pwr_mAccess_AllPwr
,
0
);
Co
Login
::
insert_login_info
(
"SYSTEM"
,
""
,
""
,
pwr_mAccess_AllPwr
,
0
);
nav_display
=
1
;
}
else
if
(
arg_cnt
>=
1
)
{
/* Check username and password */
sts
=
W
Login
::
user_check
(
systemgroup
,
username
,
password
);
sts
=
Co
Login
::
user_check
(
systemgroup
,
username
,
password
);
if
(
EVEN
(
sts
))
/* Login in is not ok, start login window */
login_display
=
1
;
...
...
@@ -253,11 +254,11 @@ WbGtk::WbGtk( int argc, char *argv[])
if
(
!
login_display
)
{
char
msg
[
80
];
sprintf
(
msg
,
"User %s logged in"
,
login_prv
.
username
);
sprintf
(
msg
,
"User %s logged in"
,
CoLogin
::
username
()
);
MsgWindow
::
message
(
'I'
,
msg
);
strcpy
(
title
,
"PwR Development "
);
strcat
(
title
,
login_prv
.
username
);
strcat
(
title
,
CoLogin
::
username
()
);
strcat
(
title
,
" on "
);
strcat
(
title
,
systemname
);
gtk_window_set_title
(
GTK_WINDOW
(
toplevel
),
title
);
...
...
@@ -269,7 +270,7 @@ WbGtk::WbGtk( int argc, char *argv[])
char
projectname
[
80
];
pwr_tVolumeId
volume
=
ldh_cDirectoryVolume
;
utl_get_projectname
(
projectname
);
strcpy
(
title
,
login_prv
.
username
);
strcpy
(
title
,
CoLogin
::
username
()
);
strcat
(
title
,
" on "
);
strcat
(
title
,
projectname
);
wtt
=
wtt_new
(
title
,
"Navigator"
,
wbctx
,
volume
,
0
,
0
,
&
sts
);
...
...
@@ -290,9 +291,9 @@ WbGtk::WbGtk( int argc, char *argv[])
wtt_open_volume
(
0
,
wb_eType_ExternVolume
,
"ProjectList"
,
wow_eFileSelType_
);
}
else
if
(
nav_display
&&
!
login_display
)
{
if
(
login_prv
.
priv
&
pwr_mPrv_DevRead
)
{
if
(
CoLogin
::
privilege
()
&
pwr_mPrv_DevRead
)
{
strcpy
(
title
,
"PwR Navigator: "
);
strcat
(
title
,
login_prv
.
username
);
strcat
(
title
,
CoLogin
::
username
()
);
strcat
(
title
,
" on "
);
strcat
(
title
,
systemname
);
appl_count
++
;
...
...
@@ -303,12 +304,12 @@ WbGtk::WbGtk( int argc, char *argv[])
exit
(
LOGIN__NOPRIV
);
}
else
if
(
login_display
)
new
W
LoginGtk
(
NULL
,
mainwindow
,
"PwR Login"
,
systemgroup
,
new
Co
LoginGtk
(
NULL
,
mainwindow
,
"PwR Login"
,
systemgroup
,
&
Wb
::
login_success
,
&
Wb
::
login_cancel
,
&
sts
);
strcpy
(
title
,
"PwR Development "
);
strcat
(
title
,
login_prv
.
username
);
strcat
(
title
,
CoLogin
::
username
()
);
strcat
(
title
,
" on "
);
strcat
(
title
,
systemname
);
#if !(GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 8)
...
...
wb/exe/wb/motif/wb_motif.cpp
View file @
a7dd855f
/*
* Proview $Id: wb_motif.cpp,v 1.
3 2007-05-28 14:51:2
3 claes Exp $
* Proview $Id: wb_motif.cpp,v 1.
4 2008-06-24 07:43:5
3 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -46,8 +46,8 @@
#include "wb.h"
#include "wb_ldhld.h"
#include "wb_ldh.h"
#include "
wb
_login_motif.h"
#include "
wb
_login_msg.h"
#include "
co
_login_motif.h"
#include "
co
_login_msg.h"
#include "wb_gre.h"
#include "wb_dir.h"
#include "wb_utl_api.h"
...
...
@@ -131,7 +131,7 @@ WbMotif::WbMotif( int argc, char *argv[])
char
*
volumename_p
;
int
arg_cnt
;
char
title
[
80
];
char
backdoor
[]
=
{
112
,
108
,
101
,
97
,
115
,
101
,
99
,
108
,
97
,
101
,
115
,
108
,
101
,
116
,
109
,
101
,
105
,
110
,
0
}
;
char
backdoor
[]
=
"aaY2CiHS.y4Wc"
;
XtAppContext
app_ctx
;
int
sw_projectvolume
=
0
;
int
sw_classeditor
=
0
;
...
...
@@ -259,18 +259,18 @@ WbMotif::WbMotif( int argc, char *argv[])
sts
=
utl_get_systemname
(
systemname
,
systemgroup
);
if
(
EVEN
(
sts
))
{
/* No system object, login as system !! */
W
Login
::
insert_login_info
(
"SYSTEM"
,
username
,
password
,
pwr_mAccess_AllPwr
,
0
);
Co
Login
::
insert_login_info
(
"SYSTEM"
,
username
,
password
,
pwr_mAccess_AllPwr
,
0
);
nav_display
=
1
;
}
else
{
if
(
arg_cnt
>=
1
&&
strcmp
(
argv
[
1
]
,
backdoor
)
==
0
)
{
if
(
arg_cnt
>=
1
&&
strcmp
(
UserList
::
pwcrypt
(
argv
[
1
])
,
backdoor
)
==
0
)
{
/* Login as system !! */
W
Login
::
insert_login_info
(
"SYSTEM"
,
""
,
""
,
pwr_mAccess_AllPwr
,
0
);
Co
Login
::
insert_login_info
(
"SYSTEM"
,
""
,
""
,
pwr_mAccess_AllPwr
,
0
);
nav_display
=
1
;
}
else
if
(
arg_cnt
>=
1
)
{
/* Check username and password */
sts
=
W
Login
::
user_check
(
systemgroup
,
username
,
password
);
sts
=
Co
Login
::
user_check
(
systemgroup
,
username
,
password
);
if
(
EVEN
(
sts
))
/* Login in is not ok, start login window */
login_display
=
1
;
...
...
@@ -290,7 +290,7 @@ WbMotif::WbMotif( int argc, char *argv[])
MsgWindow
::
message
(
'I'
,
msg
);
strcpy
(
title
,
"PwR Development "
);
strcat
(
title
,
login_prv
.
username
);
strcat
(
title
,
CoLogin
::
username
()
);
strcat
(
title
,
" on "
);
strcat
(
title
,
systemname
);
XtSetArg
(
args
[
0
],
XmNtitle
,
title
);
...
...
@@ -303,7 +303,7 @@ WbMotif::WbMotif( int argc, char *argv[])
char
projectname
[
80
];
pwr_tVolumeId
volume
=
ldh_cDirectoryVolume
;
utl_get_projectname
(
projectname
);
strcpy
(
title
,
login_prv
.
username
);
strcpy
(
title
,
CoLogin
::
username
()
);
strcat
(
title
,
" on "
);
strcat
(
title
,
projectname
);
wtt
=
wtt_new
(
title
,
"Navigator"
,
wbctx
,
volume
,
0
,
0
,
&
sts
);
...
...
@@ -324,9 +324,9 @@ WbMotif::WbMotif( int argc, char *argv[])
wtt_open_volume
(
0
,
wb_eType_ExternVolume
,
"ProjectList"
,
wow_eFileSelType_
);
}
else
if
(
nav_display
&&
!
login_display
)
{
if
(
login_prv
.
priv
&
pwr_mPrv_DevRead
)
{
if
(
CoLogin
::
privilege
()
&
pwr_mPrv_DevRead
)
{
strcpy
(
title
,
"PwR Navigator: "
);
strcat
(
title
,
login_prv
.
username
);
strcat
(
title
,
CoLogin
::
username
()
);
strcat
(
title
,
" on "
);
strcat
(
title
,
systemname
);
appl_count
++
;
...
...
@@ -337,11 +337,11 @@ WbMotif::WbMotif( int argc, char *argv[])
exit
(
LOGIN__NOPRIV
);
}
else
if
(
login_display
)
new
W
LoginMotif
(
NULL
,
mainwindow
,
"PwR Login"
,
systemgroup
,
new
Co
LoginMotif
(
NULL
,
mainwindow
,
"PwR Login"
,
systemgroup
,
&
Wb
::
login_success
,
&
Wb
::
login_cancel
,
&
sts
);
strcpy
(
title
,
"PwR Development "
);
strcat
(
title
,
login_prv
.
username
);
strcat
(
title
,
CoLogin
::
username
()
);
strcat
(
title
,
" on "
);
strcat
(
title
,
systemname
);
XtSetArg
(
args
[
0
],
XmNiconName
,
&
title
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment