FileDialog: initial-file didnʼt set initial-folder
authorDaniel Boles <dboles.src@gmail.com>
Thu, 22 Jun 2023 21:33:14 +0000 (22:33 +0100)
committerDaniel Boles <dboles.src@gmail.com>
Thu, 22 Jun 2023 21:33:14 +0000 (22:33 +0100)
We always set :initial-folder to NULL and then notified about that,
instead of setting it to the folder of the :initial-file as we say.

gtk/gtkfiledialog.c

index 746a54cb3d66311301652b2094381e52a30f8044..6735833754d79e90ca96f71ebf699b0de2d9ab49 100644 (file)
@@ -703,7 +703,7 @@ gtk_file_dialog_set_initial_file (GtkFileDialog *self,
       if (folder == NULL)
         goto invalid_file;
 
-      if (g_set_object (&self->initial_folder, NULL))
+      if (g_set_object (&self->initial_folder, folder))
         g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_INITIAL_FOLDER]);
 
       info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME, 0, NULL, NULL);