summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-10-30 18:58:16 +0000
committerjstebbins <[email protected]>2008-10-30 18:58:16 +0000
commit9834623a06e533d557ec8919e4238e207886f9a7 (patch)
tree8d88b3e4e0347fd8b4a1e7a81ddc5e0519c09588 /gtk/src/callbacks.c
parent39a4d09c458ecef7007890aaf9872842e041410f (diff)
LinGui: add handbrake version and preset used to activity log
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1882 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r--gtk/src/callbacks.c42
1 files changed, 35 insertions, 7 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index df8d82996..7e22de3ce 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -1401,9 +1401,20 @@ static void
submit_job(GValue *settings)
{
static gint unique_id = 1;
+ gchar *type, *modified, *preset;
+ GValue *path;
+ gboolean preset_modified;
g_debug("submit_job");
if (settings == NULL) return;
+ preset_modified = ghb_settings_get_boolean(settings, "preset_modified");
+ path = ghb_settings_get_value(settings, "preset");
+ preset = ghb_preset_path_string(path);
+ type = ghb_preset_is_custom() ? "Custom " : "";
+ modified = preset_modified ? "Modified " : "";
+ ghb_log("%s%sPreset: %s", modified, type, preset);
+ g_free(preset);
+
ghb_settings_set_int(settings, "job_unique_id", unique_id);
ghb_settings_set_int(settings, "job_status", GHB_QUEUE_RUNNING);
ghb_add_job (settings, unique_id);
@@ -1880,6 +1891,30 @@ ghb_log_cb(GIOChannel *source, GIOCondition cond, gpointer data)
}
void
+show_activity_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
+{
+ GtkWidget *widget = GHB_WIDGET (ud->builder, "activity_window");
+ gtk_widget_show (widget);
+}
+
+void
+ghb_log(gchar *log, ...)
+{
+ va_list args;
+ time_t _now;
+ struct tm *now;
+ gchar fmt[362];
+
+ _now = time(NULL);
+ now = localtime( &_now );
+ snprintf(fmt, 362, "[%02d:%02d:%02d] lingui: %s\n",
+ now->tm_hour, now->tm_min, now->tm_sec, log);
+ va_start(args, log);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
+}
+
+void
about_activate_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{
GtkWidget *widget = GHB_WIDGET (ud->builder, "hb_about");
@@ -1924,13 +1959,6 @@ hb_about_response_cb(GtkWidget *widget, gint response, signal_user_data_t *ud)
}
void
-show_activity_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
-{
- GtkWidget *widget = GHB_WIDGET (ud->builder, "activity_window");
- gtk_widget_show (widget);
-}
-
-void
show_queue_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{
GtkWidget *widget = GHB_WIDGET (ud->builder, "queue_window");