[gtk/deprecate-all-the-cells: 21/24] demos and examples: Ignore deprecations




commit 5bb6490e2d5baf6a449976f4664bdcb35910a145
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 7 21:12:37 2022 -0400

    demos and examples: Ignore deprecations
    
    For now, just ignore deprecations. Eventually,
    we will have to go through, drop demos that are
    for wholly deprecated widgets, and update others.

 demos/constraint-editor/constraint-editor.c |  2 ++
 demos/constraint-editor/guide-editor.c      |  2 ++
 demos/gtk-demo/combobox.c                   |  2 ++
 demos/gtk-demo/editable_cells.c             |  2 ++
 demos/gtk-demo/font_features.c              |  1 +
 demos/gtk-demo/fontrendering.c              |  2 ++
 demos/gtk-demo/iconview.c                   |  2 ++
 demos/gtk-demo/iconview_edit.c              |  2 ++
 demos/gtk-demo/sizegroup.c                  |  2 ++
 demos/gtk-demo/textview.c                   |  2 ++
 demos/gtk-demo/tree_store.c                 |  2 ++
 demos/widget-factory/widget-factory.c       | 12 ++++++++++++
 examples/bp/bloatpad.c                      |  2 ++
 13 files changed, 35 insertions(+)
---
diff --git a/demos/constraint-editor/constraint-editor.c b/demos/constraint-editor/constraint-editor.c
index 3e77eca1d4..f08e321033 100644
--- a/demos/constraint-editor/constraint-editor.c
+++ b/demos/constraint-editor/constraint-editor.c
@@ -21,6 +21,8 @@
 
 #include "constraint-editor.h"
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 struct _ConstraintEditor
 {
   GtkWidget parent_instance;
diff --git a/demos/constraint-editor/guide-editor.c b/demos/constraint-editor/guide-editor.c
index 6e8e2ac5ac..8a54c560ad 100644
--- a/demos/constraint-editor/guide-editor.c
+++ b/demos/constraint-editor/guide-editor.c
@@ -21,6 +21,8 @@
 
 #include "guide-editor.h"
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 struct _GuideEditor
 {
   GtkWidget parent_instance;
diff --git a/demos/gtk-demo/combobox.c b/demos/gtk-demo/combobox.c
index d7a7320eb0..1450e8055a 100644
--- a/demos/gtk-demo/combobox.c
+++ b/demos/gtk-demo/combobox.c
@@ -11,6 +11,8 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 enum
 {
   ICON_NAME_COL,
diff --git a/demos/gtk-demo/editable_cells.c b/demos/gtk-demo/editable_cells.c
index cd1fc9be3c..11e914bd6f 100644
--- a/demos/gtk-demo/editable_cells.c
+++ b/demos/gtk-demo/editable_cells.c
@@ -14,6 +14,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 typedef struct
 {
   int    number;
diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c
index 0b0b735b8f..c661cd49c7 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -21,6 +21,7 @@
 #include "script-names.h"
 #include "language-names.h"
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 
 #define MAKE_TAG(a,b,c,d) (unsigned int)(((a) << 24) | ((b) << 16) | ((c) <<  8) | (d))
 
diff --git a/demos/gtk-demo/fontrendering.c b/demos/gtk-demo/fontrendering.c
index 9f85d2c03b..434f7e99ee 100644
--- a/demos/gtk-demo/fontrendering.c
+++ b/demos/gtk-demo/fontrendering.c
@@ -10,6 +10,8 @@
 
 #include <gtk/gtk.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 static GtkWidget *window = NULL;
 static GtkWidget *font_button = NULL;
 static GtkWidget *entry = NULL;
diff --git a/demos/gtk-demo/iconview.c b/demos/gtk-demo/iconview.c
index 030e9a896a..7b038cf474 100644
--- a/demos/gtk-demo/iconview.c
+++ b/demos/gtk-demo/iconview.c
@@ -9,6 +9,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 static GtkWidget *window = NULL;
 
 #define FOLDER_NAME "/iconview/gnome-fs-directory.png"
diff --git a/demos/gtk-demo/iconview_edit.c b/demos/gtk-demo/iconview_edit.c
index 69e6184055..83dc2b02ea 100644
--- a/demos/gtk-demo/iconview_edit.c
+++ b/demos/gtk-demo/iconview_edit.c
@@ -8,6 +8,8 @@
 #include <gtk/gtk.h>
 #include <string.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 enum
 {
   COL_TEXT,
diff --git a/demos/gtk-demo/sizegroup.c b/demos/gtk-demo/sizegroup.c
index ec90338867..45ed13792a 100644
--- a/demos/gtk-demo/sizegroup.c
+++ b/demos/gtk-demo/sizegroup.c
@@ -16,6 +16,8 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 /* Convenience function to create a combo box holding a number of strings
  */
 GtkWidget *
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
index 5435d5ce5f..2ee8bf8c7e 100644
--- a/demos/gtk-demo/textview.c
+++ b/demos/gtk-demo/textview.c
@@ -11,6 +11,8 @@
 #include <stdlib.h> /* for exit() */
 #include "paintable.h"
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 static void easter_egg_callback (GtkWidget *button, gpointer data);
 
 static void
diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c
index 4514aceec9..0a7730d637 100644
--- a/demos/gtk-demo/tree_store.c
+++ b/demos/gtk-demo/tree_store.c
@@ -10,6 +10,8 @@
 
 #include <gtk/gtk.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 /* TreeItem structure */
 typedef struct _TreeItem TreeItem;
 struct _TreeItem
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c
index 4ec907d531..e1881cc5b2 100644
--- a/demos/widget-factory/widget-factory.c
+++ b/demos/widget-factory/widget-factory.c
@@ -664,6 +664,7 @@ on_record_button_toggled (GtkToggleButton *button,
     gtk_widget_add_css_class (GTK_WIDGET (button), "destructive-action");
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 on_page_combo_changed (GtkComboBox *combo,
                        gpointer     user_data)
@@ -705,6 +706,7 @@ on_page_combo_changed (GtkComboBox *combo,
     default:;
     }
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 on_range_from_changed (GtkSpinButton *from)
@@ -843,6 +845,7 @@ page_changed_cb (GtkWidget *stack, GParamSpec *pspec, gpointer data)
     }
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 populate_model (GtkTreeStore *store)
 {
@@ -960,6 +963,7 @@ row_separator_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
 
   return is_sep;
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 update_title_header (GtkListBoxRow *row,
@@ -1578,6 +1582,7 @@ osd_frame_pressed (GtkGestureClick *gesture,
   return GDK_EVENT_STOP;
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static gboolean
 page_combo_separator_func (GtkTreeModel *model,
                            GtkTreeIter  *iter,
@@ -1592,6 +1597,7 @@ page_combo_separator_func (GtkTreeModel *model,
 
   return res;
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 toggle_format (GSimpleAction *action,
@@ -1844,6 +1850,7 @@ update_buttons (GtkWidget *iv, GtkIconSize size)
   gtk_widget_set_sensitive (button, size != GTK_ICON_SIZE_INHERIT);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 increase_icon_size (GtkWidget *iv)
 {
@@ -1894,6 +1901,7 @@ reset_icon_size (GtkWidget *iv)
 
   gtk_widget_queue_resize (iv);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static char *
 scale_format_value_blank (GtkScale *scale, double value, gpointer user_data)
@@ -2270,10 +2278,12 @@ activate (GApplication *app)
   g_object_set_data (G_OBJECT (window), "selection_flowbox", widget2);
   g_signal_connect_swapped (widget, "clicked", G_CALLBACK (populate_flowbox), widget2);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   widget = (GtkWidget *)gtk_builder_get_object (builder, "charletree");
   populate_model ((GtkTreeStore *)gtk_tree_view_get_model (GTK_TREE_VIEW (widget)));
   gtk_tree_view_set_row_separator_func (GTK_TREE_VIEW (widget), row_separator_func, NULL, NULL);
   gtk_tree_view_expand_all (GTK_TREE_VIEW (widget));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   widget = GTK_WIDGET (gtk_builder_get_object (builder, "munsell"));
   widget2 = GTK_WIDGET (gtk_builder_get_object (builder, "cchooser"));
@@ -2281,6 +2291,7 @@ activate (GApplication *app)
   populate_colors (widget, widget2);
   g_signal_connect (widget2, "notify::rgba", G_CALLBACK (rgba_changed), widget);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   widget = (GtkWidget *)gtk_builder_get_object (builder, "page_combo");
   gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (widget), page_combo_separator_func, NULL, NULL);
   widget2 = (GtkWidget *)gtk_builder_get_object (builder, "range_from_spin");
@@ -2291,6 +2302,7 @@ activate (GApplication *app)
   g_object_set_data (G_OBJECT (widget), "range_to_spin", widget3);
   g_object_set_data (G_OBJECT (widget2), "range_to_spin", widget3);
   g_object_set_data (G_OBJECT (widget), "print_button", widget4);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   widget2 = (GtkWidget *)gtk_builder_get_object (builder, "tooltextview");
 
diff --git a/examples/bp/bloatpad.c b/examples/bp/bloatpad.c
index e923b444c9..983257cf1c 100644
--- a/examples/bp/bloatpad.c
+++ b/examples/bp/bloatpad.c
@@ -1,6 +1,8 @@
 #include <stdlib.h>
 #include <gtk/gtk.h>
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
 typedef struct
 {
   GtkApplication parent_instance;


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