This is an automated email from the git hooks/post-receive script. eric pushed a commit to branch master in repository apps/ristretto.
commit 6c5a2323b7c293e4a3b9894c1fb9584a1163797d Author: Marc Schink <xfce-...@marcschink.de> Date: Tue Sep 1 17:43:36 2015 +0200 Remember last location in save-copy dialog. The save-copy dialog now uses the location where the last copy of an image was stored as default location. Signed-off-by: Eric Koegel <eric.koe...@gmail.com> --- src/main_window.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main_window.c b/src/main_window.c index 87170da..41e6309 100644 --- a/src/main_window.c +++ b/src/main_window.c @@ -131,6 +131,8 @@ struct _RsttoMainWindowPriv gint play_timeout_id; GtkFileFilter *filter; + + gchar *last_copy_folder_uri; }; enum @@ -773,6 +775,8 @@ rstto_main_window_init (RsttoMainWindow *window) window->priv->settings_manager = rstto_settings_new(); window->priv->thumbnailer = rstto_thumbnailer_new(); + window->priv->last_copy_folder_uri = NULL; + /* Setup the image filter list for drag and drop */ window->priv->filter = gtk_file_filter_new (); g_object_ref_sink (window->priv->filter); @@ -1194,6 +1198,12 @@ rstto_main_window_dispose(GObject *object) window->priv->thumbnailer = NULL; } + if (window->priv->last_copy_folder_uri) + { + g_free (window->priv->last_copy_folder_uri); + window->priv->last_copy_folder_uri = NULL; + } + if (window->priv->action_group) { g_object_unref (window->priv->action_group); @@ -3176,6 +3186,11 @@ cb_rstto_main_window_save_copy (GtkWidget *widget, RsttoMainWindow *window) GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); + + if (window->priv->last_copy_folder_uri) + gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (dialog), + window->priv->last_copy_folder_uri); + gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), rstto_file_get_display_name (r_file)); @@ -3201,6 +3216,10 @@ cb_rstto_main_window_save_copy (GtkWidget *widget, RsttoMainWindow *window) gtk_dialog_run(GTK_DIALOG(err_dialog)); gtk_widget_destroy(err_dialog); } + + g_free (window->priv->last_copy_folder_uri); + window->priv->last_copy_folder_uri = gtk_file_chooser_get_current_folder_uri ( + GTK_FILE_CHOOSER (dialog)); } gtk_widget_destroy(dialog); -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits