[gtk/deprecate-app-choosers: 2/2] Deprecate the app chooser widgets




commit e0dfae470faa7a217660d3474ff0d7146e0d1d4e
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 3 21:54:57 2022 -0400

    Deprecate the app chooser widgets
    
    These are a family of pretty specialized widgets, and
    are very rarely used. Instead of porting them away
    from GtkTreeView and GtkComboBox, deprecate them.

 gtk/{ => deprecated}/gtkappchooser.c        |  8 ++++++++
 gtk/{ => deprecated}/gtkappchooser.h        |  6 +++---
 gtk/{ => deprecated}/gtkappchooserbutton.c  | 26 ++++++++++++++++++++++++++
 gtk/{ => deprecated}/gtkappchooserbutton.h  | 24 ++++++++++++------------
 gtk/{ => deprecated}/gtkappchooserdialog.c  | 12 ++++++++++++
 gtk/{ => deprecated}/gtkappchooserdialog.h  | 10 +++++-----
 gtk/{ => deprecated}/gtkappchooserprivate.h |  0
 gtk/{ => deprecated}/gtkappchooserwidget.c  | 28 ++++++++++++++++++++++++++++
 gtk/{ => deprecated}/gtkappchooserwidget.h  | 26 +++++++++++++-------------
 gtk/deprecated/meson.build                  | 16 ++++++++++++----
 gtk/gtk.h                                   |  8 ++++----
 gtk/meson.build                             |  9 +--------
 tests/testappchooser.c                      |  2 ++
 tests/testappchooserbutton.c                |  2 ++
 14 files changed, 128 insertions(+), 49 deletions(-)
---
diff --git a/gtk/gtkappchooser.c b/gtk/deprecated/gtkappchooser.c
similarity index 94%
rename from gtk/gtkappchooser.c
rename to gtk/deprecated/gtkappchooser.c
index 51b50f9749..db2e9fecba 100644
--- a/gtk/gtkappchooser.c
+++ b/gtk/deprecated/gtkappchooser.c
@@ -52,6 +52,8 @@
 
 #include <glib.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 G_DEFINE_INTERFACE (GtkAppChooser, gtk_app_chooser, GTK_TYPE_WIDGET);
 
 static void
@@ -82,6 +84,8 @@ gtk_app_chooser_default_init (GtkAppChooserIface *iface)
  * shows applications.
  *
  * Returns: the content type of @self. Free with g_free()
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 char *
 gtk_app_chooser_get_content_type (GtkAppChooser *self)
@@ -105,6 +109,8 @@ gtk_app_chooser_get_content_type (GtkAppChooser *self)
  *
  * Returns: (nullable) (transfer full): a `GAppInfo` for the
  *   currently selected application
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 GAppInfo *
 gtk_app_chooser_get_app_info (GtkAppChooser *self)
@@ -117,6 +123,8 @@ gtk_app_chooser_get_app_info (GtkAppChooser *self)
  * @self: a `GtkAppChooser`
  *
  * Reloads the list of applications.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_refresh (GtkAppChooser *self)
