From: Emmanuele Bassi Date: Thu, 20 Oct 2022 11:23:58 +0000 (+0100) Subject: Mark GtkAppChooser-related types as deprecated X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~9^2~150^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bf8d4c541873c2f62c92c3926e985e27d93f749e;p=gtk4.git Mark GtkAppChooser-related types as deprecated The type docblock needs a Deprecated annotation. --- diff --git a/gtk/deprecated/gtkappchooser.c b/gtk/deprecated/gtkappchooser.c index db2e9fecba..0dd124cc95 100644 --- a/gtk/deprecated/gtkappchooser.c +++ b/gtk/deprecated/gtkappchooser.c @@ -41,6 +41,10 @@ * * To obtain the application that has been selected in a `GtkAppChooser`, * use [method@Gtk.AppChooser.get_app_info]. + * + * Deprecated: 4.10: The application selection widgets should be + * implemented according to the design of each platform and/or + * application requiring them. */ #include "config.h" diff --git a/gtk/deprecated/gtkappchooserbutton.c b/gtk/deprecated/gtkappchooserbutton.c index 6a5044fbdd..3f83f2fde7 100644 --- a/gtk/deprecated/gtkappchooserbutton.c +++ b/gtk/deprecated/gtkappchooserbutton.c @@ -45,9 +45,13 @@ * To track changes in the selected application, use the * [signal@Gtk.AppChooserButton::changed] signal. * - * # CSS nodes + * ## CSS nodes * * `GtkAppChooserButton` has a single CSS node with the name “appchooserbutton”. + * + * Deprecated: 4.10: The application selection widgets should be + * implemented according to the design of each platform and/or + * application requiring them. */ #include "config.h" diff --git a/gtk/deprecated/gtkappchooserdialog.c b/gtk/deprecated/gtkappchooserdialog.c index 96c7ed644b..4575c18d68 100644 --- a/gtk/deprecated/gtkappchooserdialog.c +++ b/gtk/deprecated/gtkappchooserdialog.c @@ -37,6 +37,10 @@ * * To set the heading that is shown above the `GtkAppChooserWidget`, * use [method@Gtk.AppChooserDialog.set_heading]. + * + * Deprecated: 4.10: The application selection widgets should be + * implemented according to the design of each platform and/or + * application requiring them. */ #include "config.h" @@ -216,13 +220,13 @@ set_dialog_properties (GtkAppChooserDialog *self) else if (self->content_type) { /* Translators: %s is a file type description */ - subtitle = g_strdup_printf (_("Opening “%s” files."), + subtitle = g_strdup_printf (_("Opening “%s” files."), unknown ? self->content_type : description); string = g_strdup_printf (_("No applications found for “%s” files"), unknown ? self->content_type : description); } - g_object_get (self, "use-header-bar", &use_header, NULL); + g_object_get (self, "use-header-bar", &use_header, NULL); if (use_header) { GtkWidget *box, *label; @@ -494,7 +498,7 @@ static void gtk_app_chooser_dialog_dispose (GObject *object) { GtkAppChooserDialog *self = GTK_APP_CHOOSER_DIALOG (object); - + g_clear_object (&self->gfile); self->dismissed = TRUE; diff --git a/gtk/deprecated/gtkappchooserwidget.c b/gtk/deprecated/gtkappchooserwidget.c index fc662b2674..60e31fc336 100644 --- a/gtk/deprecated/gtkappchooserwidget.c +++ b/gtk/deprecated/gtkappchooserwidget.c @@ -69,9 +69,13 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS * [signal@Gtk.AppChooserWidget::application-selected] and * [signal@Gtk.AppChooserWidget::application-activated] signals. * - * # CSS nodes + * ## CSS nodes * * `GtkAppChooserWidget` has a single CSS node with name appchooser. + * + * Deprecated: 4.10: The application selection widgets should be + * implemented according to the design of each platform and/or + * application requiring them. */ typedef struct _GtkAppChooserWidgetClass GtkAppChooserWidgetClass; @@ -312,7 +316,7 @@ gtk_app_chooser_sort_func (GtkTreeModel *model, retval = 1; goto out; } - + /* the recommended one always wins */ if (a_recommended && !b_recommended) { @@ -444,7 +448,7 @@ gtk_app_chooser_widget_add_section (GtkAppChooserWidget *self, retval = FALSE; heading_added = FALSE; bold_string = g_strdup_printf ("%s", heading_title); - + for (l = applications; l != NULL; l = l->next) { app = l->data;