[gtk+/gtk-style-context: 408/540] GtkWidgetPath: Make gtk_widget_path_prepend_type() return nothing.



commit 442fc19864d9e2548dea0aa4affb25acf2b18871
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Nov 19 18:58:19 2010 +0100

    GtkWidgetPath: Make gtk_widget_path_prepend_type() return nothing.
    
    It's senseless to always return 0

 gtk/gtkwidgetpath.c |   10 +++-------
 gtk/gtkwidgetpath.h |    2 +-
 2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkwidgetpath.c b/gtk/gtkwidgetpath.c
index 88d2b6d..633fe43 100644
--- a/gtk/gtkwidgetpath.c
+++ b/gtk/gtkwidgetpath.c
@@ -230,23 +230,19 @@ gtk_widget_path_length (const GtkWidgetPath *path)
  *
  * Prepends a widget type to the widget hierachy represented by @path.
  *
- * Returns: the position where the element was inserted
- *
  * Since: 3.0
  **/
-guint
+void
 gtk_widget_path_prepend_type (GtkWidgetPath *path,
                               GType          type)
 {
   GtkPathElement new = { 0 };
 
-  g_return_val_if_fail (path != NULL, 0);
-  g_return_val_if_fail (g_type_is_a (type, GTK_TYPE_WIDGET), 0);
+  g_return_if_fail (path != NULL);
+  g_return_if_fail (g_type_is_a (type, GTK_TYPE_WIDGET));
 
   new.type = type;
   g_array_prepend_val (path->elems, new);
-
-  return 0;
 }
 
 /**
diff --git a/gtk/gtkwidgetpath.h b/gtk/gtkwidgetpath.h
index f36ebcb..18ee05f 100644
--- a/gtk/gtkwidgetpath.h
+++ b/gtk/gtkwidgetpath.h
@@ -37,7 +37,7 @@ guint           gtk_widget_path_length              (const GtkWidgetPath *path);
 
 guint           gtk_widget_path_append_type         (GtkWidgetPath       *path,
                                                      GType                type);
-guint           gtk_widget_path_prepend_type        (GtkWidgetPath       *path,
+void            gtk_widget_path_prepend_type        (GtkWidgetPath       *path,
                                                      GType                type);
 
 GType               gtk_widget_path_iter_get_widget_type (const GtkWidgetPath *path,



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