QGtkStyle: GTK3 compatible gtk_adjustment_new()
In GTK3, gtk_adjustment_new() returns GtkAdjustment* and there's no such thing as GtkObject anymore. Just typedef the function pointer appropriately and as a bonus we'll save ourselves from the casts. ;) Change-Id: I2f17ab10b835dd0bffabb86345488e84aea51f3c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This commit is contained in:
parent
ede6412104
commit
89ccb0a699
@ -606,21 +606,20 @@ void QGtkStylePrivate::initGtkWidgets() const
|
||||
addWidget(QGtkStylePrivate::gtk_frame_new(NULL));
|
||||
addWidget(QGtkStylePrivate::gtk_expander_new(""));
|
||||
addWidget(QGtkStylePrivate::gtk_statusbar_new());
|
||||
addWidget(QGtkStylePrivate::gtk_hscale_new((GtkAdjustment*)(QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0))));
|
||||
addWidget(QGtkStylePrivate::gtk_hscale_new((QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0))));
|
||||
addWidget(QGtkStylePrivate::gtk_hscrollbar_new(NULL));
|
||||
addWidget(QGtkStylePrivate::gtk_scrolled_window_new(NULL, NULL));
|
||||
|
||||
initGtkMenu();
|
||||
addWidget(QGtkStylePrivate::gtk_notebook_new());
|
||||
addWidget(QGtkStylePrivate::gtk_progress_bar_new());
|
||||
addWidget(QGtkStylePrivate::gtk_spin_button_new((GtkAdjustment*)
|
||||
(QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0)), 0.1, 3));
|
||||
addWidget(QGtkStylePrivate::gtk_spin_button_new((QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0)), 0.1, 3));
|
||||
GtkWidget *toolbar = gtk_toolbar_new();
|
||||
g_signal_connect (toolbar, "notify::toolbar-style", G_CALLBACK (update_toolbar_style), toolbar);
|
||||
gtk_toolbar_insert((GtkToolbar*)toolbar, gtk_separator_tool_item_new(), -1);
|
||||
addWidget(toolbar);
|
||||
initGtkTreeview();
|
||||
addWidget(gtk_vscale_new((GtkAdjustment*)(QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0))));
|
||||
addWidget(gtk_vscale_new((QGtkStylePrivate::gtk_adjustment_new(1, 0, 1, 0, 0, 0))));
|
||||
addWidget(gtk_vscrollbar_new(NULL));
|
||||
}
|
||||
else // Rebuild map
|
||||
|
@ -201,7 +201,7 @@ typedef void (*Ptr_gtk_paint_option) (GtkStyle*,GdkWindow*, GtkStateType, GtkSh
|
||||
typedef void (*Ptr_gtk_paint_flat_box) (GtkStyle*,GdkWindow*, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint , gint , gint , gint);
|
||||
typedef void (*Ptr_gtk_paint_extension) (GtkStyle *, GdkWindow *, GtkStateType, GtkShadowType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint, gint, GtkPositionType);
|
||||
typedef void (*Ptr_gtk_adjustment_configure) (GtkAdjustment *, double, double, double, double, double, double);
|
||||
typedef GtkObject* (*Ptr_gtk_adjustment_new) (double, double, double, double, double, double);
|
||||
typedef GtkAdjustment* (*Ptr_gtk_adjustment_new) (double, double, double, double, double, double);
|
||||
typedef void (*Ptr_gtk_paint_hline) (GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint y);
|
||||
typedef void (*Ptr_gtk_paint_vline) (GtkStyle *, GdkWindow *, GtkStateType, const GdkRectangle *, GtkWidget *, const gchar *, gint, gint, gint);
|
||||
typedef void (*Ptr_gtk_menu_item_set_submenu) (GtkMenuItem *, GtkWidget *);
|
||||
|
Loading…
Reference in New Issue
Block a user