X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Finit_module.c;h=94668d207a88eacf39c66e3d96b3f67df86c34e2;hb=b9ce0bad7daf7c0a2333c91fdb1e35d602afe17f;hp=83d35c96ca0ed274bd1f4c0cb38d2a28e4318c93;hpb=f61f4dca50e13aa52b1ca3941c8f420848f4353f;p=lttv.git diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c b/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c index 83d35c96..94668d20 100644 --- a/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c +++ b/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c @@ -12,8 +12,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. */ /* @@ -34,9 +34,11 @@ #include #include #include -#include + #include +#ifdef BABEL_CLEANUP #include +#endif /* BABEL_CLEANUP */ #include #include #include @@ -46,7 +48,6 @@ #include #include #include "callbacks.h" -#include __EXPORT LttvTraceInfo @@ -88,6 +89,7 @@ static GSList *g_init_trace = NULL; static char *a_trace; //static char g_init_trace[PATH_MAX] = ""; +static gboolean a_live; void lttv_trace_option(void *hook_data) @@ -119,7 +121,7 @@ static gboolean window_creation_hook(void *hook_data, void *call_data) gtk_set_locale (); gtk_init (<tv_argc, <tv_argv); - add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps"); + add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps/" PACKAGE); add_pixmap_directory ("pixmaps"); add_pixmap_directory ("../modules/gui/main/pixmaps"); @@ -134,6 +136,7 @@ static gboolean window_creation_hook(void *hook_data, void *call_data) static void init() { LttvAttributeValue value; + gboolean retval; // Global attributes only used for interaction with main() here. LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes()); @@ -173,12 +176,19 @@ static void init() { "pathname of the directory containing the trace", LTTV_OPT_STRING, &a_trace, lttv_trace_option, NULL); - g_assert(lttv_iattribute_find_by_path(attributes, "hooks/main/before", - LTTV_POINTER, &value)); + a_live = FALSE; + lttv_option_add("live", 0, + "define if the traceset is receiving live informations", + "", + LTTV_OPT_NONE, &a_live, NULL, NULL); + + retval= lttv_iattribute_find_by_path(attributes, "hooks/main/before", + LTTV_POINTER, &value); + g_assert(retval); g_assert((main_hooks = *(value.v_pointer)) != NULL); lttv_hooks_add(main_hooks, window_creation_hook, NULL, LTTV_PRIO_DEFAULT); - +#ifdef BABEL_CLEANUP { /* Register state calculator */ LttvHooks *hook_adder = lttv_hooks_new(); @@ -218,6 +228,7 @@ static void init() { after_request, NULL, NULL, hook_adder, hook_remover); } +#endif /* BABEL_CLEANUP */ } void @@ -241,6 +252,7 @@ static void destroy_walk(gpointer data, gpointer user_data) static void destroy() { lttv_option_remove("trace"); + lttv_option_remove("live"); lttv_hooks_remove_data(main_hooks, window_creation_hook, NULL); @@ -257,4 +269,4 @@ static void destroy() { LTTV_MODULE("lttvwindow", "Viewer main window", \ "Viewer with multiple windows, tabs and panes for graphical modules", \ - init, destroy, "stats", "option") + init, destroy, "option","state")