[gtk] Fix the build with docs



commit 3735c9d1553f31885cd8d1ab3549f7dfd36df6c3
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Feb 24 08:22:22 2020 -0500

    Fix the build with docs
    
    This is fallout from filechooser api changes.

 docs/tools/widgets.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index d3ec172f79..0dd0cda76f 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -593,6 +593,7 @@ create_file_button (void)
   GtkWidget *vbox2;
   GtkWidget *picker;
   char *path;
+  GFile *file;
 
   vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
   vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
@@ -615,8 +616,10 @@ create_file_button (void)
                                        GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
   gtk_widget_set_size_request (picker, 150, -1);
   path = g_build_filename (g_get_home_dir (), "Documents", NULL);
-  gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (picker), path);
+  file = g_file_new_for_path (path);
+  gtk_file_chooser_set_file (GTK_FILE_CHOOSER (picker), file, NULL);
   g_free (path);
+  g_object_unref (file);
   gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
   gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
   gtk_container_add (GTK_CONTAINER (vbox2), picker);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]