[Xfce4-commits] [apps/xfburn] 01/01: Remember the last directory of the data filechooser

noreply at xfce.org noreply at xfce.org
Tue Apr 8 07:22:39 CEST 2014


This is an automated email from the git hooks/post-receive script.

squisher pushed a commit to branch master
in repository apps/xfburn.

commit 3194115405e4a774c7b8fd1853bc2d05a9f0cc17
Author: David Mohr <david at mcbf.net>
Date:   Mon Apr 7 23:21:36 2014 -0600

    Remember the last directory of the data filechooser
    
    This makes adding files from related locations easier.
---
 xfburn/xfburn-data-composition.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xfburn/xfburn-data-composition.c b/xfburn/xfburn-data-composition.c
index 57884b0..4444f25 100644
--- a/xfburn/xfburn-data-composition.c
+++ b/xfburn/xfburn-data-composition.c
@@ -176,6 +176,7 @@ typedef struct
   GtkWidget *progress;
   GtkTreeStore *model;
   GtkWidget *add_filechooser;
+  gchar * last_directory;
   GtkWidget *add_window;
 
   gchar *default_vol_name;
@@ -913,6 +914,8 @@ add_cb (GtkWidget * widget, gpointer data)
     GString  * str = g_string_new(NULL);
     GSList * curr;
 
+    priv->last_directory = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER(priv->add_filechooser));
+
     for (curr = list; curr!=NULL; curr = curr->next) {
         g_string_append(str, curr->data);
         g_string_append_c(str, '\n');;
@@ -948,6 +951,8 @@ select_files (XfburnDataComposition * dc)
     priv->add_filechooser = gtk_file_chooser_widget_new (GTK_FILE_CHOOSER_ACTION_OPEN);
 
     gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER(priv->add_filechooser), TRUE);
+    if (priv->last_directory)
+      gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(priv->add_filechooser), priv->last_directory);
 
     vbox = gtk_vbox_new (FALSE, 0);
     gtk_container_add(GTK_CONTAINER(window), vbox);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list