From cf159ac68a1bca3f7fd34c884f240f7627a04f73 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 21 Jul 2014 02:34:39 +0200 Subject: [PATCH] app: get rid of some GtkObject variables, makes the gtk3-port diff smaller --- app/widgets/gimpcombotagentry.c | 4 ++-- app/widgets/gimppropwidgets.c | 19 ++++++++++--------- app/widgets/gimpuimanager.c | 6 +++--- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/app/widgets/gimpcombotagentry.c b/app/widgets/gimpcombotagentry.c index db7822bb53..77b023ae4d 100644 --- a/app/widgets/gimpcombotagentry.c +++ b/app/widgets/gimpcombotagentry.c @@ -52,7 +52,7 @@ static void gimp_combo_tag_entry_icon_press (GtkWidget *wi GdkEvent *event, gpointer user_data); -static void gimp_combo_tag_entry_popup_destroy (GtkObject *object, +static void gimp_combo_tag_entry_popup_destroy (GtkWidget *widget, GimpComboTagEntry *entry); static void gimp_combo_tag_entry_tag_count_changed (GimpTaggedContainer *container, @@ -291,7 +291,7 @@ gimp_combo_tag_entry_icon_press (GtkWidget *widget, } static void -gimp_combo_tag_entry_popup_destroy (GtkObject *object, +gimp_combo_tag_entry_popup_destroy (GtkWidget *widget, GimpComboTagEntry *entry) { entry->popup = NULL; diff --git a/app/widgets/gimppropwidgets.c b/app/widgets/gimppropwidgets.c index 88b9c6a368..f1305e9aed 100644 --- a/app/widgets/gimppropwidgets.c +++ b/app/widgets/gimppropwidgets.c @@ -478,12 +478,12 @@ gimp_prop_spin_scale_new (GObject *config, gdouble page_increment, gint digits) { - GParamSpec *param_spec; - GtkObject *adjustment; - GtkWidget *scale; - gdouble value; - gdouble lower; - gdouble upper; + GParamSpec *param_spec; + GtkAdjustment *adjustment; + GtkWidget *scale; + gdouble value; + gdouble lower; + gdouble upper; param_spec = find_param_spec (config, property_name, G_STRFUNC); if (! param_spec) @@ -500,10 +500,11 @@ gimp_prop_spin_scale_new (GObject *config, if (! label) label = g_param_spec_get_nick (param_spec); - adjustment = gtk_adjustment_new (value, lower, upper, - step_increment, page_increment, 0.0); + adjustment = (GtkAdjustment *) + gtk_adjustment_new (value, lower, upper, + step_increment, page_increment, 0.0); - scale = gimp_spin_scale_new (GTK_ADJUSTMENT (adjustment), label, digits); + scale = gimp_spin_scale_new (adjustment, label, digits); set_param_spec (G_OBJECT (adjustment), scale, param_spec); diff --git a/app/widgets/gimpuimanager.c b/app/widgets/gimpuimanager.c index 381ab079eb..a66f3dc585 100644 --- a/app/widgets/gimpuimanager.c +++ b/app/widgets/gimpuimanager.c @@ -97,7 +97,7 @@ static void gimp_ui_manager_menu_pos (GtkMenu *menu, gint *y, gboolean *push_in, gpointer data); -static void gimp_ui_manager_delete_popdown_data (GtkObject *object, +static void gimp_ui_manager_delete_popdown_data (GtkWidget *widget, GimpUIManager *manager); static void gimp_ui_manager_item_realize (GtkWidget *widget, GimpUIManager *manager); @@ -857,10 +857,10 @@ gimp_ui_manager_menu_pos (GtkMenu *menu, } static void -gimp_ui_manager_delete_popdown_data (GtkObject *object, +gimp_ui_manager_delete_popdown_data (GtkWidget *widget, GimpUIManager *manager) { - g_signal_handlers_disconnect_by_func (object, + g_signal_handlers_disconnect_by_func (widget, gimp_ui_manager_delete_popdown_data, manager); g_object_set_data (G_OBJECT (manager), "popdown-data", NULL);