From 00544af8c27c668572659650f9dc71c1d1fb7199 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 7 Jun 2011 21:35:57 -0400 Subject: [PATCH] Deprecate h/v subclasses of GtkSeparator This has been discussed in bug 541009. --- gtk/gtkhseparator.c | 5 +++++ gtk/gtkhseparator.h | 2 ++ gtk/gtkvseparator.c | 5 +++++ gtk/gtkvseparator.h | 5 +++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gtk/gtkhseparator.c b/gtk/gtkhseparator.c index 49b31d0b9b..53e99fc0cf 100644 --- a/gtk/gtkhseparator.c +++ b/gtk/gtkhseparator.c @@ -26,6 +26,7 @@ #include "config.h" +#undef GTK_DISABLE_DEPRECATED #include "gtkhseparator.h" #include "gtkorientable.h" @@ -46,6 +47,8 @@ * widget using gtk_separator_menu_item_new() and add it to the menu with * gtk_menu_shell_append(). * + * + * GtkHSeparator has been deprecated, use #GtkSeparator instead. */ @@ -69,6 +72,8 @@ gtk_hseparator_init (GtkHSeparator *hseparator) * Creates a new #GtkHSeparator. * * Returns: a new #GtkHSeparator. + * + * Deprecated: 3.2: Use gtk_separator_new() with %GTK_ORIENTATION_HORIZONTAL instead */ GtkWidget * gtk_hseparator_new (void) diff --git a/gtk/gtkhseparator.h b/gtk/gtkhseparator.h index 4cda938477..d93ca96011 100644 --- a/gtk/gtkhseparator.h +++ b/gtk/gtkhseparator.h @@ -31,6 +31,7 @@ #ifndef __GTK_HSEPARATOR_H__ #define __GTK_HSEPARATOR_H__ +#ifndef GTK_DISABLE_DEPRECATED #include @@ -65,4 +66,5 @@ GtkWidget* gtk_hseparator_new (void); G_END_DECLS +#endif #endif /* __GTK_HSEPARATOR_H__ */ diff --git a/gtk/gtkvseparator.c b/gtk/gtkvseparator.c index f2dcf81b70..9fb5f92e77 100644 --- a/gtk/gtkvseparator.c +++ b/gtk/gtkvseparator.c @@ -27,6 +27,7 @@ #include "config.h" #include "gtkorientable.h" +#undef GTK_DISABLE_DEPRECATED #include "gtkvseparator.h" @@ -39,6 +40,8 @@ * The #GtkVSeparator widget is a vertical separator, used to group the * widgets within a window. It displays a vertical line with a shadow to * make it appear sunken into the interface. + * + * GtkVSeparator has been deprecated, use #GtkSeparator instead. */ G_DEFINE_TYPE (GtkVSeparator, gtk_vseparator, GTK_TYPE_SEPARATOR) @@ -61,6 +64,8 @@ gtk_vseparator_init (GtkVSeparator *vseparator) * Creates a new #GtkVSeparator. * * Returns: a new #GtkVSeparator. + * + * Deprecated: 3.2: Use gtk_separator_new() with %GTK_ORIENTATION_VERTICAL instead */ GtkWidget * gtk_vseparator_new (void) diff --git a/gtk/gtkvseparator.h b/gtk/gtkvseparator.h index 62c7bf50e1..0ff262fea2 100644 --- a/gtk/gtkvseparator.h +++ b/gtk/gtkvseparator.h @@ -31,10 +31,10 @@ #ifndef __GTK_VSEPARATOR_H__ #define __GTK_VSEPARATOR_H__ +#ifndef GTK_DISABLE_DEPRECATED #include - G_BEGIN_DECLS @@ -72,5 +72,6 @@ GtkWidget* gtk_vseparator_new (void); G_END_DECLS +#endif -#endif /* __GTK_SEPARATOR_H__ */ +#endif /* __GTK_VSEPARATOR_H__ */