gtk/gtkfilechoosernativeportal.c: Fix on C89 compilers

Make sure we declare variables at the top of the block-we can't declare
variables in a for loop initilization in this case.
This commit is contained in:
Chun-wei Fan 2020-07-16 18:31:37 +08:00
parent 6f54881851
commit dd5fd12343

View File

@ -138,7 +138,9 @@ response_cb (GDBusConnection *connection,
*/
GtkFileFilter *filter_to_select = filter;
GSList *filters = gtk_file_chooser_list_filters (GTK_FILE_CHOOSER (self));
for (GSList *l = filters; l; l = l->next)
GSList *l;
for (l = filters; l; l = l->next)
{
GtkFileFilter *f = l->data;
if (g_strcmp0 (gtk_file_filter_get_name (f), current_filter_name) == 0)