}
if(GTK_IS_TREE_VIEW(widget)) {
- gtk_tree_view_set_headers_clickable(widget, TRUE);
+ gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(widget), TRUE);
}
gtk_widget_add_events(widget, GDK_BUTTON_PRESS_MASK);
g_signal_connect (G_OBJECT(widget),
void
insert_viewer_wrap(GtkWidget *menuitem, gpointer user_data)
{
- guint val = 20;
-
insert_viewer((GtkWidget*)menuitem, (lttvwindow_viewer_constructor)user_data);
- // selected_hook(&val);
}
/* Set the tab's time window and current time if
* out of bounds */
if(ltt_time_compare(tab->time_window.start_time, time_span.start_time) < 0
- || ltt_time_compare( ltt_time_add(tab->time_window.start_time,
- tab->time_window.time_width),
+ || ltt_time_compare(tab->time_window.end_time,
time_span.end_time) > 0) {
new_time_window.start_time = time_span.start_time;
tmp_time.tv_sec = time_span.end_time.tv_sec;
tmp_time.tv_nsec = 0;
new_time_window.time_width = tmp_time ;
+ new_time_window.time_width_double = ltt_time_to_double(tmp_time);
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}
time_change_manager(tab, new_time_window);
current_time_change_manager(tab, new_current_time);
mw = lookup_widget(widget, "MWindow");
if(mw == NULL){
- g_printf("Main window does not exist\n");
+ g_info("Main window does not exist\n");
return NULL;
}
mw_data = (MainWindow *) g_object_get_data(G_OBJECT(mw),"main_window_data");
if(mw_data == NULL){
- g_printf("Main window data does not exist\n");
+ g_warning("Main window data does not exist\n");
return NULL;
}
return mw_data;
MainWindow * parent = get_window_data_struct(widget);
if(clone){
- g_printf("Clone : use the same traceset\n");
+ g_info("Clone : use the same traceset\n");
construct_main_window(parent);
}else{
- g_printf("Empty : traceset is set to NULL\n");
+ g_info("Empty : traceset is set to NULL\n");
construct_main_window(NULL);
}
}
if(child == NULL) return -1;
gint pos;
- GValue value = { 0, };
+ GValue value;
+ memset(&value, 0, sizeof(GValue));
g_value_init(&value, G_TYPE_INT);
gtk_container_child_get_property(GTK_CONTAINER(container),
child,
case GTK_RESPONSE_OK:
dir = gtk_file_selection_get_selections (file_selector);
traceset = lttv_traceset_load(dir[0]);
- g_printf("Open a trace set %s\n", dir[0]);
+ g_info("Open a trace set %s\n", dir[0]);
//Not finished yet
g_strfreev(dir);
case GTK_RESPONSE_REJECT:
lttv_traceset_context_position_destroy(events_request->start_position);
if(events_request->end_position != NULL)
lttv_traceset_context_position_destroy(events_request->end_position);
+ if(events_request->hooks != NULL)
+ g_array_free(events_request->hooks, TRUE);
if(events_request->before_chunk_traceset != NULL)
lttv_hooks_destroy(events_request->before_chunk_traceset);
if(events_request->before_chunk_trace != NULL)
gboolean lttvwindow_process_pending_requests(Tab *tab)
{
- unsigned max_nb_events;
- GdkWindow * win;
- GdkCursor * new;
GtkWidget* widget;
LttvTracesetContext *tsc;
LttvTracefileContext *tfc;
ltime = g_slist_append(ltime, g_slist_nth_data(list_out, 0));
for(iter=g_slist_nth(list_out,1);iter!=NULL;iter=g_slist_next(iter)) {
/* Find all time requests with the lowest start time in list_out */
- guint index_ltime = g_array_index(ltime, guint, 0);
EventsRequest *event_request_ltime = (EventsRequest*)g_slist_nth_data(ltime, 0);
EventsRequest *event_request_list_out = (EventsRequest*)iter->data;
events_request->event_by_id);
else {
guint nb_trace = lttv_traceset_number(tsc->ts);
- g_assert(events_request->trace < nb_trace &&
+ g_assert((guint)events_request->trace < nb_trace &&
events_request->trace > -1);
LttvTraceContext *tc = tsc->traces[events_request->trace];
events_request->event_by_id);
else {
guint nb_trace = lttv_traceset_number(tsc->ts);
- g_assert(events_request->trace < nb_trace &&
+ g_assert((guint)events_request->trace < nb_trace &&
events_request->trace > -1);
LttvTraceContext *tc = tsc->traces[events_request->trace];
events_request->event_by_id);
else {
guint nb_trace = lttv_traceset_number(tsc->ts);
- g_assert(events_request->trace < nb_trace &&
+ g_assert((guint)events_request->trace < nb_trace &&
events_request->trace > -1);
LttvTraceContext *tc = tsc->traces[events_request->trace];
{
/* 4. Call process traceset middle */
- g_debug("Calling process traceset middle with %p, %lu sec %lu nsec, %lu nb ev, %p end pos", tsc, end_time.tv_sec, end_time.tv_nsec, end_nb_events, end_position);
+ g_debug("Calling process traceset middle with %p, %lu sec %lu nsec, %u nb ev, %p end pos", tsc, end_time.tv_sec, end_time.tv_nsec, end_nb_events, end_position);
count = lttv_process_traceset_middle(tsc, end_time, end_nb_events, end_position);
tfc = lttv_traceset_context_get_current_tfc(tsc);
const char * dir;
char abs_path[PATH_MAX];
gint id;
- gint i;
MainWindow * mw_data = get_window_data_struct(widget);
GtkWidget * notebook = lookup_widget(widget, "MNotebook");
void save(GtkWidget * widget, gpointer user_data)
{
- g_printf("Save\n");
+ g_info("Save\n");
}
void save_as(GtkWidget * widget, gpointer user_data)
{
- g_printf("Save as\n");
+ g_info("Save as\n");
}
{
TimeInterval time_span;
TimeWindow new_time_window;
- LttTime current_time, time_delta, time_s, time_e, time_tmp;
+ LttTime current_time, time_delta;
MainWindow * mw_data = get_window_data_struct(widget);
LttvTracesetContext *tsc;
GtkWidget * notebook = lookup_widget(widget, "MNotebook");
if(size == 0){
new_time_window.start_time = time_span.start_time;
new_time_window.time_width = time_delta;
+ new_time_window.time_width_double = ltt_time_to_double(time_delta);
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}else{
new_time_window.time_width = ltt_time_div(new_time_window.time_width, size);
+ new_time_window.time_width_double =
+ ltt_time_to_double(new_time_window.time_width);
if(ltt_time_compare(new_time_window.time_width,time_delta) > 0)
{ /* Case where zoom out is bigger than trace length */
new_time_window.start_time = time_span.start_time;
new_time_window.time_width = time_delta;
+ new_time_window.time_width_double = ltt_time_to_double(time_delta);
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}
else
{
/* Center the image on the current time */
new_time_window.start_time =
- ltt_time_sub(current_time, ltt_time_div(new_time_window.time_width, 2.0));
+ ltt_time_sub(current_time,
+ ltt_time_from_double(new_time_window.time_width_double/2.0));
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
/* If on borders, don't fall off */
if(ltt_time_compare(new_time_window.start_time, time_span.start_time) <0)
{
new_time_window.start_time = time_span.start_time;
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}
else
{
- if(ltt_time_compare(
- ltt_time_add(new_time_window.start_time, new_time_window.time_width),
- time_span.end_time) > 0)
+ if(ltt_time_compare(new_time_window.end_time,
+ time_span.end_time) > 0)
{
new_time_window.start_time =
ltt_time_sub(time_span.end_time, new_time_window.time_width);
+
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width) ;
}
}
void go_to_time(GtkWidget * widget, gpointer user_data)
{
- g_printf("Go to time\n");
+ g_info("Go to time\n");
}
void show_time_frame(GtkWidget * widget, gpointer user_data)
{
- g_printf("Show time frame\n");
+ g_info("Show time frame\n");
}
GtkNotebook * notebook = (GtkNotebook *)lookup_widget(widget, "MNotebook");
if(notebook == NULL){
- g_printf("Notebook does not exist\n");
+ g_info("Notebook does not exist\n");
return NULL;
}
GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
MainWindow * mw_data = get_window_data_struct(widget);
notebook = lookup_widget(widget, "MNotebook");
if(notebook == NULL){
- g_printf("Notebook does not exist\n");
+ g_info("Notebook does not exist\n");
return;
}
gint page_num;
GtkWidget *notebook = lookup_widget(widget, "MNotebook");
if(notebook == NULL){
- g_printf("Notebook does not exist\n");
+ g_info("Notebook does not exist\n");
return;
}
on_cut_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_printf("Cut\n");
+ g_info("Cut\n");
}
on_copy_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_printf("Copye\n");
+ g_info("Copye\n");
}
on_paste_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_printf("Paste\n");
+ g_info("Paste\n");
}
on_delete_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_printf("Delete\n");
+ g_info("Delete\n");
}
s = g_object_get_data(G_OBJECT(w), "Traceset_Selector");
if(!s){
- g_printf("There is no viewer yet\n");
+ g_info("There is no viewer yet\n");
return;
}
if(get_filter_selection(s, "Configure trace and tracefile filter", "Select traces and tracefiles")){
on_trace_facility_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_printf("Trace facility selector: %s\n");
+ g_info("Trace facility selector: %s\n");
}
lttv_module_require(str1, &error);
#endif //0
lttv_library_load(str1, &error);
- if(error != NULL) g_warning(error->message);
- else g_printf("Load library: %s\n", str);
+ if(error != NULL) g_warning("%s", error->message);
+ else g_info("Load library: %s\n", str);
g_strfreev(dir);
case GTK_RESPONSE_REJECT:
case GTK_RESPONSE_CANCEL:
{
MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem);
- LttvLibrary *library;
- {
- GPtrArray *name;
- guint nb,i;
- gchar *lib_name;
- name = g_ptr_array_new();
- nb = lttv_library_number();
- LttvLibraryInfo *lib_info = g_new(LttvLibraryInfo,nb);
- /* ask for the library name */
+ LttvLibrary *library = NULL;
+
+ GPtrArray *name;
+ guint nb,i;
+ gchar *lib_name;
+ name = g_ptr_array_new();
+ nb = lttv_library_number();
+ LttvLibraryInfo *lib_info = g_new(LttvLibraryInfo,nb);
+ /* ask for the library name */
+ for(i=0;i<nb;i++){
+ LttvLibrary *iter_lib = lttv_library_get(i);
+ lttv_library_info(iter_lib, &lib_info[i]);
+
+ gchar *path = lib_info[i].name;
+ g_ptr_array_add(name, path);
+ }
+ lib_name = get_selection((char **)(name->pdata), name->len,
+ "Select a library", "Libraries");
+ if(lib_name != NULL) {
for(i=0;i<nb;i++){
- LttvLibrary *iter_lib = lttv_library_get(i);
- lttv_library_info(iter_lib, &lib_info[i]);
-
- gchar *path = lib_info[i].name;
- g_ptr_array_add(name, lib_info[i].name);
- }
- lib_name = get_selection((char **)(name->pdata), name->len,
- "Select a library", "Libraries");
- if(lib_name != NULL) {
- for(i=0;i<nb;i++){
- if(strcmp(lib_name, lib_info[i].name) == 0) {
- library = lttv_library_get(i);
- break;
- }
+ if(strcmp(lib_name, lib_info[i].name) == 0) {
+ library = lttv_library_get(i);
+ break;
}
}
- g_ptr_array_free(name, TRUE);
- g_free(lib_info);
-
- if(lib_name == NULL) return;
}
-
- lttv_library_unload(library);
+ g_ptr_array_free(name, TRUE);
+ g_free(lib_info);
+
+ if(lib_name == NULL) return;
+
+ if(library != NULL) lttv_library_unload(library);
}
GError *error = NULL;
MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem);
- LttvLibrary *library;
+ LttvLibrary *library = NULL;
{
GPtrArray *name;
guint nb,i;
}
lttv_module_require(module_name_out, &error);
- if(error != NULL) g_warning(error->message);
- else g_printf("Load module: %s\n", module_name_out);
+ if(error != NULL) g_warning("%s", error->message);
+ else g_info("Load module: %s", module_name_out);
#if 0
#endif //0
lttv_library_load(str1, &error);
if(error != NULL) g_warning(error->message);
- else g_printf("Load library: %s\n", str);
+ else g_info("Load library: %s\n", str);
g_strfreev(dir);
case GTK_RESPONSE_REJECT:
case GTK_RESPONSE_CANCEL:
if(lib_name == NULL) return;
}
- LttvModule *module;
+ LttvModule *module = NULL;
{
/* Ask for the module to load : list modules in the selected lib */
GPtrArray *name;
LttvModuleInfo module_info;
lttv_module_info(module, &module_info);
- g_printf("Release module: %s\n", module_info.name);
+ g_info("Release module: %s\n", module_info.name);
lttv_module_release(module);
}
on_color_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_printf("Color\n");
+ g_info("Color\n");
}
on_filter_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_printf("Filter\n");
+ g_info("Filter\n");
}
on_save_configuration_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_printf("Save configuration\n");
+ g_info("Save configuration\n");
}
on_content_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_printf("Content\n");
+ g_info("Content\n");
}
GtkWidget *label2 = gtk_label_new("");
gtk_misc_set_padding(GTK_MISC(label2), 10, 20);
gtk_label_set_markup(GTK_LABEL(label2), "\
-Project author: Karim Yaghmour\n\
-\n\
Contributors :\n\
\n\
Michel Dagenais (New trace format, lttv main)\n\
Mathieu Desnoyers (Directory structure, build with automake/conf,\n\
- lttv gui, control flow view, gui green threads\n\
- with interruptible foreground and background computation,\n\
- detailed event list)\n\
-Benoit Des Ligneris (Cluster adaptation)\n\
+ lttv gui, control flow view, gui cooperative trace reading\n\
+ scheduler with interruptible foreground and background\n\
+ computation, detailed event list)\n\
+Benoit Des Ligneris, Éric 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)");
+Tom Zanussi (RelayFS)\n\
+\n\
+Strongly 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, Copyright (C) 2004 Karim Yaghmour\n\
+Linux Trace Toolkit Viewer, Copyright (C) 2004 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.");
g_object_unref(main_window->attributes);
g_main_window_list = g_slist_remove(g_main_window_list, main_window);
- g_printf("There are now : %d windows\n",g_slist_length(g_main_window_list));
+ 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 ();
}
gpointer user_data)
{
MainWindow * mw_data = get_window_data_struct((GtkWidget*)widget);
- float width = event->width;
- TimeWindow time_win;
- double ratio;
- TimeInterval *time_span;
- LttTime time;
// MD : removed time width modification upon resizing of the main window.
// The viewers will redraw themselves completely, without time interval
LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
TimeInterval time_span = tsc->time_span;
LttTime start_time = new_time_window.start_time;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
/* Set scrollbar */
GtkAdjustment *adjustment = gtk_range_get_adjustment(GTK_RANGE(tab->scrollbar));
"lower",
0.0, /* lower */
"upper",
- ltt_time_to_double(upper)
- * NANOSECONDS_PER_SECOND, /* upper */
+ ltt_time_to_double(upper), /* upper */
"step_increment",
- ltt_time_to_double(new_time_window.time_width)
- / SCROLL_STEP_PER_PAGE
- * NANOSECONDS_PER_SECOND, /* step increment */
+ new_time_window.time_width_double
+ / SCROLL_STEP_PER_PAGE, /* step increment */
"page_increment",
- ltt_time_to_double(new_time_window.time_width)
- * NANOSECONDS_PER_SECOND, /* page increment */
+ new_time_window.time_width_double,
+ /* page increment */
"page_size",
- ltt_time_to_double(new_time_window.time_width)
- * NANOSECONDS_PER_SECOND, /* page size */
+ new_time_window.time_width_double, /* page size */
NULL);
gtk_adjustment_changed(adjustment);
// "value",
// ltt_time_to_double(
// ltt_time_sub(start_time, time_span.start_time))
- // * NANOSECONDS_PER_SECOND, /* value */
+ // , /* value */
// NULL);
//gtk_adjustment_value_changed(adjustment);
gtk_range_set_value(GTK_RANGE(tab->scrollbar),
ltt_time_to_double(
- ltt_time_sub(start_time, time_span.start_time))
- * NANOSECONDS_PER_SECOND /* value */);
+ ltt_time_sub(start_time, time_span.start_time)) /* value */);
/* set the time bar. */
/* start seconds */
TimeWindow new_time_window = tab->time_window;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
new_time_window.start_time.tv_sec = value;
new_time_window.start_time.tv_nsec = time_span.end_time.tv_nsec-1;
}
- /* check if end time selected is below or equal */
if(ltt_time_compare(new_time_window.start_time, end_time) >= 0) {
/* Then, we must push back end time : keep the same time width
* if possible, else end traceset time */
- end_time = LTT_TIME_MIN(time_span.end_time,
- ltt_time_add(new_time_window.start_time,
- new_time_window.time_width)
- );
+ end_time = LTT_TIME_MIN(ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width),
+ time_span.end_time);
}
/* Fix the time width to fit start time and end time */
new_time_window.time_width = ltt_time_sub(end_time,
new_time_window.start_time);
+ new_time_window.time_width_double =
+ ltt_time_to_double(new_time_window.time_width);
+
+ new_time_window.end_time = end_time;
time_change_manager(tab, new_time_window);
TimeWindow new_time_window = tab->time_window;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
new_time_window.start_time.tv_nsec = value;
- /* check if end time selected is below or equal */
if(ltt_time_compare(new_time_window.start_time, end_time) >= 0) {
/* Then, we must push back end time : keep the same time width
* if possible, else end traceset time */
- end_time = LTT_TIME_MIN(time_span.end_time,
- ltt_time_add(new_time_window.start_time,
- new_time_window.time_width)
- );
+ end_time = LTT_TIME_MIN(ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width),
+ time_span.end_time);
}
/* Fix the time width to fit start time and end time */
new_time_window.time_width = ltt_time_sub(end_time,
new_time_window.start_time);
+ new_time_window.time_width_double =
+ ltt_time_to_double(new_time_window.time_width);
+
+ new_time_window.end_time = end_time;
time_change_manager(tab, new_time_window);
TimeWindow new_time_window = tab->time_window;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
+
end_time.tv_sec = value;
/* end nanoseconds */
end_time.tv_nsec = time_span.end_time.tv_nsec;
}
- /* check if end time selected is below or equal */
if(ltt_time_compare(new_time_window.start_time, end_time) >= 0) {
/* Then, we must push front start time : keep the same time width
* if possible, else end traceset time */
- new_time_window.start_time = LTT_TIME_MAX(time_span.start_time,
- ltt_time_sub(end_time,
- new_time_window.time_width)
- );
+ new_time_window.start_time = LTT_TIME_MAX(
+ ltt_time_sub(end_time,
+ new_time_window.time_width),
+ time_span.start_time);
}
/* Fix the time width to fit start time and end time */
new_time_window.time_width = ltt_time_sub(end_time,
new_time_window.start_time);
+ new_time_window.time_width_double =
+ ltt_time_to_double(new_time_window.time_width);
+ new_time_window.end_time = end_time;
+
time_change_manager(tab, new_time_window);
}
TimeWindow new_time_window = tab->time_window;
- LttTime end_time = ltt_time_add(new_time_window.start_time,
- new_time_window.time_width);
+ LttTime end_time = new_time_window.end_time;
+
end_time.tv_nsec = value;
- /* check if end time selected is below or equal */
if(ltt_time_compare(new_time_window.start_time, end_time) >= 0) {
/* Then, we must push front start time : keep the same time width
* if possible, else end traceset time */
- new_time_window.start_time = LTT_TIME_MAX(time_span.start_time,
- ltt_time_sub(end_time,
- new_time_window.time_width)
- );
+ new_time_window.start_time = LTT_TIME_MAX(
+ ltt_time_sub(end_time,
+ new_time_window.time_width),
+ time_span.start_time);
}
/* Fix the time width to fit start time and end time */
new_time_window.time_width = ltt_time_sub(end_time,
new_time_window.start_time);
+ new_time_window.time_width_double =
+ ltt_time_to_double(new_time_window.time_width);
+ new_time_window.end_time = end_time;
time_change_manager(tab, new_time_window);
LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
TimeInterval time_span = tsc->time_span;
- time = ltt_time_add(ltt_time_from_double(value/NANOSECONDS_PER_SECOND),
+ time = ltt_time_add(ltt_time_from_double(value),
time_span.start_time);
new_time_window.start_time = time;
page_size = adjust->page_size;
new_time_window.time_width =
- ltt_time_from_double(page_size/NANOSECONDS_PER_SECOND);
+ ltt_time_from_double(page_size);
+
+ new_time_window.time_width_double =
+ page_size;
+
+ new_time_window.end_time = ltt_time_add(new_time_window.start_time,
+ new_time_window.time_width);
time_change_manager(tab, new_time_window);
//time = ltt_time_sub(time_span->end_time, time_span->start_time);
//time = ltt_time_mul(time, (float)ratio);
//time = ltt_time_add(time_span->start_time, time);
- time = ltt_time_add(ltt_time_from_double(value/NANOSECONDS_PER_SECOND),
+ time = ltt_time_add(ltt_time_from_double(value),
time_span.start_time);
time_window.start_time = time;
page_size = adjust->page_size;
time_window.time_width =
- ltt_time_from_double(page_size/NANOSECONDS_PER_SECOND);
+ ltt_time_from_double(page_size);
//time = ltt_time_sub(time_span.end_time, time);
//if(ltt_time_compare(time,time_window.time_width) < 0){
// time_window.time_width = time;
}
id = gtk_dialog_run(GTK_DIALOG(dialogue));
+ GtkTreeModel **store_model = (GtkTreeModel**)&store; /* for strict aliasing */
switch(id){
case GTK_RESPONSE_ACCEPT:
case GTK_RESPONSE_OK:
- if (gtk_tree_selection_get_selected (select, (GtkTreeModel**)&store, &iter)){
+ if (gtk_tree_selection_get_selected (select, store_model, &iter)){
gtk_tree_model_get ((GtkTreeModel*)store, &iter, MODULE_COLUMN, &unload_module_name, -1);
}
case GTK_RESPONSE_REJECT:
void add_all_menu_toolbar_constructors(MainWindow * mw, gpointer user_data)
{
- int i;
+ guint i;
GdkPixbuf *pixbuf;
lttvwindow_viewer_constructor constructor;
LttvMenus * global_menu, * instance_menu;
//create a default tab
notebook = (GtkNotebook *)lookup_widget(new_m_window->mwindow, "MNotebook");
if(notebook == NULL){
- g_printf("Notebook does not exist\n");
+ g_info("Notebook does not exist\n");
return;
}
//gtk_notebook_popup_enable (GTK_NOTEBOOK(notebook));
}
}
- g_printf("There are now : %d windows\n",g_slist_length(g_main_window_list));
+ g_info("There are now : %d windows\n",g_slist_length(g_main_window_list));
}
{
GList * list;
Tab * tab;
- LttTime tmp_time;
//create a new tab data structure
tab = g_new(Tab,1);