Commit 995e4650 authored by Claes Sjofors's avatar Claes Sjofors

Gtk print dilog fix

parent b7a95862
......@@ -536,6 +536,8 @@ void CLogGtk::print()
wow->CreateBrowPrintDialog( title, clognav->brow->ctx, flow_eOrientation_Landscape,
parent_wid, &sts);
if ( sts == WOW__PRINTDIALOGDISABLED)
wow->DisplayError( "Disabled", "Print Dialog is disabled");
}
......@@ -45,6 +45,7 @@
#include "co_cdh.h"
#include "co_time.h"
#include "co_syi.h"
#include "co_dcli.h"
#include "pwr_baseclasses.h"
#include "rt_gdh.h"
#include "rt_mh.h"
......@@ -113,4 +114,14 @@ void EvListGtk::print( const char *title)
CoWowGtk::CreateBrowPrintDialogGtk( print_title, brow->ctx, flow_eOrientation_Landscape,
GTK_WINDOW(parent_wid), &sts);
if ( sts == WOW__PRINTDIALOGDISABLED) {
pwr_tFileName filename;
pwr_tCmd cmd;
dcli_translate_filename( filename, "$pwrp_tmp/xnav.ps");
print_nodia( filename);
sprintf( cmd, "$pwr_exe/rt_print.sh %s", filename);
system(cmd);
}
}
......@@ -86,10 +86,7 @@ void CLog::activate_prev_file()
void CLog::activate_print()
{
if ( CoWow::PrintDialogIsDisabled())
wow->DisplayError( "Disabled", "Print Dialog is disabled");
else
print();
print();
}
void CLog::activate_help()
......
......@@ -163,50 +163,17 @@ void Ev::blk_display_in_xnav_cb( void *ctx, pwr_tAttrRef *arp)
void Ev::eve_activate_print()
{
if ( CoWow::PrintDialogIsDisabled()) {
pwr_tFileName filename;
pwr_tCmd cmd;
dcli_translate_filename( filename, "$pwrp_tmp/xnav.ps");
eve->print_nodia( filename);
sprintf( cmd, "$pwr_exe/rt_print.sh %s", filename);
system(cmd);
}
else
eve->print( "Event List");
eve->print( "Event List");
}
void Ev::ala_activate_print()
{
if ( CoWow::PrintDialogIsDisabled()) {
pwr_tFileName filename;
pwr_tCmd cmd;
dcli_translate_filename( filename, "$pwrp_tmp/xnav.ps");
ala->print_nodia( filename);
sprintf( cmd, "$pwr_exe/rt_print.sh %s", filename);
system(cmd);
}
else
ala->print( "Alarm List");
ala->print( "Alarm List");
}
void Ev::blk_activate_print()
{
if ( CoWow::PrintDialogIsDisabled()) {
pwr_tFileName filename;
pwr_tCmd cmd;
dcli_translate_filename( filename, "$pwrp_tmp/xnav.ps");
blk->print_nodia( filename);
sprintf( cmd, "$pwr_exe/rt_print.sh %s", filename);
system(cmd);
}
else
blk->print( "Block List");
blk->print( "Block List");
}
void Ev::eve_activate_ack_last()
......
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