[gtk/wip/otte/diediedie] gtk: Remove GtkFileChooserButton




commit eb9c204535962fd2918d1338a292a42b32c3ae10
Author: Benjamin Otte <otte redhat com>
Date:   Wed Dec 2 20:15:28 2020 +0100

    gtk: Remove GtkFileChooserButton
    
    ... as discussed in the meeting.

 demos/gtk-demo/listview_words.c                    |   36 +-
 demos/gtk-demo/paintable_svg.c                     |   57 +-
 demos/gtk-demo/pickers.c                           |   38 -
 demos/widget-factory/widget-factory.ui             |    3 -
 docs/reference/gtk/gtk4-docs.xml                   |    1 -
 docs/reference/gtk/gtk4-sections.txt               |   25 -
 docs/reference/gtk/gtk4.types.in                   |    1 -
 docs/tools/widgets.c                               |   46 -
 gtk/gtk-autocleanups.h                             |    1 -
 gtk/gtk.h                                          |    1 -
 gtk/gtkfilechooser.c                               |   11 +-
 gtk/gtkfilechooserbutton.c                         | 2930 --------------------
 gtk/gtkfilechooserbutton.h                         |   62 -
 gtk/meson.build                                    |    2 -
 tests/meson.build                                  |    1 -
 tests/testfilechooserbutton.c                      |  283 --
 testsuite/gtk/defaultvalue.c                       |    3 +-
 testsuite/gtk/focus-chain/widget-factory.tab       |    1 -
 .../gtk/focus-chain/widget-factory.tab-backward    |    1 -
 testsuite/gtk/focus-chain/widget-factory.ui        |    3 -
 testsuite/gtk/focus-chain/widget-factory2.ui       |    3 -
 testsuite/gtk/focus-chain/widget-factory3.ui       |    3 -
 testsuite/gtk/notify.c                             |    3 +-
 testsuite/gtk/object.c                             |    2 -
 testsuite/gtk/templates.c                          |   18 -
 25 files changed, 80 insertions(+), 3455 deletions(-)
---
diff --git a/demos/gtk-demo/listview_words.c b/demos/gtk-demo/listview_words.c
index 867f74e652..e2a5a1e2fa 100644
--- a/demos/gtk-demo/listview_words.c
+++ b/demos/gtk-demo/listview_words.c
@@ -142,16 +142,42 @@ load_file (GtkStringList *list,
 }
 
 static void
-file_selected_cb (GtkWidget     *button,
+open_response_cb (GtkWidget     *dialog,
+                  int            response,
                   GtkStringList *stringlist)
 {
-  GFile *file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (button));
+  gtk_widget_hide (dialog);
 
-  if (file)
+  if (response == GTK_RESPONSE_ACCEPT)
     {
+      GFile *file;
+
+      file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
       load_file (stringlist, file);
       g_object_unref (file);
     }
+
+  gtk_window_destroy (GTK_WINDOW (dialog));
+}
+
+static void
+file_open_cb (GtkWidget     *button,
+              GtkStringList *stringlist)
+{
+  GtkWidget *dialog;
+
+  dialog = gtk_file_chooser_dialog_new ("Open file",
+                                        GTK_WINDOW (gtk_widget_get_root (button)),
+                                        GTK_FILE_CHOOSER_ACTION_OPEN,
+                                        "_Cancel", GTK_RESPONSE_CANCEL,
+                                        "_Load", GTK_RESPONSE_ACCEPT,
+                                        NULL);
+
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
+  gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+
+  g_signal_connect (dialog, "response", G_CALLBACK (open_response_cb), stringlist);
+  gtk_widget_show (dialog);
 }
 
 GtkWidget *
@@ -189,8 +215,8 @@ do_listview_words (GtkWidget *do_widget)
 
       header = gtk_header_bar_new ();
       gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
