X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Fcallbacks.c;h=273207da007bda0ed98840e7c71bf34cc4179a58;hb=e025a729300a06b0de77a8c63d7256fed2658ccb;hp=5630febb54977dd490786ea726e9d9c4459d60ca;hpb=3234f094e8b6c0bb98f4f8b6e611b3d4f7b4a649;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index 5630febb..273207da 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -4308,6 +4308,50 @@ void construct_main_window(MainWindow * parent) } LttvTraceset *traceset = new_tab->traceset_info->traceset; SetTraceset(new_tab, traceset); + + /* Insert default viewers */ + { + LttvAttributeType type; + LttvAttributeName name; + LttvAttributeValue value; + LttvAttribute *attribute; + + LttvIAttribute *attributes_global = + LTTV_IATTRIBUTE(lttv_global_attributes()); + + g_assert(attribute = + LTTV_ATTRIBUTE(lttv_iattribute_find_subdir( + LTTV_IATTRIBUTE(attributes_global), + LTTV_VIEWER_CONSTRUCTORS))); + + name = g_quark_from_string("guievents"); + type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(attribute), + name, &value); + if(type == LTTV_POINTER) { + lttvwindow_viewer_constructor viewer_constructor = + (lttvwindow_viewer_constructor)*value.v_pointer; + insert_viewer(new_window, viewer_constructor); + } + + name = g_quark_from_string("guicontrolflow"); + type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(attribute), + name, &value); + if(type == LTTV_POINTER) { + lttvwindow_viewer_constructor viewer_constructor = + (lttvwindow_viewer_constructor)*value.v_pointer; + insert_viewer(new_window, viewer_constructor); + } + + name = g_quark_from_string("guistatistics"); + type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(attribute), + name, &value); + if(type == LTTV_POINTER) { + lttvwindow_viewer_constructor viewer_constructor = + (lttvwindow_viewer_constructor)*value.v_pointer; + insert_viewer(new_window, viewer_constructor); + } + + } } g_printf("There are now : %d windows\n",g_slist_length(g_main_window_list)); @@ -4323,7 +4367,7 @@ void tab_destructor(Tab * tab) int i, nb, ref_count; LttvTrace * trace; - g_object_free(tab->tooltips); + g_object_unref(tab->tooltips); if(tab->attributes) g_object_unref(tab->attributes);