#include "CFV-private.h"
+#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
+#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
+
extern GSList *gControl_Flow_Data_List;
/*****************************************************************************
void
guicontrolflow_destructor_full(ControlFlowData *Control_Flow_Data)
{
+ g_info("CFV.c : guicontrolflow_destructor_full, %p", Control_Flow_Data);
/* May already have been done by GTK window closing */
if(GTK_IS_WIDGET(Control_Flow_Data->Scrolled_Window_VC))
gtk_widget_destroy(Control_Flow_Data->Scrolled_Window_VC);
-
- guicontrolflow_destructor(Control_Flow_Data);
+ //Control_Flow_Data->Parent_Window = NULL;
+ //FIXME guicontrolflow_destructor(Control_Flow_Data);
}
+/* When this destructor is called, the widgets are already disconnected */
void
guicontrolflow_destructor(ControlFlowData *Control_Flow_Data)
{
guint index;
+ g_info("CFV.c : guicontrolflow_destructor, %p", Control_Flow_Data);
+ g_info("%p, %p, %p", update_time_window_hook, Control_Flow_Data, Control_Flow_Data->Parent_Window);
/* Process List is removed with it's widget */
//ProcessList_destroy(Control_Flow_Data->Process_List);
- unreg_update_time_window(update_time_window_hook,
+ if(Control_Flow_Data->Parent_Window != NULL)
+ {
+ unreg_update_time_window(update_time_window_hook,
Control_Flow_Data,
- Control_Flow_Data->Scrolled_Window_VC->parent);
+ Control_Flow_Data->Parent_Window);
- unreg_update_current_time(update_current_time_hook,
+ unreg_update_current_time(update_current_time_hook,
Control_Flow_Data,
- Control_Flow_Data->Scrolled_Window_VC->parent);
-
+ Control_Flow_Data->Parent_Window);
+ }
+ g_info("CFV.c : guicontrolflow_destructor, %p", Control_Flow_Data);
g_slist_remove(gControl_Flow_Data_List,Control_Flow_Data);
g_free(Control_Flow_Data);
}
*****************************************************************************/
+#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
+#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
+
//#define PANGO_ENABLE_BACKEND
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include "CFV-private.h"
-/* NOTE : no drawing data should be sent there, as the drawing widget
+/* NOTE : no drawing data should be sent there, since the drawing widget
* has not been initialized */
void send_test_drawing(ProcessList *Process_List,
Drawing_t *Drawing,
PangoFontDescription *FontDesc;// = pango_font_description_new();
gint Font_Size;
+ //icon
+ GdkBitmap *mask = g_new(GdkBitmap, 1);
+ GdkPixmap *icon_pixmap = g_new(GdkPixmap, 1);
+ GdkGC * gc = gdk_gc_new(Pixmap);
+
/* Sent text data */
layout = gtk_widget_create_pango_layout(Drawing->Drawing_Area_V,
NULL);
LttTime birth;
birth.tv_sec = 12000;
birth.tv_nsec = 55500;
- g_critical("we have : x : %u, y : %u, width : %u, height : %u", x, y, width, height);
+ g_info("we have : x : %u, y : %u, width : %u, height : %u", x, y, width, height);
processlist_get_process_pixels(Process_List,
1,
&birth,
&y,
&height);
- g_critical("we draw : x : %u, y : %u, width : %u, height : %u", x, y, width, height);
+ g_info("we draw : x : %u, y : %u, width : %u, height : %u", x, y, width, height);
drawing_draw_line(
Drawing, Pixmap, x,
y+(height/2), x + width, y+(height/2),
y+(height/2), x + width, y+(height/2),
Drawing->Drawing_Area_V->style->black_gc);
- g_critical("y : %u, height : %u", y, height);
+
+ /* Draw icon */
+ icon_pixmap = gdk_pixmap_create_from_xpm(Pixmap, &mask, NULL,
+// "/home/compudj/local/share/LinuxTraceToolkit/pixmaps/move_message.xpm");
+ "/home/compudj/local/share/LinuxTraceToolkit/pixmaps/mini-display.xpm");
+ gdk_gc_copy(gc, Drawing->Drawing_Area_V->style->black_gc);
+ gdk_gc_set_clip_mask(gc, mask);
+ gdk_draw_drawable(Pixmap,
+ gc,
+ icon_pixmap,
+ 0, 0, 0, 0, -1, -1);
+
+ g_free(icon_pixmap);
+ g_free(mask);
+ g_free(gc);
+
+ g_info("y : %u, height : %u", y, height);
birth.tv_sec = 12000;
birth.tv_nsec = 55700;
y+(height/2), x + width, y+(height/2),
Drawing->Drawing_Area_V->style->black_gc);
- g_critical("y : %u, height : %u", y, height);
+ g_info("y : %u, height : %u", y, height);
for(i=0; i<10; i++)
{
y+(height/2), x + width, y+(height/2),
Drawing->Drawing_Area_V->style->black_gc);
- g_critical("y : %u, height : %u", y, height);
+ g_info("y : %u, height : %u", y, height);
pango_font_description_set_size(FontDesc, Font_Size);
GtkWidget *
h_guicontrolflow(MainWindow *pmParentWindow, LttvTracesetSelector * s, char * key)
{
- g_critical("hGuiControlFlow");
+ g_info("h_guicontrolflow, %p, %p, %s", pmParentWindow, s, key);
ControlFlowData *Control_Flow_Data = guicontrolflow() ;
+
+ Control_Flow_Data->Parent_Window = pmParentWindow;
get_time_window(pmParentWindow,
guicontrolflow_get_time_window(Control_Flow_Data));
*Time_Window = *New_Time_Window;
- g_critical("New time window HOOK : %u, %u to %u, %u",
+ g_info("New time window HOOK : %u, %u to %u, %u",
Time_Window->start_time.tv_sec,
Time_Window->start_time.tv_nsec,
Time_Window->time_width.tv_sec,
LttTime* Current_Time =
guicontrolflow_get_current_time(Control_Flow_Data);
*Current_Time = *((LttTime*)call_data);
- g_critical("New Current time HOOK : %u, %u", Current_Time->tv_sec,
+ g_info("New Current time HOOK : %u, %u", Current_Time->tv_sec,
Current_Time->tv_nsec);
/* If current time is inside time interval, just move the highlight
* Author : Mathieu Desnoyers, June 2003
*/
+#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
+#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
+
#include <glib.h>
#include <gmodule.h>
#include <lttv/module.h>
return;
}
- g_critical("GUI ControlFlow Viewer init()");
+ g_info("GUI ControlFlow Viewer init()");
/* Register the toolbar insert button */
toolbar_item_reg(hGuiControlFlowInsert_xpm, "Insert Control Flow Viewer",
void destroy_walk(gpointer data, gpointer user_data)
{
+ g_info("Walk destroy GUI Control Flow Viewer");
guicontrolflow_destructor_full((ControlFlowData*)data);
- g_critical("Walk destroy GUI Control Flow Viewer");
}
* everything that has been registered in the gtkTraceSet API.
*/
G_MODULE_EXPORT void destroy() {
- g_critical("GUI Control Flow Viewer destroy()");
+ g_info("GUI Control Flow Viewer destroy()");
int i;
g_slist_foreach(gControl_Flow_Data_List, destroy_walk, NULL );