X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Fmain%2Fsrc%2Fcallbacks.c;h=08a58516c2eb22bd47019b7e2596e22e3dbf52c4;hb=32abbc51645342dde940bf20c084f51a566d9ae8;hp=8b537cc61db68e0848c78a0d39e7b8d694ae2f38;hpb=efde9138bd61f0ce9cabb3f2dcc0d0040eaf35ed;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c index 8b537cc6..08a58516 100644 --- a/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/main/src/callbacks.c @@ -21,11 +21,11 @@ #endif #include -#include #include "callbacks.h" #include "interface.h" #include "support.h" +#include #include #include #include @@ -274,10 +274,10 @@ void create_new_window(GtkWidget* widget, gpointer user_data, gboolean clone) if(clone){ g_printf("Clone : use the same traceset\n"); - construct_main_window(parent, NULL); + construct_main_window(parent); }else{ g_printf("Empty : traceset is set to NULL\n"); - construct_main_window(NULL, parent->win_creation_data); + construct_main_window(NULL); } } @@ -1041,10 +1041,7 @@ on_load_module_activate (GtkMenuItem *menuitem, str1 = strrchr(str,'\\'); str1++; } - if(mw_data->win_creation_data) - lttv_module_load(str1, mw_data->win_creation_data->argc,mw_data->win_creation_data->argv); - else - lttv_module_load(str1, 0,NULL); + lttv_module_require(str1, NULL); g_slist_foreach(g_main_window_list, (gpointer)insert_menu_toolbar_item, NULL); g_strfreev(dir); @@ -1067,30 +1064,36 @@ on_unload_module_activate (GtkMenuItem *menuitem, gpointer user_data) { int i; - char **name, *unload_module_name; + GPtrArray *name; + char *unload_module_name; guint nb; - LttvModule ** modules, *module; + LttvLibrary *library; + LttvLibraryInfo library_info; MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem); - modules = lttv_module_list(&nb); - name = g_new(char*, nb); + name = g_ptr_array_new(); + nb = lttv_library_number(); + for(i=0;i 0) g_ptr_array_add(name, library_info.name); } - unload_module_name =get_unload_module(name,nb); + unload_module_name =get_unload_module((char **)(name->pdata), name->len); if(unload_module_name){ for(i=0;itab = NULL; new_m_window->current_tab = NULL; new_m_window->attributes = LTTV_IATTRIBUTE(g_object_new(LTTV_ATTRIBUTE_TYPE, NULL)); - if(parent){ - new_m_window->win_creation_data = parent->win_creation_data; - }else{ - new_m_window->win_creation_data = win_creation_data; - } new_m_window->hash_menu_item = g_hash_table_new_full (g_str_hash, g_str_equal, main_window_destroy_hash_key,