[gtk+] Avoid deprecation warnings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Avoid deprecation warnings
- Date: Tue, 24 Jun 2014 15:45:12 +0000 (UTC)
commit ecffe569551b2d91e5fa39936db9b50d5e2aab86
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 24 08:21:29 2014 -0400
Avoid deprecation warnings
We know regions are deprecated, no need to warn about it here.
gtk/gtkcssmatcher.c | 6 +++++-
tests/styleexamples.c | 2 ++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssmatcher.c b/gtk/gtkcssmatcher.c
index b0bdfd1..04d4571 100644
--- a/gtk/gtkcssmatcher.c
+++ b/gtk/gtkcssmatcher.c
@@ -106,7 +106,8 @@ gtk_css_matcher_widget_path_has_regions (const GtkCssMatcher *matcher)
const GtkWidgetPath *siblings;
GSList *regions;
gboolean result;
-
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
siblings = gtk_widget_path_iter_get_siblings (matcher->path.path, matcher->path.index);
if (siblings && matcher->path.sibling_index != gtk_widget_path_iter_get_sibling_index (matcher->path.path,
matcher->path.index))
regions = gtk_widget_path_iter_list_regions (siblings, matcher->path.sibling_index);
@@ -116,6 +117,7 @@ gtk_css_matcher_widget_path_has_regions (const GtkCssMatcher *matcher)
g_slist_free (regions);
return result;
+G_GNUC_END_IGNORE_DEPRECATIONS
}
static gboolean
@@ -126,6 +128,7 @@ gtk_css_matcher_widget_path_has_region (const GtkCssMatcher *matcher,
const GtkWidgetPath *siblings;
GtkRegionFlags region_flags;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
siblings = gtk_widget_path_iter_get_siblings (matcher->path.path, matcher->path.index);
if (siblings && matcher->path.sibling_index != gtk_widget_path_iter_get_sibling_index (matcher->path.path,
matcher->path.index))
{
@@ -142,6 +145,7 @@ gtk_css_matcher_widget_path_has_region (const GtkCssMatcher *matcher,
return FALSE;
return TRUE;
+G_GNUC_END_IGNORE_DEPRECATIONS
}
static gboolean
diff --git a/tests/styleexamples.c b/tests/styleexamples.c
index b3169f4..d55ea2d 100644
--- a/tests/styleexamples.c
+++ b/tests/styleexamples.c
@@ -217,7 +217,9 @@ draw_cb_extension (GtkWidget *widget, cairo_t *cr)
gtk_style_context_save (context);
gtk_style_context_add_class (context, "notebook");
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_style_context_add_region (context, GTK_STYLE_REGION_TAB, 0);
+G_GNUC_END_IGNORE_DEPRECATIONS
gtk_style_context_set_state (context, 0);
gtk_render_extension (context, cr, 26, 12, 24, 12, GTK_POS_BOTTOM);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]