Commit eac1959d authored by Javier Jardon's avatar Javier Jardon Committed by Matthias Clasen

Move destroy signal to GtkWidget

Also make GtkWidget derive from GInitiallyUnowned
parent 3b8184cf
......@@ -118,7 +118,7 @@ static void gtk_accel_label_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_accel_label_destroy (GtkObject *object);
static void gtk_accel_label_destroy (GtkWidget *widget);
static void gtk_accel_label_finalize (GObject *object);
static gboolean gtk_accel_label_draw (GtkWidget *widget,
cairo_t *cr);
......@@ -138,17 +138,15 @@ static void
gtk_accel_label_class_init (GtkAccelLabelClass *class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
gobject_class->finalize = gtk_accel_label_finalize;
gobject_class->set_property = gtk_accel_label_set_property;
gobject_class->get_property = gtk_accel_label_get_property;
object_class->destroy = gtk_accel_label_destroy;
widget_class->draw = gtk_accel_label_draw;
widget_class->get_preferred_width = gtk_accel_label_get_preferred_width;
widget_class->destroy = gtk_accel_label_destroy;
class->signal_quote1 = g_strdup ("<:");
class->signal_quote2 = g_strdup (":>");
......@@ -288,14 +286,14 @@ gtk_accel_label_new (const gchar *string)
}
static void
gtk_accel_label_destroy (GtkObject *object)
gtk_accel_label_destroy (GtkWidget *widget)
{
GtkAccelLabel *accel_label = GTK_ACCEL_LABEL (object);
GtkAccelLabel *accel_label = GTK_ACCEL_LABEL (widget);
gtk_accel_label_set_accel_widget (accel_label, NULL);
gtk_accel_label_set_accel_closure (accel_label, NULL);
GTK_OBJECT_CLASS (gtk_accel_label_parent_class)->destroy (object);
GTK_WIDGET_CLASS (gtk_accel_label_parent_class)->destroy (widget);
}
static void
......
......@@ -114,7 +114,7 @@ struct _GtkAssistantPrivate
static void gtk_assistant_class_init (GtkAssistantClass *class);
static void gtk_assistant_init (GtkAssistant *assistant);
static void gtk_assistant_destroy (GtkObject *object);
static void gtk_assistant_destroy (GtkWidget *widget);
static void gtk_assistant_style_set (GtkWidget *widget,
GtkStyle *old_style);
static void gtk_assistant_size_request (GtkWidget *widget,
......@@ -200,17 +200,14 @@ static void
gtk_assistant_class_init (GtkAssistantClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
gobject_class = (GObjectClass *) class;
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
container_class = (GtkContainerClass *) class;
object_class->destroy = gtk_assistant_destroy;
widget_class->destroy = gtk_assistant_destroy;
widget_class->style_set = gtk_assistant_style_set;
widget_class->size_request = gtk_assistant_size_request;
widget_class->size_allocate = gtk_assistant_size_allocate;
......@@ -1005,9 +1002,9 @@ remove_page (GtkAssistant *assistant,
}
static void
gtk_assistant_destroy (GtkObject *object)
gtk_assistant_destroy (GtkWidget *widget)
{
GtkAssistant *assistant = GTK_ASSISTANT (object);
GtkAssistant *assistant = GTK_ASSISTANT (widget);
GtkAssistantPrivate *priv = assistant->priv;
if (priv->header_image)
......@@ -1056,9 +1053,9 @@ gtk_assistant_destroy (GtkObject *object)
priv->current_page = NULL;
while (priv->pages)
remove_page (GTK_ASSISTANT (object), priv->pages);
GTK_OBJECT_CLASS (gtk_assistant_parent_class)->destroy (object);
remove_page (assistant, priv->pages);
GTK_WIDGET_CLASS (gtk_assistant_parent_class)->destroy (widget);
}
static GList*
......
......@@ -109,7 +109,7 @@ struct _GtkButtonPrivate
GtkAction *action;
};
static void gtk_button_destroy (GtkObject *object);
static void gtk_button_destroy (GtkWidget *widget);
static void gtk_button_dispose (GObject *object);
static void gtk_button_set_property (GObject *object,
guint prop_id,
......@@ -189,12 +189,10 @@ static void
gtk_button_class_init (GtkButtonClass *klass)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
gobject_class = G_OBJECT_CLASS (klass);
object_class = (GtkObjectClass*) klass;
widget_class = (GtkWidgetClass*) klass;
container_class = (GtkContainerClass*) klass;
......@@ -203,10 +201,9 @@ gtk_button_class_init (GtkButtonClass *klass)
gobject_class->set_property = gtk_button_set_property;
gobject_class->get_property = gtk_button_get_property;
object_class->destroy = gtk_button_destroy;
widget_class->get_preferred_width = gtk_button_get_preferred_width;
widget_class->get_preferred_height = gtk_button_get_preferred_height;
widget_class->destroy = gtk_button_destroy;
widget_class->screen_changed = gtk_button_screen_changed;
widget_class->realize = gtk_button_realize;
widget_class->unrealize = gtk_button_unrealize;
......@@ -358,7 +355,7 @@ gtk_button_class_init (GtkButtonClass *klass)
*/
button_signals[PRESSED] =
g_signal_new (I_("pressed"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkButtonClass, pressed),
NULL, NULL,
......@@ -375,7 +372,7 @@ gtk_button_class_init (GtkButtonClass *klass)
*/
button_signals[RELEASED] =
g_signal_new (I_("released"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkButtonClass, released),
NULL, NULL,
......@@ -390,7 +387,7 @@ gtk_button_class_init (GtkButtonClass *klass)
*/
button_signals[CLICKED] =
g_signal_new (I_("clicked"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkButtonClass, clicked),
NULL, NULL,
......@@ -407,7 +404,7 @@ gtk_button_class_init (GtkButtonClass *klass)
*/
button_signals[ENTER] =
g_signal_new (I_("enter"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkButtonClass, enter),
NULL, NULL,
......@@ -424,7 +421,7 @@ gtk_button_class_init (GtkButtonClass *klass)
*/
button_signals[LEAVE] =
g_signal_new (I_("leave"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkButtonClass, leave),
NULL, NULL,
......@@ -442,7 +439,7 @@ gtk_button_class_init (GtkButtonClass *klass)
*/
button_signals[ACTIVATE] =
g_signal_new (I_("activate"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkButtonClass, activate),
NULL, NULL,
......@@ -587,17 +584,17 @@ gtk_button_init (GtkButton *button)
}
static void
gtk_button_destroy (GtkObject *object)
gtk_button_destroy (GtkWidget *widget)
{
GtkButton *button = GTK_BUTTON (object);
GtkButton *button = GTK_BUTTON (widget);
if (button->label_text)
{
g_free (button->label_text);
button->label_text = NULL;
}
GTK_OBJECT_CLASS (gtk_button_parent_class)->destroy (object);
GTK_WIDGET_CLASS (gtk_button_parent_class)->destroy (widget);
}
static GObject*
......
......@@ -335,7 +335,7 @@ struct _GtkCalendarPrivate
#define GTK_CALENDAR_GET_PRIVATE(widget) (GTK_CALENDAR (widget)->priv)
static void gtk_calendar_finalize (GObject *calendar);
static void gtk_calendar_destroy (GtkObject *calendar);
static void gtk_calendar_destroy (GtkWidget *widget);
static void gtk_calendar_set_property (GObject *object,
guint prop_id,
const GValue *value,
......@@ -432,19 +432,16 @@ static void
gtk_calendar_class_init (GtkCalendarClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
gobject_class = (GObjectClass*) class;
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
gobject_class->set_property = gtk_calendar_set_property;
gobject_class->get_property = gtk_calendar_get_property;
gobject_class->finalize = gtk_calendar_finalize;
object_class->destroy = gtk_calendar_destroy;
widget_class->destroy = gtk_calendar_destroy;
widget_class->realize = gtk_calendar_realize;
widget_class->unrealize = gtk_calendar_unrealize;
widget_class->draw = gtk_calendar_draw;
......@@ -1376,11 +1373,11 @@ gtk_calendar_finalize (GObject *object)
}
static void
gtk_calendar_destroy (GtkObject *object)
gtk_calendar_destroy (GtkWidget *widget)
{
GtkCalendarPrivate *priv = GTK_CALENDAR_GET_PRIVATE (object);
GtkCalendarPrivate *priv = GTK_CALENDAR_GET_PRIVATE (widget);
calendar_stop_spinning (GTK_CALENDAR (object));
calendar_stop_spinning (GTK_CALENDAR (widget));
/* Call the destroy function for the extra display callback: */
if (priv->detail_func_destroy && priv->detail_func_user_data)
......@@ -1390,7 +1387,7 @@ gtk_calendar_destroy (GtkObject *object)
priv->detail_func_destroy = NULL;
}
GTK_OBJECT_CLASS (gtk_calendar_parent_class)->destroy (object);
GTK_WIDGET_CLASS (gtk_calendar_parent_class)->destroy (widget);
}
......
......@@ -159,7 +159,7 @@ struct _GtkColorSelectionPrivate
};
static void gtk_color_selection_destroy (GtkObject *object);
static void gtk_color_selection_destroy (GtkWidget *widget);
static void gtk_color_selection_finalize (GObject *object);
static void update_color (GtkColorSelection *colorsel);
static void gtk_color_selection_set_property (GObject *object,
......@@ -289,7 +289,6 @@ static void
gtk_color_selection_class_init (GtkColorSelectionClass *klass)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
gobject_class = G_OBJECT_CLASS (klass);
......@@ -297,10 +296,8 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
gobject_class->set_property = gtk_color_selection_set_property;
gobject_class->get_property = gtk_color_selection_get_property;
object_class = GTK_OBJECT_CLASS (klass);
object_class->destroy = gtk_color_selection_destroy;
widget_class = GTK_WIDGET_CLASS (klass);
widget_class->destroy = gtk_color_selection_destroy;
widget_class->realize = gtk_color_selection_realize;
widget_class->unrealize = gtk_color_selection_unrealize;
widget_class->show_all = gtk_color_selection_show_all;
......@@ -337,7 +334,7 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
color_selection_signals[COLOR_CHANGED] =
g_signal_new (I_("color-changed"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkColorSelectionClass, color_changed),
NULL, NULL,
......@@ -605,12 +602,12 @@ gtk_color_selection_get_property (GObject *object,
}
}
/* GtkObject methods */
/* GtkWidget methods */
static void
gtk_color_selection_destroy (GtkObject *object)
gtk_color_selection_destroy (GtkWidget *widget)
{
GtkColorSelection *cselection = GTK_COLOR_SELECTION (object);
GtkColorSelection *cselection = GTK_COLOR_SELECTION (widget);
GtkColorSelectionPrivate *priv = cselection->private_data;
if (priv->dropper_grab_widget)
......@@ -619,11 +616,9 @@ gtk_color_selection_destroy (GtkObject *object)
priv->dropper_grab_widget = NULL;
}
GTK_OBJECT_CLASS (gtk_color_selection_parent_class)->destroy (object);
GTK_WIDGET_CLASS (gtk_color_selection_parent_class)->destroy (widget);
}
/* GtkWidget methods */
static void
gtk_color_selection_realize (GtkWidget *widget)
{
......
......@@ -221,7 +221,7 @@ static void gtk_combo_box_cell_layout_init (GtkCellLayoutIface *iface);
static void gtk_combo_box_cell_editable_init (GtkCellEditableIface *iface);
static void gtk_combo_box_dispose (GObject *object);
static void gtk_combo_box_finalize (GObject *object);
static void gtk_combo_box_destroy (GtkObject *object);
static void gtk_combo_box_destroy (GtkWidget *widget);
static void gtk_combo_box_set_property (GObject *object,
guint prop_id,
......@@ -496,7 +496,6 @@ static void
gtk_combo_box_class_init (GtkComboBoxClass *klass)
{
GObjectClass *object_class;
GtkObjectClass *gtk_object_class;
GtkContainerClass *container_class;
GtkWidgetClass *widget_class;
GtkBindingSet *binding_set;
......@@ -520,9 +519,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
widget_class->get_preferred_height = gtk_combo_box_get_preferred_height;
widget_class->get_preferred_height_for_width = gtk_combo_box_get_preferred_height_for_width;
widget_class->get_preferred_width_for_height = gtk_combo_box_get_preferred_width_for_height;
gtk_object_class = (GtkObjectClass *)klass;
gtk_object_class->destroy = gtk_combo_box_destroy;
widget_class->destroy = gtk_combo_box_destroy;
object_class = (GObjectClass *)klass;
object_class->dispose = gtk_combo_box_dispose;
......@@ -5420,9 +5417,9 @@ gtk_combo_box_grab_focus (GtkWidget *widget)
}
static void
gtk_combo_box_destroy (GtkObject *object)
gtk_combo_box_destroy (GtkWidget *widget)
{
GtkComboBox *combo_box = GTK_COMBO_BOX (object);
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
if (combo_box->priv->popup_idle_id > 0)
{
......@@ -5439,7 +5436,7 @@ gtk_combo_box_destroy (GtkObject *object)
combo_box->priv->row_separator_data = NULL;
combo_box->priv->row_separator_destroy = NULL;
GTK_OBJECT_CLASS (gtk_combo_box_parent_class)->destroy (object);
GTK_WIDGET_CLASS (gtk_combo_box_parent_class)->destroy (widget);
combo_box->priv->cell_view = NULL;
}
......
......@@ -80,7 +80,7 @@ static void gtk_container_base_class_init (GtkContainerClass *klass);
static void gtk_container_base_class_finalize (GtkContainerClass *klass);
static void gtk_container_class_init (GtkContainerClass *klass);
static void gtk_container_init (GtkContainer *container);
static void gtk_container_destroy (GtkObject *object);
static void gtk_container_destroy (GtkWidget *widget);
static void gtk_container_set_property (GObject *object,
guint prop_id,
const GValue *value,
......@@ -224,7 +224,6 @@ static void
gtk_container_class_init (GtkContainerClass *class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
parent_class = g_type_class_peek_parent (class);
......@@ -235,8 +234,7 @@ gtk_container_class_init (GtkContainerClass *class)
gobject_class->set_property = gtk_container_set_property;
gobject_class->get_property = gtk_container_get_property;
object_class->destroy = gtk_container_destroy;
widget_class->destroy = gtk_container_destroy;
widget_class->show_all = gtk_container_show_all;
widget_class->hide_all = gtk_container_hide_all;
widget_class->draw = gtk_container_draw;
......@@ -281,7 +279,7 @@ gtk_container_class_init (GtkContainerClass *class)
GTK_PARAM_WRITABLE));
container_signals[ADD] =
g_signal_new (I_("add"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkContainerClass, add),
NULL, NULL,
......@@ -290,7 +288,7 @@ gtk_container_class_init (GtkContainerClass *class)
GTK_TYPE_WIDGET);
container_signals[REMOVE] =
g_signal_new (I_("remove"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkContainerClass, remove),
NULL, NULL,
......@@ -299,7 +297,7 @@ gtk_container_class_init (GtkContainerClass *class)
GTK_TYPE_WIDGET);
container_signals[CHECK_RESIZE] =
g_signal_new (I_("check-resize"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkContainerClass, check_resize),
NULL, NULL,
......@@ -307,7 +305,7 @@ gtk_container_class_init (GtkContainerClass *class)
G_TYPE_NONE, 0);
container_signals[SET_FOCUS_CHILD] =
g_signal_new (I_("set-focus-child"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkContainerClass, set_focus_child),
NULL, NULL,
......@@ -1083,9 +1081,9 @@ gtk_container_init (GtkContainer *container)
}
static void
gtk_container_destroy (GtkObject *object)
gtk_container_destroy (GtkWidget *widget)
{
GtkContainer *container = GTK_CONTAINER (object);
GtkContainer *container = GTK_CONTAINER (widget);
GtkContainerPrivate *priv = container->priv;
if (GTK_CONTAINER_RESIZE_PENDING (container))
......@@ -1105,7 +1103,7 @@ gtk_container_destroy (GtkObject *object)
gtk_container_foreach (container, (GtkCallback) gtk_widget_destroy, NULL);
GTK_OBJECT_CLASS (parent_class)->destroy (object);
GTK_WIDGET_CLASS (parent_class)->destroy (widget);
}
static void
......
......@@ -236,7 +236,7 @@ typedef enum
DISPLAY_BLANK /* In invisible mode, nothing shown at all */
} DisplayMode;
/* GObject, GtkObject methods
/* GObject methods
*/
static void gtk_entry_editable_init (GtkEditableInterface *iface);
static void gtk_entry_cell_editable_init (GtkCellEditableIface *iface);
......@@ -249,11 +249,11 @@ static void gtk_entry_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gtk_entry_finalize (GObject *object);
static void gtk_entry_destroy (GtkObject *object);
static void gtk_entry_dispose (GObject *object);
/* GtkWidget methods
*/
static void gtk_entry_destroy (GtkWidget *widget);
static void gtk_entry_realize (GtkWidget *widget);
static void gtk_entry_unrealize (GtkWidget *widget);
static void gtk_entry_map (GtkWidget *widget);
......@@ -564,17 +564,16 @@ gtk_entry_class_init (GtkEntryClass *class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GtkWidgetClass *widget_class;
GtkObjectClass *gtk_object_class;
GtkBindingSet *binding_set;
widget_class = (GtkWidgetClass*) class;
gtk_object_class = (GtkObjectClass *)class;
gobject_class->dispose = gtk_entry_dispose;
gobject_class->finalize = gtk_entry_finalize;
gobject_class->set_property = gtk_entry_set_property;
gobject_class->get_property = gtk_entry_get_property;
widget_class->destroy = gtk_entry_destroy;
widget_class->map = gtk_entry_map;
widget_class->unmap = gtk_entry_unmap;
widget_class->realize = gtk_entry_realize;
......@@ -610,8 +609,6 @@ gtk_entry_class_init (GtkEntryClass *class)
widget_class->popup_menu = gtk_entry_popup_menu;
gtk_object_class->destroy = gtk_entry_destroy;
class->move_cursor = gtk_entry_move_cursor;
class->insert_at_cursor = gtk_entry_insert_at_cursor;
class->delete_from_cursor = gtk_entry_delete_from_cursor;
......@@ -2425,9 +2422,9 @@ emit_changed (GtkEntry *entry)
}
static void
gtk_entry_destroy (GtkObject *object)
gtk_entry_destroy (GtkWidget *widget)
{
GtkEntry *entry = GTK_ENTRY (object);
GtkEntry *entry = GTK_ENTRY (widget);
entry->current_pos = entry->selection_bound = 0;
_gtk_entry_reset_im_context (entry);
......@@ -2445,7 +2442,7 @@ gtk_entry_destroy (GtkObject *object)
entry->recompute_idle = 0;
}
GTK_OBJECT_CLASS (gtk_entry_parent_class)->destroy (object);
GTK_WIDGET_CLASS (gtk_entry_parent_class)->destroy (widget);
}
static void
......
......@@ -78,8 +78,7 @@ static void gtk_expander_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gtk_expander_destroy (GtkObject *object);
static void gtk_expander_destroy (GtkWidget *widget);
static void gtk_expander_realize (GtkWidget *widget);
static void gtk_expander_unrealize (GtkWidget *widget);
static void gtk_expander_size_allocate (GtkWidget *widget,
......@@ -157,20 +156,17 @@ static void
gtk_expander_class_init (GtkExpanderClass *klass)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
gobject_class = (GObjectClass *) klass;
object_class = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
container_class = (GtkContainerClass *) klass;
gobject_class->set_property = gtk_expander_set_property;
gobject_class->get_property = gtk_expander_get_property;
object_class->destroy = gtk_expander_destroy;
widget_class->destroy = gtk_expander_destroy;
widget_class->realize = gtk_expander_realize;
widget_class->unrealize = gtk_expander_unrealize;
widget_class->size_allocate = gtk_expander_size_allocate;
......@@ -414,17 +410,17 @@ gtk_expander_get_property (GObject *object,
}
static void
gtk_expander_destroy (GtkObject *object)
gtk_expander_destroy (GtkWidget *widget)
{
GtkExpanderPrivate *priv = GTK_EXPANDER (object)->priv;
GtkExpanderPrivate *priv = GTK_EXPANDER (widget)->priv;
if (priv->animation_timeout)
{
g_source_remove (priv->animation_timeout);
priv->animation_timeout = 0;
}
GTK_OBJECT_CLASS (gtk_expander_parent_class)->destroy (object);
GTK_WIDGET_CLASS (gtk_expander_parent_class)->destroy (widget);
}
static void
......
......@@ -207,10 +207,8 @@ static void gtk_file_chooser_button_get_property (GObject *ob
GParamSpec *pspec);
static void gtk_file_chooser_button_finalize (GObject *object);
/* GtkObject Functions */
static void gtk_file_chooser_button_destroy (GtkObject *object);
/* GtkWidget Functions */
static void gtk_file_chooser_button_destroy (GtkWidget *widget);
static void gtk_file_chooser_button_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
......@@ -317,11 +315,9 @@ static void
gtk_file_chooser_button_class_init (GtkFileChooserButtonClass * class)
{
GObjectClass *gobject_class;
GtkObjectClass *gtkobject_class;
GtkWidgetClass *widget_class;
gobject_class = G_OBJECT_CLASS (class);
gtkobject_class = GTK_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
gobject_class->constructor = gtk_file_chooser_button_constructor;
......@@ -329,8 +325,7 @@ gtk_file_chooser_button_class_init (GtkFileChooserButtonClass * class)
gobject_class->get_property = gtk_file_chooser_button_get_property;
gobject_class->finalize = gtk_file_chooser_button_finalize;
gtkobject_class->destroy = gtk_file_chooser_button_destroy;
widget_class->destroy = gtk_file_chooser_button_destroy;
widget_class->drag_data_received = gtk_file_chooser_button_drag_data_received;
widget_class->show_all = gtk_file_chooser_button_show_all;
widget_class->hide_all = gtk_file_chooser_button_hide_all;
......@@ -883,13 +878,13 @@ gtk_file_chooser_button_finalize (GObject *object)
}
/* ********************* *
* GtkObject Functions *
* GtkWidget Functions *
* ********************* */
static void
gtk_file_chooser_button_destroy (GtkObject *object)
gtk_file_chooser_button_destroy (GtkWidget *widget)
{
GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (object);
GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (widget);
GtkFileChooserButtonPrivate *priv = button->priv;
GtkTreeIter iter;
GSList *l;
......@@ -949,14 +944,9 @@ gtk_file_chooser_button_destroy (GtkObject *object)
priv->fs = NULL;
}
GTK_OBJECT_CLASS (gtk_file_chooser_button_parent_class)->destroy (object);
GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->destroy (widget);
}
/* ********************* *
* GtkWidget Functions *
* ********************* */
struct DndSelectFolderData
{
GtkFileSystem *file_system;
......
......@@ -85,7 +85,7 @@ enum {
LAST_SIGNAL
};
static void gtk_hsv_destroy (GtkObject *object);
static void gtk_hsv_destroy (GtkWidget *widget);
static void gtk_hsv_map (GtkWidget *widget);
static void gtk_hsv_unmap (GtkWidget *widget);
static void gtk_hsv_realize (GtkWidget *widget);
......@@ -118,18 +118,15 @@ static void
gtk_hsv_class_init (GtkHSVClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkHSVClass *hsv_class;
GtkBindingSet *binding_set;
gobject_class = (GObjectClass *) class;
object_class = (GtkObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
hsv_class = GTK_HSV_CLASS (class);
object_class->destroy = gtk_hsv_destroy;
widget_class->destroy = gtk_hsv_destroy;
widget_class->map = gtk_hsv_map;
widget_class->unmap = gtk_hsv_unmap;
widget_class->realize = gtk_hsv_realize;
......@@ -147,7 +144,7 @@ gtk_hsv_class_init (GtkHSVClass *class)
hsv_signals[CHANGED] =
g_signal_new (I_("changed"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkHSVClass, changed),
NULL, NULL,
......@@ -156,7 +153,7 @@ gtk_hsv_class_init (GtkHSVClass *class)
hsv_signals[MOVE] =
g_signal_new (I_("move"),
G_OBJECT_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkHSVClass, move),
NULL, NULL,
......@@ -221,9 +218,9 @@ gtk_hsv_init (GtkHSV *hsv)
/* Destroy handler for the HSV color selector */
static void
gtk_hsv_destroy (GtkObject *object)
gtk_hsv_destroy (GtkWidget *widget)
{
GTK_OBJECT_CLASS (gtk_hsv_parent_class)->destroy (object);
GTK_WIDGET_CLASS (gtk_hsv_parent_class)->destroy (widget);
}
/* Default signal handlers */
......
......@@ -245,11 +245,8 @@ static void gtk_icon_view_get_property (GObject
guint prop_id,
GValue *value,
GParamSpec *pspec);
/* GtkObject vfuncs */
static void gtk_icon_view_destroy (GtkObject *object);
/* GtkWidget vfuncs */
static void gtk_icon_view_destroy (GtkWidget *widget);
static void gtk_icon_view_realize (GtkWidget *widget);
static void gtk_icon_view_unrealize (GtkWidget *widget);
static void gtk_icon_view_style_set (GtkWidget *widget,
......@@ -487,7 +484,6 @@ static void
gtk_icon_view_class_init (GtkIconViewClass *klass)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
GtkBindingSet *binding_set;
......@@ -497,7 +493,6 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
g_type_class_add_private (klass, sizeof (GtkIconViewPrivate));
gobject_class = (GObjectClass *) klass;
object_class = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
container_class = (GtkContainerClass *) klass;
......@@ -505,8 +500,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
gobject_class->set_property = gtk_icon_view_set_property;
gobject_class->get_property = gtk_icon_view_get_property;
object_class->destroy = gtk_icon_view_destroy;
widget_class->destroy = gtk_icon_view_destroy;
widget_class->realize = gtk_icon_view_realize;
widget_class->unrealize = gtk_icon_view_unrealize;
widget_class->style_set = gtk_icon_view_style_set;
......@@ -1136,46 +1130,6 @@ gtk_icon_view_init (GtkIconView *icon_view)