[gthumb/gthumb-3-2] video screenshot: fixed setting of the default destination



commit 2105f39b50b02e486dece2768adbb8b7910e6ac1
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Jul 10 15:30:15 2013 +0200

    video screenshot: fixed setting of the default destination
    
    the default value is 'file://~'; use PICTURES as default
    destination.

 extensions/gstreamer_tools/actions.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/extensions/gstreamer_tools/actions.c b/extensions/gstreamer_tools/actions.c
index a2bd807..86cdc51 100644
--- a/extensions/gstreamer_tools/actions.c
+++ b/extensions/gstreamer_tools/actions.c
@@ -146,8 +146,15 @@ screenshot_ready_cb (GdkPixbuf *pixbuf,
                int          attempt;
 
                last_uri = g_settings_get_string (save_data->settings, 
PREF_GSTREAMER_TOOLS_SCREESHOT_LOCATION);
-               if ((last_uri == NULL) || (strcmp (last_uri, "~") == 0))
-                       last_folder = g_file_new_for_path (g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP));
+               if ((last_uri == NULL) || (strcmp (last_uri, "~") == 0) || (strcmp (last_uri, "file://~") == 
0)) {
+                       const char *dir;
+
+                       dir = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
+                       if (dir != NULL)
+                               last_folder = g_file_new_for_path (dir);
+                       else
+                               last_folder = g_file_new_for_uri (get_home_uri ());
+               }
                else
                        last_folder = g_file_new_for_uri (last_uri);
                gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (file_sel), last_folder, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]