summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-06-21 15:38:38 +0200
committerBenjamin Otte <otte@redhat.com>2014-06-21 15:46:44 +0200
commit93b31790424cbc2face0a885b5dd49889c2f297e (patch)
tree9cd262c0f3e6a7130b256b0b98da239e9a81010e
parent6bc251692a202c6ec54572cdab0dd68df16c77df (diff)
downloadgtk+-93b31790424cbc2face0a885b5dd49889c2f297e.tar.gz
widgetpath: Deprecate regions
This is a foolowup to d80bf0790d0903ba2825f306b6f7435529f922e2
-rw-r--r--gtk/gtknotebook.c4
-rw-r--r--gtk/gtkstylecontext.c2
-rw-r--r--gtk/gtktreeview.c2
-rw-r--r--gtk/gtkwidgetpath.c14
-rw-r--r--gtk/gtkwidgetpath.h12
-rw-r--r--testsuite/gtk/stylecontext.c3
6 files changed, 31 insertions, 6 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 73616715f9..3e1dee6ec9 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -4603,10 +4603,12 @@ gtk_notebook_get_path_for_child (GtkContainer *container,
if (!c)
return path;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_path_iter_add_region (path,
gtk_widget_path_length (path) - 2,
GTK_STYLE_REGION_TAB,
_gtk_notebook_get_tab_flags (notebook, page));
+G_GNUC_END_IGNORE_DEPRECATIONS
return path;
}
@@ -6680,6 +6682,7 @@ gtk_notebook_update_tab_states (GtkNotebook *notebook)
{
GtkRegionFlags current_flags;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* FIXME: We should store these flags somewhere instead of poking
* the widget's path */
if (!gtk_widget_path_iter_has_region (gtk_widget_get_path (page->tab_label),
@@ -6688,6 +6691,7 @@ gtk_notebook_update_tab_states (GtkNotebook *notebook)
&current_flags)
|| current_flags != _gtk_notebook_get_tab_flags (notebook, page))
_gtk_widget_invalidate_style_context (page->tab_label, GTK_CSS_CHANGE_PARENT_STATE);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
}
}
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 45fcb9c1b1..1ca31bced9 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -730,9 +730,11 @@ create_query_path (GtkStyleContext *context,
GtkRegion *region;
region = &g_array_index (info->regions, GtkRegion, i);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_path_iter_add_region (path, pos,
g_quark_to_string (region->class_quark),
region->flags);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
/* Set widget classes */
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 83537c9d34..addac50f2d 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -8751,7 +8751,9 @@ gtk_tree_view_get_path_for_child (GtkContainer *container,
if (!list->next)
flags |= GTK_REGION_LAST;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_path_iter_add_region (path, gtk_widget_path_length (path) - 2, GTK_STYLE_REGION_COLUMN_HEADER, flags);
+G_GNUC_END_IGNORE_DEPRECATIONS
break;
}
g_list_free (visible_columns);
diff --git a/gtk/gtkwidgetpath.c b/gtk/gtkwidgetpath.c
index ca324d9d80..221e93ce61 100644
--- a/gtk/gtkwidgetpath.c
+++ b/gtk/gtkwidgetpath.c
@@ -981,6 +981,8 @@ gtk_widget_path_iter_has_class (const GtkWidgetPath *path,
* and “-”, starting always with a lowercase letter.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
**/
void
gtk_widget_path_iter_add_region (GtkWidgetPath *path,
@@ -1020,6 +1022,8 @@ gtk_widget_path_iter_add_region (GtkWidgetPath *path,
* the hierarchy defined in @path.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
**/
void
gtk_widget_path_iter_remove_region (GtkWidgetPath *path,
@@ -1056,6 +1060,8 @@ gtk_widget_path_iter_remove_region (GtkWidgetPath *path,
* hierarchy defined in @path.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
**/
void
gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
@@ -1089,6 +1095,8 @@ gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
* free the list itself.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
**/
GSList *
gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
@@ -1136,6 +1144,8 @@ gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
* Returns: %TRUE if the widget at @pos has the region defined.
*
* Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
**/
gboolean
gtk_widget_path_iter_has_qregion (const GtkWidgetPath *path,
@@ -1182,6 +1192,8 @@ gtk_widget_path_iter_has_qregion (const GtkWidgetPath *path,
* Returns: %TRUE if the class @name is defined for the widget at @pos
*
* Since: 3.0
+ *
+ * Deprecated: 3.14: The use of regions is deprecated.
**/
gboolean
gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
@@ -1203,7 +1215,9 @@ gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
if (qname == 0)
return FALSE;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return gtk_widget_path_iter_has_qregion (path, pos, qname, flags);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
diff --git a/gtk/gtkwidgetpath.h b/gtk/gtkwidgetpath.h
index ea40469cee..7a705572aa 100644
--- a/gtk/gtkwidgetpath.h
+++ b/gtk/gtkwidgetpath.h
@@ -119,29 +119,29 @@ gboolean gtk_widget_path_iter_has_qclass (const GtkWidgetPath *path,
gint pos,
GQuark qname);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_widget_path_iter_add_region (GtkWidgetPath *path,
gint pos,
const gchar *name,
GtkRegionFlags flags);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_widget_path_iter_remove_region (GtkWidgetPath *path,
gint pos,
const gchar *name);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_widget_path_iter_clear_regions (GtkWidgetPath *path,
gint pos);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
GSList * gtk_widget_path_iter_list_regions (const GtkWidgetPath *path,
gint pos);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
gboolean gtk_widget_path_iter_has_region (const GtkWidgetPath *path,
gint pos,
const gchar *name,
GtkRegionFlags *flags);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
gboolean gtk_widget_path_iter_has_qregion (const GtkWidgetPath *path,
gint pos,
GQuark qname,
diff --git a/testsuite/gtk/stylecontext.c b/testsuite/gtk/stylecontext.c
index 7348df952c..89d395ab27 100644
--- a/testsuite/gtk/stylecontext.c
+++ b/testsuite/gtk/stylecontext.c
@@ -115,6 +115,7 @@ test_path (void)
gtk_widget_path_iter_clear_classes (path, 1);
g_assert (!gtk_widget_path_iter_has_class (path, 1, "class1"));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_widget_path_iter_add_region (path, 1, "tab", 0);
gtk_widget_path_iter_add_region (path, 1, "title", GTK_REGION_EVEN | GTK_REGION_FIRST);
@@ -130,6 +131,8 @@ test_path (void)
g_assert (gtk_widget_path_iter_has_region (path2, 1, "title", &flags) &&
flags == (GTK_REGION_EVEN | GTK_REGION_FIRST));
g_assert (!gtk_widget_path_iter_has_region (path2, 1, "extension", NULL));
+G_GNUC_END_IGNORE_DEPRECATIONS
+
gtk_widget_path_free (path2);
gtk_widget_path_free (path);