Skip to content

Commit

Permalink
filechooser: Support current_folder with OpenFile
Browse files Browse the repository at this point in the history
  • Loading branch information
sophie-h authored and smcv committed Aug 31, 2023
1 parent b6a8b0a commit c1334aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/filechooser.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,12 @@ handle_open (XdpImplFileChooser *object,
}
g_slist_free_full (filters, g_object_unref);

if (strcmp (method_name, "SaveFile") == 0)
if (strcmp (method_name, "OpenFile") == 0)
{
if (g_variant_lookup (arg_options, "current_folder", "^&ay", &path))
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), path);
}
else if (strcmp (method_name, "SaveFile") == 0)
{
if (g_variant_lookup (arg_options, "current_name", "&s", &current_name))
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), current_name);
Expand Down

0 comments on commit c1334aa

Please sign in to comment.