From: compudj Date: Mon, 29 Sep 2003 12:26:07 +0000 (+0000) Subject: rectangle draw : need modif to the main window so the module known it's ready for... X-Git-Tag: v0.12.20~3211 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1ab3d149f8c0f55b1f913df39b1f5e49b8f569b9;p=lttv.git rectangle draw : need modif to the main window so the module known it's ready for being drawn on git-svn-id: http://ltt.polymtl.ca/svn@278 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c b/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c index 2233e332..aae13cf7 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/CFV.c @@ -147,7 +147,12 @@ GuiControlFlow(void) g_slist_append(gControl_Flow_Data_List,Control_Flow_Data); - send_test_data(Control_Flow_Data->Process_List); + //FIXME : data sent too fast. The widget must be + //inserted in the main window before the Drawing area + //can be configured (and this must happend bedore sending + //data) + send_test_data(Control_Flow_Data->Process_List, + Control_Flow_Data->Drawing); return Control_Flow_Data; diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c b/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c index 572f4510..2f1312aa 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Drawing.c @@ -349,7 +349,7 @@ void Drawing_Insert_Square(Drawing_t *Drawing, /* add an empty square */ gdk_draw_rectangle (Pixmap, - Drawing->Drawing_Area_V->style->white_gc, + Drawing->Drawing_Area_V->style->black_gc, TRUE, 0, y, Drawing->width, // do not overlap diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c index bc278874..5cbdae73 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.c @@ -13,10 +13,11 @@ #include "Event_Hooks.h" #include "CFV.h" #include "Process_List.h" +#include "Drawing.h" -void send_test_data(ProcessList *Process_List) +void send_test_data(ProcessList *Process_List, Drawing_t *Drawing) { - guint height; + guint height, size; int i; ProcessInfo Process_Info = {10000, 12000, 55600}; //ProcessInfo Process_Info = {156, 14000, 55500}; @@ -30,7 +31,8 @@ void send_test_data(ProcessList *Process_List) 1, &birth, &height); - + Drawing_Insert_Square( Drawing, height, 5); + g_critical("height : %u", height); birth.tv_sec = 14000; @@ -40,6 +42,7 @@ void send_test_data(ProcessList *Process_List) 156, &birth, &height); + Drawing_Insert_Square( Drawing, height, 5); g_critical("height : %u", height); @@ -50,6 +53,7 @@ void send_test_data(ProcessList *Process_List) 10, &birth, &height); + Drawing_Insert_Square( Drawing, height, 5); for(i=0; i<10; i++) { @@ -60,6 +64,7 @@ void send_test_data(ProcessList *Process_List) i, &birth, &height); + Drawing_Insert_Square( Drawing, height, 5); } g_critical("height : %u", height); @@ -71,18 +76,26 @@ void send_test_data(ProcessList *Process_List) 10, &birth, &height); + Drawing_Insert_Square( Drawing, height, 5); g_critical("height : %u", height); ProcessList_add(Process_List, 10000, &birth, &height); + Drawing_Insert_Square( Drawing, height, 5); g_critical("height : %u", height); + ProcessList_get_process_pixels(Process_List, + 10000, + &birth, + &height, &size); ProcessList_remove( Process_List, 10000, &birth); + + Drawing_Remove_Square( Drawing, height, 5); if(got_RowRef = (GtkTreeRowReference*)g_hash_table_lookup( diff --git a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h index 329718d0..479b3a35 100644 --- a/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h +++ b/ltt/branches/poly/lttv/modules/guiControlFlow/Event_Hooks.h @@ -10,8 +10,9 @@ #include #include #include "Process_List.h" +#include "Drawing.h" -void send_test_data(ProcessList *Process_List); +void send_test_data(ProcessList *Process_List, Drawing_t *Drawing); GtkWidget *hGuiControlFlow(mainWindow *pmParentWindow);