X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Fcallbacks.c;h=ff2081c280ac2508608a4d3d7cf9e4e29c664421;hb=190724cdfc53eeebfd895b594f875b53a72adf37;hp=42f75746a0b18a1bfe61f17359c3a923c85906e0;hpb=68316c48132d571147ee54eaef32a508c522635b;p=lttv.git diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index 42f75746..ff2081c2 100644 --- a/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -31,9 +31,7 @@ #include "callbacks.h" #include "interface.h" #include "support.h" -#include -#include -#include +#include #include #include #include @@ -1680,23 +1678,12 @@ void add_trace(GtkWidget * widget, gpointer user_data) ptab = (LttvPluginTab *)g_object_get_data(G_OBJECT(page), "Tab_Plugin"); tab = ptab->tab; } -//TODO fdeslauriers 2012-07-06: Remove this popup when we support multiple traces - traceset = lttvwindow_get_traceset(tab); - if(traceset != NULL && lttv_traceset_number(traceset) > 0){ - GtkWidget *dialogue = - gtk_message_dialog_new( - GTK_WINDOW(gtk_widget_get_toplevel(widget)), - GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - "Loading multiple traces is not supported at the moment."); - gtk_dialog_run(GTK_DIALOG(dialogue)); - gtk_widget_destroy(dialogue); - return; - } - + /* Create a new traceset*/ - traceset = lttv_traceset_new(); + traceset = tab->traceset_info->traceset; + if(traceset == NULL) { + traceset = lttv_traceset_new(); + } /* File open dialog management */ #ifdef BABEL_CLEANUP GtkWidget *extra_live_button; @@ -2279,7 +2266,7 @@ LttvPluginTab *create_new_tab(GtkWidget* widget, gpointer user_data) gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook))); Tab *copy_tab; - if(!page) { + if(!page || TRUE ) { copy_tab = NULL; } else { LttvPluginTab *ptab; @@ -3101,7 +3088,19 @@ void on_button_new_clicked (GtkButton *button, gpointer user_data) { +#ifdef BABEL_CLEANUP create_new_window((GtkWidget*)button, user_data, TRUE); +#else + GtkWidget *dialogue = + gtk_message_dialog_new( + GTK_WINDOW(gtk_widget_get_toplevel(button)), + GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + "Opening multiple windows is disabled."); + gtk_dialog_run(GTK_DIALOG(dialogue)); + gtk_widget_destroy(dialogue); +#endif } void