X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Fcallbacks.c;h=8de2ba16d87a331299cdedf2c90df287b212ab3a;hb=088f6772c700cf75d4ba27adf086dc37d961a960;hp=a9bdac212f730a5464da842e91fe9f16269daae6;hpb=962e2228963dbdec5d1b92b8c7d85989b941516e;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 a9bdac21..8de2ba16 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -73,12 +73,6 @@ Tab* create_tab(MainWindow * mw, Tab *copy_tab, static void insert_viewer(GtkWidget* widget, lttvwindow_viewer_constructor constructor); -void checkbox_changed(GtkTreeView *treeview, - GtkTreePath *arg1, - GtkTreeViewColumn *arg2, - gpointer user_data); -void remove_trace_from_traceset_selector(GtkWidget * paned, unsigned i); -void add_trace_into_traceset_selector(GtkWidget * paned, LttTrace * trace); Tab *create_new_tab(GtkWidget* widget, gpointer user_data); static gboolean lttvwindow_process_pending_requests(Tab *tab); @@ -337,6 +331,18 @@ static void connect_focus_recursive(GtkWidget *widget, (gpointer)viewer); } +/* Stop all the processings and call gtk_main_quit() */ +static void mainwindow_quit() +{ + lttvwindowtraces_unregister_requests(g_quark_from_string("stats")); + lttvwindowtraces_unregister_requests(g_quark_from_string("state")); + lttvwindowtraces_unregister_computation_hooks(g_quark_from_string("stats")); + lttvwindowtraces_unregister_computation_hooks(g_quark_from_string("state")); + + gtk_main_quit(); +} + + /* insert_viewer function constructs an instance of a viewer first, * then inserts the widget of the instance into the container of the * main window @@ -429,6 +435,10 @@ int SetTraceset(Tab * tab, LttvTraceset *traceset) time_change_manager(tab, new_time_window); current_time_change_manager(tab, new_current_time); + //FIXME : we delete the filter tree, when it should be updated. + lttv_filter_destroy(tab->filter); + tab->filter = NULL; + #if 0 /* Set scrollbar */ GtkAdjustment *adjustment = gtk_range_get_adjustment(GTK_RANGE(tab->scrollbar)); @@ -959,8 +969,9 @@ gboolean lttvwindow_process_pending_requests(Tab *tab) } /* 0.2 Seek tracefiles positions to context position */ + //g_assert(lttv_process_traceset_seek_position(tsc, sync_position) == 0); lttv_process_traceset_synchronize_tracefiles(tsc); - + /* Events processing algorithm implementation */ /* Warning : the gtk_events_pending takes a LOT of cpu time. So what we do @@ -1592,10 +1603,10 @@ gboolean lttvwindow_process_pending_requests(Tab *tab) } - /* C Unlock Traces */ { - //lttv_process_traceset_get_sync_data(tsc); + lttv_process_traceset_get_sync_data(tsc); + //lttv_traceset_context_position_save(tsc, sync_position); guint iter_trace; @@ -1607,7 +1618,6 @@ gboolean lttvwindow_process_pending_requests(Tab *tab) lttvwindowtraces_unlock(trace_v); } } - #if 0 //set the cursor back to normal gdk_window_set_cursor(win, NULL); @@ -1779,9 +1789,11 @@ void add_trace(GtkWidget * widget, gpointer user_data) * it will remove the trace, recreate the traceset_contex, * and redraws all the viewer of the current tab. If there is on trace in the * current traceset, it will delete all viewers of the current tab + * + * It destroys the filter tree. FIXME... we should request for an update + * instead. */ -// MD : no filter version. void remove_trace(GtkWidget *widget, gpointer user_data) { LttTrace *trace; @@ -2259,6 +2271,8 @@ Tab *create_new_tab(GtkWidget* widget, gpointer user_data){ strcpy(label,"Page"); if(get_label(mw_data, label,"Get the name of the tab","Please input tab's name")) return (create_tab (mw_data, copy_tab, notebook, label)); + else + return NULL; } void @@ -2362,7 +2376,7 @@ void on_quit_activate (GtkMenuItem *menuitem, gpointer user_data) { - gtk_main_quit (); + mainwindow_quit(); } @@ -3199,7 +3213,7 @@ on_MWindow_destroy (GtkWidget *widget, g_info("There are now : %d windows\n",g_slist_length(g_main_window_list)); if(g_slist_length(g_main_window_list) == 0) - gtk_main_quit (); + mainwindow_quit(); } gboolean @@ -3809,7 +3823,7 @@ char * get_selection(char ** loaded_module_name, int nb_module, } id = gtk_dialog_run(GTK_DIALOG(dialogue)); - GtkTreeModel **store_model = (GtkTreeModel**)&store; /* for strict aliasing */ + GtkTreeModel **store_model = (GtkTreeModel**)&store; switch(id){ case GTK_RESPONSE_ACCEPT: case GTK_RESPONSE_OK: