[gtk+] Recursively move autocleanups to their header files



commit a395852233a9d7e8462a1287e847808d368be321
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Nov 10 14:11:04 2015 +0000

    Recursively move autocleanups to their header files
    
    Start from GtkAccelLabel and walk the tree downwards.

 gtk/gtk-autocleanups.h |    4 ----
 gtk/gtkaccellabel.h    |    6 ++++--
 gtk/gtklabel.h         |    6 ++++--
 gtk/gtkmenu.h          |    5 +++--
 gtk/gtkmenushell.h     |    6 ++++--
 5 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtk-autocleanups.h b/gtk/gtk-autocleanups.h
index f0328ab..986695f 100644
--- a/gtk/gtk-autocleanups.h
+++ b/gtk/gtk-autocleanups.h
@@ -21,7 +21,6 @@
 
 #ifndef __GI_SCANNER__
 
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkAccelLabel, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkAccelMap, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkAccessible, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkActionBar, g_object_unref)
@@ -106,17 +105,14 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkIconView, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkImage, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkInfoBar, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkInvisible, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLabel, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLayout, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLevelBar, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLinkButton, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkListStore, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLockButton, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMenu, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMenuBar, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMenuButton, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMenuItem, g_object_unref)
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMenuShell, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMenuToolButton, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMessageDialog, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMountOperation, g_object_unref)
diff --git a/gtk/gtkaccellabel.h b/gtk/gtkaccellabel.h
index c08f81b..fa7ea51 100644
--- a/gtk/gtkaccellabel.h
+++ b/gtk/gtkaccellabel.h
@@ -28,14 +28,12 @@
 #ifndef __GTK_ACCEL_LABEL_H__
 #define __GTK_ACCEL_LABEL_H__
 
-
 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
 #error "Only <gtk/gtk.h> can be included directly."
 #endif
 
 #include <gtk/gtklabel.h>
 
-
 G_BEGIN_DECLS
 
 #define GTK_TYPE_ACCEL_LABEL           (gtk_accel_label_get_type ())
@@ -111,6 +109,10 @@ gchar *    _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *kla
                                                         guint               accelerator_key,
                                                         GdkModifierType     accelerator_mods);
 
+#ifndef __GI_SCANNER__
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkAccelLabel, g_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GTK_ACCEL_LABEL_H__ */
diff --git a/gtk/gtklabel.h b/gtk/gtklabel.h
index 424c8f3..58ee934 100644
--- a/gtk/gtklabel.h
+++ b/gtk/gtklabel.h
@@ -25,7 +25,6 @@
 #ifndef __GTK_LABEL_H__
 #define __GTK_LABEL_H__
 
-
 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
 #error "Only <gtk/gtk.h> can be included directly."
 #endif
@@ -34,7 +33,6 @@
 #include <gtk/gtkwindow.h>
 #include <gtk/gtkmenu.h>
 
-
 G_BEGIN_DECLS
 
 #define GTK_TYPE_LABEL           (gtk_label_get_type ())
@@ -227,6 +225,10 @@ void         gtk_label_set_yalign (GtkLabel *label,
 GDK_AVAILABLE_IN_3_16
 gfloat       gtk_label_get_yalign (GtkLabel *label);
 
+#ifndef __GI_SCANNER__
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkLabel, g_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GTK_LABEL_H__ */
diff --git a/gtk/gtkmenu.h b/gtk/gtkmenu.h
index bf81a89..f66200a 100644
--- a/gtk/gtkmenu.h
+++ b/gtk/gtkmenu.h
@@ -25,7 +25,6 @@
 #ifndef __GTK_MENU_H__
 #define __GTK_MENU_H__
 
-
 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
 #error "Only <gtk/gtk.h> can be included directly."
 #endif
@@ -33,7 +32,6 @@
 #include <gtk/gtkaccelgroup.h>
 #include <gtk/gtkmenushell.h>
 
-
 G_BEGIN_DECLS
 
 #define GTK_TYPE_MENU                  (gtk_menu_get_type ())
@@ -251,6 +249,9 @@ void     gtk_menu_set_reserve_toggle_size (GtkMenu  *menu,
 GDK_AVAILABLE_IN_ALL
 gboolean gtk_menu_get_reserve_toggle_size (GtkMenu  *menu);
 
+#ifndef __GI_SCANNER__
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMenu, g_object_unref)
+#endif
 
 G_END_DECLS
 
diff --git a/gtk/gtkmenushell.h b/gtk/gtkmenushell.h
index af424b0..34db130 100644
--- a/gtk/gtkmenushell.h
+++ b/gtk/gtkmenushell.h
@@ -25,14 +25,12 @@
 #ifndef __GTK_MENU_SHELL_H__
 #define __GTK_MENU_SHELL_H__
 
-
 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
 #error "Only <gtk/gtk.h> can be included directly."
 #endif
 
 #include <gtk/gtkcontainer.h>
 
-
 G_BEGIN_DECLS
 
 #define GTK_TYPE_MENU_SHELL             (gtk_menu_shell_get_type ())
@@ -132,6 +130,10 @@ void       gtk_menu_shell_bind_model   (GtkMenuShell *menu_shell,
                                         const gchar  *action_namespace,
                                         gboolean      with_separators);
 
+#ifndef __GI_SCANNER__
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkMenuShell, g_object_unref)
+#endif
+
 G_END_DECLS
 
 #endif /* __GTK_MENU_SHELL_H__ */


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