* src/gtk/filesel.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Tue, 2 Sep 2003 19:12:07 +0000 (19:12 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Tue, 2 Sep 2003 19:12:07 +0000 (19:12 +0000)
remember last used dir when attaching multiple files (should fix
bug #290, "Attach File does not remember directory")

ChangeLog.claws
configure.ac
src/gtk/filesel.c

index 1c0d0f6..0b3017b 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-02 [alfons]    0.9.4claws55
+
+       * src/gtk/filesel.c
+               remember last used dir when attaching multiple files (should fix
+               bug #290, "Attach File does not remember directory")
+
 2003-09-01 [paul]      0.9.4claws54
 
        * po/es.po
index 14ae2f1..b4727ea 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=4
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=54
+EXTRA_VERSION=55
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index e4af38f..a6f0897 100644 (file)
@@ -156,6 +156,15 @@ GList *filesel_select_multiple_files(const gchar *title, const gchar *file)
                        fname = gtk_file_selection_get_filename(GTK_FILE_SELECTION(filesel));
                        list = g_list_append(list, g_strdup(fname));
                }
+               /* store dir of first entry */
+               if (NULL != (fname = list->data) && *fname) {
+                       gchar *dir;
+                       if (NULL != (dir = g_dirname(fname))) {
+                               g_free(cwd);
+                               cwd = g_strconcat(dir, G_DIR_SEPARATOR_S, NULL);
+                               g_free(dir); 
+                       }
+               }
        }
 
        manage_window_focus_out(filesel, NULL, NULL);