Commit 4bca1630 authored by claes's avatar claes

Login was put behind xtt att startup

parent 160a0733
/*
* Proview $Id: rt_xtt_gtk.cpp,v 1.15 2008-06-24 08:05:25 claes Exp $
* Proview $Id: rt_xtt_gtk.cpp,v 1.16 2008-06-25 07:57:25 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -31,6 +31,7 @@
#include "co_cdh.h"
#include "co_time.h"
#include "co_wow_gtk.h"
#include "co_login_gtk.h"
#include "pwr_baseclasses.h"
#include "pwr_nmpsclasses.h"
......@@ -934,9 +935,16 @@ XttGtk::XttGtk( int argc, char *argv[], int *return_sts) :
xnav->open_login();
wow = new CoWowGtk( toplevel);
if ( !quiet)
if ( !quiet) {
if ( xnav->cologin)
// Set login window as parent to warranty as focus is left to parent.
((CoWowGtk *)wow)->SetParent( ((CoLoginGtk *)xnav->cologin)->widgets.toplevel);
wow->DisplayWarranty();
if ( xnav->cologin)
((CoWowGtk *)wow)->SetParent( toplevel);
}
// TODO if ( xnav->op)
// close( this, 0);
......
/*
* Proview $Id: xtt_xnav.cpp,v 1.39 2008-06-24 08:11:28 claes Exp $
* Proview $Id: xtt_xnav.cpp,v 1.40 2008-06-25 07:58:04 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -33,7 +33,7 @@
#include "co_cdh.h"
#include "co_dcli.h"
#include "co_time.h"
#include "co_api.h"
#include "co_api_user.h"
#include "co_msg.h"
#include "co_syi.h"
#include "pwr_baseclasses.h"
......@@ -1059,7 +1059,7 @@ XNav::XNav(
menu_tree(NULL), ev(0), op(0), clog(0), closing_down(0),
base_priv(pwr_mPrv_System), priv(pwr_mPrv_System), displayed(0),
current_logging_index(-1), search_last_found(0), search_compiled(0),
attach_audio(0), audio(0), op_close_button(xn_op_close_button)
attach_audio(0), audio(0), op_close_button(xn_op_close_button), cologin(0)
{
strcpy( name, xn_name);
strcpy( opplace_name, xn_opplace_name);
......@@ -1151,7 +1151,10 @@ int XNav::set_attr_value( char *value_str)
if ( EVEN(sts)) return sts;
sts = gdh_SetObjectInfo( attr_str, buffer, item->size);
if ( EVEN(sts)) return sts;
if ( EVEN(sts)) {
message(' ', get_message(sts));
return sts;
}
break;
}
case xnav_eItemType_Local: {
......
/*
* Proview $Id: xtt_xnav.h,v 1.23 2008-06-24 08:11:28 claes Exp $
* Proview $Id: xtt_xnav.h,v 1.24 2008-06-25 07:58:04 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -313,6 +313,7 @@ class XNav {
CoWow *wow;
int op_close_button;
static xmenu_sMenuCall *mcp;
CoLogin *cologin;
virtual void set_inputfocus() {}
virtual void pop() {}
......
/*
* Proview $Id: xtt_xnav_command.cpp,v 1.35 2008-06-24 08:11:28 claes Exp $
* Proview $Id: xtt_xnav_command.cpp,v 1.36 2008-06-25 07:58:04 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -41,7 +41,7 @@
#include "pwr_baseclasses.h"
#include "pwr_nmpsclasses.h"
#include "co_ccm_msg.h"
#include "co_api.h"
#include "co_api_user.h"
#include "flow.h"
#include "flow_browctx.h"
#include "flow_browapi.h"
......@@ -544,11 +544,13 @@ static void xnav_login_success_bc( void *ctx)
CoLogin::get_login_info( 0, 0, xnav->user, (unsigned long *)&xnav->priv, 0);
sprintf( msg, "User %s logged in", xnav->user);
xnav->cologin = 0;
xnav->message('I', msg);
}
static void xnav_login_cancel_bc(void *xnav)
{
((XNav *)xnav)->cologin = 0;
}
static int xnav_login_func( void *client_data,
......@@ -568,8 +570,8 @@ static int xnav_login_func( void *client_data,
if ( EVEN( dcli_get_qualifier( "dcli_arg1", arg1_str, sizeof(arg1_str))))
{
xnav->login_new( "PwR Login", systemgroup, xnav_login_success_bc,
xnav_login_cancel_bc, &sts);
xnav->cologin = xnav->login_new( "PwR Login", systemgroup, xnav_login_success_bc,
xnav_login_cancel_bc, &sts);
return 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment