summaryrefslogtreecommitdiffstats
path: root/gtk/src/main.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-09-25 14:38:21 +0000
committerjstebbins <[email protected]>2008-09-25 14:38:21 +0000
commit0a66557bbd0c429e27463d8bb3fe1918e44b344b (patch)
tree51aa5dbf53bc24f60e021f311f96d9c1a845da97 /gtk/src/main.c
parentb6e78bffa6baa8adb7436a9e41a392c4544aacc3 (diff)
LinGui: Store the activity log in the users config dir instead of PWD.
Display the location of the activity log in the activity window. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1761 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/main.c')
-rw-r--r--gtk/src/main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c
index ed07b5ca3..c03c15032 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -385,6 +385,7 @@ IoRedirect(signal_user_data_t *ud)
{
GIOChannel *channel;
gint pfd[2];
+ gchar *config, *path;
// I'm opening a pipe and attaching the writer end to stderr
// The reader end will be polled by main event loop and I'll get
@@ -396,7 +397,12 @@ IoRedirect(signal_user_data_t *ud)
}
// Open activity log.
// TODO: Put this in the same directory as the encode destination
- ud->activity_log = g_io_channel_new_file ("Activity.log", "w", NULL);
+ config = ghb_get_user_config_dir();
+ path = g_strdup_printf("%s/%s", config, "Activity.log");
+ ud->activity_log = g_io_channel_new_file (path, "w", NULL);
+ ghb_ui_update(ud, "activity_location", ghb_string_value(path));
+ g_free(path);
+ g_free(config);
// Set encoding to raw.
g_io_channel_set_encoding (ud->activity_log, NULL, NULL);
stderr->_fileno = pfd[1];
@@ -492,11 +498,11 @@ main (int argc, char *argv[])
ud->current_job = NULL;
ud->current_dvd_device = NULL;
ud->dont_clear_presets = FALSE;
- // Redirect stderr to the activity window
- IoRedirect(ud);
// Enable events that alert us to media change events
watch_volumes (ud);
ud->builder = create_builder_or_die (BUILDER_NAME);
+ // Redirect stderr to the activity window
+ IoRedirect(ud);
ghb_init_dep_map();
// Need to connect x264_options textview buffer to the changed signal