[gtk/file-chooser-api-cleanup-2: 22/24] filechooser: Drop gtk_file_chooser_[un]select_file



commit dcee15c0f1996e86940f7020f27cc91840349fa0
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Jul 9 00:46:55 2020 -0400

    filechooser: Drop gtk_file_chooser_[un]select_file
    
    Most use cases for these apis can be handled with
    gtk_file_chooser_set_file and/or
    gtk_file_chooser_set_current_folder.

 docs/reference/gtk/gtk4-sections.txt |  2 --
 gtk/gtkfilechooser.h                 | 15 ++++-----------
 gtk/gtkfilechooserprivate.h          |  6 +++++-
 gtk/gtkprinteroptionwidget.c         |  1 +
 4 files changed, 10 insertions(+), 14 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 07768db1c9..481b890c34 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -1300,8 +1300,6 @@ gtk_file_chooser_get_current_name
 <SUBSECTION>
 gtk_file_chooser_get_file
 gtk_file_chooser_set_file
-gtk_file_chooser_select_file
-gtk_file_chooser_unselect_file
 gtk_file_chooser_get_files
 gtk_file_chooser_set_current_folder
 gtk_file_chooser_get_current_folder
diff --git a/gtk/gtkfilechooser.h b/gtk/gtkfilechooser.h
index a412ec1766..79d5f122d8 100644
--- a/gtk/gtkfilechooser.h
+++ b/gtk/gtkfilechooser.h
@@ -91,17 +91,17 @@ GQuark gtk_file_chooser_error_quark (void);
  */
 GDK_AVAILABLE_IN_ALL
 void                 gtk_file_chooser_set_action          (GtkFileChooser       *chooser,
-                                                          GtkFileChooserAction  action);
+                                                           GtkFileChooserAction  action);
 GDK_AVAILABLE_IN_ALL
 GtkFileChooserAction gtk_file_chooser_get_action          (GtkFileChooser       *chooser);
 GDK_AVAILABLE_IN_ALL
 void                 gtk_file_chooser_set_select_multiple (GtkFileChooser       *chooser,
-                                                          gboolean              select_multiple);
+                                                           gboolean              select_multiple);
 GDK_AVAILABLE_IN_ALL
 gboolean             gtk_file_chooser_get_select_multiple (GtkFileChooser       *chooser);
 GDK_AVAILABLE_IN_ALL
 void                 gtk_file_chooser_set_create_folders  (GtkFileChooser       *chooser,
-                                                         gboolean               create_folders);
+                                                          gboolean               create_folders);
 GDK_AVAILABLE_IN_ALL
 gboolean             gtk_file_chooser_get_create_folders (GtkFileChooser *chooser);
 
@@ -109,7 +109,7 @@ gboolean             gtk_file_chooser_get_create_folders (GtkFileChooser *choose
  */
 GDK_AVAILABLE_IN_ALL
 void        gtk_file_chooser_set_current_name  (GtkFileChooser *chooser,
-                                               const gchar    *name);
+                                                const gchar    *name);
 GDK_AVAILABLE_IN_ALL
 gchar *gtk_file_chooser_get_current_name (GtkFileChooser *chooser);
 
@@ -121,13 +121,6 @@ gboolean gtk_file_chooser_set_file                (GtkFileChooser  *chooser,
                                                    GFile           *file,
                                                    GError         **error);
 GDK_AVAILABLE_IN_ALL
-gboolean gtk_file_chooser_select_file             (GtkFileChooser  *chooser,
-                                                   GFile           *file,
-                                                   GError         **error);
-GDK_AVAILABLE_IN_ALL
-void     gtk_file_chooser_unselect_file           (GtkFileChooser  *chooser,
-                                                   GFile           *file);
-GDK_AVAILABLE_IN_ALL
 GSList * gtk_file_chooser_get_files               (GtkFileChooser  *chooser);
 GDK_AVAILABLE_IN_ALL
 gboolean gtk_file_chooser_set_current_folder      (GtkFileChooser  *chooser,
diff --git a/gtk/gtkfilechooserprivate.h b/gtk/gtkfilechooserprivate.h
index fc87de8ed0..a88fe367f7 100644
--- a/gtk/gtkfilechooserprivate.h
+++ b/gtk/gtkfilechooserprivate.h
@@ -113,7 +113,11 @@ GtkFileSystem *_gtk_file_chooser_get_file_system         (GtkFileChooser    *cho
 
 void     gtk_file_chooser_select_all         (GtkFileChooser *chooser);
 void     gtk_file_chooser_unselect_all       (GtkFileChooser *chooser);
-
+gboolean gtk_file_chooser_select_file             (GtkFileChooser  *chooser,
+                                                   GFile           *file,
+                                                   GError         **error);
+void     gtk_file_chooser_unselect_file           (GtkFileChooser  *chooser,
+                                                   GFile           *file);
 G_END_DECLS
 
 #endif /* __GTK_FILE_CHOOSER_PRIVATE_H__ */
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c
index b83040f404..93589648c4 100644
--- a/gtk/gtkprinteroptionwidget.c
+++ b/gtk/gtkprinteroptionwidget.c
@@ -28,6 +28,7 @@
 #include "gtksignallistitemfactory.h"
 #include "gtkentry.h"
 #include "gtkfilechooserdialog.h"
+#include "gtkfilechooserprivate.h"
 #include "gtkimage.h"
 #include "gtklabel.h"
 #include "gtkliststore.h"


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