Commit 7cce30a2 authored by claes's avatar claes

Runtime Monitor and Status Monitor added

parent 9f1e1785
/*
* Proview $Id: wb_wtt_gtk.cpp,v 1.12 2007-04-23 11:45:43 claes Exp $
* Proview $Id: wb_wtt_gtk.cpp,v 1.13 2007-05-16 12:39:14 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -54,6 +54,8 @@
#include "wb_volume.h"
#include "wb_env.h"
#include "wb_wpkg_gtk.h"
#include "co_rtmon_gtk.h"
#include "co_statusmon_nodelist_gtk.h"
#include "co_msgwindow.h"
#include "wb_wnav_selformat.h"
#include "wb_pwrs.h"
......@@ -864,6 +866,32 @@ void WttGtk::activate_command( GtkWidget *w, gpointer data)
wtt->command_open = 1;
}
static void wtt_help_cb( void *ctx, char *topic)
{
pwr_tCmd cmd;
sprintf( cmd, "help %s", topic);
((Wtt *)ctx)->wnav->command( cmd);
}
void WttGtk::activate_rtmon( GtkWidget *w, gpointer data)
{
Wtt *wtt = (Wtt *)data;
pwr_tStatus sts;
RtMon *rtmon = new RtMonGtk( wtt, ((WttGtk *)wtt)->toplevel, "Runtime Monitor", &sts);
rtmon->help_cb = wtt_help_cb;
}
void WttGtk::activate_statusmon( GtkWidget *w, gpointer data)
{
Wtt *wtt = (Wtt *)data;
pwr_tStatus sts;
Nodelist *nl = new NodelistGtk( wtt, ((WttGtk *)wtt)->toplevel, "Supervision Center", 0, &sts);
nl->set_scantime(3);
nl->help_cb = wtt_help_cb;
}
void WttGtk::activate_exit( GtkWidget *w, gpointer data)
{
Wtt *wtt = (Wtt *)data;
......@@ -2268,6 +2296,23 @@ WttGtk::WttGtk(
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), options);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(options), GTK_WIDGET(options_menu));
// Tools menu
GtkWidget *mtools_rtmon = gtk_menu_item_new_with_mnemonic( "_Runtime Monitor");
g_signal_connect( mtools_rtmon, "activate",
G_CALLBACK(WttGtk::activate_rtmon), this);
GtkWidget *mtools_statusmon = gtk_menu_item_new_with_mnemonic( "_Supervision Center");
g_signal_connect( mtools_statusmon, "activate",
G_CALLBACK(WttGtk::activate_statusmon), this);
GtkMenu *mtools_menu = (GtkMenu *) g_object_new( GTK_TYPE_MENU, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(mtools_menu), mtools_rtmon);
gtk_menu_shell_append(GTK_MENU_SHELL(mtools_menu), mtools_statusmon);
GtkWidget *mtools = gtk_menu_item_new_with_mnemonic("_Tools");
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), mtools);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(mtools), GTK_WIDGET(mtools_menu));
// Menu Help
GtkWidget *help_overview = gtk_image_menu_item_new_with_mnemonic("_Overview");
gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(help_overview),
......
/*
* Proview $Id: wb_wtt_gtk.h,v 1.4 2007-02-05 09:34:37 claes Exp $
* Proview $Id: wb_wtt_gtk.h,v 1.5 2007-05-16 12:39:14 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -214,6 +214,8 @@ class WttGtk : public Wtt {
static void activate_scriptproj( GtkWidget *w, gpointer data);
static void activate_scriptbase( GtkWidget *w, gpointer data);
static void activate_set_advuser( GtkWidget *w, gpointer data);
static void activate_rtmon( GtkWidget *w, gpointer data);
static void activate_statusmon( GtkWidget *w, gpointer data);
static void activate_help( GtkWidget *w, gpointer data);
static void activate_help_project( GtkWidget *w, gpointer data);
static void activate_help_proview( GtkWidget *w, gpointer data);
......
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