Commit 7f065b37 authored by Chun-wei Fan's avatar Chun-wei Fan

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.
parent f534c971
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment