diff options
Diffstat (limited to 'src/gns/gnunet-gns-gtk.c')
-rw-r--r-- | src/gns/gnunet-gns-gtk.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gns/gnunet-gns-gtk.c b/src/gns/gnunet-gns-gtk.c index 4751f24a..da5ee2e8 100644 --- a/src/gns/gnunet-gns-gtk.c +++ b/src/gns/gnunet-gns-gtk.c | |||
@@ -175,6 +175,7 @@ GNUNET_GNS_GTK_open_imagemenuitem_activate_cb (GtkMenuItem *menuitem, | |||
175 | GtkWidget *ad; | 175 | GtkWidget *ad; |
176 | GtkBuilder *builder; | 176 | GtkBuilder *builder; |
177 | GtkWidget *toplevel; | 177 | GtkWidget *toplevel; |
178 | GtkFileFilter *ff; | ||
178 | 179 | ||
179 | builder = | 180 | builder = |
180 | GNUNET_GTK_get_new_builder ("gnunet_gns_gtk_zone_open.glade", NULL); | 181 | GNUNET_GTK_get_new_builder ("gnunet_gns_gtk_zone_open.glade", NULL); |
@@ -183,9 +184,15 @@ GNUNET_GNS_GTK_open_imagemenuitem_activate_cb (GtkMenuItem *menuitem, | |||
183 | GNUNET_break (0); | 184 | GNUNET_break (0); |
184 | return; | 185 | return; |
185 | } | 186 | } |
187 | /* This file filter could be set with glade if we use gtk3 | ||
188 | * With gtk2 we have to set it manually */ | ||
189 | ff = GTK_FILE_FILTER (gtk_builder_get_object | ||
190 | (builder, "GNUNET_GNS_GTK_zone_open_filefilter")); | ||
191 | gtk_file_filter_add_pattern (ff, "*.zkey"); | ||
192 | |||
186 | ad = GTK_WIDGET (gtk_builder_get_object | 193 | ad = GTK_WIDGET (gtk_builder_get_object |
187 | (builder, "GNUNET_GNS_GTK_zone_open_filechooserdialog")); | 194 | (builder, "GNUNET_GNS_GTK_zone_open_filechooserdialog")); |
188 | toplevel = gtk_widget_get_toplevel (menuitem); | 195 | toplevel = gtk_widget_get_toplevel (GTK_WIDGET (menuitem)); |
189 | if (GTK_IS_WINDOW (toplevel)) | 196 | if (GTK_IS_WINDOW (toplevel)) |
190 | gtk_window_set_transient_for (GTK_WINDOW (ad), GTK_WINDOW (toplevel)); | 197 | gtk_window_set_transient_for (GTK_WINDOW (ad), GTK_WINDOW (toplevel)); |
191 | gtk_window_present (GTK_WINDOW (ad)); | 198 | gtk_window_present (GTK_WINDOW (ad)); |