[gtk+] Deprecate h/v variants of GtkScale
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Deprecate h/v variants of GtkScale
- Date: Wed, 8 Jun 2011 01:45:19 +0000 (UTC)
commit 12d3f26d660e110d4f4f5a4fe7fa3dba343a7041
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 7 21:43:32 2011 -0400
Deprecate h/v variants of GtkScale
This has been discussed in bug 541009.
gtk/gtkhscale.c | 7 +++++++
gtk/gtkhscale.h | 3 +++
gtk/gtkvscale.c | 7 +++++++
gtk/gtkvscale.h | 2 ++
4 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkhscale.c b/gtk/gtkhscale.c
index 84ea86a..e19a5b6 100644
--- a/gtk/gtkhscale.c
+++ b/gtk/gtkhscale.c
@@ -29,6 +29,7 @@
#include <math.h>
#include <stdlib.h>
+#undef GTK_DISABLE_DEPRECATED
#include "gtkhscale.h"
#include "gtkorientable.h"
@@ -43,6 +44,8 @@
*
* The position to show the current value, and the number of decimal places
* shown can be set using the parent #GtkScale class's functions.
+ *
+ * GtkHScale has been deprecated, use #GtkScale instead.
*/
@@ -70,6 +73,8 @@ gtk_hscale_init (GtkHScale *hscale)
* Creates a new #GtkHScale.
*
* Returns: a new #GtkHScale.
+ *
+ * Deprecated: 3.2: Use gtk_scale_new() with %GTK_ORIENTATION_HORIZONTAL instead
*/
GtkWidget *
gtk_hscale_new (GtkAdjustment *adjustment)
@@ -98,6 +103,8 @@ gtk_hscale_new (GtkAdjustment *adjustment)
* needs, use gtk_scale_set_digits() to correct it.
*
* Return value: a new #GtkHScale
+ *
+ * Deprecated: 3.2: Use gtk_scale_new_with_range() with %GTK_ORIENTATION_HORIZONTAL instead
**/
GtkWidget *
gtk_hscale_new_with_range (gdouble min,
diff --git a/gtk/gtkhscale.h b/gtk/gtkhscale.h
index 9ecfd69..863d065 100644
--- a/gtk/gtkhscale.h
+++ b/gtk/gtkhscale.h
@@ -31,6 +31,7 @@
#ifndef __GTK_HSCALE_H__
#define __GTK_HSCALE_H__
+#ifndef GTK_DISABLE_DEPRECATED
#include <gtk/gtkscale.h>
@@ -68,4 +69,6 @@ GtkWidget* gtk_hscale_new_with_range (gdouble min,
G_END_DECLS
+#endif
+
#endif /* __GTK_HSCALE_H__ */
diff --git a/gtk/gtkvscale.c b/gtk/gtkvscale.c
index af7fa40..45b540c 100644
--- a/gtk/gtkvscale.c
+++ b/gtk/gtkvscale.c
@@ -29,6 +29,7 @@
#include <math.h>
#include <stdlib.h>
+#undef GTK_DISABLE_DEPRECATED
#include "gtkvscale.h"
#include "gtkorientable.h"
@@ -43,6 +44,8 @@
*
* The position to show the current value, and the number of decimal places
* shown can be set using the parent #GtkScale class's functions.
+ *
+ * GtkVScale has been deprecated, use #GtkScale instead.
*/
G_DEFINE_TYPE (GtkVScale, gtk_vscale, GTK_TYPE_SCALE)
@@ -68,6 +71,8 @@ gtk_vscale_init (GtkVScale *vscale)
* Creates a new #GtkVScale.
*
* Returns: a new #GtkVScale.
+ *
+ * Deprecated: 3.2: Use gtk_scale_new() with %GTK_ORIENTATION_VERTICAL instead
*/
GtkWidget *
gtk_vscale_new (GtkAdjustment *adjustment)
@@ -96,6 +101,8 @@ gtk_vscale_new (GtkAdjustment *adjustment)
* needs, use gtk_scale_set_digits() to correct it.
*
* Return value: a new #GtkVScale
+ *
+ * Deprecated: 3.2: Use gtk_scale_new_with_range() with %GTK_ORIENTATION_VERTICAL instead
**/
GtkWidget *
gtk_vscale_new_with_range (gdouble min,
diff --git a/gtk/gtkvscale.h b/gtk/gtkvscale.h
index ce4953e..be2ed79 100644
--- a/gtk/gtkvscale.h
+++ b/gtk/gtkvscale.h
@@ -31,6 +31,7 @@
#ifndef __GTK_VSCALE_H__
#define __GTK_VSCALE_H__
+#ifndef GTK_DISABLE_DEPRECATED
#include <gtk/gtkscale.h>
@@ -75,5 +76,6 @@ GtkWidget* gtk_vscale_new_with_range (gdouble min,
G_END_DECLS
+#endif
#endif /* __GTK_VSCALE_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]