ptab = (LttvPluginTab *)g_object_get_data(G_OBJECT(page), "Tab_Plugin");
tab = ptab->tab;
}
-#if 0
-//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;
- }
-#endif
+
/* Create a new traceset*/
traceset = tab->traceset_info->traceset;
if(traceset == NULL) {
gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)));
Tab *copy_tab;
- if(!page) {
+ if(!page || TRUE ) {
copy_tab = NULL;
} else {
LttvPluginTab *ptab;
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
// gtk_container_add (GTK_CONTAINER (FileMenuNewTitle_menu), EmptyTraceset);
// CloneTraceset = gtk_menu_item_new_with_mnemonic ("Clone trace set");
+#ifdef BABEL_CLEANUP
CloneTraceset = gtk_menu_item_new_with_mnemonic ("New window");
gtk_widget_show (CloneTraceset);
gtk_container_add (GTK_CONTAINER (FileMenuNewTitle_menu), CloneTraceset);
+
FileMenuNewSep = gtk_menu_item_new ();
gtk_widget_show (FileMenuNewSep);
gtk_container_add (GTK_CONTAINER (FileMenuNewTitle_menu), FileMenuNewSep);
gtk_widget_set_sensitive (FileMenuNewSep, FALSE);
-
+#endif
Tab = gtk_menu_item_new_with_mnemonic ("Tab");
gtk_widget_show (Tab);
gtk_container_add (GTK_CONTAINER (FileMenuNewTitle_menu), Tab);
gtk_box_pack_start (GTK_BOX (MVbox), MToolbar1, FALSE, FALSE, 0);
gtk_toolbar_set_style (GTK_TOOLBAR (MToolbar1), GTK_TOOLBAR_ICONS);
+#ifdef BABEL_CLEANUP
tmp_toolbar_icon = create_pixmap (MWindow, "filenew.png");
tlbEmptyTraceset = gtk_toolbar_append_element (GTK_TOOLBAR (MToolbar1),
GTK_TOOLBAR_CHILD_BUTTON,
gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (MToolbar1)->children)->data))->label), TRUE);
gtk_widget_show (tlbEmptyTraceset);
gtk_container_set_border_width (GTK_CONTAINER (tlbEmptyTraceset), 1);
-
+#endif
tmp_toolbar_icon = create_pixmap (MWindow, "filenew.png");
tlbTab = gtk_toolbar_append_element (GTK_TOOLBAR (MToolbar1),
GTK_TOOLBAR_CHILD_BUTTON,
// g_signal_connect ((gpointer) EmptyTraceset, "activate",
// G_CALLBACK (on_empty_traceset_activate),
// NULL);
+#ifdef BABEL_CLEANUP
g_signal_connect ((gpointer) CloneTraceset, "activate",
G_CALLBACK (on_clone_traceset_activate),
NULL);
+#endif
g_signal_connect ((gpointer) Tab, "activate",
G_CALLBACK (on_tab_activate),
NULL);
g_signal_connect ((gpointer) About, "activate",
G_CALLBACK (on_about_activate),
NULL);
+#ifdef BABEL_CLEANUP
g_signal_connect ((gpointer) tlbEmptyTraceset, "clicked",
G_CALLBACK (on_button_new_clicked),
NULL);
+#endif
g_signal_connect ((gpointer) tlbTab, "clicked",
G_CALLBACK (on_button_new_tab_clicked),
NULL);
GLADE_HOOKUP_OBJECT (MWindow, FileMenuNewTitle, "FileMenuNewTitle");
GLADE_HOOKUP_OBJECT (MWindow, FileMenuNewTitle_menu, "FileMenuNewTitle_menu");
// GLADE_HOOKUP_OBJECT (MWindow, EmptyTraceset, "EmptyTraceset");
+#ifdef BABEL_CLEANUP
GLADE_HOOKUP_OBJECT (MWindow, CloneTraceset, "CloneTraceset");
GLADE_HOOKUP_OBJECT (MWindow, FileMenuNewSep, "FileMenuNewSep");
+#endif
GLADE_HOOKUP_OBJECT (MWindow, Tab, "Tab");
// GLADE_HOOKUP_OBJECT (MWindow, OpenTraceset, "OpenTraceset");
GLADE_HOOKUP_OBJECT (MWindow, Close, "Close");
GLADE_HOOKUP_OBJECT (MWindow, HelpmenuSeparator, "HelpmenuSeparator");
GLADE_HOOKUP_OBJECT (MWindow, About, "About");
GLADE_HOOKUP_OBJECT (MWindow, MToolbar1, "MToolbar1");
+#ifdef BABEL_CLEANUP
GLADE_HOOKUP_OBJECT (MWindow, tlbEmptyTraceset, "tlbEmptyTraceset");
+#endif BABEL_CLEANUP
GLADE_HOOKUP_OBJECT (MWindow, tlbTab, "tlbTab");
// GLADE_HOOKUP_OBJECT (MWindow, tlbOpenTraceset, "tlbOpenTraceset");
GLADE_HOOKUP_OBJECT (MWindow, tlbAddTrace, "tlbAddTrace");