X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Fmenu.c;h=5235acaaa61acdde2a1de3d3228ab8a2451ab7f0;hb=5e96e7e38fc3a40f0d9076c7ca8f369ad8c91d8c;hp=33f170b0054dc2c49a6f52fe1ee27963b2470ecd;hpb=2d262115fc06b5ffb6038207a6d0c1d5f81763c2;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c index 33f170b0..5235acaa 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c @@ -16,34 +16,37 @@ * MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include -inline LttvMenus *lttv_menus_new() { +LttvMenus *lttv_menus_new() { return g_array_new(FALSE, FALSE, sizeof(LttvMenuClosure)); } /* MD: delete elements of the array also, but don't free pointed addresses * (functions). */ -inline void lttv_menus_destroy(LttvMenus *h) { +void lttv_menus_destroy(LttvMenus *h) { g_debug("lttv_menus_destroy()"); g_array_free(h, TRUE); } -inline LttvMenuClosure lttv_menus_add(LttvMenus *h, lttvwindow_viewer_constructor f, char* menu_path, char* menu_text, GtkWidget *widget) +LttvMenuClosure lttv_menus_add(LttvMenus *h, + lttvwindow_viewer_constructor f, + char* menu_path, char* menu_text, GtkWidget *widget) { LttvMenuClosure c; - /* if h is null, do nothing, or popup a warning message */ - if(h == NULL)return; - c.con = f; c.menu_path = menu_path; c.menu_text = menu_text; c.widget = widget; - g_array_append_val(h,c); + if(h != NULL) g_array_append_val(h,c); return c; } @@ -51,7 +54,7 @@ inline LttvMenuClosure lttv_menus_add(LttvMenus *h, lttvwindow_viewer_constructo GtkWidget *lttv_menus_remove(LttvMenus *h, lttvwindow_viewer_constructor f) { LttvMenuClosure * tmp; - gint i; + guint i; GtkWidget *widget; for(i=0;ilen;i++){