From 9ff11a569d0ce13629f7cf4677fe3d6c2cc866c9 Mon Sep 17 00:00:00 2001 From: erg Date: Wed, 9 Apr 2008 21:06:09 +0000 Subject: [PATCH] Add macros for custom_object_data and custom_graph_data; clean up warnings; add macros for malloc and realloc --- cmd/smyrna/gui/callbacks.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/cmd/smyrna/gui/callbacks.c b/cmd/smyrna/gui/callbacks.c index 7e20772b4..117557318 100755 --- a/cmd/smyrna/gui/callbacks.c +++ b/cmd/smyrna/gui/callbacks.c @@ -23,14 +23,10 @@ #include "viewport.h" #include "topview.h" #include "selection.h" - - - +#include "memory.h" //Menu Items - - void new_graph_clicked(GtkWidget * widget, gpointer user_data) { g_print("new graph button fired\n"); @@ -39,7 +35,6 @@ void new_graph_clicked(GtkWidget * widget, gpointer user_data) void open_graph_clicked(GtkWidget * widget, gpointer user_data) { - } void save_graph_clicked(GtkWidget * widget, gpointer user_data) { @@ -189,8 +184,8 @@ void on_newNode(GtkWidget * button, gpointer user_data) { int *a; int *b; - a = (int *) malloc(sizeof(int)); - b = (int *) malloc(sizeof(int)); + a = NEW(int); + b = NEW(int); } @@ -270,8 +265,7 @@ void frmObjectBtnOK_clicked(GtkWidget * widget, gpointer user_data) { //call function to update object values update_object_properties(frmObjectTypeIndex, frmObjectg); - if (((custom_graph_data *) AGDATA(view->g[view->activeGraph]))-> - TopView == 0) + if (GD_TopView(view->g[view->activeGraph]) == 0) do_graph_layout(view->g[view->activeGraph], 0, 1); else { set_update_required(view->Topview); -- 2.40.0