+ tab->time_window.time_width = tmp_time ;
+ tab->current_time.tv_sec =
+ LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context)->
+ time_span.start_time.tv_sec;
+ tab->current_time.tv_nsec =
+ LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context)->
+ time_span.start_time.tv_nsec;
+ }
+#endif //0
+ tab->attributes = LTTV_IATTRIBUTE(g_object_new(LTTV_ATTRIBUTE_TYPE, NULL));
+ tab->interrupted_state = g_object_new(LTTV_ATTRIBUTE_TYPE, NULL);
+
+ tab->vbox = gtk_vbox_new(FALSE, 2);
+ tab->viewer_container = gtk_vbox_new(TRUE, 2);
+ tab->scrollbar = gtk_hscrollbar_new(NULL);
+ //tab->multivpaned = gtk_multi_vpaned_new();
+
+ gtk_box_pack_start(GTK_BOX(tab->vbox),
+ tab->viewer_container,
+ TRUE, /* expand */
+ TRUE, /* Give the extra space to the child */
+ 0); /* No padding */
+
+// if(copy_tab) {
+// tab->time_window = copy_tab->time_window;
+// tab->current_time = copy_tab->current_time;
+// }
+
+ /* Create the timebar */
+ {
+ tab->MTimebar = gtk_hbox_new(FALSE, 2);
+ gtk_widget_show(tab->MTimebar);
+ tab->tooltips = gtk_tooltips_new();
+
+ tab->MEventBox1a = gtk_event_box_new();
+ gtk_widget_show(tab->MEventBox1a);
+ gtk_tooltips_set_tip(tab->tooltips, tab->MEventBox1a,
+ "Paste Start and End Times Here", "");
+ tab->MText1a = gtk_label_new("Time Frame ");
+ gtk_widget_show(tab->MText1a);
+ gtk_container_add(GTK_CONTAINER(tab->MEventBox1a), tab->MText1a);
+ tab->MEventBox1b = gtk_event_box_new();
+ gtk_widget_show(tab->MEventBox1b);
+ gtk_tooltips_set_tip(tab->tooltips, tab->MEventBox1b,
+ "Paste Start Time Here", "");
+ tab->MText1b = gtk_label_new("start: ");
+ gtk_widget_show(tab->MText1b);
+ gtk_container_add(GTK_CONTAINER(tab->MEventBox1b), tab->MText1b);
+ tab->MText2 = gtk_label_new("s");
+ gtk_widget_show(tab->MText2);
+ tab->MText3a = gtk_label_new("ns");
+ gtk_widget_show(tab->MText3a);
+
+ tab->MEventBox3b = gtk_event_box_new();
+ gtk_widget_show(tab->MEventBox3b);
+ gtk_tooltips_set_tip(tab->tooltips, tab->MEventBox3b,
+ "Paste End Time Here", "");
+ tab->MText3b = gtk_label_new("end:");
+ gtk_widget_show(tab->MText3b);
+ gtk_container_add(GTK_CONTAINER(tab->MEventBox3b), tab->MText3b);
+ tab->MText4 = gtk_label_new("s");
+ gtk_widget_show(tab->MText4);
+ tab->MText5a = gtk_label_new("ns");
+ gtk_widget_show(tab->MText5a);
+
+ tab->MEventBox8 = gtk_event_box_new();
+ gtk_widget_show(tab->MEventBox8);
+ gtk_tooltips_set_tip(tab->tooltips, tab->MEventBox8,
+ "Paste Time Interval here", "");
+ tab->MText8 = gtk_label_new("Time Interval:");
+ gtk_widget_show(tab->MText8);
+ gtk_container_add(GTK_CONTAINER(tab->MEventBox8), tab->MText8);
+ tab->MText9 = gtk_label_new("s");
+ gtk_widget_show(tab->MText9);
+ tab->MText10 = gtk_label_new("ns");
+ gtk_widget_show(tab->MText10);
+
+ tab->MEventBox5b = gtk_event_box_new();
+ gtk_widget_show(tab->MEventBox5b);
+ gtk_tooltips_set_tip(tab->tooltips, tab->MEventBox5b,
+ "Paste Current Time Here", "");
+ tab->MText5b = gtk_label_new("Current Time:");
+ gtk_widget_show(tab->MText5b);
+ gtk_container_add(GTK_CONTAINER(tab->MEventBox5b), tab->MText5b);
+ tab->MText6 = gtk_label_new("s");
+ gtk_widget_show(tab->MText6);
+ tab->MText7 = gtk_label_new("ns");
+ gtk_widget_show(tab->MText7);
+
+ tab->MEntry1 = gtk_spin_button_new_with_range(0.0, 1.0, 1.0);
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tab->MEntry1),0);
+ gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(tab->MEntry1),TRUE);
+ gtk_widget_show(tab->MEntry1);
+ tab->MEntry2 = gtk_spin_button_new_with_range(0.0, 1.0, 1.0);
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tab->MEntry2),0);
+ gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(tab->MEntry2),TRUE);
+ gtk_widget_show(tab->MEntry2);
+ tab->MEntry3 = gtk_spin_button_new_with_range(0.0, 1.0, 1.0);
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tab->MEntry3),0);
+ gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(tab->MEntry3),TRUE);
+ gtk_widget_show(tab->MEntry3);
+ tab->MEntry4 = gtk_spin_button_new_with_range(0.0, 1.0, 1.0);
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tab->MEntry4),0);
+ gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(tab->MEntry4),TRUE);
+ gtk_widget_show(tab->MEntry4);
+ tab->MEntry5 = gtk_spin_button_new_with_range(0.0, 1.0, 1.0);
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tab->MEntry5),0);
+ gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(tab->MEntry5),TRUE);
+ gtk_widget_show(tab->MEntry5);
+ tab->MEntry6 = gtk_spin_button_new_with_range(0.0, 1.0, 1.0);
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tab->MEntry6),0);
+ gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(tab->MEntry6),TRUE);
+ gtk_widget_show(tab->MEntry6);
+ tab->MEntry7 = gtk_spin_button_new_with_range(0.0, 1.0, 1.0);
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tab->MEntry7),0);
+ gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(tab->MEntry7),TRUE);
+ gtk_widget_show(tab->MEntry7);
+ tab->MEntry8 = gtk_spin_button_new_with_range(0.0, 1.0, 1.0);
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(tab->MEntry8),0);
+ gtk_spin_button_set_snap_to_ticks(GTK_SPIN_BUTTON(tab->MEntry8),TRUE);
+ gtk_widget_show(tab->MEntry8);
+
+ GtkWidget *temp_widget;
+
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEventBox1a, FALSE,
+ FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEventBox1b, FALSE,
+ FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEntry1, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MText2, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEntry2, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MText3a, FALSE, FALSE, 0);
+ temp_widget = gtk_vseparator_new();
+ gtk_widget_show(temp_widget);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), temp_widget, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEventBox3b, FALSE,
+ FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEntry3, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MText4, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEntry4, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MText5a, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEventBox8, FALSE,
+ FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEntry7, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MText9, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MEntry8, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (tab->MTimebar), tab->MText10, FALSE, FALSE, 0);
+
+ temp_widget = gtk_vseparator_new();
+ gtk_widget_show(temp_widget);
+ gtk_box_pack_end (GTK_BOX (tab->MTimebar), tab->MText7, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (tab->MTimebar), tab->MEntry6, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (tab->MTimebar), tab->MText6, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (tab->MTimebar), tab->MEntry5, FALSE, FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (tab->MTimebar), tab->MEventBox5b, FALSE,
+ FALSE, 0);
+ gtk_box_pack_end (GTK_BOX (tab->MTimebar), temp_widget, FALSE, FALSE, 0);
+
+
+ //GtkWidget *test = gtk_button_new_with_label("drop");
+ //gtk_button_set_relief(GTK_BUTTON(test), GTK_RELIEF_NONE);
+ //gtk_widget_show(test);
+ //gtk_box_pack_end(GTK_BOX (tab->MTimebar), test, FALSE, FALSE, 0);
+ //gtk_widget_add_events(tab->MText1, GDK_ALL_EVENTS_MASK);//GDK_BUTTON_PRESS_MASK);
+ /*GtkWidget *event_box = gtk_event_box_new();
+ gtk_widget_show(event_box);
+ gtk_tooltips_set_tip(tooltips, event_box,
+ "Paste Current Time Here", "");
+ gtk_box_pack_end(GTK_BOX (tab->MTimebar), event_box, FALSE, FALSE, 0);
+ GtkWidget *test = gtk_label_new("drop");
+ gtk_container_add(GTK_CONTAINER(event_box), test);
+ gtk_widget_show(test);
+ g_signal_connect (G_OBJECT(event_box),
+ "button-press-event",
+ G_CALLBACK (on_MText1_paste),
+ (gpointer)tab);
+*/
+
+ g_signal_connect (G_OBJECT(tab->MEventBox1a),
+ "button-press-event",
+ G_CALLBACK (on_MEventBox1a_paste),
+ (gpointer)tab);
+
+ g_signal_connect (G_OBJECT(tab->MEventBox1b),
+ "button-press-event",
+ G_CALLBACK (on_MEventBox1b_paste),
+ (gpointer)tab);
+ g_signal_connect (G_OBJECT(tab->MEventBox3b),
+ "button-press-event",
+ G_CALLBACK (on_MEventBox3b_paste),
+ (gpointer)tab);
+ g_signal_connect (G_OBJECT(tab->MEventBox5b),
+ "button-press-event",
+ G_CALLBACK (on_MEventBox5b_paste),
+ (gpointer)tab);
+ g_signal_connect (G_OBJECT(tab->MEventBox8),
+ "button-press-event",
+ G_CALLBACK (on_MEventBox8_paste),
+ (gpointer)tab);
+ }
+
+ gtk_box_pack_end(GTK_BOX(tab->vbox),
+ tab->scrollbar,
+ FALSE, /* Do not expand */
+ FALSE, /* Fill has no effect here (expand false) */
+ 0); /* No padding */
+
+ gtk_box_pack_end(GTK_BOX(tab->vbox),
+ tab->MTimebar,
+ FALSE, /* Do not expand */
+ FALSE, /* Fill has no effect here (expand false) */
+ 0); /* No padding */
+
+ g_object_set_data(G_OBJECT(tab->viewer_container), "focused_viewer", NULL);
+
+
+ tab->mw = mw;
+
+ /*{
+ // Display a label with a X
+ GtkWidget *w_hbox = gtk_hbox_new(FALSE, 4);
+ GtkWidget *w_label = gtk_label_new (label);
+ GtkWidget *pixmap = create_pixmap(GTK_WIDGET(notebook), "close.png");
+ GtkWidget *w_button = gtk_button_new ();
+ gtk_container_add(GTK_CONTAINER(w_button), pixmap);
+ //GtkWidget *w_button = gtk_button_new_with_label("x");
+
+ gtk_button_set_relief(GTK_BUTTON(w_button), GTK_RELIEF_NONE);
+
+ gtk_box_pack_start(GTK_BOX(w_hbox), w_label, TRUE, TRUE, 0);
+ gtk_box_pack_end(GTK_BOX(w_hbox), w_button, FALSE,
+ FALSE, 0);
+
+ g_signal_connect_swapped (w_button, "clicked",
+ G_CALLBACK (on_close_tab_X_clicked),
+ tab->multi_vpaned);
+
+ gtk_widget_set_state(w_button, GTK_STATE_ACTIVE);
+
+ gtk_widget_show (w_label);
+ gtk_widget_show (pixmap);
+ gtk_widget_show (w_button);
+ gtk_widget_show (w_hbox);
+
+ tab->label = w_hbox;
+ }*/
+
+
+ tab->label = gtk_label_new (label);
+
+ gtk_widget_show(tab->label);
+ gtk_widget_show(tab->scrollbar);
+ gtk_widget_show(tab->viewer_container);
+ gtk_widget_show(tab->vbox);
+ //gtk_widget_show(tab->multivpaned);
+