*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
{
/* 5. After process traceset middle */
- LttTime curTime = lttv_traceset_get_current_time(ts);
/* - if the iterator is not valid anymore (got to the end) */
if(bt_ctf_iter_read_event(ts->iter) == NULL) {
/* - For each req in list_in */
}
#undef list_out
+#ifdef BABEL_CLEANUP
/**
Manage the periodic update of a live trace
*/
static gboolean
live_trace_update_handler(Tab *tab)
{
-#ifdef BABEL_CLEANUP
+
unsigned int updated_count;
LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
TimeInterval initial_time_span = tsc->time_span;
/* Timer will be recalled as long as there is files to update */
return (updated_count > 0);
-#endif /* BABEL_CLEANUP */
}
-
+#endif /* BABEL_CLEANUP */
+#ifdef BABEL_CLEANUP
static void lttvwindow_add_trace(Tab *tab, LttvTrace *trace_v)
{
-#ifdef BABEL_CLEANUP
+
LttvTraceset *traceset = tab->traceset_info->traceset;
guint i;
guint num_traces = lttv_traceset_number(traceset);
(GSourceFunc) live_trace_update_handler,
tab);
}
-#endif /* BABEL_CLEANUP */
-}
+}
+#endif /* BABEL_CLEANUP */
/* add_trace adds a trace into the current traceset. It first displays a
* directory selection dialogue to let user choose a trace, then recreates
* tracset_context, and redraws all the viewer of the current tab
}
-static void
-on_about_close_activate (GtkButton *button,
- gpointer user_data)
-{
- GtkWidget *about_widget = GTK_WIDGET(user_data);
-
- gtk_widget_destroy(about_widget);
-}
-
void
on_about_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
MainWindow *main_window = get_window_data_struct(GTK_WIDGET(menuitem));
- GtkWidget *window_widget = main_window->mwindow;
- GtkWidget *about_widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- GtkWindow *about_window = GTK_WINDOW(about_widget);
-
- gtk_window_set_title(about_window, "About Linux Trace Toolkit");
-
- gtk_window_set_resizable(about_window, FALSE);
- gtk_window_set_transient_for(about_window, GTK_WINDOW(window_widget));
- gtk_window_set_destroy_with_parent(about_window, TRUE);
- gtk_window_set_modal(about_window, FALSE);
-
- /* Put the about window at the center of the screen */
- gtk_window_set_position(about_window, GTK_WIN_POS_CENTER_ALWAYS);
- GtkWidget *vbox = gtk_vbox_new(FALSE, 1);
-
- gtk_container_add(GTK_CONTAINER(about_widget), vbox);
-
- /* Text to show */
- GtkWidget *label1 = gtk_label_new("");
- gtk_misc_set_padding(GTK_MISC(label1), 10, 20);
- gtk_label_set_markup(GTK_LABEL(label1), "\
-<big>Linux Trace Toolkit " VERSION "</big>");
- gtk_label_set_justify(GTK_LABEL(label1), GTK_JUSTIFY_CENTER);
-
- GtkWidget *label2 = gtk_label_new("");
- gtk_misc_set_padding(GTK_MISC(label2), 10, 20);
- gtk_label_set_markup(GTK_LABEL(label2), "\
-Contributors :\n\
-\n\
-Michel Dagenais (New trace format, lttv main)\n\
-Mathieu Desnoyers (Kernel Tracer, Directory structure, build with automake/conf,\n\
- lttv gui, control flow view, gui cooperative trace reading\n\
- scheduler with interruptible foreground and background\n\
- computation, detailed event list (rewrite), trace reading\n\
- library (rewrite))\n\
-Benoit Des Ligneris, Eric Clement (Cluster adaptation, work in progress)\n\
-Xang-Xiu Yang (new trace reading library and converter, lttv gui, \n\
- detailed event list and statistics view)\n\
-Tom Zanussi (RelayFS)\n\
-\n\
-Inspired from the original Linux Trace Toolkit Visualizer made by\n\
-Karim Yaghmour");
-
- GtkWidget *label3 = gtk_label_new("");
- gtk_label_set_markup(GTK_LABEL(label3), "\
-Linux Trace Toolkit Viewer, Copyright (C) 2004, 2005, 2006\n\
- Michel Dagenais\n\
- Mathieu Desnoyers\n\
- Xang-Xiu Yang\n\
-Linux Trace Toolkit comes with ABSOLUTELY NO WARRANTY.\n\
-This is free software, and you are welcome to redistribute it\n\
-under certain conditions. See COPYING for details.");
- gtk_misc_set_padding(GTK_MISC(label3), 10, 20);
-
- gtk_box_pack_start_defaults(GTK_BOX(vbox), label1);
- gtk_box_pack_start_defaults(GTK_BOX(vbox), label2);
- gtk_box_pack_start_defaults(GTK_BOX(vbox), label3);
-
- GtkWidget *hbox = gtk_hbox_new(TRUE, 0);
- gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
- GtkWidget *close_button = gtk_button_new_with_mnemonic("_Close");
- gtk_box_pack_end(GTK_BOX(hbox), close_button, FALSE, FALSE, 0);
- gtk_container_set_border_width(GTK_CONTAINER(close_button), 20);
-
- g_signal_connect(G_OBJECT(close_button), "clicked",
- G_CALLBACK(on_about_close_activate),
- (gpointer)about_widget);
+ gchar * authors[] = { "Yannick Brosseau",
+ "Francis Deslauriers",
+ "Mathieu Desnoyer",
+ "Michel Dagenais",
+ "Benoit Des Ligneris",
+ "Eric Clement",
+ "Xang-Xiu Yang",
+ "Tom Zanussi",
+ NULL };
+
+ static const gchar *comments = "Trace visualiser for LTTng 2.x data\
+\nInspired from the original Linux Trace Toolkit Visualizer made by Karim Yaghmour";
- gtk_widget_show_all(about_widget);
+ static const gchar *copyright = "Copyright \xc2\xa9 2004-2013";
+
+ gtk_show_about_dialog((GtkWindow *)main_window->mwindow,
+ "authors", authors,
+ "comments", comments,
+ "version", VERSION,
+ "program-name", "LTTV",
+ "license", "GPLv2, see COPYING file for details",
+ "website", "http://lttng.org/lttv/",
+ "copyright", copyright,
+ NULL);
}
#else
GtkWidget *dialogue =
gtk_message_dialog_new(
- GTK_WINDOW(gtk_widget_get_toplevel(button)),
+ GTK_WINDOW(gtk_widget_get_toplevel((GtkWidget *)button)),
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,