Deprecate h/v subclasses of GtkScrollbar

This has been discussed in bug 541009.
This commit is contained in:
Matthias Clasen
2011-06-07 21:38:15 -04:00
parent 00544af8c2
commit d41844c946
4 changed files with 16 additions and 0 deletions

View File

@ -27,6 +27,8 @@
#include "config.h"
#include "gtkscrollbar.h"
#undef GTK_DISABLE_DEPRECATED
#include "gtkhscrollbar.h"
#include "gtkorientable.h"
#include "gtkintl.h"
@ -44,6 +46,8 @@
* adjustment of the scrollbar or it may be left %NULL in which case one
* will be created for you. See #GtkScrollbar for a description of what the
* fields in an adjustment represent for a scrollbar.
*
* GtkHScrollbar has been deprecated, use #GtkScrollbar instead.
*/
@ -69,6 +73,8 @@ gtk_hscrollbar_init (GtkHScrollbar *hscrollbar)
* Creates a new horizontal scrollbar.
*
* Returns: the new #GtkHScrollbar
*
* Deprecated: 3.2: Use gtk_scrollbar_new() with %GTK_ORIENTATION_HORIZONTAL instead
*/
GtkWidget *
gtk_hscrollbar_new (GtkAdjustment *adjustment)

View File

@ -31,6 +31,7 @@
#ifndef __GTK_HSCROLLBAR_H__
#define __GTK_HSCROLLBAR_H__
#ifndef GTK_DISABLE_DEPRECATED
#include <gtk/gtkscrollbar.h>
@ -66,5 +67,6 @@ GtkWidget* gtk_hscrollbar_new (GtkAdjustment *adjustment);
G_END_DECLS
#endif
#endif /* __GTK_HSCROLLBAR_H__ */

View File

@ -28,6 +28,8 @@
#include "config.h"
#include "gtkorientable.h"
#include "gtkscrollbar.h"
#undef GTK_DISABLE_DEPRECATED
#include "gtkvscrollbar.h"
#include "gtkintl.h"
@ -44,6 +46,8 @@
* adjustment of the scrollbar or it may be left %NULL in which case one
* will be created for you. See #GtkScrollbar for a description of what the
* fields in an adjustment represent for a scrollbar.
*
* GtkVScrollbar has been deprecated, use #GtkScrollbar instead.
*/
G_DEFINE_TYPE (GtkVScrollbar, gtk_vscrollbar, GTK_TYPE_SCROLLBAR)
@ -68,6 +72,8 @@ gtk_vscrollbar_init (GtkVScrollbar *vscrollbar)
* Creates a new vertical scrollbar.
*
* Returns: the new #GtkVScrollbar
*
* Deprecated: 3.2: Use gtk_scrollbar_new() with %GTK_ORIENTATION_VERTICAL instead
*/
GtkWidget *
gtk_vscrollbar_new (GtkAdjustment *adjustment)

View File

@ -31,6 +31,7 @@
#ifndef __GTK_VSCROLLBAR_H__
#define __GTK_VSCROLLBAR_H__
#ifndef GTK_DISABLE_DEPRECATED
#include <gtk/gtkscrollbar.h>
@ -72,5 +73,6 @@ GtkWidget* gtk_vscrollbar_new (GtkAdjustment *adjustment);
G_END_DECLS
#endif
#endif /* __GTK_VSCROLLBAR_H__ */