message = g_strdup_vprintf(format, ap);
va_end(ap);
- location = g_strdup_printf("%s:%s:%d:", file_name, function_name, line_number);
+ if (options && options->log_window.timer_data)
+ {
+ location = g_strdup_printf("%s:%s:%s:%d:", get_exec_time(), file_name,
+ function_name, line_number);
+ }
+ else
+ {
+ location = g_strdup_printf("%s:%s:%d:", file_name, function_name, line_number);
+ }
+
buf = g_strconcat(location, message, NULL);
log_domain_print_message(domain,buf);
g_free(location);
GtkWidget *bar;
GtkWidget *pause;
GtkWidget *wrap;
+ GtkWidget *timer_data;
GtkWidget *debug_level;
};
}
}
+static void log_window_timer_data_cb(GtkWidget *widget, gpointer data)
+{
+ LogWindow *logwin = data;
+
+ options->log_window.timer_data = !options->log_window.timer_data;
+}
+
static void log_window_regexp_cb(GtkWidget *text_entry, gpointer data)
{
gchar *new_regexp;
logwin->wrap = pref_button_new(hbox, NULL, "Line wrap", FALSE,
G_CALLBACK(log_window_line_wrap_cb), logwin);
+ logwin->timer_data = pref_button_new(hbox, NULL, "Timer data", FALSE,
+ G_CALLBACK(log_window_timer_data_cb), logwin);
+
pref_label_new(hbox, "Filter regexp");
textbox = gtk_entry_new();
options->log_window_lines = 1000;
options->log_window.line_wrap = TRUE;
options->log_window.paused = FALSE;
+ options->log_window.timer_data = FALSE;
return options;
}
struct {
gboolean paused;
gboolean line_wrap;
+ gboolean timer_data;
} log_window;
};
pref_spin_new_int(group, _("Debug level:"), NULL,
DEBUG_LEVEL_MIN, DEBUG_LEVEL_MAX, 1, get_debug_level(), &debug_c);
+ pref_checkbox_new_int(group, _("Timer data"),
+ options->log_window.timer_data, &c_options->log_window.timer_data);
+
pref_spin_new_int(group, _("Log Window max. lines:"), NULL,
1, 99999, 1, options->log_window_lines, &options->log_window_lines);
#endif
WRITE_NL(); WRITE_BOOL(*options, tools_restore_state);
WRITE_NL(); WRITE_UINT(*options, log_window_lines);
+ WRITE_NL(); WRITE_BOOL(*options, log_window.timer_data);
/* File operations Options */
WRITE_NL(); WRITE_BOOL(*options, file_ops.enable_in_place_rename);
if (READ_BOOL(*options, tools_restore_state)) continue;
if (READ_INT(*options, log_window_lines)) continue;
+ if (READ_BOOL(*options, log_window.timer_data)) continue;
/* Properties dialog options */
if (READ_CHAR(*options, properties.tabs_order)) continue;
gint h;
gint x;
gint y;
- gboolean paused;
} log_window;
gboolean tools_float;