filechoosernativewin32: Set default extension
Setting the default extension before a filter is selected allows the IFileDialog to automatically change the extension when the filter is changed. See: https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifiledialog-setdefaultextension
This commit is contained in:
parent
10689066e3
commit
c1aec7f100
@ -610,6 +610,10 @@ filechooser_win32_thread (gpointer _data)
|
|||||||
if (FAILED (hr))
|
if (FAILED (hr))
|
||||||
g_warning_hr ("Can't set file types", hr);
|
g_warning_hr ("Can't set file types", hr);
|
||||||
|
|
||||||
|
hr = IFileDialog_SetDefaultExtension (pfd, L"");
|
||||||
|
if (FAILED (hr))
|
||||||
|
g_warning_hr ("Can't set default extension", hr);
|
||||||
|
|
||||||
if (data->self->current_filter)
|
if (data->self->current_filter)
|
||||||
{
|
{
|
||||||
GSList *filters = gtk_file_chooser_list_filters (GTK_FILE_CHOOSER (data->self));
|
GSList *filters = gtk_file_chooser_list_filters (GTK_FILE_CHOOSER (data->self));
|
||||||
|
Loading…
Reference in New Issue
Block a user