gtk/gtkfilechoosernativewin32.c: Declare variables at top-of-block
Since GTK+-3.22.x is not advertised to use C99, make sure that the build works on pre-C99 compilers such as pre-2013 Visual Studio.
This commit is contained in:
@@ -239,13 +239,16 @@ ifiledialogevents_OnTypeChange (IFileDialogEvents * self,
|
||||
FileDialogEvents *events = (FileDialogEvents *) self;
|
||||
UINT fileType;
|
||||
HRESULT hr = IFileDialog_GetFileTypeIndex (pfd, &fileType);
|
||||
GSList *filters;
|
||||
|
||||
if (FAILED (hr))
|
||||
{
|
||||
g_warning_hr ("Can't get current file type", hr);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
fileType--; // fileTypeIndex starts at 1
|
||||
GSList *filters = gtk_file_chooser_list_filters (GTK_FILE_CHOOSER (events->data->self));
|
||||
filters = gtk_file_chooser_list_filters (GTK_FILE_CHOOSER (events->data->self));
|
||||
events->data->self->current_filter = g_slist_nth_data (filters, fileType);
|
||||
g_slist_free (filters);
|
||||
g_object_notify (G_OBJECT (events->data->self), "filter");
|
||||
|
||||
Reference in New Issue
Block a user