-      open_button = gtk_file_chooser_button_new ("_Open", GTK_FILE_CHOOSER_ACTION_OPEN);
-      g_signal_connect (open_button, "file-set", G_CALLBACK (file_selected_cb), stringlist);
+      open_button = gtk_button_new_with_mnemonic ("_Open");
+      g_signal_connect (open_button, "clicked", G_CALLBACK (file_open_cb), stringlist);
       gtk_header_bar_pack_start (GTK_HEADER_BAR (header), open_button);
       gtk_window_set_titlebar (GTK_WINDOW (window), header);
 
diff --git a/demos/gtk-demo/paintable_svg.c b/demos/gtk-demo/paintable_svg.c
index eab506f4ed..9d87f121ac 100644
--- a/demos/gtk-demo/paintable_svg.c
+++ b/demos/gtk-demo/paintable_svg.c
@@ -13,19 +13,50 @@
 
 
 static void
-file_set (GtkFileChooserButton *button,
-          GtkWidget            *picture)
+open_response_cb (GtkWidget  *dialog,
+                  int         response,
+                  GtkPicture *picture)
 {
-  GFile *file;
-  GdkPaintable *paintable;
+  gtk_widget_hide (dialog);
+
+  if (response == GTK_RESPONSE_ACCEPT)
+    {
+      GFile *file;
+      GdkPaintable *paintable;
+
+      file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
+      paintable = svg_paintable_new (file);
+      gtk_picture_set_paintable (GTK_PICTURE (picture), paintable);
+      g_object_unref (paintable);
+      g_object_unref (file);
+    }
 
-  file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (button));
+  gtk_window_destroy (GTK_WINDOW (dialog));
+}
 
-  paintable = svg_paintable_new (file);
-  gtk_picture_set_paintable (GTK_PICTURE (picture), paintable);
+static void
+show_file_open (GtkWidget  *button,
+                GtkPicture *picture)
+{
+  GtkFileFilter *filter;
+  GtkWidget *dialog;
 
-  g_object_unref (paintable);
-  g_object_unref (file);
+  dialog = gtk_file_chooser_dialog_new ("Open node file",
+                                        GTK_WINDOW (gtk_widget_get_root (button)),
+                                        GTK_FILE_CHOOSER_ACTION_OPEN,
+                                        "_Cancel", GTK_RESPONSE_CANCEL,
+                                        "_Load", GTK_RESPONSE_ACCEPT,
+                                        NULL);
+
+  filter = gtk_file_filter_new ();
+  gtk_file_filter_add_mime_type (filter, "image/svg+xml");
+  gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
+
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
+  gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+
+  g_signal_connect (dialog, "response", G_CALLBACK (open_response_cb), picture);
+  gtk_widget_show (dialog);
 }
 
 static GtkWidget *window;
@@ -35,7 +66,6 @@ do_paintable_svg (GtkWidget *do_widget)
 {
   GtkWidget *header;
   GtkWidget *picture;
-  GtkFileFilter *filter;
   GtkWidget *button;
   GFile *file;
   GdkPaintable *paintable;
@@ -49,17 +79,14 @@ do_paintable_svg (GtkWidget *do_widget)
       gtk_window_set_title (GTK_WINDOW (window), "Paintable — SVG");
       g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
 
-      button = gtk_file_chooser_button_new ("Select an SVG file", GTK_FILE_CHOOSER_ACTION_OPEN);
-      filter = gtk_file_filter_new ();
-      gtk_file_filter_add_mime_type (filter, "image/svg+xml");
-      gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (button), filter);
+      button = gtk_button_new_with_mnemonic ("_Open");
       gtk_header_bar_pack_start (GTK_HEADER_BAR (header), button);
 
       picture = gtk_picture_new ();
       gtk_picture_set_can_shrink (GTK_PICTURE (picture), TRUE);
       gtk_widget_set_size_request (picture, 16, 16);
 
-      g_signal_connect (button, "file-set", G_CALLBACK (file_set), picture);
+      g_signal_connect (button, "clicked", G_CALLBACK (show_file_open), picture);
 
       gtk_window_set_child (GTK_WINDOW (window), picture);
 
