[gtk+] Deprecate h/v variants of GtkBox
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Deprecate h/v variants of GtkBox
- Date: Wed, 8 Jun 2011 01:45:24 +0000 (UTC)
commit 4cbbe565b932db1855a844ae5c7ba221243ff8cf
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 7 21:44:24 2011 -0400
Deprecate h/v variants of GtkBox
This has been discussed in bug 541009.
gtk/gtkhbox.c | 5 +++++
gtk/gtkhbox.h | 4 ++++
gtk/gtkvbox.c | 5 +++++
gtk/gtkvbox.h | 4 ++++
4 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkhbox.c b/gtk/gtkhbox.c
index 75d4ab0..cade454 100644
--- a/gtk/gtkhbox.c
+++ b/gtk/gtkhbox.c
@@ -26,6 +26,7 @@
#include "config.h"
+#undef GTK_DISABLE_DEPRECATED
#include "gtkhbox.h"
#include "gtkorientable.h"
@@ -42,6 +43,8 @@
* spacing, width, and alignment of #GtkHBox children.
*
* All children are allocated the same height.
+ *
+ * GtkHBox has been deprecated, use #GtkBox instead.
*/
@@ -69,6 +72,8 @@ gtk_hbox_init (GtkHBox *hbox)
* Creates a new #GtkHBox.
*
* Returns: a new #GtkHBox.
+ *
+ * Deprecated: 3.2: Use gtk_box_new() with %GTK_ORIENTATION_HORIZONTAL instead
*/
GtkWidget *
gtk_hbox_new (gboolean homogeneous,
diff --git a/gtk/gtkhbox.h b/gtk/gtkhbox.h
index e04c731..670e02a 100644
--- a/gtk/gtkhbox.h
+++ b/gtk/gtkhbox.h
@@ -37,6 +37,8 @@
G_BEGIN_DECLS
+#ifndef GTK_DISABLE_DEPRECATED
+
#define GTK_TYPE_HBOX (gtk_hbox_get_type ())
#define GTK_HBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HBOX, GtkHBox))
#define GTK_HBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HBOX, GtkHBoxClass))
@@ -63,6 +65,8 @@ GType gtk_hbox_get_type (void) G_GNUC_CONST;
GtkWidget * gtk_hbox_new (gboolean homogeneous,
gint spacing);
+#endif
+
G_END_DECLS
#endif /* __GTK_HBOX_H__ */
diff --git a/gtk/gtkvbox.c b/gtk/gtkvbox.c
index 3ab349d..f7f91f6 100644
--- a/gtk/gtkvbox.c
+++ b/gtk/gtkvbox.c
@@ -27,6 +27,7 @@
#include "config.h"
#include "gtkorientable.h"
+#undef GTK_DISABLE_DEPRECATED
#include "gtkvbox.h"
@@ -42,6 +43,8 @@
* spacing, height, and alignment of #GtkVBox children.
*
* All children are allocated the same width.
+ *
+ * GtkVBox has been deprecated, use #GtkBox instead.
*/
G_DEFINE_TYPE (GtkVBox, gtk_vbox, GTK_TYPE_BOX)
@@ -68,6 +71,8 @@ gtk_vbox_init (GtkVBox *vbox)
* Creates a new #GtkVBox.
*
* Returns: a new #GtkVBox.
+ *
+ * Deprecated: 3.2: Use gtk_box_new() with %GTK_ORIENTATION_VERTICAL instead
*/
GtkWidget *
gtk_vbox_new (gboolean homogeneous,
diff --git a/gtk/gtkvbox.h b/gtk/gtkvbox.h
index 5cd7bb9..e6cfa29 100644
--- a/gtk/gtkvbox.h
+++ b/gtk/gtkvbox.h
@@ -37,6 +37,8 @@
G_BEGIN_DECLS
+#ifndef GTK_DISABLE_DEPRECATED
+
#define GTK_TYPE_VBOX (gtk_vbox_get_type ())
#define GTK_VBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_VBOX, GtkVBox))
#define GTK_VBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_VBOX, GtkVBoxClass))
@@ -63,6 +65,8 @@ GType gtk_vbox_get_type (void) G_GNUC_CONST;
GtkWidget * gtk_vbox_new (gboolean homogeneous,
gint spacing);
+#endif
+
G_END_DECLS
#endif /* __GTK_VBOX_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]