diff --git a/gtk/gtkappchooser.h b/gtk/deprecated/gtkappchooser.h
similarity index 96%
rename from gtk/gtkappchooser.h
rename to gtk/deprecated/gtkappchooser.h
index 6777297b2a..4c928a08f0 100644
--- a/gtk/gtkappchooser.h
+++ b/gtk/deprecated/gtkappchooser.h
@@ -41,11 +41,11 @@ typedef struct _GtkAppChooser GtkAppChooser;
 GDK_AVAILABLE_IN_ALL
 GType      gtk_app_chooser_get_type         (void) G_GNUC_CONST;
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 GAppInfo * gtk_app_chooser_get_app_info     (GtkAppChooser *self);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 char *    gtk_app_chooser_get_content_type (GtkAppChooser *self);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void       gtk_app_chooser_refresh          (GtkAppChooser *self);
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkAppChooser, g_object_unref)
diff --git a/gtk/gtkappchooserbutton.c b/gtk/deprecated/gtkappchooserbutton.c
similarity index 97%
rename from gtk/gtkappchooserbutton.c
rename to gtk/deprecated/gtkappchooserbutton.c
index fb820513e1..6a5044fbdd 100644
--- a/gtk/gtkappchooserbutton.c
+++ b/gtk/deprecated/gtkappchooserbutton.c
@@ -67,6 +67,8 @@
 #include "gtkliststore.h"
 #include "gtkprivate.h"
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 enum {
   PROP_SHOW_DIALOG_ITEM = 1,
   PROP_SHOW_DEFAULT_ITEM,
@@ -883,6 +885,8 @@ real_insert_separator (GtkAppChooserButton *self,
  * that can handle content of the given type.
  *
  * Returns: a newly created `GtkAppChooserButton`
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 GtkWidget *
 gtk_app_chooser_button_new (const char *content_type)
@@ -900,6 +904,8 @@ gtk_app_chooser_button_new (const char *content_type)
  *
  * Appends a separator to the list of applications that is shown
  * in the popup.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_button_append_separator (GtkAppChooserButton *self)
@@ -928,6 +934,8 @@ gtk_app_chooser_button_append_separator (GtkAppChooserButton *self)
  * callback for the activation of a particular custom item in the list.
  *
  * See also [method@Gtk.AppChooserButton.append_separator].
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_button_append_custom_item (GtkAppChooserButton *self,
@@ -955,6 +963,8 @@ gtk_app_chooser_button_append_custom_item (GtkAppChooserButton *self,
  *
  * Use [method@Gtk.AppChooser.refresh] to bring the selection
  * to its initial state.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_button_set_active_custom_item (GtkAppChooserButton *self,
@@ -983,6 +993,8 @@ gtk_app_chooser_button_set_active_custom_item (GtkAppChooserButton *self,
  * for a `GtkAppChooserDialog`.
  *
  * Returns: the value of [property@Gtk.AppChooserButton:show-dialog-item]
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 gboolean
 gtk_app_chooser_button_get_show_dialog_item (GtkAppChooserButton *self)
@@ -999,6 +1011,8 @@ gtk_app_chooser_button_get_show_dialog_item (GtkAppChooserButton *self)
  *
  * Sets whether the dropdown menu of this button should show an
  * entry to trigger a `GtkAppChooserDialog`.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_button_set_show_dialog_item (GtkAppChooserButton *self,
@@ -1022,6 +1036,8 @@ gtk_app_chooser_button_set_show_dialog_item (GtkAppChooserButton *self,
  * application at the top.
  *
  * Returns: the value of [property@Gtk.AppChooserButton:show-default-item]
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 gboolean
 gtk_app_chooser_button_get_show_default_item (GtkAppChooserButton *self)
@@ -1038,6 +1054,8 @@ gtk_app_chooser_button_get_show_default_item (GtkAppChooserButton *self)
  *
  * Sets whether the dropdown menu of this button should show the
  * default application for the given content type at top.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_button_set_show_default_item (GtkAppChooserButton *self,
@@ -1063,6 +1081,8 @@ gtk_app_chooser_button_set_show_default_item (GtkAppChooserButton *self,
  * Sets the text to display at the top of the dialog.
  *
  * If the heading is not set, the dialog displays a default text.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_button_set_heading (GtkAppChooserButton *self,
@@ -1084,6 +1104,8 @@ gtk_app_chooser_button_set_heading (GtkAppChooserButton *self,
  *
  * Returns: (nullable): the text to display at the top of the dialog,
  *   or %NULL, in which case a default text is displayed
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 const char *
 gtk_app_chooser_button_get_heading (GtkAppChooserButton *self)
@@ -1099,6 +1121,8 @@ gtk_app_chooser_button_get_heading (GtkAppChooserButton *self)
  * @modal: %TRUE to make the dialog modal
  *
  * Sets whether the dialog should be modal.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_button_set_modal (GtkAppChooserButton *self,
@@ -1121,6 +1145,8 @@ gtk_app_chooser_button_set_modal (GtkAppChooserButton *self,
  * Gets whether the dialog is modal.
  *
  * Returns: %TRUE if the dialog is modal
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 gboolean
 gtk_app_chooser_button_get_modal (GtkAppChooserButton *self)
diff --git a/gtk/gtkappchooserbutton.h b/gtk/deprecated/gtkappchooserbutton.h
similarity index 92%
rename from gtk/gtkappchooserbutton.h
rename to gtk/deprecated/gtkappchooserbutton.h
index 493c5e34d1..6f3a739507 100644
--- a/gtk/gtkappchooserbutton.h
+++ b/gtk/deprecated/gtkappchooserbutton.h
@@ -40,40 +40,40 @@ typedef struct _GtkAppChooserButton        GtkAppChooserButton;
 GDK_AVAILABLE_IN_ALL
 GType       gtk_app_chooser_button_get_type           (void) G_GNUC_CONST;
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 GtkWidget * gtk_app_chooser_button_new                (const char          *content_type);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void        gtk_app_chooser_button_append_separator   (GtkAppChooserButton *self);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void        gtk_app_chooser_button_append_custom_item (GtkAppChooserButton *self,
                                                        const char          *name,
                                                        const char          *label,
                                                        GIcon               *icon);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void     gtk_app_chooser_button_set_active_custom_item (GtkAppChooserButton *self,
                                                         const char          *name);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void     gtk_app_chooser_button_set_show_dialog_item  (GtkAppChooserButton *self,
                                                        gboolean             setting);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 gboolean gtk_app_chooser_button_get_show_dialog_item  (GtkAppChooserButton *self);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void     gtk_app_chooser_button_set_heading           (GtkAppChooserButton *self,
                                                        const char          *heading);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 const char *
          gtk_app_chooser_button_get_heading           (GtkAppChooserButton *self);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void     gtk_app_chooser_button_set_show_default_item (GtkAppChooserButton *self,
                                                        gboolean             setting);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 gboolean gtk_app_chooser_button_get_show_default_item (GtkAppChooserButton *self);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 gboolean gtk_app_chooser_button_get_modal             (GtkAppChooserButton *self);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void     gtk_app_chooser_button_set_modal             (GtkAppChooserButton *self,
                                                        gboolean             modal);
 
diff --git a/gtk/gtkappchooserdialog.c b/gtk/deprecated/gtkappchooserdialog.c
similarity index 98%
rename from gtk/gtkappchooserdialog.c
rename to gtk/deprecated/gtkappchooserdialog.c
index 3d1669dbf2..96c7ed644b 100644
--- a/gtk/gtkappchooserdialog.c
+++ b/gtk/deprecated/gtkappchooserdialog.c
@@ -61,6 +61,8 @@
 #include <glib/gi18n-lib.h>
 #include <gio/gio.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 typedef struct _GtkAppChooserDialogClass   GtkAppChooserDialogClass;
 
 struct _GtkAppChooserDialog {
@@ -670,6 +672,8 @@ set_parent_and_flags (GtkWidget      *dialog,
  * The dialog will show applications that can open the file.
  *
  * Returns: a newly created `GtkAppChooserDialog`
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 GtkWidget *
 gtk_app_chooser_dialog_new (GtkWindow      *parent,
@@ -700,6 +704,8 @@ gtk_app_chooser_dialog_new (GtkWindow      *parent,
  * The dialog will show applications that can open the content type.
  *
  * Returns: a newly created `GtkAppChooserDialog`
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 GtkWidget *
 gtk_app_chooser_dialog_new_for_content_type (GtkWindow      *parent,
@@ -726,6 +732,8 @@ gtk_app_chooser_dialog_new_for_content_type (GtkWindow      *parent,
  * Returns the `GtkAppChooserWidget` of this dialog.
  *
  * Returns: (transfer none): the `GtkAppChooserWidget` of @self
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 GtkWidget *
 gtk_app_chooser_dialog_get_widget (GtkAppChooserDialog *self)
@@ -743,6 +751,8 @@ gtk_app_chooser_dialog_get_widget (GtkAppChooserDialog *self)
  * Sets the text to display at the top of the dialog.
  *
  * If the heading is not set, the dialog displays a default text.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_dialog_set_heading (GtkAppChooserDialog *self,
@@ -777,6 +787,8 @@ gtk_app_chooser_dialog_set_heading (GtkAppChooserDialog *self,
  *
  * Returns: (nullable): the text to display at the top of the dialog,
  *   or %NULL, in which case a default text is displayed
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 const char *
 gtk_app_chooser_dialog_get_heading (GtkAppChooserDialog *self)
diff --git a/gtk/gtkappchooserdialog.h b/gtk/deprecated/gtkappchooserdialog.h
similarity index 95%
rename from gtk/gtkappchooserdialog.h
rename to gtk/deprecated/gtkappchooserdialog.h
index 9f3f8c589e..80e926932a 100644
--- a/gtk/gtkappchooserdialog.h
+++ b/gtk/deprecated/gtkappchooserdialog.h
@@ -43,21 +43,21 @@ typedef struct _GtkAppChooserDialog        GtkAppChooserDialog;
 GDK_AVAILABLE_IN_ALL
 GType         gtk_app_chooser_dialog_get_type             (void) G_GNUC_CONST;
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 GtkWidget *   gtk_app_chooser_dialog_new                  (GtkWindow           *parent,
                                                            GtkDialogFlags       flags,
                                                            GFile               *file);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 GtkWidget *   gtk_app_chooser_dialog_new_for_content_type (GtkWindow           *parent,
                                                            GtkDialogFlags       flags,
                                                            const char          *content_type);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 GtkWidget *   gtk_app_chooser_dialog_get_widget           (GtkAppChooserDialog *self);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void          gtk_app_chooser_dialog_set_heading          (GtkAppChooserDialog *self,
                                                            const char          *heading);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 const char * gtk_app_chooser_dialog_get_heading          (GtkAppChooserDialog *self);
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkAppChooserDialog, g_object_unref)
diff --git a/gtk/gtkappchooserprivate.h b/gtk/deprecated/gtkappchooserprivate.h
similarity index 100%
rename from gtk/gtkappchooserprivate.h
rename to gtk/deprecated/gtkappchooserprivate.h
diff --git a/gtk/gtkappchooserwidget.c b/gtk/deprecated/gtkappchooserwidget.c
similarity index 98%
rename from gtk/gtkappchooserwidget.c
rename to gtk/deprecated/gtkappchooserwidget.c
index 90915f06bf..fc662b2674 100644
--- a/gtk/gtkappchooserwidget.c
+++ b/gtk/deprecated/gtkappchooserwidget.c
@@ -44,6 +44,8 @@
 #include <glib/gi18n-lib.h>
 #include <gio/gio.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 /**
  * GtkAppChooserWidget:
  *
@@ -1112,6 +1114,8 @@ gtk_app_chooser_widget_iface_init (GtkAppChooserIface *iface)
  * that can handle content of the given type.
  *
  * Returns: a newly created `GtkAppChooserWidget`
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 GtkWidget *
 gtk_app_chooser_widget_new (const char *content_type)
@@ -1128,6 +1132,8 @@ gtk_app_chooser_widget_new (const char *content_type)
  *
  * Sets whether the app chooser should show the default handler
  * for the content type in a separate section.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_widget_set_show_default (GtkAppChooserWidget *self,
@@ -1153,6 +1159,8 @@ gtk_app_chooser_widget_set_show_default (GtkAppChooserWidget *self,
  * for the content type in a separate section.
  *
  * Returns: the value of [property@Gtk.AppChooserWidget:show-default]
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 gboolean
 gtk_app_chooser_widget_get_show_default (GtkAppChooserWidget *self)
@@ -1169,6 +1177,8 @@ gtk_app_chooser_widget_get_show_default (GtkAppChooserWidget *self)
  *
  * Sets whether the app chooser should show recommended applications
  * for the content type in a separate section.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_widget_set_show_recommended (GtkAppChooserWidget *self,
@@ -1194,6 +1204,8 @@ gtk_app_chooser_widget_set_show_recommended (GtkAppChooserWidget *self,
  * for the content type in a separate section.
  *
  * Returns: the value of [property@Gtk.AppChooserWidget:show-recommended]
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 gboolean
 gtk_app_chooser_widget_get_show_recommended (GtkAppChooserWidget *self)
@@ -1210,6 +1222,8 @@ gtk_app_chooser_widget_get_show_recommended (GtkAppChooserWidget *self)
  *
  * Sets whether the app chooser should show related applications
  * for the content type in a separate section.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_widget_set_show_fallback (GtkAppChooserWidget *self,
@@ -1235,6 +1249,8 @@ gtk_app_chooser_widget_set_show_fallback (GtkAppChooserWidget *self,
  * for the content type in a separate section.
  *
  * Returns: the value of [property@Gtk.AppChooserWidget:show-fallback]
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 gboolean
 gtk_app_chooser_widget_get_show_fallback (GtkAppChooserWidget *self)
@@ -1251,6 +1267,8 @@ gtk_app_chooser_widget_get_show_fallback (GtkAppChooserWidget *self)
  *
  * Sets whether the app chooser should show applications
  * which are unrelated to the content type.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_widget_set_show_other (GtkAppChooserWidget *self,
@@ -1276,6 +1294,8 @@ gtk_app_chooser_widget_set_show_other (GtkAppChooserWidget *self,
  * which are unrelated to the content type.
  *
  * Returns: the value of [property@Gtk.AppChooserWidget:show-other]
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 gboolean
 gtk_app_chooser_widget_get_show_other (GtkAppChooserWidget *self)
@@ -1292,6 +1312,8 @@ gtk_app_chooser_widget_get_show_other (GtkAppChooserWidget *self)
  *
  * Sets whether the app chooser should show all applications
  * in a flat list.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_widget_set_show_all (GtkAppChooserWidget *self,
@@ -1317,6 +1339,8 @@ gtk_app_chooser_widget_set_show_all (GtkAppChooserWidget *self,
  * in a flat list.
  *
  * Returns: the value of [property@Gtk.AppChooserWidget:show-all]
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 gboolean
 gtk_app_chooser_widget_get_show_all (GtkAppChooserWidget *self)
@@ -1333,6 +1357,8 @@ gtk_app_chooser_widget_get_show_all (GtkAppChooserWidget *self)
  *
  * Sets the text that is shown if there are not applications
  * that can handle the content type.
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 void
 gtk_app_chooser_widget_set_default_text (GtkAppChooserWidget *self,
@@ -1359,6 +1385,8 @@ gtk_app_chooser_widget_set_default_text (GtkAppChooserWidget *self,
  * that can handle the content type.
  *
  * Returns: (nullable): the value of [property@Gtk.AppChooserWidget:default-text]
+ *
+ * Deprecated: 4.10: This widget will be removed in GTK 5
  */
 const char *
 gtk_app_chooser_widget_get_default_text (GtkAppChooserWidget *self)
diff --git a/gtk/gtkappchooserwidget.h b/gtk/deprecated/gtkappchooserwidget.h
similarity index 92%
rename from gtk/gtkappchooserwidget.h
rename to gtk/deprecated/gtkappchooserwidget.h
index 6167e05739..75751dc9eb 100644
--- a/gtk/gtkappchooserwidget.h
+++ b/gtk/deprecated/gtkappchooserwidget.h
@@ -43,43 +43,43 @@ typedef struct _GtkAppChooserWidget        GtkAppChooserWidget;
 GDK_AVAILABLE_IN_ALL
 GType         gtk_app_chooser_widget_get_type             (void) G_GNUC_CONST;
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 GtkWidget *   gtk_app_chooser_widget_new                  (const char          *content_type);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void          gtk_app_chooser_widget_set_show_default     (GtkAppChooserWidget *self,
                                                            gboolean             setting);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 gboolean      gtk_app_chooser_widget_get_show_default     (GtkAppChooserWidget *self);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void          gtk_app_chooser_widget_set_show_recommended (GtkAppChooserWidget *self,
                                                            gboolean             setting);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 gboolean      gtk_app_chooser_widget_get_show_recommended (GtkAppChooserWidget *self);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void          gtk_app_chooser_widget_set_show_fallback    (GtkAppChooserWidget *self,
                                                            gboolean             setting);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 gboolean      gtk_app_chooser_widget_get_show_fallback    (GtkAppChooserWidget *self);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void          gtk_app_chooser_widget_set_show_other       (GtkAppChooserWidget *self,
                                                            gboolean             setting);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 gboolean      gtk_app_chooser_widget_get_show_other       (GtkAppChooserWidget *self);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void          gtk_app_chooser_widget_set_show_all         (GtkAppChooserWidget *self,
                                                            gboolean             setting);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 gboolean      gtk_app_chooser_widget_get_show_all         (GtkAppChooserWidget *self);
 
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 void          gtk_app_chooser_widget_set_default_text     (GtkAppChooserWidget *self,
                                                            const char          *text);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
 const char * gtk_app_chooser_widget_get_default_text     (GtkAppChooserWidget *self);
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkAppChooserWidget, g_object_unref)
diff --git a/gtk/deprecated/meson.build b/gtk/deprecated/meson.build
index 7e7916bcff..98c454ef73 100644
--- a/gtk/deprecated/meson.build
+++ b/gtk/deprecated/meson.build
@@ -1,5 +1,13 @@
-gtk_deprecated_sources = files([])
+gtk_deprecated_sources = [
+  'deprecated/gtkappchooser.c',
+  'deprecated/gtkappchooserbutton.c',
+  'deprecated/gtkappchooserdialog.c',
+  'deprecated/gtkappchooserwidget.c',
+]
 
-gtk_deprecated_headers = files([])
-
-install_headers(gtk_deprecated_headers, subdir: 'gtk-4.0/gtk/deprecated/')
+gtk_deprecated_headers = [
+  'deprecated/gtkappchooser.h',
+  'deprecated/gtkappchooserbutton.h',
+  'deprecated/gtkappchooserdialog.h',
+  'deprecated/gtkappchooserwidget.h',
+]
diff --git a/gtk/gtk.h b/gtk/gtk.h
index f995ba4689..ff0a3eff62 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -37,10 +37,10 @@
 #include <gtk/gtkactionable.h>
 #include <gtk/gtkactionbar.h>
 #include <gtk/gtkadjustment.h>
-#include <gtk/gtkappchooser.h>
-#include <gtk/gtkappchooserdialog.h>
-#include <gtk/gtkappchooserwidget.h>
-#include <gtk/gtkappchooserbutton.h>
+#include <gtk/deprecated/gtkappchooser.h>
+#include <gtk/deprecated/gtkappchooserdialog.h>
+#include <gtk/deprecated/gtkappchooserwidget.h>
+#include <gtk/deprecated/gtkappchooserbutton.h>
 #include <gtk/gtkapplication.h>
 #include <gtk/gtkapplicationwindow.h>
 #include <gtk/gtkaspectframe.h>
diff --git a/gtk/meson.build b/gtk/meson.build
index 9982cc1678..46a50717bf 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -159,10 +159,6 @@ gtk_public_sources = files([
   'gtkactionable.c',
   'gtkactionbar.c',
   'gtkadjustment.c',
-  'gtkappchooser.c',
-  'gtkappchooserbutton.c',
-  'gtkappchooserdialog.c',
-  'gtkappchooserwidget.c',
   'gtkapplication.c',
   'gtkapplicationwindow.c',
   'gtkaspectframe.c',
@@ -451,10 +447,6 @@ gtk_public_headers = files([
   'gtkactionable.h',
   'gtkactionbar.h',
   'gtkadjustment.h',
-  'gtkappchooser.h',
-  'gtkappchooserbutton.h',
-  'gtkappchooserdialog.h',
-  'gtkappchooserwidget.h',
   'gtkapplication.h',
   'gtkapplicationwindow.h',
   'gtkaspectframe.h',
@@ -704,6 +696,7 @@ gtk_public_headers = files([
 ])
 
 install_headers(gtk_public_headers, subdir: 'gtk-4.0/gtk/')
+install_headers(gtk_deprecated_headers, subdir: 'gtk-4.0/gtk/deprecated')
 
 gtk_sources = gtk_public_sources + gtk_private_sources
 
diff --git a/tests/testappchooser.c b/tests/testappchooser.c
index a3418dd34b..09a856d561 100644
--- a/tests/testappchooser.c
+++ b/tests/testappchooser.c
@@ -21,6 +21,8 @@
 #include <stdlib.h>
 #include <gtk/gtk.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 static GtkWidget *toplevel;
 static GFile *file;
 static GtkWidget *grid, *file_l, *open;
diff --git a/tests/testappchooserbutton.c b/tests/testappchooserbutton.c
index 9024b51dfa..1ffc062d4a 100644
--- a/tests/testappchooserbutton.c
+++ b/tests/testappchooserbutton.c
@@ -21,6 +21,8 @@
 #include <stdlib.h>
 #include <gtk/gtk.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 #define CUSTOM_ITEM "custom-item"
 
 static GtkWidget *toplevel, *button, *box;


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