diff --git a/demos/gtk-demo/pickers.c b/demos/gtk-demo/pickers.c
index 0b42034030..e5f6ef99d4 100644
--- a/demos/gtk-demo/pickers.c
+++ b/demos/gtk-demo/pickers.c
@@ -63,9 +63,6 @@ do_pickers (GtkWidget *do_widget)
 
   if (!window)
   {
-    char *dir;
-    GFile *file;
-
     window = gtk_window_new ();
     gtk_window_set_display (GTK_WINDOW (window),
                             gtk_widget_get_display (do_widget));
@@ -129,41 +126,6 @@ do_pickers (GtkWidget *do_widget)
     gtk_widget_set_hexpand (label, TRUE);
     gtk_grid_attach (GTK_GRID (table), label, 0, 2, 1, 1);
 
-    picker = gtk_file_chooser_button_new ("Pick a File",
-                                          GTK_FILE_CHOOSER_ACTION_OPEN);
-    gtk_grid_attach (GTK_GRID (table), picker, 1, 2, 1, 1);
-
-    picker = gtk_file_chooser_button_new ("Pick a File",
-                                          GTK_FILE_CHOOSER_ACTION_OPEN);
-
-    dir = g_get_current_dir ();
-    file = g_file_new_for_path (dir);
-    gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (picker), file, NULL);
-    g_object_unref (file);
-    g_free (dir);
-
-    gtk_file_chooser_add_choice (GTK_FILE_CHOOSER (picker),
-                                 "choice",
-                                 "Encoding",
-                                 (const char *[]) { "option1", "option2", NULL },
-                                 (const char *[]) { "UTF-8", "Other Encoding", NULL });
-    gtk_file_chooser_set_choice (GTK_FILE_CHOOSER (picker), "choice", "option1");
-    gtk_file_chooser_add_choice (GTK_FILE_CHOOSER (picker),
-                                 "check",
-                                 "Read backwards",
-                                 NULL, NULL);
-    gtk_file_chooser_set_choice (GTK_FILE_CHOOSER (picker), "check", "false");
-
-    gtk_grid_attach (GTK_GRID (table), picker, 2, 2, 1, 1);
-
-    label = gtk_label_new ("Folder:");
-    gtk_widget_set_halign (label, GTK_ALIGN_START);
-    gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
-    picker = gtk_file_chooser_button_new ("Pick a Folder",
-                                          GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-    gtk_grid_attach (GTK_GRID (table), label, 0, 3, 1, 1);
-    gtk_grid_attach (GTK_GRID (table), picker, 1, 3, 1, 1);
-
     label = gtk_label_new ("Mail:");
     gtk_widget_set_halign (label, GTK_ALIGN_START);
     gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index ba2378ba34..6d6f539140 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -878,9 +878,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <property name="use-alpha">1</property>
                               </object>
                             </child>
-                            <child>
-                              <object class="GtkFileChooserButton" id="filechooserbutton1"/>
-                            </child>
                             <child>
                               <object class="GtkLinkButton" id="linkbutton1">
                                 <property name="label" translatable="yes">link button</property>
diff --git a/docs/reference/gtk/gtk4-docs.xml b/docs/reference/gtk/gtk4-docs.xml
index 25ed9eebd7..faae8a2de6 100644
--- a/docs/reference/gtk/gtk4-docs.xml
+++ b/docs/reference/gtk/gtk4-docs.xml
@@ -283,7 +283,6 @@
       <xi:include href="xml/gtkcolorchooserwidget.xml" />
       <xi:include href="xml/gtkcolorchooserdialog.xml" />
       <xi:include href="xml/gtkfilechooser.xml" />
-      <xi:include href="xml/gtkfilechooserbutton.xml" />
       <xi:include href="xml/gtkfilechoosernative.xml" />
       <xi:include href="xml/gtkfilechooserdialog.xml" />
       <xi:include href="xml/gtkfilechooserwidget.xml" />
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index c6e8f87a58..faad758464 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -1339,31 +1339,6 @@ gtk_file_chooser_widget_get_type
 GtkFileChooserWidgetPrivate
 </SECTION>
 
-<SECTION>
-<FILE>gtkfilechooserbutton</FILE>
-<TITLE>GtkFileChooserButton</TITLE>
-GtkFileChooserButton
-gtk_file_chooser_button_new
-gtk_file_chooser_button_new_with_dialog
-gtk_file_chooser_button_get_title
-gtk_file_chooser_button_set_title
-gtk_file_chooser_button_get_width_chars
-gtk_file_chooser_button_set_width_chars
-gtk_file_chooser_button_get_modal
-gtk_file_chooser_button_set_modal
-
-<SUBSECTION Standard>
-GTK_FILE_CHOOSER_BUTTON
-GTK_IS_FILE_CHOOSER_BUTTON
-GTK_TYPE_FILE_CHOOSER_BUTTON
-GTK_FILE_CHOOSER_BUTTON_CLASS
-GTK_IS_FILE_CHOOSER_BUTTON_CLASS
-GTK_FILE_CHOOSER_BUTTON_GET_CLASS
-<SUBSECTION Private>
-gtk_file_chooser_button_get_type
-GtkFileChooserButtonPrivate
-</SECTION>
-
 <SECTION>
 <FILE>gtkfilefilter</FILE>
 GtkFileFilter
diff --git a/docs/reference/gtk/gtk4.types.in b/docs/reference/gtk/gtk4.types.in
index 5981ffb897..9bc79517f7 100644
--- a/docs/reference/gtk/gtk4.types.in
+++ b/docs/reference/gtk/gtk4.types.in
@@ -87,7 +87,6 @@ gtk_event_controller_motion_get_type
 gtk_event_controller_scroll_get_type
 gtk_every_filter_get_type
 gtk_expander_get_type
-gtk_file_chooser_button_get_type
 gtk_file_chooser_dialog_get_type
 gtk_file_chooser_get_type
 gtk_file_chooser_native_get_type
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index 51889d8e96..884939adb5 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -615,51 +615,6 @@ create_font_button (void)
   return new_widget_info ("font-button", vbox, SMALL);
 }
 
