[gtk+/gtk-style-context: 176/191] GtkWidgetPath: Make API more consistent.



commit eb1dcb21d9b370da46c65343ff7bbcde9b517990
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Aug 4 12:50:37 2010 +0200

    GtkWidgetPath: Make API more consistent.

 gtk/gtkcssprovider.c |    4 ++--
 gtk/gtkwidget.c      |    4 ++--
 gtk/gtkwidgetpath.c  |   20 ++++++++++----------
 gtk/gtkwidgetpath.h  |   20 ++++++++++----------
 4 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 75cbd30..2e23d57 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -379,7 +379,7 @@ compare_selector_element (GtkWidgetPath   *path,
     {
       GType type;
 
-      type = gtk_widget_path_get_element_type (path, index);
+      type = gtk_widget_path_iter_get_widget_type (path, index);
 
       if (!g_type_is_a (type, elem->type))
         return FALSE;
@@ -436,7 +436,7 @@ compare_selector_element (GtkWidgetPath   *path,
       const gchar *name, *path_name;
 
       name = g_quark_to_string (elem->name);
-      path_name = gtk_widget_path_get_element_name (path, index);
+      path_name = gtk_widget_path_iter_get_name (path, index);
 
       if (!path_name ||
           strcmp (path_name, name) != 0)
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 7827e63..41dacac 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11574,7 +11574,7 @@ gtk_widget_get_path (GtkWidget *widget)
   gtk_widget_path_prepend_type (path, G_OBJECT_TYPE (widget));
 
   if (widget->name)
-    gtk_widget_path_set_element_name (path, 0, widget->name);
+    gtk_widget_path_iter_set_name (path, 0, widget->name);
 
   context = g_object_get_qdata (G_OBJECT (widget),
                                 quark_style_context);
@@ -11603,7 +11603,7 @@ gtk_widget_get_path (GtkWidget *widget)
       position = gtk_widget_path_prepend_type (path, G_OBJECT_TYPE (parent));
 
       if (parent->name)
-        gtk_widget_path_set_element_name (path, position, parent->name);
+        gtk_widget_path_iter_set_name (path, position, parent->name);
 
       parent = parent->parent;
     }
diff --git a/gtk/gtkwidgetpath.c b/gtk/gtkwidgetpath.c
index bbac2a7..60dcfa2 100644
--- a/gtk/gtkwidgetpath.c
+++ b/gtk/gtkwidgetpath.c
@@ -132,8 +132,8 @@ gtk_widget_path_prepend_type (GtkWidgetPath *path,
 }
 
 GType
-gtk_widget_path_get_element_type (const GtkWidgetPath *path,
-                                  guint                pos)
+gtk_widget_path_iter_get_widget_type (const GtkWidgetPath *path,
+                                      guint                pos)
 {
   GtkPathElement *elem;
 
@@ -145,9 +145,9 @@ gtk_widget_path_get_element_type (const GtkWidgetPath *path,
 }
 
 void
-gtk_widget_path_set_element_type (GtkWidgetPath *path,
-                                  guint          pos,
-                                  GType          type)
+gtk_widget_path_iter_set_widget_type (GtkWidgetPath *path,
+                                      guint          pos,
+                                      GType          type)
 {
   GtkPathElement *elem;
 
@@ -160,8 +160,8 @@ gtk_widget_path_set_element_type (GtkWidgetPath *path,
 }
 
 G_CONST_RETURN gchar *
-gtk_widget_path_get_element_name (const GtkWidgetPath *path,
-                                  guint                pos)
+gtk_widget_path_iter_get_name (const GtkWidgetPath *path,
+                               guint                pos)
 {
   GtkPathElement *elem;
 
@@ -173,9 +173,9 @@ gtk_widget_path_get_element_name (const GtkWidgetPath *path,
 }
 
 void
-gtk_widget_path_set_element_name (GtkWidgetPath *path,
-                                  guint          pos,
-                                  const gchar   *name)
+gtk_widget_path_iter_set_name (GtkWidgetPath *path,
+                               guint          pos,
+                               const gchar   *name)
 {
   GtkPathElement *elem;
 
diff --git a/gtk/gtkwidgetpath.h b/gtk/gtkwidgetpath.h
index b6515e1..d6e074e 100644
--- a/gtk/gtkwidgetpath.h
+++ b/gtk/gtkwidgetpath.h
@@ -38,17 +38,17 @@ guint           gtk_widget_path_length              (const GtkWidgetPath *path);
 guint           gtk_widget_path_prepend_type        (GtkWidgetPath       *path,
                                                      GType                type);
 
-GType               gtk_widget_path_get_element_type (const GtkWidgetPath*path,
-                                                      guint               pos);
-void                gtk_widget_path_set_element_type (GtkWidgetPath      *path,
-                                                      guint               pos,
-                                                      GType               type);
-
-G_CONST_RETURN gchar * gtk_widget_path_get_element_name (const GtkWidgetPath *path,
-                                                         guint                pos);
-void                   gtk_widget_path_set_element_name (GtkWidgetPath       *path,
-                                                         guint                pos,
-                                                         const gchar         *name);
+GType               gtk_widget_path_iter_get_widget_type (const GtkWidgetPath *path,
+                                                          guint                pos);
+void                gtk_widget_path_iter_set_widget_type (GtkWidgetPath       *path,
+                                                          guint                pos,
+                                                          GType                type);
+
+G_CONST_RETURN gchar * gtk_widget_path_iter_get_name (const GtkWidgetPath *path,
+                                                      guint                pos);
+void                   gtk_widget_path_iter_set_name (GtkWidgetPath       *path,
+                                                      guint                pos,
+                                                      const gchar         *name);
 
 void     gtk_widget_path_iter_add_region    (GtkWidgetPath      *path,
                                              guint               pos,



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