From: arif Date: Thu, 11 Mar 2010 17:23:07 +0000 (+0000) Subject: graph attribute `datacolumns` is used to populate node list , it should be comma... X-Git-Tag: LAST_LIBGRAPH~32^2~1398 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=404c64a58d571831c2802348c055929d01cb18e8;p=graphviz graph attribute `datacolumns` is used to populate node list , it should be comma delimeted attribute list e.g: G[datacolumns="IP,HOST,DATA1"] --- diff --git a/cmd/smyrna/gui/datalistcallbacks.c b/cmd/smyrna/gui/datalistcallbacks.c index 90461314e..ea638565d 100755 --- a/cmd/smyrna/gui/datalistcallbacks.c +++ b/cmd/smyrna/gui/datalistcallbacks.c @@ -20,37 +20,6 @@ void btnTVEdit_clicked_cb(GtkWidget * widget, gpointer user_data) { } -void btnTVDelete_clicked_cb(GtkWidget * widget, gpointer user_data) -{ -} -void btnTVFirst_clicked_cb(GtkWidget * widget, gpointer user_data) -{ - tv_nodes_first_page(); -} - -void btnTVPrevious_clicked_cb(GtkWidget * widget, gpointer user_data) -{ - tv_nodes_prior_page(); -} - -void btnTVNext_clicked_cb(GtkWidget * widget, gpointer user_data) -{ - tv_nodes_next_page(); -} - -void btnTVLast_clicked_cb(GtkWidget * widget, gpointer user_data) -{ - tv_nodes_last_page(); -} - -void btnTVGotopage_clicked_cb(GtkWidget * widget, gpointer user_data) -{ - GtkSpinButton *spn; - int p; - spn = (GtkSpinButton *) glade_xml_get_widget(xml, "spnTVGotopage"); - p = gtk_spin_button_get_value_as_int(spn); - tv_nodes_goto_page(p - 1); -} void btnTVCancel_clicked_cb(GtkWidget * widget, gpointer user_data) { @@ -93,16 +62,6 @@ void btnTVFilterApply_clicked_cb(GtkWidget * widget, gpointer user_data) } -void btnTVSelectAll_clicked_cb(GtkWidget * widget, gpointer user_data) -{ - tv_select_all(); -} - -void btnTVUnselectAll_clicked_cb(GtkWidget * widget, gpointer user_data) -{ - tv_unselect_all(); -} - void btnTVShowAll_clicked_cb(GtkWidget * widget, gpointer user_data) { diff --git a/cmd/smyrna/gui/glcompui.c b/cmd/smyrna/gui/glcompui.c index cb2a6b7a0..e33869eef 100644 --- a/cmd/smyrna/gui/glcompui.c +++ b/cmd/smyrna/gui/glcompui.c @@ -203,6 +203,35 @@ void selectnodes(glCompObj *obj, GLfloat x, GLfloat y) } +void testContainer(glCompSet *s) +{ + + glCompPanel* p; + glCompLabel *l=NULL; + + p = glCompPanelNew((glCompObj *) s, 100, 100, 500, 500); + p = glCompPanelNew((glCompObj *) p, 0, 0, 480, 480); + p->common.anchor.leftAnchor=1; + p->common.anchor.bottomAnchor=1; + p->common.anchor.topAnchor=1; + p->common.anchor.rightAnchor=1; + + + p->common.anchor.left=10; + p->common.anchor.bottom=50; + p->common.anchor.top=10; + p->common.anchor.right=10; + + + + + + + +} + + + glCompSet *glcreate_gl_topview_menu(void) { /* static char* icondir[512]; */ @@ -362,6 +391,8 @@ glCompSet *glcreate_gl_topview_menu(void) i->common.visible = 0; /* l=glCompLabelNew((glCompObj *)s,100,5,view->Topview->Graphdata.GraphFileName); glCompLabelSetFontSize(l,24);*/ + +// testContainer(s); return s; diff --git a/cmd/smyrna/gui/menucallbacks.c b/cmd/smyrna/gui/menucallbacks.c index 535878ed0..86cd28e32 100755 --- a/cmd/smyrna/gui/menucallbacks.c +++ b/cmd/smyrna/gui/menucallbacks.c @@ -188,8 +188,10 @@ void mHideConsoleSlot(GtkWidget * widget, gpointer user_data) //Graph void mNodeListSlot(GtkWidget * widget, gpointer user_data) { - gtk_widget_show(glade_xml_get_widget(xml, "ListForm")); - execute_tv_nodes(); + gtk_widget_show(glade_xml_get_widget(xml, "frmTVNodes")); + setup_tree (view->g[view->activeGraph]); + + } void mNewNodeSlot(GtkWidget * widget, gpointer user_data) diff --git a/cmd/smyrna/tvnodes.c b/cmd/smyrna/tvnodes.c index 1637d758a..b00c9571b 100755 --- a/cmd/smyrna/tvnodes.c +++ b/cmd/smyrna/tvnodes.c @@ -370,7 +370,9 @@ grid* update_colums(grid* g,char* str) add_column(g,"ID",0,G_TYPE_STRING); add_column(g,"Name",0,G_TYPE_STRING); add_column(g,"visible",0,G_TYPE_BOOLEAN); - + if(!str) + return g; + a=strtok(str,","); add_column(g,a,1,G_TYPE_STRING); while ((a=strtok(NULL,","))) @@ -384,10 +386,12 @@ void setup_tree (Agraph_t* g) G_TYPE_INT: G_TYPE_BOOLEAN: */ - char buf[]="IP,HOST,DATA3,COLOR,FALAN,FILAN"; + static char* buf=NULL; static GtkTreeStore *store=NULL; static GtkTreeView *tree=NULL; grid* gr=NULL; + buf=agget(g,"datacolumns"); + // tree=(GtkTreeView *) glade_xml_get_widget(xml, "treeview1"); gr=update_colums(gr,buf); tree=update_tree (tree,gr);