-static WidgetInfo *
-create_file_button (void)
-{
-  GtkWidget *vbox;
-  GtkWidget *vbox2;
-  GtkWidget *picker;
-  char *path;
-  GFile *file;
-
-  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
-  vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
-  picker = gtk_file_chooser_button_new ("File Chooser Button",
-                                       GTK_FILE_CHOOSER_ACTION_OPEN);
-  gtk_widget_set_size_request (picker, 150, -1);
-  gtk_widget_set_halign (picker, GTK_ALIGN_CENTER);
-  gtk_widget_set_valign (picker, GTK_ALIGN_CENTER);
-  gtk_box_append (GTK_BOX (vbox2), picker);
-  gtk_box_append (GTK_BOX (vbox2),
-                     gtk_label_new ("File Button (Files)"));
-
-  gtk_box_append (GTK_BOX (vbox),
-                     vbox2);
-  gtk_box_append (GTK_BOX (vbox),
-                     gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
-
-  vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
-  picker = gtk_file_chooser_button_new ("File Chooser Button",
-                                       GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-  gtk_widget_set_size_request (picker, 150, -1);
-  path = g_build_filename (g_get_home_dir (), "Documents", NULL);
-  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_box_append (GTK_BOX (vbox2), picker);
-  gtk_box_append (GTK_BOX (vbox2), gtk_label_new ("File Button (Select Folder)"));
-  gtk_box_append (GTK_BOX (vbox), vbox2);
-
-  add_margin (vbox);
-
-  return new_widget_info ("file-button", vbox, MEDIUM);
-}
-
 static WidgetInfo *
 create_editable_label (void)
 {
@@ -2144,7 +2099,6 @@ get_all_widgets (void)
   retval = g_list_prepend (retval, create_combo_box_entry ());
   retval = g_list_prepend (retval, create_combo_box_text ());
   retval = g_list_prepend (retval, create_entry ());
-  retval = g_list_prepend (retval, create_file_button ());
   retval = g_list_prepend (retval, create_font_button ());
   retval = g_list_prepend (retval, create_frame ());
   retval = g_list_prepend (retval, create_icon_view ());
diff --git a/gtk/gtk-autocleanups.h b/gtk/gtk-autocleanups.h
index 127a63c4a8..561e8dbb84 100644
--- a/gtk/gtk-autocleanups.h
+++ b/gtk/gtk-autocleanups.h
@@ -66,7 +66,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkEntry, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkEntryCompletion, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkEventController, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkExpander, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkFileChooserButton, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkFileChooserDialog, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkFileChooserWidget, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkFileFilter, g_object_unref)
diff --git a/gtk/gtk.h b/gtk/gtk.h
index be942b218b..d5f50a86b3 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -119,7 +119,6 @@
 #include <gtk/gtkfixed.h>
 #include <gtk/gtkfixedlayout.h>
 #include <gtk/gtkfilechooser.h>
-#include <gtk/gtkfilechooserbutton.h>
 #include <gtk/gtkfilechooserdialog.h>
 #include <gtk/gtkfilechoosernative.h>
 #include <gtk/gtkfilechooserwidget.h>
diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c
index fd7162a539..decad3fcc8 100644
--- a/gtk/gtkfilechooser.c
+++ b/gtk/gtkfilechooser.c
@@ -29,15 +29,14 @@
  * SECTION:gtkfilechooser
  * @Short_description: File chooser interface used by GtkFileChooserWidget and GtkFileChooserDialog
  * @Title: GtkFileChooser
- * @See_also: #GtkFileChooserDialog, #GtkFileChooserWidget, #GtkFileChooserButton
+ * @See_also: #GtkFileChooserDialog, #GtkFileChooserWidget
  *
  * #GtkFileChooser is an interface that can be implemented by file
  * selection widgets.  In GTK, the main objects that implement this
- * interface are #GtkFileChooserWidget, #GtkFileChooserDialog, and
- * #GtkFileChooserButton.  You do not need to write an object that
- * implements the #GtkFileChooser interface unless you are trying to
- * adapt an existing file selector to expose a standard programming
- * interface.
+ * interface are #GtkFileChooserWidget and #GtkFileChooserDialog.  You do not
+ * need to write an object that implements the #GtkFileChooser interface
+ * unless you are trying to adapt an existing file selector to expose a
+ * standard programming interface.
  *
  * #GtkFileChooser allows for shortcuts to various places in the filesystem.
  * In the default implementation these are displayed in the left pane. It
diff --git a/gtk/meson.build b/gtk/meson.build
index d7f206c231..0e0239a8a6 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -241,7 +241,6 @@ gtk_public_sources = files([
   'gtkexpander.c',
   'gtkexpression.c',
   'gtkfilechooser.c',
-  'gtkfilechooserbutton.c',
   'gtkfilechooserdialog.c',
   'gtkfilechoosernative.c',
   'gtkfilechooserwidget.c',
@@ -529,7 +528,6 @@ gtk_public_headers = files([
   'gtkexpander.h',
   'gtkexpression.h',
   'gtkfilechooser.h',
-  'gtkfilechooserbutton.h',
   'gtkfilechooserdialog.h',
   'gtkfilechoosernative.h',
   'gtkfilechooserwidget.h',
diff --git a/tests/meson.build b/tests/meson.build
index 4acdc7dcaf..51b2311a80 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -33,7 +33,6 @@ gtk_tests = [
   ['testentrycompletion'],
   ['testentryicons'],
   ['testfilechooser'],
-  ['testfilechooserbutton'],
   ['testflowbox'],
   ['testfontoptions'],
   ['testframe'],
diff --git a/testsuite/gtk/defaultvalue.c b/testsuite/gtk/defaultvalue.c
index 22146a5c90..d55e6d5381 100644
--- a/testsuite/gtk/defaultvalue.c
+++ b/testsuite/gtk/defaultvalue.c
@@ -94,8 +94,7 @@ test_type (gconstpointer data)
     return;
 
   /* These leak their GDBusConnections */
-  if (g_type_is_a (type, GTK_TYPE_FILE_CHOOSER_BUTTON) ||
-      g_type_is_a (type, GTK_TYPE_FILE_CHOOSER_DIALOG) ||
+  if (g_type_is_a (type, GTK_TYPE_FILE_CHOOSER_DIALOG) ||
       g_type_is_a (type, GTK_TYPE_FILE_CHOOSER_WIDGET) ||
       g_str_equal (g_type_name (type), "GtkPlacesSidebar"))
     return;
diff --git a/testsuite/gtk/focus-chain/widget-factory.tab b/testsuite/gtk/focus-chain/widget-factory.tab
index 468e4560fd..b10898543d 100644
--- a/testsuite/gtk/focus-chain/widget-factory.tab
+++ b/testsuite/gtk/focus-chain/widget-factory.tab
@@ -16,7 +16,6 @@ GtkToggleButton
 GtkToggleButton
 GtkButton
 GtkButton
-GtkButton
 GtkLinkButton
 GtkSwitch
 GtkScale
diff --git a/testsuite/gtk/focus-chain/widget-factory.tab-backward 
b/testsuite/gtk/focus-chain/widget-factory.tab-backward
index dd7582889a..4025f6adf6 100644
--- a/testsuite/gtk/focus-chain/widget-factory.tab-backward
+++ b/testsuite/gtk/focus-chain/widget-factory.tab-backward
@@ -12,7 +12,6 @@ GtkSwitch
 GtkLinkButton
 GtkButton
 GtkButton
-GtkButton
 GtkToggleButton
 GtkToggleButton
 GtkToggleButton
diff --git a/testsuite/gtk/focus-chain/widget-factory.ui b/testsuite/gtk/focus-chain/widget-factory.ui
index 654671b4fd..cfa86b68fe 100644
--- a/testsuite/gtk/focus-chain/widget-factory.ui
+++ b/testsuite/gtk/focus-chain/widget-factory.ui
@@ -854,9 +854,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <property name="use-alpha">1</property>
                               </object>
                             </child>
-                            <child>
-                              <object class="GtkFileChooserButton" id="filechooserbutton1"/>
-                            </child>
                             <child>
                               <object class="GtkLinkButton" id="linkbutton1">
                                 <property name="label" translatable="yes">link button</property>
diff --git a/testsuite/gtk/focus-chain/widget-factory2.ui b/testsuite/gtk/focus-chain/widget-factory2.ui
index 5dd9037329..748c98ffde 100644
--- a/testsuite/gtk/focus-chain/widget-factory2.ui
+++ b/testsuite/gtk/focus-chain/widget-factory2.ui
@@ -855,9 +855,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <property name="use-alpha">1</property>
                               </object>
                             </child>
-                            <child>
-                              <object class="GtkFileChooserButton" id="filechooserbutton1"/>
-                            </child>
                             <child>
                               <object class="GtkLinkButton" id="linkbutton1">
                                 <property name="label" translatable="yes">link button</property>
diff --git a/testsuite/gtk/focus-chain/widget-factory3.ui b/testsuite/gtk/focus-chain/widget-factory3.ui
index b6d52bea51..d7a2643843 100644
--- a/testsuite/gtk/focus-chain/widget-factory3.ui
+++ b/testsuite/gtk/focus-chain/widget-factory3.ui
@@ -855,9 +855,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                                 <property name="use-alpha">1</property>
                               </object>
                             </child>
-                            <child>
-                              <object class="GtkFileChooserButton" id="filechooserbutton1"/>
-                            </child>
                             <child>
                               <object class="GtkLinkButton" id="linkbutton1">
                                 <property name="label" translatable="yes">link button</property>
diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c
index f90fb66be2..12ae9edb89 100644
--- a/testsuite/gtk/notify.c
+++ b/testsuite/gtk/notify.c
@@ -401,8 +401,7 @@ test_type (gconstpointer data)
     return;
 
   /* These leak their GDBusConnections */
-  if (g_type_is_a (type, GTK_TYPE_FILE_CHOOSER_BUTTON) ||
-      g_type_is_a (type, GTK_TYPE_FILE_CHOOSER_DIALOG) ||
+  if (g_type_is_a (type, GTK_TYPE_FILE_CHOOSER_DIALOG) ||
       g_type_is_a (type, GTK_TYPE_FILE_CHOOSER_WIDGET) ||
       g_type_is_a (type, GTK_TYPE_FILE_CHOOSER_NATIVE))
     return;
diff --git a/testsuite/gtk/object.c b/testsuite/gtk/object.c
index d4c13339c8..2efe3cdb65 100644
--- a/testsuite/gtk/object.c
+++ b/testsuite/gtk/object.c
@@ -57,8 +57,6 @@ list_ignore_properties (gboolean buglist)
     { "GtkWidget",              "has-default",          (void*) TRUE, },                /* conflicts with 
toplevel-less widgets */
     { "GtkWidget",              "display",              (void*) MATCH_ANY_VALUE },
     { "GtkCellView",            "background",           (void*) "", },                  /* "" is not a valid 
background color */
-    { "GtkFileChooserButton",   "select-multiple",      (void*) MATCH_ANY_VALUE },      /* property disabled 
*/
-    { "GtkFileChooserButton",   "action",               (void*) GTK_FILE_CHOOSER_ACTION_SAVE },
     { "GtkFileChooserWidget",   "select-multiple",      (void*) 0x1 },                  /* property 
conflicts */
     { "GtkFileChooserDialog",   "select-multiple",      (void*) MATCH_ANY_VALUE },      /* property disabled 
*/
     { "GtkTextView",            "overwrite",            (void*) MATCH_ANY_VALUE },      /* needs text buffer 
*/
diff --git a/testsuite/gtk/templates.c b/testsuite/gtk/templates.c
index 9eb1974213..843fd500d9 100644
--- a/testsuite/gtk/templates.c
+++ b/testsuite/gtk/templates.c
@@ -330,23 +330,6 @@ test_file_chooser_dialog_show (void)
   gtk_window_destroy (GTK_WINDOW (widget));
 }
 
-static void
-test_file_chooser_button_basic (void)
-{
-  GtkWidget *widget;
-  gboolean done = FALSE;
-
-  g_test_log_set_fatal_handler (ignore_gvfs_warning, NULL);
-
-  widget = gtk_file_chooser_button_new ("Choose a file !", GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-  g_assert (GTK_IS_FILE_CHOOSER_BUTTON (widget));
-  g_timeout_add (100, main_loop_quit_cb, &done);
-  while (!done)
-    g_main_context_iteration (NULL,  TRUE);
-
-  g_object_unref (g_object_ref_sink (widget));
-}
-
 static void
 test_font_button_basic (void)
 {
@@ -469,7 +452,6 @@ main (int argc, char **argv)
   g_test_add_func ("/template/GtkFileChooserWidget/basic", test_file_chooser_widget_basic);
   g_test_add_func ("/template/GtkFileChooserDialog/basic", test_file_chooser_dialog_basic);
   g_test_add_func ("/template/GtkFileChooserDialog/show", test_file_chooser_dialog_show);
-  g_test_add_func ("/template/GtkFileChooserButton/basic", test_file_chooser_button_basic);
   g_test_add_func ("/template/GtkFontButton/basic", test_font_button_basic);
   g_test_add_func ("/template/GtkFontChooserWidget/basic", test_font_chooser_widget_basic);
   g_test_add_func ("/template/GtkFontChooserDialog/basic", test_font_chooser_dialog_basic);


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