diff --git a/extensions/file_tools/gth-file-tool-adjust-colors.c b/extensions/file_tools/gth-file-tool-adjust-colors.c
index 5fb6b0e..16772e0 100644
--- a/extensions/file_tools/gth-file-tool-adjust-colors.c
+++ b/extensions/file_tools/gth-file-tool-adjust-colors.c
@@ -352,7 +352,7 @@ gimp_scale_entry_new (GtkWidget *parent_box,
 	GtkWidget *hbox;
 	GtkWidget *scale;
 	GtkWidget *spinbutton;
-	GtkObject *adj;
+	GObject *adj;
 
 	adj = gtk_adjustment_new (value, lower, upper,
 				  step_increment, page_increment,
diff --git a/gthumb/gth-toggle-menu-tool-button.c b/gthumb/gth-toggle-menu-tool-button.c
index e22b49d..283a6b9 100644
--- a/gthumb/gth-toggle-menu-tool-button.c
+++ b/gthumb/gth-toggle-menu-tool-button.c
@@ -579,7 +579,7 @@ real_button_button_press_event_cb (GtkWidget               *widget,
 
 
 static void
-gth_toggle_menu_tool_button_destroy (GtkObject *object)
+gth_toggle_menu_tool_button_destroy (GtkWidget *object)
 {
 	GthToggleMenuToolButton *button;
 
@@ -595,7 +595,7 @@ gth_toggle_menu_tool_button_destroy (GtkObject *object)
 		button->priv->toggle_button = NULL;
 	}
 
-	GTK_OBJECT_CLASS (parent_class)->destroy (object);
+	GTK_WIDGET_CLASS (parent_class)->destroy (object);
 }
 
 
@@ -663,7 +663,6 @@ static void
 gth_toggle_menu_tool_button_class_init (GthToggleMenuToolButtonClass *klass)
 {
 	GObjectClass     *object_class;
-	GtkObjectClass   *gtk_object_class;
 	GtkWidgetClass   *widget_class;
 	GtkToolItemClass *tool_item_class;
 
@@ -674,8 +673,7 @@ gth_toggle_menu_tool_button_class_init (GthToggleMenuToolButtonClass *klass)
 	object_class->set_property = gth_toggle_menu_tool_button_set_property;
 	object_class->get_property = gth_toggle_menu_tool_button_get_property;
 
-	gtk_object_class = (GtkObjectClass *) klass;
-	gtk_object_class->destroy = gth_toggle_menu_tool_button_destroy;
+	widget_class->destroy = gth_toggle_menu_tool_button_destroy;
 
 	widget_class = (GtkWidgetClass *) klass;
 	widget_class->state_changed = gth_toggle_menu_tool_button_state_changed;
