Commit 6618e0c6 authored by Claes Sjofors's avatar Claes Sjofors

Xtt history curve, error text for data load failure added

parent fb6ca715
......@@ -55,6 +55,7 @@ typedef void *Widget;
#include "glow_growctx.h"
#include "glow_growapi.h"
#include "co_lng.h"
#include "co_msg.h"
#include "xtt_ge_gtk.h"
#include "xtt_trend_gtk.h"
#include "xtt_sevhist_gtk.h"
......@@ -69,6 +70,19 @@ typedef void *Widget;
#include "rt_xnav_msg.h"
#include "glow_msg.h"
GtkWidget *XttMultiViewGtk::error_msg( const char *msg, pwr_tStatus sts)
{
char str1[200];
char str2[400];
msg_GetMsg( sts, str1, sizeof(str1));
strcpy( str2, msg);
strcat( str2, "\n");
strcat( str2, str1);
return gtk_label_new( str2);
}
gboolean XttMultiViewGtk::action_inputfocus( GtkWidget *w, GdkEvent *event, gpointer data)
{
XttMultiViewGtk *multiview = (XttMultiViewGtk *)data;
......@@ -702,7 +716,10 @@ XttMultiViewGtk::XttMultiViewGtk( GtkWidget *mv_parent_wid, void *mv_parent_ctx,
oidv, anamev, onamev, sevhistobjectv,
xnav->scctx, w, h,
(unsigned int)curve_mOptions_Embedded, color_theme, 0, sts);
if ( EVEN(*sts)) break;
if ( EVEN(*sts)) {
comp_widget[i*rows + j] = error_msg("Unable to load history data", *sts);
break;
}
sevhist[i*rows + j]->help_cb = multiview_trend_help_cb;
sevhist[i*rows + j]->get_select_cb = multiview_sevhist_get_select_cb;
......
......@@ -95,6 +95,7 @@ class XttMultiViewGtk : public XttMultiView {
int key_pressed( int key);
void close_input_all();
void signal_send( char *signalname);
GtkWidget *error_msg( const char *msg, pwr_tStatus sts);
static void ge_change_value_cb( void *ge_ctx, void *value_object, char *text);
static void confirm_cb( void *ge_ctx, void *confirm_object, char *text);
......
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