aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c4
-rw-r--r--addressbook/gui/widgets/e-minicard.c2
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c2
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c2
-rw-r--r--calendar/gui/dialogs/comp-editor-util.h2
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.h4
-rw-r--r--calendar/gui/e-cal-list-view.c13
-rw-r--r--calendar/gui/e-day-view.c22
-rw-r--r--calendar/gui/e-itip-control.c13
-rw-r--r--calendar/gui/e-meeting-attendee.h4
-rw-r--r--calendar/gui/e-meeting-time-sel.c17
-rw-r--r--calendar/gui/e-week-view-layout.c4
-rw-r--r--calendar/gui/e-week-view.c40
-rw-r--r--calendar/gui/print.c2
-rw-r--r--calendar/gui/weekday-picker.c15
-rw-r--r--composer/e-msg-composer.c24
-rw-r--r--e-util/e-categories-config.c2
-rw-r--r--e-util/e-text-event-processor.h2
-rw-r--r--filter/e-filter-int.c4
-rw-r--r--filter/e-filter-rule.c6
-rw-r--r--filter/e-rule-editor.c14
-rw-r--r--libgnomecanvas/gnome-canvas-bpath.c12
-rw-r--r--libgnomecanvas/gnome-canvas-clipgroup.c12
-rw-r--r--libgnomecanvas/gnome-canvas-line.c13
-rw-r--r--libgnomecanvas/gnome-canvas-pixbuf.c46
-rw-r--r--libgnomecanvas/gnome-canvas-polygon.c23
-rw-r--r--libgnomecanvas/gnome-canvas-rect-ellipse.c15
-rw-r--r--libgnomecanvas/gnome-canvas-rich-text.c8
-rw-r--r--libgnomecanvas/gnome-canvas-shape.c13
-rw-r--r--libgnomecanvas/gnome-canvas-text.c14
-rw-r--r--libgnomecanvas/gnome-canvas-widget.c46
-rw-r--r--libgnomecanvas/gnome-canvas-widget.h2
-rw-r--r--libgnomecanvas/gnome-canvas.c77
-rw-r--r--libgnomecanvas/gnome-canvas.h12
-rw-r--r--mail/e-mail-reader.c13
-rw-r--r--mail/em-filter-rule.c6
-rw-r--r--mail/em-folder-selector.c12
-rw-r--r--mail/em-folder-tree.c56
-rw-r--r--mail/mail-mt.c10
-rw-r--r--mail/mail-vfolder.c2
-rw-r--r--mail/message-list.c101
-rw-r--r--plugins/groupwise-features/junk-settings.c15
-rw-r--r--plugins/groupwise-features/share-folder.c15
-rw-r--r--plugins/itip-formatter/itip-view.c11
-rw-r--r--shell/e-shell-sidebar.c35
-rw-r--r--widgets/misc/e-calendar.c14
-rw-r--r--widgets/misc/e-canvas-vbox.c8
-rw-r--r--widgets/misc/e-canvas.c2
-rw-r--r--widgets/misc/e-printable.c4
-rw-r--r--widgets/misc/e-printable.h4
-rw-r--r--widgets/table/e-cell-combo.c4
-rw-r--r--widgets/table/e-cell-popup.c2
-rw-r--r--widgets/table/e-table-click-to-add.c12
-rw-r--r--widgets/table/e-table-group-container.c8
-rw-r--r--widgets/table/e-table-group-leaf.c16
-rw-r--r--widgets/table/e-table-group.c2
-rw-r--r--widgets/table/e-table-header-item.c4
-rw-r--r--widgets/table/e-table-header-item.h2
-rw-r--r--widgets/table/e-table-model.c14
-rw-r--r--widgets/table/e-table.c16
-rw-r--r--widgets/table/e-tree-model.c20
-rw-r--r--widgets/table/e-tree.c12
-rw-r--r--widgets/table/gal-a11y-e-table-item.c7
-rw-r--r--widgets/text/e-reflow.c8
65 files changed, 383 insertions, 545 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index 928d9aa023..236ccbb127 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -479,7 +479,7 @@ e_addressbook_reflow_adapter_class_init (GObjectClass *object_class)
}
static void
-e_addressbook_reflow_adapter_init (GtkObject *object)
+e_addressbook_reflow_adapter_init (GObject *object)
{
EAddressbookReflowAdapter *adapter = E_ADDRESSBOOK_REFLOW_ADAPTER (object);
EAddressbookReflowAdapterPrivate *priv;
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 957d85e30f..5d54f28686 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -73,7 +73,7 @@ static void search_result (EAddressbookView *view,
const gchar *error_msg);
static void folder_bar_message (EAddressbookView *view,
const gchar *status);
-static void stop_state_changed (GtkObject *object,
+static void stop_state_changed (GObject *object,
EAddressbookView *view);
static void backend_died (EAddressbookView *view);
static void command_state_change (EAddressbookView *view);
@@ -1124,7 +1124,7 @@ folder_bar_message (EAddressbookView *view,
}
static void
-stop_state_changed (GtkObject *object, EAddressbookView *view)
+stop_state_changed (GObject *object, EAddressbookView *view)
{
command_state_change (view);
}
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 5c2da9de01..e3dc55bb70 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -69,7 +69,7 @@ static gpointer parent_class;
static void
e_minicard_field_destroy (EMinicardField *field)
{
- gtk_object_destroy (GTK_OBJECT (field->label));
+ g_object_run_dispose (G_OBJECT (field->label));
g_free (field);
}
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index acb4423f71..418bf8a704 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -527,7 +527,7 @@ alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm )
e_destination_set_email (dest, a->value);
}
e_destination_store_append_destination (destination_store, dest);
- g_object_unref (GTK_OBJECT (dest));
+ g_object_unref (G_OBJECT (dest));
}
e_cal_component_free_attendee_list (attendee_list);
}
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index 259533877a..6a95b2d425 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -148,7 +148,7 @@ comp_editor_new_date_edit (gboolean show_date,
FIXME: Should probably use the timezone from somewhere in the component
rather than the current timezone. */
struct tm
-comp_editor_get_current_time (GtkObject *object, gpointer data)
+comp_editor_get_current_time (GObject *object, gpointer data)
{
icaltimezone *zone;
struct icaltimetype tt;
diff --git a/calendar/gui/dialogs/comp-editor-util.h b/calendar/gui/dialogs/comp-editor-util.h
index 6ebe4735d1..07ba65a799 100644
--- a/calendar/gui/dialogs/comp-editor-util.h
+++ b/calendar/gui/dialogs/comp-editor-util.h
@@ -38,7 +38,7 @@ GtkWidget * comp_editor_new_date_edit (gboolean show_date,
gboolean show_time,
gboolean make_time_insensitive);
-struct tm comp_editor_get_current_time (GtkObject *object, gpointer data);
+struct tm comp_editor_get_current_time (GObject *object, gpointer data);
gchar *comp_editor_strip_categories (const gchar *categories);
diff --git a/calendar/gui/dialogs/e-delegate-dialog.h b/calendar/gui/dialogs/e-delegate-dialog.h
index a70488a0ea..5e1c9f0e5b 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.h
+++ b/calendar/gui/dialogs/e-delegate-dialog.h
@@ -40,14 +40,14 @@ typedef struct _EDelegateDialogClass EDelegateDialogClass;
typedef struct _EDelegateDialogPrivate EDelegateDialogPrivate;
struct _EDelegateDialog {
- GtkObject object;
+ GObject object;
/* Private data */
EDelegateDialogPrivate *priv;
};
struct _EDelegateDialogClass {
- GtkObjectClass parent_class;
+ GObjectClass parent_class;
};
GType e_delegate_dialog_get_type (void);
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index 2efc7c2dff..70770aff53 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -61,7 +61,7 @@
#include "goto.h"
#include "misc.h"
-static void e_cal_list_view_destroy (GtkObject *object);
+static void e_cal_list_view_dispose (GObject *object);
static GList *e_cal_list_view_get_selected_events (ECalendarView *cal_view);
static gboolean e_cal_list_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time);
@@ -83,16 +83,16 @@ G_DEFINE_TYPE (ECalListView, e_cal_list_view, E_TYPE_CALENDAR_VIEW)
static void
e_cal_list_view_class_init (ECalListViewClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
ECalendarViewClass *view_class;
- object_class = (GtkObjectClass *) class;
+ object_class = (GObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
view_class = (ECalendarViewClass *) class;
/* Method override */
- object_class->destroy = e_cal_list_view_destroy;
+ object_class->dispose = e_cal_list_view_dispose;
widget_class->popup_menu = e_cal_list_view_popup_menu;
@@ -317,7 +317,7 @@ e_cal_list_view_new (ECalModel *model)
}
static void
-e_cal_list_view_destroy (GtkObject *object)
+e_cal_list_view_dispose (GObject *object)
{
ECalListView *cal_list_view;
@@ -345,7 +345,8 @@ e_cal_list_view_destroy (GtkObject *object)
cal_list_view->table = NULL;
}
- GTK_OBJECT_CLASS (e_cal_list_view_parent_class)->destroy (object);
+ if (G_OBJECT_CLASS (e_cal_list_view_parent_class)->dispose)
+ G_OBJECT_CLASS (e_cal_list_view_parent_class)->dispose (object);
}
static void
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 1713b7a660..bb4c9e76b7 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -110,7 +110,7 @@ static GtkTargetEntry target_table[] = {
{ (gchar *) "application/x-e-calendar-event", 0, 0 }
};
-static void e_day_view_destroy (GtkObject *object);
+static void e_day_view_dispose (GObject *object);
static void e_day_view_realize (GtkWidget *widget);
static void e_day_view_set_colors (EDayView *day_view, GtkWidget *widget);
static void e_day_view_unrealize (GtkWidget *widget);
@@ -608,7 +608,6 @@ static void
e_day_view_class_init (EDayViewClass *class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
GtkWidgetClass *widget_class;
ECalendarViewClass *view_class;
@@ -616,9 +615,7 @@ e_day_view_class_init (EDayViewClass *class)
object_class->set_property = day_view_set_property;
object_class->get_property = day_view_get_property;
object_class->constructed = day_view_constructed;
-
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = e_day_view_destroy;
+ object_class->dispose = e_day_view_dispose;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = e_day_view_realize;
@@ -1377,7 +1374,7 @@ e_day_view_new (ECalModel *model)
}
static void
-e_day_view_destroy (GtkObject *object)
+e_day_view_dispose (GObject *object)
{
EDayView *day_view;
gint day;
@@ -1428,7 +1425,8 @@ e_day_view_destroy (GtkObject *object)
}
}
- GTK_OBJECT_CLASS (e_day_view_parent_class)->destroy (object);
+ if (G_OBJECT_CLASS (e_day_view_parent_class)->dispose)
+ G_OBJECT_CLASS (e_day_view_parent_class)->dispose (object);
}
static void
@@ -2121,7 +2119,7 @@ e_day_view_remove_event_cb (EDayView *day_view,
}
if (event->canvas_item)
- gtk_object_destroy (GTK_OBJECT (event->canvas_item));
+ g_object_run_dispose (G_OBJECT (event->canvas_item));
if (is_comp_data_valid (event))
g_object_unref (event->comp_data);
@@ -4653,7 +4651,7 @@ e_day_view_free_event_array (EDayView *day_view,
for (event_num = 0; event_num < array->len; event_num++) {
event = &g_array_index (array, EDayViewEvent, event_num);
if (event->canvas_item)
- gtk_object_destroy (GTK_OBJECT (event->canvas_item));
+ g_object_run_dispose (G_OBJECT (event->canvas_item));
if (is_comp_data_valid (event))
g_object_unref (event->comp_data);
@@ -4849,7 +4847,7 @@ e_day_view_reshape_long_events (EDayView *day_view)
if (event->num_columns == 0) {
if (event->canvas_item) {
- gtk_object_destroy (GTK_OBJECT (event->canvas_item));
+ g_object_run_dispose (G_OBJECT (event->canvas_item));
event->canvas_item = NULL;
}
} else {
@@ -4883,7 +4881,7 @@ e_day_view_reshape_long_event (EDayView *day_view,
&item_x, &item_y,
&item_w, &item_h)) {
if (event->canvas_item) {
- gtk_object_destroy (GTK_OBJECT (event->canvas_item));
+ g_object_run_dispose (G_OBJECT (event->canvas_item));
event->canvas_item = NULL;
}
return;
@@ -5075,7 +5073,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
&item_x, &item_y,
&item_w, &item_h)) {
if (event->canvas_item) {
- gtk_object_destroy (GTK_OBJECT (event->canvas_item));
+ g_object_run_dispose (G_OBJECT (event->canvas_item));
event->canvas_item = NULL;
}
} else {
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 838445d1b9..2c1c452299 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -106,7 +106,7 @@ struct _EItipControlPrivate {
#define HTML_BODY_END "</body>"
#define HTML_FOOTER "</html>"
-static void e_itip_control_destroy (GtkObject *obj);
+static void e_itip_control_dispose (GObject *obj);
static void find_my_address (EItipControl *itip, icalcomponent *ical_comp, icalparameter_partstat *status);
static gboolean object_requested_cb (GtkHTML *html, GtkHTMLEmbedded *eb, gpointer data);
@@ -117,11 +117,11 @@ G_DEFINE_TYPE (EItipControl, e_itip_control, GTK_TYPE_VBOX)
static void
e_itip_control_class_init (EItipControlClass *klass)
{
- GtkObjectClass *gtkobject_class;
+ GObjectClass *object_class;
- gtkobject_class = GTK_OBJECT_CLASS (klass);
+ object_class = G_OBJECT_CLASS (klass);
- gtkobject_class->destroy = e_itip_control_destroy;
+ object_class->dispose = e_itip_control_dispose;
}
static void
@@ -488,7 +488,7 @@ clean_up (EItipControl *itip)
}
static void
-e_itip_control_destroy (GtkObject *obj)
+e_itip_control_dispose (GObject *obj)
{
EItipControl *itip = E_ITIP_CONTROL (obj);
EItipControlPrivate *priv;
@@ -518,7 +518,8 @@ e_itip_control_destroy (GtkObject *obj)
itip->priv = NULL;
}
- (* GTK_OBJECT_CLASS (e_itip_control_parent_class)->destroy) (obj);
+ if (G_OBJECT_CLASS (e_itip_control_parent_class)->dispose)
+ G_OBJECT_CLASS (e_itip_control_parent_class)->dispose (obj);
}
GtkWidget *
diff --git a/calendar/gui/e-meeting-attendee.h b/calendar/gui/e-meeting-attendee.h
index fb7e32edc7..d24b013ec6 100644
--- a/calendar/gui/e-meeting-attendee.h
+++ b/calendar/gui/e-meeting-attendee.h
@@ -64,13 +64,13 @@ typedef enum
} EMeetingAttendeeEditLevel;
struct _EMeetingAttendee {
- GtkObject parent;
+ GObject parent;
EMeetingAttendeePrivate *priv;
};
struct _EMeetingAttendeeClass {
- GtkObjectClass parent_class;
+ GObjectClass parent_class;
void (* changed) (EMeetingAttendee *ia);
};
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 3b120566e8..e0fb5ad419 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -270,7 +270,7 @@ meeting_time_selector_get_property (GObject *object,
}
static void
-meeting_time_selector_destroy (GtkObject *object)
+meeting_time_selector_dispose (GObject *object)
{
EMeetingTimeSelector *mts;
@@ -304,15 +304,14 @@ meeting_time_selector_destroy (GtkObject *object)
mts->style_change_idle_id = 0;
}
- if (GTK_OBJECT_CLASS (e_meeting_time_selector_parent_class)->destroy)
- (*GTK_OBJECT_CLASS (e_meeting_time_selector_parent_class)->destroy)(object);
+ if (G_OBJECT_CLASS (e_meeting_time_selector_parent_class)->dispose)
+ G_OBJECT_CLASS (e_meeting_time_selector_parent_class)->dispose (object);
}
static void
e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
GtkWidgetClass *widget_class;
g_type_class_add_private (class, sizeof (EMeetingTimeSelectorPrivate));
@@ -320,9 +319,7 @@ e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * class)
object_class = G_OBJECT_CLASS (class);
object_class->set_property = meeting_time_selector_set_property;
object_class->get_property = meeting_time_selector_get_property;
-
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = meeting_time_selector_destroy;
+ object_class->dispose = meeting_time_selector_dispose;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = e_meeting_time_selector_realize;
@@ -1459,7 +1456,7 @@ e_meeting_time_selector_refresh_cb (gpointer data)
if (mts->display_main != NULL)
gtk_widget_queue_draw (mts->display_main);
- g_object_unref (GTK_OBJECT (mts));
+ g_object_unref (G_OBJECT (mts));
return FALSE;
}
@@ -1508,9 +1505,9 @@ e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, gint row,
gint i;
for (i = 0; i < e_meeting_store_count_actual_attendees (mts->model); i++)
- g_object_ref (GTK_OBJECT (mts));
+ g_object_ref (G_OBJECT (mts));
} else {
- g_object_ref (GTK_OBJECT (mts));
+ g_object_ref (G_OBJECT (mts));
}
if (all)
diff --git a/calendar/gui/e-week-view-layout.c b/calendar/gui/e-week-view-layout.c
index 52db8c19fa..b4b8aaa1b2 100644
--- a/calendar/gui/e-week-view-layout.c
+++ b/calendar/gui/e-week-view-layout.c
@@ -97,9 +97,9 @@ e_week_view_layout_events (GArray *events,
span = &g_array_index (old_spans, EWeekViewEventSpan,
span_num);
if (span->background_item)
- gtk_object_destroy (GTK_OBJECT (span->background_item));
+ g_object_run_dispose (G_OBJECT (span->background_item));
if (span->text_item)
- gtk_object_destroy (GTK_OBJECT (span->text_item));
+ g_object_run_dispose (G_OBJECT (span->text_item));
}
g_array_free (old_spans, TRUE);
}
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index e6524fe731..7e5ca496f7 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -87,7 +87,7 @@ typedef struct {
ECalModelComponent *comp_data;
} AddEventData;
-static void e_week_view_destroy (GtkObject *object);
+static void e_week_view_dispose (GObject *object);
static void e_week_view_realize (GtkWidget *widget);
static void e_week_view_set_colors (EWeekView *week_view, GtkWidget *widget);
static void e_week_view_unrealize (GtkWidget *widget);
@@ -647,7 +647,6 @@ static void
e_week_view_class_init (EWeekViewClass *class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
GtkWidgetClass *widget_class;
ECalendarViewClass *view_class;
@@ -655,9 +654,7 @@ e_week_view_class_init (EWeekViewClass *class)
object_class->set_property = week_view_set_property;
object_class->get_property = week_view_get_property;
object_class->constructed = week_view_constructed;
-
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = e_week_view_destroy;
+ object_class->dispose = e_week_view_dispose;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = e_week_view_realize;
@@ -713,7 +710,7 @@ static void
e_week_view_init (EWeekView *week_view)
{
GnomeCanvasGroup *canvas_group;
- GtkObject *adjustment;
+ GtkAdjustment *adjustment;
GdkPixbuf *pixbuf;
gint i;
@@ -840,7 +837,7 @@ e_week_view_init (EWeekView *week_view)
*/
adjustment = gtk_adjustment_new (0, -52, 52, 1, 1, 1);
- week_view->vscrollbar = gtk_vscrollbar_new (GTK_ADJUSTMENT (adjustment));
+ week_view->vscrollbar = gtk_vscrollbar_new (adjustment);
gtk_table_attach (GTK_TABLE (week_view), week_view->vscrollbar,
2, 3, 1, 2, 0, GTK_EXPAND | GTK_FILL, 0, 0);
gtk_widget_show (week_view->vscrollbar);
@@ -874,7 +871,7 @@ e_week_view_new (ECalModel *model)
}
static void
-e_week_view_destroy (GtkObject *object)
+e_week_view_dispose (GObject *object)
{
EWeekView *week_view;
@@ -918,7 +915,8 @@ e_week_view_destroy (GtkObject *object)
week_view->scroll_by_week_notif_id = 0;
}
- GTK_OBJECT_CLASS (e_week_view_parent_class)->destroy (object);
+ if (G_OBJECT_CLASS (e_week_view_parent_class)->dispose)
+ G_OBJECT_CLASS (e_week_view_parent_class)->dispose (object);
}
static void
@@ -2292,11 +2290,11 @@ e_week_view_remove_event_cb (EWeekView *week_view,
event->spans_index + span_num);
if (span->text_item) {
- gtk_object_destroy (GTK_OBJECT (span->text_item));
+ g_object_run_dispose (G_OBJECT (span->text_item));
span->text_item = NULL;
}
if (span->background_item) {
- gtk_object_destroy (GTK_OBJECT (span->background_item));
+ g_object_run_dispose (G_OBJECT (span->background_item));
span->background_item = NULL;
}
}
@@ -2762,9 +2760,9 @@ e_week_view_free_events (EWeekView *week_view)
span = &g_array_index (week_view->spans,
EWeekViewEventSpan, span_num);
if (span->background_item)
- gtk_object_destroy (GTK_OBJECT (span->background_item));
+ g_object_run_dispose (G_OBJECT (span->background_item));
if (span->text_item)
- gtk_object_destroy (GTK_OBJECT (span->text_item));
+ g_object_run_dispose (G_OBJECT (span->text_item));
}
g_array_free (week_view->spans, TRUE);
week_view->spans = NULL;
@@ -3129,9 +3127,9 @@ e_week_view_reshape_event_span (EWeekView *week_view,
if (!e_week_view_get_span_position (week_view, event_num, span_num,
&span_x, &span_y, &span_w)) {
if (span->background_item)
- gtk_object_destroy (GTK_OBJECT (span->background_item));
+ g_object_run_dispose (G_OBJECT (span->background_item));
if (span->text_item)
- gtk_object_destroy (GTK_OBJECT (span->text_item));
+ g_object_run_dispose (G_OBJECT (span->text_item));
span->background_item = NULL;
span->text_item = NULL;
@@ -3549,11 +3547,11 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
/* Stop the signal last or we will also stop any
other events getting to the EText item. */
- g_signal_stop_emission_by_name (GTK_OBJECT (item), "event");
+ g_signal_stop_emission_by_name (G_OBJECT (item), "event");
return TRUE;
} else if (gdkevent->key.keyval == GDK_KEY_Escape) {
cancel_editing (week_view);
- g_signal_stop_emission_by_name (GTK_OBJECT (item), "event");
+ g_signal_stop_emission_by_name (G_OBJECT (item), "event");
/* focus should go to week view when stop editing */
gtk_widget_grab_focus (GTK_WIDGET (week_view));
return TRUE;
@@ -3582,7 +3580,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
event->comp_data->client,
event->comp_data->icalcomp, FALSE);
- g_signal_stop_emission_by_name (GTK_OBJECT (item), "event");
+ g_signal_stop_emission_by_name (G_OBJECT (item), "event");
return TRUE;
case GDK_BUTTON_PRESS:
tooltip_destroy (week_view, item);
@@ -3613,7 +3611,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
(GdkEventButton*) gdkevent,
event_num);
- g_signal_stop_emission_by_name (GTK_OBJECT (item->canvas),
+ g_signal_stop_emission_by_name (G_OBJECT (item->canvas),
"button_press_event");
return TRUE;
}
@@ -3625,7 +3623,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
/* Only let the EText handle the event while editing. */
if (!E_TEXT (item)->editing) {
- g_signal_stop_emission_by_name (GTK_OBJECT (item), "event");
+ g_signal_stop_emission_by_name (G_OBJECT (item), "event");
if (gdkevent) {
week_view->drag_event_x = gdkevent->button.x;
@@ -3660,7 +3658,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
/* Stop the signal last or we will also stop any
other events getting to the EText item. */
- g_signal_stop_emission_by_name (GTK_OBJECT (item), "event");
+ g_signal_stop_emission_by_name (G_OBJECT (item), "event");
return TRUE;
}
week_view->pressed_event_num = -1;
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 655a8c2a75..4bbecb2939 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -993,7 +993,7 @@ free_event_array (GArray *array)
for (event_num = 0; event_num < array->len; event_num++) {
event = &g_array_index (array, EDayViewEvent, event_num);
if (event->canvas_item)
- gtk_object_destroy (GTK_OBJECT (event->canvas_item));
+ g_object_run_dispose (G_OBJECT (event->canvas_item));
}
g_array_set_size (array, 0);
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index 025c9df1ea..7586ad2439 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -191,7 +191,7 @@ configure_items (WeekdayPicker *wp)
}
static void
-weekday_picker_destroy (GtkObject *object)
+weekday_picker_dispose (GObject *object)
{
WeekdayPicker *wp;
WeekdayPickerPrivate *priv;
@@ -205,8 +205,9 @@ weekday_picker_destroy (GtkObject *object)
g_free (priv);
wp->priv = NULL;
- /* Chain up to parent's destroy() method. */
- GTK_OBJECT_CLASS (weekday_picker_parent_class)->destroy (object);
+ /* Chain up to parent's dispose() method. */
+ if (G_OBJECT_CLASS (weekday_picker_parent_class)->dispose)
+ G_OBJECT_CLASS (weekday_picker_parent_class)->dispose (object);
}
static void
@@ -342,11 +343,11 @@ weekday_picker_focus (GtkWidget *widget,
static void
weekday_picker_class_init (WeekdayPickerClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
- object_class = GTK_OBJECT_CLASS (class);
- object_class->destroy = weekday_picker_destroy;
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = weekday_picker_dispose;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = weekday_picker_realize;
@@ -530,7 +531,7 @@ weekday_picker_set_days (WeekdayPicker *wp, guint8 day_mask)
priv->day_mask = day_mask;
colorize_items (wp);
- g_signal_emit (GTK_OBJECT (wp), wp_signals[CHANGED], 0);
+ g_signal_emit (G_OBJECT (wp), wp_signals[CHANGED], 0);
}
/**
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index d4e45d4d15..0ea116f6dc 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1776,17 +1776,6 @@ msg_composer_get_property (GObject *object,
}
static void
-msg_composer_dispose (GObject *object)
-{
- EMsgComposer *composer = E_MSG_COMPOSER (object);
-
- e_composer_private_dispose (composer);
-
- /* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (e_msg_composer_parent_class)->dispose (object);
-}
-
-static void
msg_composer_finalize (GObject *object)
{
EMsgComposer *composer = E_MSG_COMPOSER (object);
@@ -1951,7 +1940,7 @@ msg_composer_constructed (GObject *object)
}
static void
-msg_composer_destroy (GtkObject *object)
+msg_composer_dispose (GObject *object)
{
EMsgComposer *composer = E_MSG_COMPOSER (object);
EShell *shell;
@@ -1969,8 +1958,11 @@ msg_composer_destroy (GtkObject *object)
g_signal_handlers_disconnect_by_func (
shell, msg_composer_prepare_for_quit_cb, composer);
- /* Chain up to parent's destroy() method. */
- GTK_OBJECT_CLASS (e_msg_composer_parent_class)->destroy (object);
+ e_composer_private_dispose (composer);
+
+ /* Chain up to parent's dispose() method. */
+ if (G_OBJECT_CLASS (e_msg_composer_parent_class)->dispose)
+ G_OBJECT_CLASS (e_msg_composer_parent_class)->dispose (object);
}
static void
@@ -2231,7 +2223,6 @@ static void
e_msg_composer_class_init (EMsgComposerClass *class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
GtkWidgetClass *widget_class;
GtkhtmlEditorClass *editor_class;
@@ -2244,9 +2235,6 @@ e_msg_composer_class_init (EMsgComposerClass *class)
object_class->finalize = msg_composer_finalize;
object_class->constructed = msg_composer_constructed;
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = msg_composer_destroy;
-
widget_class = GTK_WIDGET_CLASS (class);
widget_class->map = msg_composer_map;
widget_class->key_press_event = msg_composer_key_press_event;
diff --git a/e-util/e-categories-config.c b/e-util/e-categories-config.c
index be169f7284..44d5dc2c6c 100644
--- a/e-util/e-categories-config.c
+++ b/e-util/e-categories-config.c
@@ -128,5 +128,5 @@ e_categories_config_open_dialog_for_entry (GtkEntry *entry)
gtk_entry_set_text (GTK_ENTRY (entry), text);
}
- gtk_object_destroy (GTK_OBJECT (dialog));
+ gtk_widget_destroy (GTK_WIDGET (dialog));
}
diff --git a/e-util/e-text-event-processor.h b/e-util/e-text-event-processor.h
index 9e02cb050e..cf14ebb286 100644
--- a/e-util/e-text-event-processor.h
+++ b/e-util/e-text-event-processor.h
@@ -51,7 +51,7 @@ struct _ETextEventProcessor
struct _ETextEventProcessorClass
{
- GtkObjectClass parent_class;
+ GObjectClass parent_class;
/* signals */
void (* command) (ETextEventProcessor *tep, ETextEventProcessorCommand *command);
diff --git a/filter/e-filter-int.c b/filter/e-filter-int.c
index 68f8417423..871e595505 100644
--- a/filter/e-filter-int.c
+++ b/filter/e-filter-int.c
@@ -141,13 +141,13 @@ filter_int_get_widget (EFilterElement *element)
{
EFilterInt *filter_int = E_FILTER_INT (element);
GtkWidget *widget;
- GtkObject *adjustment;
+ GtkAdjustment *adjustment;
adjustment = gtk_adjustment_new (
0.0, (gfloat) filter_int->min,
(gfloat) filter_int->max, 1.0, 1.0, 0);
widget = gtk_spin_button_new (
- GTK_ADJUSTMENT (adjustment),
+ adjustment,
filter_int->max > filter_int->min + 1000 ? 5.0 : 1.0, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (widget), TRUE);
diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c
index ca9475a6af..bfcff8c8b9 100644
--- a/filter/e-filter-rule.c
+++ b/filter/e-filter-rule.c
@@ -649,7 +649,7 @@ filter_rule_get_widget (EFilterRule *rule,
GtkWidget *add, *label, *name, *w;
GtkWidget *combobox;
GtkWidget *scrolledwindow;
- GtkObject *hadj, *vadj;
+ GtkAdjustment *hadj, *vadj;
GList *l;
gchar *text;
EFilterPart *part;
@@ -807,8 +807,8 @@ filter_rule_get_widget (EFilterRule *rule,
hadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
vadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0);
- scrolledwindow = gtk_scrolled_window_new (
- GTK_ADJUSTMENT (hadj), GTK_ADJUSTMENT (vadj));
+ scrolledwindow = gtk_scrolled_window_new (hadj, vadj);
+
gtk_scrolled_window_set_policy (
GTK_SCROLLED_WINDOW (scrolledwindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
diff --git a/filter/e-rule-editor.c b/filter/e-rule-editor.c
index 94d182ebb0..68c005cc38 100644
--- a/filter/e-rule-editor.c
+++ b/filter/e-rule-editor.c
@@ -569,17 +569,18 @@ rule_editor_finalize (GObject *object)
}
static void
-rule_editor_destroy (GtkObject *gtk_object)
+rule_editor_dispose (GObject *object)
{
- ERuleEditor *editor = E_RULE_EDITOR (gtk_object);
+ ERuleEditor *editor = E_RULE_EDITOR (object);
if (editor->dialog != NULL) {
gtk_widget_destroy (GTK_WIDGET (editor->dialog));
editor->dialog = NULL;
}
- /* Chain up to parent's destroy() method. */
- GTK_OBJECT_CLASS (e_rule_editor_parent_class)->destroy (gtk_object);
+ /* Chain up to parent's dispose() method. */
+ if (G_OBJECT_CLASS (e_rule_editor_parent_class)->dispose)
+ G_OBJECT_CLASS (e_rule_editor_parent_class)->dispose (object);
}
static void
@@ -644,15 +645,12 @@ static void
e_rule_editor_class_init (ERuleEditorClass *class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
g_type_class_add_private (class, sizeof (ERuleEditorPrivate));
object_class = G_OBJECT_CLASS (class);
object_class->finalize = rule_editor_finalize;
-
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = rule_editor_destroy;
+ object_class->dispose = rule_editor_dispose;
class->set_source = rule_editor_set_source;
class->set_sensitive = rule_editor_set_sensitive;
diff --git a/libgnomecanvas/gnome-canvas-bpath.c b/libgnomecanvas/gnome-canvas-bpath.c
index 0a59712de2..0aee2ece46 100644
--- a/libgnomecanvas/gnome-canvas-bpath.c
+++ b/libgnomecanvas/gnome-canvas-bpath.c
@@ -35,7 +35,6 @@ enum {
static void gnome_canvas_bpath_class_init (GnomeCanvasBpathClass *class);
static void gnome_canvas_bpath_init (GnomeCanvasBpath *bpath);
-static void gnome_canvas_bpath_destroy (GtkObject *object);
static void gnome_canvas_bpath_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -79,11 +78,9 @@ static void
gnome_canvas_bpath_class_init (GnomeCanvasBpathClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
parent_class = g_type_class_peek_parent (class);
@@ -95,8 +92,6 @@ gnome_canvas_bpath_class_init (GnomeCanvasBpathClass *class)
gobject_class->set_property = gnome_canvas_bpath_set_property;
gobject_class->get_property = gnome_canvas_bpath_get_property;
- object_class->destroy = gnome_canvas_bpath_destroy;
-
g_object_class_install_property (gobject_class,
PROP_BPATH,
g_param_spec_boxed ("bpath", NULL, NULL,
@@ -113,13 +108,6 @@ gnome_canvas_bpath_init (GnomeCanvasBpath *bpath)
}
static void
-gnome_canvas_bpath_destroy (GtkObject *object)
-{
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
-
-static void
gnome_canvas_bpath_set_property (GObject *object,
guint param_id,
const GValue *value,
diff --git a/libgnomecanvas/gnome-canvas-clipgroup.c b/libgnomecanvas/gnome-canvas-clipgroup.c
index 6019d1cdf6..350cb643bb 100644
--- a/libgnomecanvas/gnome-canvas-clipgroup.c
+++ b/libgnomecanvas/gnome-canvas-clipgroup.c
@@ -44,7 +44,7 @@ enum {
static void gnome_canvas_clipgroup_class_init (GnomeCanvasClipgroupClass *klass);
static void gnome_canvas_clipgroup_init (GnomeCanvasClipgroup *clipgroup);
-static void gnome_canvas_clipgroup_destroy (GtkObject *object);
+static void gnome_canvas_clipgroup_destroy (GnomeCanvasItem *object);
static void gnome_canvas_clipgroup_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -119,17 +119,15 @@ static void
gnome_canvas_clipgroup_class_init (GnomeCanvasClipgroupClass *klass)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
gobject_class = (GObjectClass *) klass;
- object_class = (GtkObjectClass *) klass;
item_class = (GnomeCanvasItemClass *) klass;
parent_class = g_type_class_ref (GNOME_TYPE_CANVAS_GROUP);
- object_class->destroy = gnome_canvas_clipgroup_destroy;
gobject_class->set_property = gnome_canvas_clipgroup_set_property;
gobject_class->get_property = gnome_canvas_clipgroup_get_property;
+ item_class->destroy = gnome_canvas_clipgroup_destroy;
item_class->update = gnome_canvas_clipgroup_update;
item_class->render = gnome_canvas_clipgroup_render;
@@ -153,7 +151,7 @@ gnome_canvas_clipgroup_init (GnomeCanvasClipgroup *clipgroup)
}
static void
-gnome_canvas_clipgroup_destroy (GtkObject *object)
+gnome_canvas_clipgroup_destroy (GnomeCanvasItem *object)
{
GnomeCanvasClipgroup *clipgroup;
@@ -172,8 +170,8 @@ gnome_canvas_clipgroup_destroy (GtkObject *object)
clipgroup->svp = NULL;
}
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy)
+ GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy (object);
}
static void
diff --git a/libgnomecanvas/gnome-canvas-line.c b/libgnomecanvas/gnome-canvas-line.c
index fa9179d024..a55b298beb 100644
--- a/libgnomecanvas/gnome-canvas-line.c
+++ b/libgnomecanvas/gnome-canvas-line.c
@@ -84,7 +84,7 @@ enum {
static void gnome_canvas_line_class_init (GnomeCanvasLineClass *class);
static void gnome_canvas_line_init (GnomeCanvasLine *line);
-static void gnome_canvas_line_destroy (GtkObject *object);
+static void gnome_canvas_line_destroy (GnomeCanvasItem *object);
static void gnome_canvas_line_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -136,11 +136,9 @@ static void
gnome_canvas_line_class_init (GnomeCanvasLineClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
parent_class = g_type_class_peek_parent (class);
@@ -254,8 +252,7 @@ gnome_canvas_line_class_init (GnomeCanvasLineClass *class)
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- object_class->destroy = gnome_canvas_line_destroy;
-
+ item_class->destroy = gnome_canvas_line_destroy;
item_class->update = gnome_canvas_line_update;
item_class->realize = gnome_canvas_line_realize;
item_class->unrealize = gnome_canvas_line_unrealize;
@@ -280,7 +277,7 @@ gnome_canvas_line_init (GnomeCanvasLine *line)
}
static void
-gnome_canvas_line_destroy (GtkObject *object)
+gnome_canvas_line_destroy (GnomeCanvasItem *object)
{
GnomeCanvasLine *line;
@@ -319,8 +316,8 @@ gnome_canvas_line_destroy (GtkObject *object)
art_svp_free (line->last_svp);
line->last_svp = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy)
+ GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy (object);
}
/* Computes the bounding box of the line, including its arrow points. Assumes that the number of
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index 5d290f1582..3ea3f647be 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -83,7 +83,7 @@ enum {
static void gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class);
static void gnome_canvas_pixbuf_init (GnomeCanvasPixbuf *cpb);
-static void gnome_canvas_pixbuf_destroy (GtkObject *object);
+static void gnome_canvas_pixbuf_destroy (GnomeCanvasItem *object);
static void gnome_canvas_pixbuf_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -151,11 +151,9 @@ static void
gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
parent_class = g_type_class_peek_parent (class);
@@ -237,8 +235,7 @@ gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)
GTK_ANCHOR_NW,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- object_class->destroy = gnome_canvas_pixbuf_destroy;
-
+ item_class->destroy = gnome_canvas_pixbuf_destroy;
item_class->update = gnome_canvas_pixbuf_update;
item_class->draw = gnome_canvas_pixbuf_draw;
item_class->render = gnome_canvas_pixbuf_render;
@@ -264,7 +261,7 @@ gnome_canvas_pixbuf_init (GnomeCanvasPixbuf *gcp)
/* Destroy handler for the pixbuf canvas item */
static void
-gnome_canvas_pixbuf_destroy (GtkObject *object)
+gnome_canvas_pixbuf_destroy (GnomeCanvasItem *object)
{
GnomeCanvasItem *item;
GnomeCanvasPixbuf *gcp;
@@ -290,8 +287,8 @@ gnome_canvas_pixbuf_destroy (GtkObject *object)
gcp->priv = NULL;
}
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy)
+ GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy (object);
}
@@ -744,37 +741,7 @@ gnome_canvas_pixbuf_update (GnomeCanvasItem *item,
if (parent_class->update)
(* parent_class->update) (item, affine, clip_path, flags);
- /* the optimzations below cause rarely triggered redrawing bugs and
- * don't seem to actually save much performance. so it's probably
- * better to turn them off, than to chase subtle optimization bugs
- * throughgout all of gnome-canvas-pixbuf.c - TIMJ
- */
-#ifdef USE_BROKEN_OPTIMIZATIONS
- if (((flags & GNOME_CANVAS_UPDATE_VISIBILITY)
- && !(GTK_OBJECT_FLAGS (item) & GNOME_CANVAS_ITEM_VISIBLE))
- || (flags & GNOME_CANVAS_UPDATE_AFFINE)
- || priv->need_pixbuf_update
- || priv->need_xform_update) {
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
- }
-
- /* If we need a pixbuf update, or if the item changed visibility to
- * shown, recompute the bounding box.
- */
- if (priv->need_pixbuf_update
- || priv->need_xform_update
- || ((flags & GNOME_CANVAS_UPDATE_VISIBILITY)
- && (GTK_OBJECT_FLAGS (gcp) & GNOME_CANVAS_ITEM_VISIBLE))
- || (flags & GNOME_CANVAS_UPDATE_AFFINE)) {
- recompute_bounding_box (gcp, affine);
-#ifdef GNOME_CANVAS_PIXBUF_VERBOSE
- g_print ("BBox is %g %g %g %g\n", item->x1, item->y1, item->x2, item->y2);
-#endif
- gnome_canvas_request_redraw (item->canvas, item->x1, item->y1, item->x2, item->y2);
- priv->need_pixbuf_update = FALSE;
- priv->need_xform_update = FALSE;
- }
-#else /* ordinary update logic */
+ /* ordinary update logic */
gnome_canvas_request_redraw (
item->canvas, item->x1, item->y1, item->x2, item->y2);
recompute_bounding_box (gcp, affine);
@@ -782,7 +749,6 @@ gnome_canvas_pixbuf_update (GnomeCanvasItem *item,
item->canvas, item->x1, item->y1, item->x2, item->y2);
priv->need_pixbuf_update = FALSE;
priv->need_xform_update = FALSE;
-#endif
}
diff --git a/libgnomecanvas/gnome-canvas-polygon.c b/libgnomecanvas/gnome-canvas-polygon.c
index fe1d55b698..90ae40fe5e 100644
--- a/libgnomecanvas/gnome-canvas-polygon.c
+++ b/libgnomecanvas/gnome-canvas-polygon.c
@@ -51,7 +51,7 @@ enum {
static void gnome_canvas_polygon_class_init (GnomeCanvasPolygonClass *class);
static void gnome_canvas_polygon_init (GnomeCanvasPolygon *poly);
-static void gnome_canvas_polygon_destroy (GtkObject *object);
+static void gnome_canvas_polygon_destroy (GnomeCanvasItem *object);
static void gnome_canvas_polygon_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -94,28 +94,25 @@ gnome_canvas_polygon_get_type (void)
static void
gnome_canvas_polygon_class_init (GnomeCanvasPolygonClass *class)
{
- GObjectClass *gobject_class;
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GnomeCanvasItemClass *item_class;
- gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
+ object_class = (GObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
parent_class = g_type_class_peek_parent (class);
- gobject_class->set_property = gnome_canvas_polygon_set_property;
- gobject_class->get_property = gnome_canvas_polygon_get_property;
+ object_class->set_property = gnome_canvas_polygon_set_property;
+ object_class->get_property = gnome_canvas_polygon_get_property;
g_object_class_install_property
- (gobject_class,
+ (object_class,
PROP_POINTS,
g_param_spec_boxed ("points", NULL, NULL,
GNOME_TYPE_CANVAS_POINTS,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- object_class->destroy = gnome_canvas_polygon_destroy;
-
+ item_class->destroy = gnome_canvas_polygon_destroy;
item_class->update = gnome_canvas_polygon_update;
}
@@ -126,7 +123,7 @@ gnome_canvas_polygon_init (GnomeCanvasPolygon *poly)
}
static void
-gnome_canvas_polygon_destroy (GtkObject *object)
+gnome_canvas_polygon_destroy (GnomeCanvasItem *object)
{
GnomeCanvasPolygon *poly;
@@ -142,8 +139,8 @@ gnome_canvas_polygon_destroy (GtkObject *object)
poly->path_def = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy)
+ GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy (object);
}
static void
diff --git a/libgnomecanvas/gnome-canvas-rect-ellipse.c b/libgnomecanvas/gnome-canvas-rect-ellipse.c
index e086914bc4..a848d50f8e 100644
--- a/libgnomecanvas/gnome-canvas-rect-ellipse.c
+++ b/libgnomecanvas/gnome-canvas-rect-ellipse.c
@@ -57,7 +57,6 @@ enum {
static void gnome_canvas_re_class_init (GnomeCanvasREClass *class);
static void gnome_canvas_re_init (GnomeCanvasRE *re);
-static void gnome_canvas_re_destroy (GtkObject *object);
static void gnome_canvas_re_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -102,10 +101,8 @@ static void
gnome_canvas_re_class_init (GnomeCanvasREClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
re_parent_class = g_type_class_peek_parent (class);
@@ -136,8 +133,6 @@ gnome_canvas_re_class_init (GnomeCanvasREClass *class)
g_param_spec_double ("y2", NULL, NULL,
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
-
- object_class->destroy = gnome_canvas_re_destroy;
}
static void
@@ -151,16 +146,6 @@ gnome_canvas_re_init (GnomeCanvasRE *re)
}
static void
-gnome_canvas_re_destroy (GtkObject *object)
-{
- g_return_if_fail (object != NULL);
- g_return_if_fail (GNOME_IS_CANVAS_RE (object));
-
- if (GTK_OBJECT_CLASS (re_parent_class)->destroy)
- (* GTK_OBJECT_CLASS (re_parent_class)->destroy) (object);
-}
-
-static void
gnome_canvas_re_set_property (GObject *object,
guint param_id,
const GValue *value,
diff --git a/libgnomecanvas/gnome-canvas-rich-text.c b/libgnomecanvas/gnome-canvas-rich-text.c
index 8b5b2030a0..bd988ae3f5 100644
--- a/libgnomecanvas/gnome-canvas-rich-text.c
+++ b/libgnomecanvas/gnome-canvas-rich-text.c
@@ -199,13 +199,13 @@ static void
gnome_canvas_rich_text_class_init (GnomeCanvasRichTextClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
GnomeCanvasItemClass *item_class = GNOME_CANVAS_ITEM_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
gobject_class->set_property = gnome_canvas_rich_text_set_property;
gobject_class->get_property = gnome_canvas_rich_text_get_property;
+ gobject_class->finalize = gnome_canvas_rich_text_finalize;
g_object_class_install_property (
gobject_class,
@@ -381,7 +381,7 @@ gnome_canvas_rich_text_class_init (GnomeCanvasRichTextClass *klass)
/* Signals */
signals[TAG_CHANGED] = g_signal_new (
"tag_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GnomeCanvasRichTextClass, tag_changed),
NULL, NULL,
@@ -389,8 +389,6 @@ gnome_canvas_rich_text_class_init (GnomeCanvasRichTextClass *klass)
G_TYPE_NONE, 1,
G_TYPE_OBJECT);
- gobject_class->finalize = gnome_canvas_rich_text_finalize;
-
item_class->update = gnome_canvas_rich_text_update;
item_class->realize = gnome_canvas_rich_text_realize;
item_class->unrealize = gnome_canvas_rich_text_unrealize;
@@ -405,7 +403,7 @@ static void
gnome_canvas_rich_text_init (GnomeCanvasRichText *text)
{
#if 0
- GtkObject *object = GTK_OBJECT (text);
+ GObject *object = G_OBJECT (text);
object->flags |= GNOME_CANVAS_ITEM_ALWAYS_REDRAW;
#endif
diff --git a/libgnomecanvas/gnome-canvas-shape.c b/libgnomecanvas/gnome-canvas-shape.c
index 2b606c1e5b..b1154975b2 100644
--- a/libgnomecanvas/gnome-canvas-shape.c
+++ b/libgnomecanvas/gnome-canvas-shape.c
@@ -62,7 +62,7 @@ enum {
static void gnome_canvas_shape_class_init (GnomeCanvasShapeClass *class);
static void gnome_canvas_shape_init (GnomeCanvasShape *bpath);
-static void gnome_canvas_shape_destroy (GtkObject *object);
+static void gnome_canvas_shape_destroy (GnomeCanvasItem *object);
static void gnome_canvas_shape_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -124,11 +124,9 @@ static void
gnome_canvas_shape_class_init (GnomeCanvasShapeClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
parent_class = g_type_class_peek_parent (class);
@@ -217,8 +215,7 @@ gnome_canvas_shape_class_init (GnomeCanvasShapeClass *class)
g_param_spec_pointer ("dash", NULL, NULL,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- object_class->destroy = gnome_canvas_shape_destroy;
-
+ item_class->destroy = gnome_canvas_shape_destroy;
item_class->update = gnome_canvas_shape_update;
item_class->realize = gnome_canvas_shape_realize;
item_class->unrealize = gnome_canvas_shape_unrealize;
@@ -261,7 +258,7 @@ gnome_canvas_shape_init (GnomeCanvasShape *shape)
}
static void
-gnome_canvas_shape_destroy (GtkObject *object)
+gnome_canvas_shape_destroy (GnomeCanvasItem *object)
{
GnomeCanvasShape *shape;
GnomeCanvasShapePriv *priv;
@@ -285,8 +282,8 @@ gnome_canvas_shape_destroy (GtkObject *object)
shape->priv = NULL;
}
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy)
+ GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy (object);
}
/**
diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c
index c0c9acba2b..5f7679f3aa 100644
--- a/libgnomecanvas/gnome-canvas-text.c
+++ b/libgnomecanvas/gnome-canvas-text.c
@@ -105,7 +105,7 @@ struct _GnomeCanvasTextPrivate {
static void gnome_canvas_text_class_init (GnomeCanvasTextClass *class);
static void gnome_canvas_text_init (GnomeCanvasText *text);
-static void gnome_canvas_text_destroy (GtkObject *object);
+static void gnome_canvas_text_destroy (GnomeCanvasItem *object);
static void gnome_canvas_text_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -187,11 +187,9 @@ static void
gnome_canvas_text_class_init (GnomeCanvasTextClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
parent_class = g_type_class_peek_parent (class);
@@ -199,6 +197,7 @@ gnome_canvas_text_class_init (GnomeCanvasTextClass *class)
gobject_class->set_property = gnome_canvas_text_set_property;
gobject_class->get_property = gnome_canvas_text_get_property;
+
/* Text */
g_object_class_install_property
(gobject_class,
@@ -512,8 +511,7 @@ gnome_canvas_text_class_init (GnomeCanvasTextClass *class)
"Whether this tag affects font scaling");
#undef ADD_SET_PROP
- object_class->destroy = gnome_canvas_text_destroy;
-
+ item_class->destroy = gnome_canvas_text_destroy;
item_class->update = gnome_canvas_text_update;
item_class->realize = gnome_canvas_text_realize;
item_class->unrealize = gnome_canvas_text_unrealize;
@@ -554,7 +552,7 @@ gnome_canvas_text_init (GnomeCanvasText *text)
/* Destroy handler for the text item */
static void
-gnome_canvas_text_destroy (GtkObject *object)
+gnome_canvas_text_destroy (GnomeCanvasItem *object)
{
GnomeCanvasText *text;
@@ -590,8 +588,8 @@ gnome_canvas_text_destroy (GtkObject *object)
g_free (text->priv);
text->priv = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy)
+ GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy (object);
}
static void
diff --git a/libgnomecanvas/gnome-canvas-widget.c b/libgnomecanvas/gnome-canvas-widget.c
index 23b687f899..fbcb0a6a53 100644
--- a/libgnomecanvas/gnome-canvas-widget.c
+++ b/libgnomecanvas/gnome-canvas-widget.c
@@ -49,7 +49,7 @@ enum {
static void gnome_canvas_widget_class_init (GnomeCanvasWidgetClass *class);
static void gnome_canvas_widget_init (GnomeCanvasWidget *witem);
-static void gnome_canvas_widget_destroy (GtkObject *object);
+static void gnome_canvas_widget_destroy (GnomeCanvasItem *object);
static void gnome_canvas_widget_get_property (GObject *object,
guint param_id,
GValue *value,
@@ -116,11 +116,9 @@ static void
gnome_canvas_widget_class_init (GnomeCanvasWidgetClass *class)
{
GObjectClass *gobject_class;
- GtkObjectClass *object_class;
GnomeCanvasItemClass *item_class;
gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
parent_class = g_type_class_peek_parent (class);
@@ -172,8 +170,7 @@ gnome_canvas_widget_class_init (GnomeCanvasWidgetClass *class)
FALSE,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- object_class->destroy = gnome_canvas_widget_destroy;
-
+ item_class->destroy = gnome_canvas_widget_destroy;
item_class->update = gnome_canvas_widget_update;
item_class->point = gnome_canvas_widget_point;
item_class->bounds = gnome_canvas_widget_bounds;
@@ -182,6 +179,19 @@ gnome_canvas_widget_class_init (GnomeCanvasWidgetClass *class)
}
static void
+do_destroy (gpointer data, GObject *gone_object)
+{
+ GnomeCanvasWidget *witem;
+
+ witem = data;
+
+ if (!witem->in_destroy) {
+ witem->in_destroy = TRUE;
+ g_object_run_dispose (G_OBJECT (witem));
+ }
+}
+
+static void
gnome_canvas_widget_init (GnomeCanvasWidget *witem)
{
witem->x = 0.0;
@@ -193,7 +203,7 @@ gnome_canvas_widget_init (GnomeCanvasWidget *witem)
}
static void
-gnome_canvas_widget_destroy (GtkObject *object)
+gnome_canvas_widget_destroy (GnomeCanvasItem *object)
{
GnomeCanvasWidget *witem;
@@ -203,13 +213,13 @@ gnome_canvas_widget_destroy (GtkObject *object)
witem = GNOME_CANVAS_WIDGET (object);
if (witem->widget && !witem->in_destroy) {
- g_signal_handler_disconnect (witem->widget, witem->destroy_id);
+ g_object_weak_unref (G_OBJECT (witem->widget), do_destroy, witem);
gtk_widget_destroy (witem->widget);
witem->widget = NULL;
}
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy)
+ GNOME_CANVAS_ITEM_CLASS (parent_class)->destroy (object);
}
static void
@@ -290,18 +300,6 @@ recalc_bounds (GnomeCanvasWidget *witem)
}
static void
-do_destroy (GtkObject *object, gpointer data)
-{
- GnomeCanvasWidget *witem;
-
- witem = data;
-
- witem->in_destroy = TRUE;
-
- gtk_object_destroy (data);
-}
-
-static void
gnome_canvas_widget_set_property (GObject *object,
guint param_id,
const GValue *value,
@@ -325,16 +323,14 @@ gnome_canvas_widget_set_property (GObject *object,
switch (param_id) {
case PROP_WIDGET:
if (witem->widget) {
- g_signal_handler_disconnect (witem->widget, witem->destroy_id);
+ g_object_weak_unref (G_OBJECT (witem->widget), do_destroy, witem);
gtk_container_remove (GTK_CONTAINER (item->canvas), witem->widget);
}
obj = g_value_get_object (value);
if (obj) {
witem->widget = GTK_WIDGET (obj);
- witem->destroy_id = g_signal_connect (obj, "destroy",
- G_CALLBACK (do_destroy),
- witem);
+ g_object_weak_ref (obj, do_destroy, witem);
gtk_layout_put (GTK_LAYOUT (item->canvas), witem->widget,
witem->cx + item->canvas->zoom_xofs,
witem->cy + item->canvas->zoom_yofs);
diff --git a/libgnomecanvas/gnome-canvas-widget.h b/libgnomecanvas/gnome-canvas-widget.h
index 32514aad6e..62000299b1 100644
--- a/libgnomecanvas/gnome-canvas-widget.h
+++ b/libgnomecanvas/gnome-canvas-widget.h
@@ -78,8 +78,6 @@ struct _GnomeCanvasWidget {
gint cx, cy; /* Top-left canvas coordinates for widget */
gint cwidth, cheight; /* Size of widget in pixels */
- guint destroy_id; /* Signal connection id for destruction of child widget */
-
guint size_pixels : 1; /* Is size specified in (unchanging) pixels or units (get scaled)? */
guint in_destroy : 1; /* Is child widget being destroyed? */
};
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index adc18621f9..cacabff454 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -136,7 +136,7 @@ static gint emit_event (GnomeCanvas *canvas, GdkEvent *ev
static guint item_signals[ITEM_LAST_SIGNAL];
-static GtkObjectClass *item_parent_class;
+static GObjectClass *item_parent_class;
/**
* gnome_canvas_item_get_type:
@@ -165,7 +165,7 @@ gnome_canvas_item_get_type (void)
NULL /* value_table */
};
- canvas_item_type = g_type_register_static (GTK_TYPE_OBJECT, "GnomeCanvasItem",
+ canvas_item_type = g_type_register_static (G_TYPE_OBJECT, "GnomeCanvasItem",
&object_info, 0);
}
@@ -362,6 +362,9 @@ gnome_canvas_item_dispose (GObject *object)
g_free (item->xform);
item->xform = NULL;
+ if (GNOME_CANVAS_ITEM_GET_CLASS (item)->destroy)
+ GNOME_CANVAS_ITEM_GET_CLASS (item)->destroy (item);
+
G_OBJECT_CLASS (item_parent_class)->dispose (object);
/* items should remove any reference to item->canvas after the
first ::destroy */
@@ -1355,7 +1358,7 @@ static void gnome_canvas_group_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
-static void gnome_canvas_group_destroy (GtkObject *object);
+static void gnome_canvas_group_destroy (GnomeCanvasItem *object);
static void gnome_canvas_group_update (GnomeCanvasItem *item, gdouble *affine,
ArtSVP *clip_path, gint flags);
@@ -1418,36 +1421,33 @@ gnome_canvas_group_get_type (void)
static void
gnome_canvas_group_class_init (GnomeCanvasGroupClass *class)
{
- GObjectClass *gobject_class;
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GnomeCanvasItemClass *item_class;
- gobject_class = (GObjectClass *) class;
- object_class = (GtkObjectClass *) class;
+ object_class = (GObjectClass *) class;
item_class = (GnomeCanvasItemClass *) class;
group_parent_class = g_type_class_peek_parent (class);
- gobject_class->set_property = gnome_canvas_group_set_property;
- gobject_class->get_property = gnome_canvas_group_get_property;
+ object_class->set_property = gnome_canvas_group_set_property;
+ object_class->get_property = gnome_canvas_group_get_property;
g_object_class_install_property
- (gobject_class, GROUP_PROP_X,
+ (object_class, GROUP_PROP_X,
g_param_spec_double ("x",
"X",
"X",
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
g_object_class_install_property
- (gobject_class, GROUP_PROP_Y,
+ (object_class, GROUP_PROP_Y,
g_param_spec_double ("y",
"Y",
"Y",
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
- object_class->destroy = gnome_canvas_group_destroy;
-
+ item_class->destroy = gnome_canvas_group_destroy;
item_class->update = gnome_canvas_group_update;
item_class->realize = gnome_canvas_group_realize;
item_class->unrealize = gnome_canvas_group_unrealize;
@@ -1553,7 +1553,7 @@ gnome_canvas_group_get_property (GObject *gobject, guint param_id,
/* Destroy handler for canvas groups */
static void
-gnome_canvas_group_destroy (GtkObject *object)
+gnome_canvas_group_destroy (GnomeCanvasItem *object)
{
GnomeCanvasGroup *group;
@@ -1562,12 +1562,12 @@ gnome_canvas_group_destroy (GtkObject *object)
group = GNOME_CANVAS_GROUP (object);
while (group->item_list) {
- // child is unref'ed by the child's group_remove ().
- gtk_object_destroy (GTK_OBJECT (group->item_list->data));
+ /* child is unref'ed by the child's group_remove (). */
+ g_object_run_dispose (G_OBJECT (group->item_list->data));
}
- if (GTK_OBJECT_CLASS (group_parent_class)->destroy)
- (* GTK_OBJECT_CLASS (group_parent_class)->destroy) (object);
+ if (GNOME_CANVAS_ITEM_CLASS (group_parent_class)->destroy)
+ GNOME_CANVAS_ITEM_CLASS (group_parent_class)->destroy (object);
}
/* Update handler for canvas groups */
@@ -1941,7 +1941,7 @@ enum {
static void gnome_canvas_class_init (GnomeCanvasClass *class);
static void gnome_canvas_init (GnomeCanvas *canvas);
-static void gnome_canvas_destroy (GtkObject *object);
+static void gnome_canvas_dispose (GObject *object);
static void gnome_canvas_map (GtkWidget *widget);
static void gnome_canvas_unmap (GtkWidget *widget);
static void gnome_canvas_realize (GtkWidget *widget);
@@ -2055,20 +2055,17 @@ gnome_canvas_set_property (GObject *object,
static void
gnome_canvas_class_init (GnomeCanvasClass *klass)
{
- GObjectClass *gobject_class;
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
- gobject_class = (GObjectClass *)klass;
- object_class = (GtkObjectClass *) klass;
+ object_class = (GObjectClass *)klass;
widget_class = (GtkWidgetClass *) klass;
canvas_parent_class = g_type_class_peek_parent (klass);
- gobject_class->set_property = gnome_canvas_set_property;
- gobject_class->get_property = gnome_canvas_get_property;
-
- object_class->destroy = gnome_canvas_destroy;
+ object_class->set_property = gnome_canvas_set_property;
+ object_class->get_property = gnome_canvas_get_property;
+ object_class->dispose = gnome_canvas_dispose;
widget_class->map = gnome_canvas_map;
widget_class->unmap = gnome_canvas_unmap;
@@ -2098,7 +2095,7 @@ gnome_canvas_class_init (GnomeCanvasClass *klass)
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
- g_object_class_install_property (gobject_class, PROP_FOCUSED_ITEM,
+ g_object_class_install_property (object_class, PROP_FOCUSED_ITEM,
g_param_spec_object ("focused_item", NULL, NULL,
GNOME_TYPE_CANVAS_ITEM,
(G_PARAM_READABLE | G_PARAM_WRITABLE)));
@@ -2128,9 +2125,9 @@ gnome_canvas_class_init (GnomeCanvasClass *klass)
* never ever do this, so we panic if this happens.
*/
G_GNUC_NORETURN static void
-panic_root_destroyed (GtkObject *object, gpointer data)
+panic_root_finalized (gpointer data, GObject *gone_object)
{
- g_error ("Eeeek, root item %p of canvas %p was destroyed!", object, data);
+ g_error ("Eeeek, root item %p of canvas %p was destroyed!", gone_object, data);
}
/* Object initialization function for GnomeCanvas */
@@ -2182,9 +2179,7 @@ gnome_canvas_init (GnomeCanvas *canvas)
g_object_ref_sink (canvas->root);
- canvas->root_destroy_id = g_signal_connect (canvas->root, "destroy",
- G_CALLBACK (panic_root_destroyed),
- canvas);
+ g_object_weak_ref (G_OBJECT (canvas->root), panic_root_finalized, canvas);
canvas->need_repick = TRUE;
}
@@ -2227,32 +2222,28 @@ shutdown_transients (GnomeCanvas *canvas)
remove_idle (canvas);
}
-/* Destroy handler for GnomeCanvas */
+/* Dispose handler for GnomeCanvas */
static void
-gnome_canvas_destroy (GtkObject *object)
+gnome_canvas_dispose (GObject *object)
{
GnomeCanvas *canvas;
g_return_if_fail (GNOME_IS_CANVAS (object));
- /* remember, destroy can be run multiple times! */
+ /* remember, dispose can be run multiple times! */
canvas = GNOME_CANVAS (object);
- if (canvas->root_destroy_id) {
- g_signal_handler_disconnect (canvas->root, canvas->root_destroy_id);
- canvas->root_destroy_id = 0;
- }
if (canvas->root) {
- gtk_object_destroy (GTK_OBJECT (canvas->root));
+ g_object_weak_unref (G_OBJECT (canvas->root), panic_root_finalized, canvas);
g_object_unref (G_OBJECT (canvas->root));
canvas->root = NULL;
}
shutdown_transients (canvas);
- if (GTK_OBJECT_CLASS (canvas_parent_class)->destroy)
- (* GTK_OBJECT_CLASS (canvas_parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (canvas_parent_class)->dispose)
+ G_OBJECT_CLASS (canvas_parent_class)->dispose (object);
}
/**
diff --git a/libgnomecanvas/gnome-canvas.h b/libgnomecanvas/gnome-canvas.h
index 66b9dba652..c5d6cffe3b 100644
--- a/libgnomecanvas/gnome-canvas.h
+++ b/libgnomecanvas/gnome-canvas.h
@@ -138,7 +138,7 @@ typedef struct {
#define GNOME_CANVAS_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_ITEM, GnomeCanvasItemClass))
struct _GnomeCanvasItem {
- GtkObject object;
+ GObject object;
/* Parent canvas for this item */
GnomeCanvas *canvas;
@@ -156,13 +156,13 @@ struct _GnomeCanvasItem {
/* Bounding box for this item (in canvas coordinates) */
gdouble x1, y1, x2, y2;
- /* XXX GtkObject flags are sealed now, so we have to provide
+ /* XXX GObject flags are sealed now, so we have to provide
* our own. This breaks ABI compatibility with upstream. */
GnomeCanvasItemFlags flags;
};
struct _GnomeCanvasItemClass {
- GtkObjectClass parent_class;
+ GObjectClass parent_class;
/* Tell the item to update itself. The flags are from the update flags
* defined above. The item should update its internal state from its
@@ -184,6 +184,9 @@ struct _GnomeCanvasItemClass {
/* Unmap an item */
void (* unmap) (GnomeCanvasItem *item);
+ /* Destroy item; called inside GObject's dispose of the base class */
+ void (* destroy) (GnomeCanvasItem *item);
+
/* Return the microtile coverage of the item */
ArtUta *(* coverage) (GnomeCanvasItem *item);
@@ -426,9 +429,6 @@ struct _GnomeCanvas {
/* Idle handler ID */
guint idle_id;
- /* Signal handler ID for destruction of the root item */
- guint root_destroy_id;
-
/* Area that is being redrawn. Contains (x1, y1) but not (x2, y2).
* Specified in canvas pixel coordinates.
*/
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index 9eda80a5a5..047f386c19 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -109,14 +109,7 @@ static gchar *default_xfer_messages_uri;
static GQuark quark_private;
static guint signals[LAST_SIGNAL];
-G_DEFINE_INTERFACE (EMailReader, e_mail_reader, GTK_TYPE_OBJECT)
-
-static void
-mail_reader_destroy (GObject *object)
-{
- /* This will free the private struct. */
- g_object_set_qdata (object, quark_private, NULL);
-}
+G_DEFINE_INTERFACE (EMailReader, e_mail_reader, G_TYPE_OBJECT)
static void
mail_reader_private_free (EMailReaderPrivate *priv)
@@ -3227,10 +3220,6 @@ init_private:
G_OBJECT (reader), quark_private,
g_slice_new0 (EMailReaderPrivate),
(GDestroyNotify) mail_reader_private_free);
-
- g_signal_connect (
- reader, "destroy",
- G_CALLBACK (mail_reader_destroy), NULL);
}
void
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index 5a3f3adaf6..9d5ba0a527 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -519,7 +519,7 @@ get_widget (EFilterRule *fr, ERuleContext *rc)
GtkWidget *widget, *hbox, *add, *label;
GtkWidget *parts, *inframe, *w;
GtkWidget *scrolledwindow;
- GtkObject *hadj, *vadj;
+ GtkAdjustment *hadj, *vadj;
GList *l;
EFilterPart *part;
struct _rule_data *data;
@@ -581,8 +581,8 @@ get_widget (EFilterRule *fr, ERuleContext *rc)
hadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
vadj = gtk_adjustment_new (0.0, 0.0, 1.0, 1.0 ,1.0, 1.0);
- scrolledwindow = gtk_scrolled_window_new (
- GTK_ADJUSTMENT (hadj), GTK_ADJUSTMENT (vadj));
+ scrolledwindow = gtk_scrolled_window_new (hadj, vadj);
+
gtk_scrolled_window_set_policy (
GTK_SCROLLED_WINDOW (scrolledwindow),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index e20b9f711b..e4e9bbdd3a 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -48,7 +48,7 @@ folder_selector_finalize (GObject *object)
}
static void
-folder_selector_destroy (GtkObject *object)
+folder_selector_dispose (GObject *object)
{
EMFolderSelector *emfs = EM_FOLDER_SELECTOR (object);
GtkTreeModel *model;
@@ -59,23 +59,21 @@ folder_selector_destroy (GtkObject *object)
emfs->created_id = 0;
}
- /* Chain up to parent's destroy() method. */
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
+ /* Chain up to parent's dispose() method. */
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
folder_selector_class_init (EMFolderSelectorClass *class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
parent_class = g_type_class_peek_parent (class);
object_class = G_OBJECT_CLASS (class);
object_class->finalize = folder_selector_finalize;
-
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = folder_selector_destroy;
+ object_class->dispose = folder_selector_dispose;
}
static void
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 512aa9b026..db23df4969 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -702,8 +702,28 @@ static void
folder_tree_dispose (GObject *object)
{
EMFolderTreePrivate *priv;
+ GtkTreeModel *model;
priv = EM_FOLDER_TREE_GET_PRIVATE (object);
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (object));
+
+ if (priv->loaded_row_id != 0) {
+ g_signal_handler_disconnect (model, priv->loaded_row_id);
+ priv->loaded_row_id = 0;
+ }
+
+ if (priv->autoscroll_id != 0) {
+ g_source_remove (priv->autoscroll_id);
+ priv->autoscroll_id = 0;
+ }
+
+ if (priv->autoexpand_id != 0) {
+ gtk_tree_row_reference_free (priv->autoexpand_row);
+ priv->autoexpand_row = NULL;
+
+ g_source_remove (priv->autoexpand_id);
+ priv->autoexpand_id = 0;
+ }
if (priv->text_renderer != NULL) {
g_object_unref (priv->text_renderer);
@@ -734,38 +754,6 @@ folder_tree_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-static void
-em_folder_tree_destroy (GtkObject *object)
-{
- EMFolderTreePrivate *priv;
- GtkTreeModel *model;
-
- priv = EM_FOLDER_TREE_GET_PRIVATE (object);
-
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (object));
-
- if (priv->loaded_row_id != 0) {
- g_signal_handler_disconnect (model, priv->loaded_row_id);
- priv->loaded_row_id = 0;
- }
-
- if (priv->autoscroll_id != 0) {
- g_source_remove (priv->autoscroll_id);
- priv->autoscroll_id = 0;
- }
-
- if (priv->autoexpand_id != 0) {
- gtk_tree_row_reference_free (priv->autoexpand_row);
- priv->autoexpand_row = NULL;
-
- g_source_remove (priv->autoexpand_id);
- priv->autoexpand_id = 0;
- }
-
- /* Chain up to parent's destroy() method. */
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
static gboolean
folder_tree_button_press_event (GtkWidget *widget,
GdkEventButton *event)
@@ -964,7 +952,6 @@ static void
folder_tree_class_init (EMFolderTreeClass *class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
GtkWidgetClass *widget_class;
GtkTreeViewClass *tree_view_class;
@@ -975,9 +962,6 @@ folder_tree_class_init (EMFolderTreeClass *class)
object_class->dispose = folder_tree_dispose;
object_class->finalize = folder_tree_finalize;
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = em_folder_tree_destroy;
-
widget_class = GTK_WIDGET_CLASS (class);
widget_class->button_press_event = folder_tree_button_press_event;
widget_class->key_press_event = folder_tree_key_press_event;
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 5a32e155fb..cbf836aa06 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -227,14 +227,16 @@ mail_msg_unref (gpointer msg)
/* hash table of ops->dialogue of active errors */
static GHashTable *active_errors = NULL;
-static void error_destroy (GtkObject *o, gpointer data)
+static void
+error_finalized (gpointer data, GObject *gone_gd)
{
g_hash_table_remove (active_errors, data);
}
-static void error_response (GtkObject *o, gint button, gpointer data)
+static void
+error_response (GtkWidget *dialog, gint button, gpointer data)
{
- gtk_widget_destroy ((GtkWidget *)o);
+ gtk_widget_destroy (dialog);
}
void
@@ -284,7 +286,7 @@ mail_msg_check_error (gpointer msg)
g_hash_table_insert (active_errors, m->info, gd);
g_signal_connect(gd, "response", G_CALLBACK(error_response), m->info);
- g_signal_connect(gd, "destroy", G_CALLBACK(error_destroy), m->info);
+ g_object_weak_ref (G_OBJECT (gd), error_finalized, m->info);
if (m->priv->cancelable)
m->priv->error = (GtkWidget *) gd;
else
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index cb47af8efb..cd9db555e9 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -1189,7 +1189,7 @@ vfolder_edit_rule (const gchar *uri)
url = camel_url_new (uri, NULL);
if (url && url->fragment
&& (rule = e_rule_context_find_rule ((ERuleContext *)context, url->fragment, NULL))) {
- g_object_ref ((GtkObject *)rule);
+ g_object_ref (G_OBJECT (rule));
newrule = e_filter_rule_clone (rule);
w = e_filter_rule_get_widget ((EFilterRule *)newrule, (ERuleContext *)context);
diff --git a/mail/message-list.c b/mail/message-list.c
index ad7f527b8b..681cc53dce 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2430,58 +2430,6 @@ message_list_init (MessageList *message_list)
}
static void
-message_list_destroy (GtkObject *object)
-{
- MessageList *message_list = MESSAGE_LIST (object);
- MessageListPrivate *p = message_list->priv;
-
- p->destroyed = TRUE;
-
- if (message_list->folder) {
- mail_regen_cancel (message_list);
-
- if (message_list->uid_nodemap) {
- g_hash_table_foreach (message_list->uid_nodemap, (GHFunc)clear_info, message_list);
- g_hash_table_destroy (message_list->uid_nodemap);
- message_list->uid_nodemap = NULL;
- }
-
- g_signal_handlers_disconnect_by_func (
- message_list->folder, folder_changed, message_list);
- g_object_unref (message_list->folder);
- message_list->folder = NULL;
- }
-
- if (p->invisible) {
- g_object_unref (p->invisible);
- p->invisible = NULL;
- }
-
- if (message_list->extras) {
- g_object_unref (message_list->extras);
- message_list->extras = NULL;
- }
-
- if (message_list->model) {
- g_object_unref (message_list->model);
- message_list->model = NULL;
- }
-
- if (message_list->idle_id != 0) {
- g_source_remove (message_list->idle_id);
- message_list->idle_id = 0;
- }
-
- if (message_list->seen_id) {
- g_source_remove (message_list->seen_id);
- message_list->seen_id = 0;
- }
-
- /* Chain up to parent's destroy() method. */
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-static void
message_list_set_property (GObject *object,
guint property_id,
const GValue *value,
@@ -2530,9 +2478,10 @@ message_list_get_property (GObject *object,
static void
message_list_dispose (GObject *object)
{
+ MessageList *message_list = MESSAGE_LIST (object);
MessageListPrivate *priv;
- priv = MESSAGE_LIST_GET_PRIVATE (object);
+ priv = MESSAGE_LIST_GET_PRIVATE (message_list);
if (priv->shell_backend != NULL) {
g_object_unref (priv->shell_backend);
@@ -2549,6 +2498,48 @@ message_list_dispose (GObject *object)
priv->paste_target_list = NULL;
}
+ priv->destroyed = TRUE;
+
+ if (message_list->folder) {
+ mail_regen_cancel (message_list);
+
+ if (message_list->uid_nodemap) {
+ g_hash_table_foreach (message_list->uid_nodemap, (GHFunc)clear_info, message_list);
+ g_hash_table_destroy (message_list->uid_nodemap);
+ message_list->uid_nodemap = NULL;
+ }
+
+ g_signal_handlers_disconnect_by_func (
+ message_list->folder, folder_changed, message_list);
+ g_object_unref (message_list->folder);
+ message_list->folder = NULL;
+ }
+
+ if (priv->invisible) {
+ g_object_unref (priv->invisible);
+ priv->invisible = NULL;
+ }
+
+ if (message_list->extras) {
+ g_object_unref (message_list->extras);
+ message_list->extras = NULL;
+ }
+
+ if (message_list->model) {
+ g_object_unref (message_list->model);
+ message_list->model = NULL;
+ }
+
+ if (message_list->idle_id != 0) {
+ g_source_remove (message_list->idle_id);
+ message_list->idle_id = 0;
+ }
+
+ if (message_list->seen_id) {
+ g_source_remove (message_list->seen_id);
+ message_list->seen_id = 0;
+ }
+
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -2610,7 +2601,6 @@ static void
message_list_class_init (MessageListClass *class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
gint i;
for (i = 0; i < G_N_ELEMENTS (ml_drag_info); i++)
@@ -2625,9 +2615,6 @@ message_list_class_init (MessageListClass *class)
object_class->dispose = message_list_dispose;
object_class->finalize = message_list_finalize;
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = message_list_destroy;
-
class->message_list_built = NULL;
/* Inherited from ESelectableInterface */
diff --git a/plugins/groupwise-features/junk-settings.c b/plugins/groupwise-features/junk-settings.c
index 242d037bb4..4ec4159ab6 100644
--- a/plugins/groupwise-features/junk-settings.c
+++ b/plugins/groupwise-features/junk-settings.c
@@ -41,7 +41,7 @@ typedef struct _JunkEntry JunkEntry;
static void junk_settings_class_init (JunkSettingsClass *class);
static void junk_settings_init (JunkSettings *js);
-static void junk_settings_destroy (GtkObject *obj);
+static void junk_settings_dispose (GObject *obj);
static void junk_settings_finalise (GObject *obj);
static void free_all (JunkSettings *js);
static void get_junk_list (JunkSettings *js);
@@ -75,12 +75,11 @@ junk_settings_get_type (void)
static void
junk_settings_class_init (JunkSettingsClass *klass)
{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_ref (gtk_vbox_get_type ());
- object_class->destroy = junk_settings_destroy;
- gobject_class->finalize = junk_settings_finalise;
+ object_class->dispose = junk_settings_dispose;
+ object_class->finalize = junk_settings_finalise;
}
static void
@@ -94,11 +93,13 @@ junk_settings_finalise (GObject *obj)
}
static void
-junk_settings_destroy (GtkObject *obj)
+junk_settings_dispose (GObject *obj)
{
JunkSettings *js = (JunkSettings *) obj;
free_all (js);
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (obj);
}
static void
diff --git a/plugins/groupwise-features/share-folder.c b/plugins/groupwise-features/share-folder.c
index d7c564cbfe..765232d915 100644
--- a/plugins/groupwise-features/share-folder.c
+++ b/plugins/groupwise-features/share-folder.c
@@ -43,7 +43,7 @@ typedef struct _SharedUser SharedUser;
static void share_folder_class_init (ShareFolderClass *class);
static void share_folder_init (ShareFolder *sf);
-static void share_folder_destroy (GtkObject *obj);
+static void share_folder_dispose (GObject *obj);
static void share_folder_finalise (GObject *obj);
static void free_user_node (EShUsers *user);
static void free_node (SharedUser *user);
@@ -87,12 +87,11 @@ share_folder_get_type (void)
static void
share_folder_class_init (ShareFolderClass *klass)
{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_ref (gtk_vbox_get_type ());
- object_class->destroy = share_folder_destroy;
- gobject_class->finalize = share_folder_finalise;
+ object_class->dispose = share_folder_dispose;
+ object_class->finalize = share_folder_finalise;
}
static void
@@ -105,12 +104,14 @@ share_folder_finalise (GObject *obj)
}
static void
-share_folder_destroy (GtkObject *obj)
+share_folder_dispose (GObject *obj)
{
ShareFolder *sf = (ShareFolder *) obj;
free_all (sf);
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (obj);
}
static void
diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c
index 9cc641e4ee..4a2925196f 100644
--- a/plugins/itip-formatter/itip-view.c
+++ b/plugins/itip-formatter/itip-view.c
@@ -888,7 +888,7 @@ set_buttons (ItipView *view)
}
static void
-itip_view_destroy (GtkObject *object)
+itip_view_dispose (GObject *object)
{
ItipView *view = ITIP_VIEW (object);
ItipViewPrivate *priv = view->priv;
@@ -915,17 +915,18 @@ itip_view_destroy (GtkObject *object)
view->priv = NULL;
}
- GTK_OBJECT_CLASS (itip_view_parent_class)->destroy (object);
+ if (G_OBJECT_CLASS (itip_view_parent_class)->dispose)
+ G_OBJECT_CLASS (itip_view_parent_class)->dispose (object);
}
static void
itip_view_class_init (ItipViewClass *klass)
{
- GtkObjectClass *gtkobject_class;
+ GObjectClass *object_class;
- gtkobject_class = GTK_OBJECT_CLASS (klass);
+ object_class = G_OBJECT_CLASS (klass);
- gtkobject_class->destroy = itip_view_destroy;
+ object_class->dispose = itip_view_dispose;
signals[SOURCE_SELECTED] =
g_signal_new ("source_selected",
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index 61a688360f..4e4ace07c9 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -158,6 +158,16 @@ shell_sidebar_dispose (GObject *object)
priv->shell_view = NULL;
}
+ /* Unparent the widget before destroying it to avoid
+ * writing a custom GtkContainer::remove() method. */
+
+ if (priv->event_box != NULL) {
+ gtk_widget_unparent (priv->event_box);
+ gtk_widget_destroy (priv->event_box);
+ g_object_unref (priv->event_box);
+ priv->event_box = NULL;
+ }
+
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_shell_sidebar_parent_class)->dispose (object);
}
@@ -208,27 +218,6 @@ shell_sidebar_constructed (GObject *object)
}
static void
-shell_sidebar_destroy (GtkObject *gtk_object)
-{
- EShellSidebarPrivate *priv;
-
- priv = E_SHELL_SIDEBAR_GET_PRIVATE (gtk_object);
-
- /* Unparent the widget before destroying it to avoid
- * writing a custom GtkContainer::remove() method. */
-
- if (priv->event_box != NULL) {
- gtk_widget_unparent (priv->event_box);
- gtk_widget_destroy (priv->event_box);
- g_object_unref (priv->event_box);
- priv->event_box = NULL;
- }
-
- /* Chain up to parent's destroy() method. */
- GTK_OBJECT_CLASS (e_shell_sidebar_parent_class)->destroy (gtk_object);
-}
-
-static void
shell_sidebar_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
@@ -304,7 +293,6 @@ static void
e_shell_sidebar_class_init (EShellSidebarClass *class)
{
GObjectClass *object_class;
- GtkObjectClass *gtk_object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
@@ -317,9 +305,6 @@ e_shell_sidebar_class_init (EShellSidebarClass *class)
object_class->finalize = shell_sidebar_finalize;
object_class->constructed = shell_sidebar_constructed;
- gtk_object_class = GTK_OBJECT_CLASS (class);
- gtk_object_class->destroy = shell_sidebar_destroy;
-
widget_class = GTK_WIDGET_CLASS (class);
widget_class->size_request = shell_sidebar_size_request;
widget_class->size_allocate = shell_sidebar_size_allocate;
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c
index af5d0c7d83..d835ba89ae 100644
--- a/widgets/misc/e-calendar.c
+++ b/widgets/misc/e-calendar.c
@@ -65,7 +65,7 @@
#define E_CALENDAR_AUTO_MOVE_TIMEOUT 150
#define E_CALENDAR_AUTO_MOVE_TIMEOUT_DELAY 2
-static void e_calendar_destroy (GtkObject *object);
+static void e_calendar_dispose (GObject *object);
static void e_calendar_realize (GtkWidget *widget);
static void e_calendar_style_set (GtkWidget *widget,
GtkStyle *previous_style);
@@ -105,13 +105,13 @@ G_DEFINE_TYPE (
static void
e_calendar_class_init (ECalendarClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
- object_class = (GtkObjectClass *) class;
+ object_class = (GObjectClass *) class;
widget_class = (GtkWidgetClass *) class;
- object_class->destroy = e_calendar_destroy;
+ object_class->dispose = e_calendar_dispose;
widget_class->realize = e_calendar_realize;
widget_class->style_set = e_calendar_style_set;
@@ -223,7 +223,7 @@ e_calendar_new (void)
}
static void
-e_calendar_destroy (GtkObject *object)
+e_calendar_dispose (GObject *object)
{
ECalendar *cal;
@@ -237,8 +237,8 @@ e_calendar_destroy (GtkObject *object)
cal->timeout_id = 0;
}
- if (GTK_OBJECT_CLASS (e_calendar_parent_class)->destroy)
- (* GTK_OBJECT_CLASS (e_calendar_parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (e_calendar_parent_class)->dispose)
+ G_OBJECT_CLASS (e_calendar_parent_class)->dispose (object);
}
static void
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index c41cac160f..270c55c27d 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -364,14 +364,14 @@ e_canvas_vbox_reflow ( GnomeCanvasItem *item, gint flags )
void
e_canvas_vbox_add_item (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
{
- if (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item)
- (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item) (e_canvas_vbox, item);
+ if (E_CANVAS_VBOX_CLASS (G_OBJECT_GET_CLASS (e_canvas_vbox))->add_item)
+ (E_CANVAS_VBOX_CLASS (G_OBJECT_GET_CLASS (e_canvas_vbox))->add_item) (e_canvas_vbox, item);
}
void
e_canvas_vbox_add_item_start (ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
{
- if (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item_start)
- (E_CANVAS_VBOX_CLASS (GTK_OBJECT_GET_CLASS (e_canvas_vbox))->add_item_start) (e_canvas_vbox, item);
+ if (E_CANVAS_VBOX_CLASS (G_OBJECT_GET_CLASS (e_canvas_vbox))->add_item_start)
+ (E_CANVAS_VBOX_CLASS (G_OBJECT_GET_CLASS (e_canvas_vbox))->add_item_start) (e_canvas_vbox, item);
}
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 11d6c55271..dfa529ec6b 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -192,7 +192,7 @@ gnome_canvas_item_invoke_point (GnomeCanvasItem *item,
y = i.y;
#endif
- return (* GNOME_CANVAS_ITEM_CLASS (GTK_OBJECT_GET_CLASS (item))->point) (
+ return (* GNOME_CANVAS_ITEM_CLASS (G_OBJECT_GET_CLASS (item))->point) (
item, x, y, cx, cy, actual_item);
}
diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c
index bc3233a38a..aa723f61c4 100644
--- a/widgets/misc/e-printable.c
+++ b/widgets/misc/e-printable.c
@@ -28,12 +28,12 @@
#include "e-printable.h"
-#define EP_CLASS(e) ((EPrintableClass *)((GtkObject *)e)->klass)
+#define EP_CLASS(e) ((EPrintableClass *)((GObject *)e)->klass)
G_DEFINE_TYPE (
EPrintable,
e_printable,
- GTK_TYPE_OBJECT)
+ G_TYPE_OBJECT)
enum {
PRINT_PAGE,
diff --git a/widgets/misc/e-printable.h b/widgets/misc/e-printable.h
index 32cbadddbd..b8d9893799 100644
--- a/widgets/misc/e-printable.h
+++ b/widgets/misc/e-printable.h
@@ -35,11 +35,11 @@ G_BEGIN_DECLS
#define E_IS_PRINTABLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_PRINTABLE_TYPE))
typedef struct {
- GtkObject base;
+ GObject base;
} EPrintable;
typedef struct {
- GtkObjectClass parent_class;
+ GObjectClass parent_class;
/*
* Signals
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 6e8eb41762..d4ba4f31e3 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -435,7 +435,7 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
scrollbar_width =
requisition.width
- + GTK_SCROLLED_WINDOW_CLASS (GTK_OBJECT_GET_CLASS (popup))->scrollbar_spacing;
+ + GTK_SCROLLED_WINDOW_CLASS (G_OBJECT_GET_CLASS (popup))->scrollbar_spacing;
avail_height = gdk_screen_height () - *y;
@@ -491,7 +491,7 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc,
if (show_hscroll)
work_height +=
requisition.height +
- GTK_SCROLLED_WINDOW_CLASS (GTK_OBJECT_GET_CLASS (popup))->scrollbar_spacing;
+ GTK_SCROLLED_WINDOW_CLASS (G_OBJECT_GET_CLASS (popup))->scrollbar_spacing;
/* Check if it fits in the available height. */
if (work_height + list_requisition.height > avail_height) {
diff --git a/widgets/table/e-cell-popup.c b/widgets/table/e-cell-popup.c
index 5b98a205f2..ad2009d0ac 100644
--- a/widgets/table/e-cell-popup.c
+++ b/widgets/table/e-cell-popup.c
@@ -461,7 +461,7 @@ e_cell_popup_do_popup (ECellPopupView *ecp_view,
ecp->popup_cell_view = ecp_view;
- popup_func = E_CELL_POPUP_CLASS (GTK_OBJECT_GET_CLASS (ecp))->popup;
+ popup_func = E_CELL_POPUP_CLASS (G_OBJECT_GET_CLASS (ecp))->popup;
ecp->popup_view_col = view_col;
ecp->popup_row = row;
diff --git a/widgets/table/e-table-click-to-add.c b/widgets/table/e-table-click-to-add.c
index a905e2bdb7..706146f2da 100644
--- a/widgets/table/e-table-click-to-add.c
+++ b/widgets/table/e-table-click-to-add.c
@@ -66,7 +66,7 @@ enum {
};
static void
-etcta_cursor_change (GtkObject *object, gint row, gint col, ETableClickToAdd *etcta)
+etcta_cursor_change (GObject *object, gint row, gint col, ETableClickToAdd *etcta)
{
g_signal_emit (etcta,
etcta_signals[CURSOR_CHANGE], 0,
@@ -360,7 +360,7 @@ finish_editing (ETableClickToAdd *etcta)
e_table_item_leave_edit (E_TABLE_ITEM (etcta->row));
e_table_one_commit (E_TABLE_ONE (etcta->one));
etcta_drop_one (etcta);
- gtk_object_destroy (GTK_OBJECT (etcta->row));
+ g_object_run_dispose (G_OBJECT (etcta->row));
etcta->row = NULL;
one = e_table_one_new (etcta->model);
@@ -401,11 +401,11 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_BUTTON_PRESS:
if (etcta->text) {
- gtk_object_destroy (GTK_OBJECT (etcta->text));
+ g_object_run_dispose (G_OBJECT (etcta->text));
etcta->text = NULL;
}
if (etcta->rect) {
- gtk_object_destroy (GTK_OBJECT (etcta->rect));
+ g_object_run_dispose (G_OBJECT (etcta->rect));
etcta->rect = NULL;
}
if (!etcta->row) {
@@ -450,7 +450,7 @@ etcta_event (GnomeCanvasItem *item, GdkEvent *e)
if (etcta->row) {
e_table_item_leave_edit (E_TABLE_ITEM (etcta->row));
etcta_drop_one (etcta);
- gtk_object_destroy (GTK_OBJECT (etcta->row));
+ g_object_run_dispose (G_OBJECT (etcta->row));
etcta->row = NULL;
create_rect_and_text (etcta);
e_canvas_item_move_absolute (etcta->text, 3, 3);
@@ -613,7 +613,7 @@ e_table_click_to_add_commit (ETableClickToAdd *etcta)
if (etcta->row) {
e_table_one_commit (E_TABLE_ONE (etcta->one));
etcta_drop_one (etcta);
- gtk_object_destroy (GTK_OBJECT (etcta->row));
+ g_object_run_dispose (G_OBJECT (etcta->row));
etcta->row = NULL;
}
create_rect_and_text (etcta);
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index c3d44c777a..4f5a8751c3 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -75,12 +75,12 @@ e_table_group_container_child_node_free (ETableGroupContainer *etgc,
ETableGroup *etg = E_TABLE_GROUP (etgc);
ETableGroup *child = child_node->child;
- gtk_object_destroy (GTK_OBJECT (child));
+ g_object_run_dispose (G_OBJECT (child));
e_table_model_free_value (etg->model, etgc->ecol->col_idx,
child_node->key);
g_free (child_node->string);
- gtk_object_destroy (GTK_OBJECT (child_node->text));
- gtk_object_destroy (GTK_OBJECT (child_node->rect));
+ g_object_run_dispose (G_OBJECT (child_node->text));
+ g_object_run_dispose (G_OBJECT (child_node->rect));
}
static void
@@ -123,7 +123,7 @@ etgc_dispose (GObject *object)
etgc->selection_model = NULL;
if (etgc->rect)
- gtk_object_destroy (GTK_OBJECT (etgc->rect));
+ g_object_run_dispose (G_OBJECT (etgc->rect));
etgc->rect = NULL;
G_OBJECT_CLASS (etgc_parent_class)->dispose (object);
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index a111999ba9..37f28f217f 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -97,7 +97,7 @@ etgl_dispose (GObject *object)
etgl->etgl_key_press_id = 0;
etgl->etgl_start_drag_id = 0;
- gtk_object_destroy (GTK_OBJECT (etgl->item));
+ g_object_run_dispose (G_OBJECT (etgl->item));
etgl->item = NULL;
}
@@ -166,7 +166,7 @@ e_table_group_leaf_new (GnomeCanvasGroup *parent,
}
static void
-etgl_cursor_change (GtkObject *object, gint row, ETableGroupLeaf *etgl)
+etgl_cursor_change (GObject *object, gint row, ETableGroupLeaf *etgl)
{
if (row < E_TABLE_SUBSET (etgl->ets)->n_map)
e_table_group_cursor_change (E_TABLE_GROUP (etgl),
@@ -174,7 +174,7 @@ etgl_cursor_change (GtkObject *object, gint row, ETableGroupLeaf *etgl)
}
static void
-etgl_cursor_activated (GtkObject *object, gint view_row, ETableGroupLeaf *etgl)
+etgl_cursor_activated (GObject *object, gint view_row, ETableGroupLeaf *etgl)
{
if (view_row < E_TABLE_SUBSET (etgl->ets)->n_map)
e_table_group_cursor_activated (E_TABLE_GROUP (etgl),
@@ -182,14 +182,14 @@ etgl_cursor_activated (GtkObject *object, gint view_row, ETableGroupLeaf *etgl)
}
static void
-etgl_double_click (GtkObject *object, gint model_row, gint model_col, GdkEvent *event,
+etgl_double_click (GObject *object, gint model_row, gint model_col, GdkEvent *event,
ETableGroupLeaf *etgl)
{
e_table_group_double_click (E_TABLE_GROUP (etgl), model_row, model_col, event);
}
static gboolean
-etgl_key_press (GtkObject *object,
+etgl_key_press (GObject *object,
gint row,
gint col,
GdkEvent *event,
@@ -205,14 +205,14 @@ etgl_key_press (GtkObject *object,
}
static gboolean
-etgl_start_drag (GtkObject *object, gint model_row, gint model_col, GdkEvent *event,
+etgl_start_drag (GObject *object, gint model_row, gint model_col, GdkEvent *event,
ETableGroupLeaf *etgl)
{
return e_table_group_start_drag (E_TABLE_GROUP (etgl), model_row, model_col, event);
}
static gboolean
-etgl_right_click (GtkObject *object, gint view_row, gint model_col, GdkEvent *event,
+etgl_right_click (GObject *object, gint view_row, gint model_col, GdkEvent *event,
ETableGroupLeaf *etgl)
{
if (view_row < E_TABLE_SUBSET (etgl->ets)->n_map)
@@ -225,7 +225,7 @@ etgl_right_click (GtkObject *object, gint view_row, gint model_col, GdkEvent *ev
}
static gboolean
-etgl_click (GtkObject *object,
+etgl_click (GObject *object,
gint row,
gint col,
GdkEvent *event,
diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c
index ceec4fd81c..c7a867a84a 100644
--- a/widgets/table/e-table-group.c
+++ b/widgets/table/e-table-group.c
@@ -36,7 +36,7 @@
#define etg_get_type e_table_group_get_type
G_DEFINE_TYPE (ETableGroup, etg, GNOME_TYPE_CANVAS_GROUP)
-#define ETG_CLASS(e) (E_TABLE_GROUP_CLASS(GTK_OBJECT_GET_CLASS(e)))
+#define ETG_CLASS(e) (E_TABLE_GROUP_CLASS(G_OBJECT_GET_CLASS(e)))
enum {
CURSOR_CHANGE,
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index a550bbdda5..5e370fb0a6 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -555,7 +555,7 @@ ethi_add_destroy_marker (ETableHeaderItem *ethi)
gdouble x1;
if (ethi->remove_item)
- gtk_object_destroy (GTK_OBJECT (ethi->remove_item));
+ g_object_run_dispose (G_OBJECT (ethi->remove_item));
if (!ethi->stipple)
ethi->stipple = gdk_bitmap_create_from_data (
@@ -585,7 +585,7 @@ ethi_remove_destroy_marker (ETableHeaderItem *ethi)
if (!ethi->remove_item)
return;
- gtk_object_destroy (GTK_OBJECT (ethi->remove_item));
+ g_object_run_dispose (G_OBJECT (ethi->remove_item));
ethi->remove_item = NULL;
}
diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h
index 911f7d4884..c78ecea897 100644
--- a/widgets/table/e-table-header-item.h
+++ b/widgets/table/e-table-header-item.h
@@ -56,7 +56,7 @@ typedef struct {
gint resize_start_pos;
gint resize_min_width;
- GtkObject *resize_guide;
+ gpointer resize_guide;
gint group_indent_width;
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c
index a03d3f4269..dbe01a345c 100644
--- a/widgets/table/e-table-model.c
+++ b/widgets/table/e-table-model.c
@@ -393,7 +393,7 @@ e_table_model_pre_change (ETableModel *e_table_model)
return;
d (print_tabs ());
- d(g_print("Emitting pre_change on model 0x%p, a %s.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type)));
+ d(g_print("Emitting pre_change on model 0x%p, a %s.\n", e_table_model, g_type_name (G_OBJECT(e_table_model)->klass->type)));
d (depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals[MODEL_PRE_CHANGE], 0);
@@ -423,7 +423,7 @@ e_table_model_no_change (ETableModel *e_table_model)
return;
d (print_tabs ());
- d(g_print("Emitting model_no_change on model 0x%p, a %s.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type)));
+ d(g_print("Emitting model_no_change on model 0x%p, a %s.\n", e_table_model, g_type_name (G_OBJECT(e_table_model)->klass->type)));
d (depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals[MODEL_NO_CHANGE], 0);
@@ -453,7 +453,7 @@ e_table_model_changed (ETableModel *e_table_model)
return;
d (print_tabs ());
- d(g_print("Emitting model_changed on model 0x%p, a %s.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type)));
+ d(g_print("Emitting model_changed on model 0x%p, a %s.\n", e_table_model, g_type_name (G_OBJECT(e_table_model)->klass->type)));
d (depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals[MODEL_CHANGED], 0);
@@ -480,7 +480,7 @@ e_table_model_row_changed (ETableModel *e_table_model, gint row)
return;
d (print_tabs ());
- d(g_print("Emitting row_changed on model 0x%p, a %s, row %d.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
+ d(g_print("Emitting row_changed on model 0x%p, a %s, row %d.\n", e_table_model, g_type_name (G_OBJECT(e_table_model)->klass->type), row));
d (depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals[MODEL_ROW_CHANGED], 0, row);
@@ -508,7 +508,7 @@ e_table_model_cell_changed (ETableModel *e_table_model, gint col, gint row)
return;
d (print_tabs ());
- d(g_print("Emitting cell_changed on model 0x%p, a %s, row %d, col %d.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type), row, col));
+ d(g_print("Emitting cell_changed on model 0x%p, a %s, row %d, col %d.\n", e_table_model, g_type_name (G_OBJECT(e_table_model)->klass->type), row, col));
d (depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals[MODEL_CELL_CHANGED], 0, col, row);
@@ -536,7 +536,7 @@ e_table_model_rows_inserted (ETableModel *e_table_model, gint row, gint count)
return;
d (print_tabs ());
- d(g_print("Emitting row_inserted on model 0x%p, a %s, row %d.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
+ d(g_print("Emitting row_inserted on model 0x%p, a %s, row %d.\n", e_table_model, g_type_name (G_OBJECT(e_table_model)->klass->type), row));
d (depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals[MODEL_ROWS_INSERTED], 0, row, count);
@@ -579,7 +579,7 @@ e_table_model_rows_deleted (ETableModel *e_table_model, gint row, gint count)
return;
d (print_tabs ());
- d(g_print("Emitting row_deleted on model 0x%p, a %s, row %d.\n", e_table_model, g_type_name (GTK_OBJECT(e_table_model)->klass->type), row));
+ d(g_print("Emitting row_deleted on model 0x%p, a %s, row %d.\n", e_table_model, g_type_name (G_OBJECT(e_table_model)->klass->type), row));
d (depth++);
g_signal_emit (G_OBJECT (e_table_model),
e_table_model_signals[MODEL_ROWS_DELETED], 0, row, count);
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 47983f6da8..0db8f8e170 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -662,7 +662,7 @@ group_info_changed (ETableSortInfo *info, ETable *et)
if (et->is_grouped || will_be_grouped) {
et->need_rebuild = TRUE;
if (!et->rebuild_idle_id) {
- gtk_object_destroy (GTK_OBJECT (et->group));
+ g_object_run_dispose (G_OBJECT (et->group));
et->group = NULL;
et->rebuild_idle_id = g_idle_add_full (20, changed_idle, et, NULL);
}
@@ -923,7 +923,7 @@ et_table_model_changed (ETableModel *model, ETable *et)
{
et->need_rebuild = TRUE;
if (!et->rebuild_idle_id) {
- gtk_object_destroy (GTK_OBJECT (et->group));
+ g_object_run_dispose (G_OBJECT (et->group));
et->group = NULL;
et->rebuild_idle_id = g_idle_add_full (20, changed_idle, et, NULL);
}
@@ -1065,7 +1065,7 @@ changed_idle (gpointer data)
GtkAllocation allocation;
if (et->group)
- gtk_object_destroy (GTK_OBJECT (et->group));
+ g_object_run_dispose (G_OBJECT (et->group));
et_build_groups (et);
widget = GTK_WIDGET (et->table_canvas);
@@ -1110,7 +1110,7 @@ static gboolean
white_item_event (GnomeCanvasItem *white_item, GdkEvent *event, ETable *e_table)
{
gboolean return_val = 0;
- g_signal_emit (GTK_OBJECT (e_table), et_signals[WHITE_SPACE_EVENT], 0,
+ g_signal_emit (G_OBJECT (e_table), et_signals[WHITE_SPACE_EVENT], 0,
event, &return_val);
return return_val;
}
@@ -2317,7 +2317,7 @@ et_set_property (GObject *object,
g_signal_connect (G_OBJECT (etable->click_to_add), "cursor_change",
G_CALLBACK (click_to_add_cursor_change), etable);
} else {
- gtk_object_destroy (GTK_OBJECT (etable->click_to_add));
+ g_object_run_dispose (G_OBJECT (etable->click_to_add));
etable->click_to_add = NULL;
}
break;
@@ -2739,7 +2739,7 @@ e_table_drag_highlight (ETable *table,
NULL);
} else {
if (table->drop_highlight) {
- gtk_object_destroy (GTK_OBJECT (table->drop_highlight));
+ g_object_run_dispose (G_OBJECT (table->drop_highlight));
table->drop_highlight = NULL;
}
}
@@ -2758,7 +2758,7 @@ e_table_drag_unhighlight (ETable *table)
g_return_if_fail (E_IS_TABLE (table));
if (table->drop_highlight) {
- gtk_object_destroy (GTK_OBJECT (table->drop_highlight));
+ g_object_run_dispose (G_OBJECT (table->drop_highlight));
table->drop_highlight = NULL;
}
}
@@ -3108,7 +3108,7 @@ static void
context_destroyed (gpointer data)
{
ETable *et = data;
- /* if (!GTK_OBJECT_DESTROYED (et)) */
+ /* if (!G_OBJECT_DESTROYED (et)) */
/* FIXME: */
{
et->last_drop_x = 0;
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 0c346c6ec9..2c90c6ae72 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -226,7 +226,7 @@ e_tree_model_pre_change (ETreeModel *tree_model)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting pre_change on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting pre_change on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[PRE_CHANGE], 0);
}
@@ -246,7 +246,7 @@ e_tree_model_no_change (ETreeModel *tree_model)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting no_change on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting no_change on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[NO_CHANGE], 0);
}
@@ -266,7 +266,7 @@ e_tree_model_rebuilt (ETreeModel *tree_model)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting rebuilt on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting rebuilt on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[REBUILT], 0);
}
@@ -285,7 +285,7 @@ e_tree_model_node_changed (ETreeModel *tree_model, ETreePath node)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_changed on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_changed on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[NODE_CHANGED], 0, node);
}
@@ -305,7 +305,7 @@ e_tree_model_node_data_changed (ETreeModel *tree_model, ETreePath node)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_data_changed on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_data_changed on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[NODE_DATA_CHANGED], 0, node);
}
@@ -325,7 +325,7 @@ e_tree_model_node_col_changed (ETreeModel *tree_model, ETreePath node, gint col
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_col_changed on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_col_changed on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[NODE_COL_CHANGED], 0, node, col);
}
@@ -346,7 +346,7 @@ e_tree_model_node_inserted (ETreeModel *tree_model,
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_inserted on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_inserted on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[NODE_INSERTED], 0,
parent_node, inserted_node);
@@ -366,7 +366,7 @@ e_tree_model_node_removed (ETreeModel *tree_model, ETreePath parent_node, ETree
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_removed on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_removed on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[NODE_REMOVED], 0,
parent_node, removed_node, old_position);
@@ -385,7 +385,7 @@ e_tree_model_node_deleted (ETreeModel *tree_model, ETreePath deleted_node)
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_deleted on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_deleted on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[NODE_DELETED], 0, deleted_node);
}
@@ -403,7 +403,7 @@ e_tree_model_node_request_collapse (ETreeModel *tree_model, ETreePath collapsed
g_return_if_fail (tree_model != NULL);
g_return_if_fail (E_IS_TREE_MODEL (tree_model));
- d(g_print("Emitting node_request_collapse on model 0x%p, a %s.\n", tree_model, g_type_name (GTK_OBJECT(tree_model)->klass->type)));
+ d(g_print("Emitting node_request_collapse on model 0x%p, a %s.\n", tree_model, g_type_name (G_OBJECT(tree_model)->klass->type)));
g_signal_emit (G_OBJECT (tree_model), e_tree_model_signals[NODE_REQUEST_COLLAPSE], 0, collapsed_node);
}
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index b85475248a..dfb145e86f 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -299,13 +299,13 @@ e_tree_state_change (ETree *et)
}
static void
-change_trigger (GtkObject *object, ETree *et)
+change_trigger (GObject *object, ETree *et)
{
e_tree_state_change (et);
}
static void
-search_col_change_trigger (GtkObject *object, ETree *et)
+search_col_change_trigger (GObject *object, ETree *et)
{
clear_current_search_col (et);
e_tree_state_change (et);
@@ -431,7 +431,7 @@ et_dispose (GObject *object)
et->priv->last_drop_context = NULL;
if (et->priv->info_text)
- gtk_object_destroy (GTK_OBJECT (et->priv->info_text));
+ g_object_run_dispose (G_OBJECT (et->priv->info_text));
et->priv->info_text = NULL;
et->priv->info_text_resize_id = 0;
@@ -2532,7 +2532,7 @@ e_tree_drag_highlight (ETree *tree,
"y2", (gdouble) y + height - 1,
NULL);
} else {
- gtk_object_destroy (GTK_OBJECT (tree->priv->drop_highlight));
+ g_object_run_dispose (G_OBJECT (tree->priv->drop_highlight));
tree->priv->drop_highlight = NULL;
}
}
@@ -2544,7 +2544,7 @@ e_tree_drag_unhighlight (ETree *tree)
g_return_if_fail (E_IS_TREE (tree));
if (tree->priv->drop_highlight) {
- gtk_object_destroy (GTK_OBJECT (tree->priv->drop_highlight));
+ g_object_run_dispose (G_OBJECT (tree->priv->drop_highlight));
tree->priv->drop_highlight = NULL;
}
}
@@ -3639,7 +3639,7 @@ e_tree_set_info_message (ETree *tree, const gchar *info_message)
if (!info_message || !*info_message) {
g_signal_handler_disconnect (tree, tree->priv->info_text_resize_id);
- gtk_object_destroy (GTK_OBJECT (tree->priv->info_text));
+ g_object_run_dispose (G_OBJECT (tree->priv->info_text));
tree->priv->info_text = NULL;
return;
}
diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c
index f65da5dd52..3938bd02ec 100644
--- a/widgets/table/gal-a11y-e-table-item.c
+++ b/widgets/table/gal-a11y-e-table-item.c
@@ -69,7 +69,7 @@ static gboolean gal_a11y_e_table_item_unref_selection (GalA11yETableItem *a11y);
static AtkObject* eti_ref_at (AtkTable *table, gint row, gint column);
static void
-item_destroyed (GtkObject *item, gpointer user_data)
+item_finalized (gpointer user_data, GObject *gone_item)
{
GalA11yETableItem *a11y = GAL_A11Y_E_TABLE_ITEM (user_data);
GalA11yETableItemPrivate *priv = GET_PRIVATE (a11y);
@@ -1098,9 +1098,8 @@ gal_a11y_e_table_item_new (ETableItem *item)
}
if (item)
- g_signal_connect (G_OBJECT (item), "destroy",
- G_CALLBACK (item_destroyed),
- a11y);
+ g_object_weak_ref (G_OBJECT (item), item_finalized, a11y);
+
esm = item->selection;
if (esm != NULL) {
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index 99b35f9225..d7522d6344 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -398,7 +398,7 @@ item_removed (EReflowModel *model, gint i, EReflow *reflow)
}
if (reflow->items[i])
- gtk_object_destroy (GTK_OBJECT (reflow->items[i]));
+ g_object_run_dispose (G_OBJECT (reflow->items[i]));
memmove (reflow->heights + i, reflow->heights + i + 1, (reflow->count - i - 1) * sizeof (gint));
memmove (reflow->items + i, reflow->items + i + 1, (reflow->count - i - 1) * sizeof (GnomeCanvasItem *));
@@ -482,7 +482,7 @@ model_changed (EReflowModel *model, EReflow *reflow)
for (i = 0; i < count; i++) {
if (reflow->items[i])
- gtk_object_destroy (GTK_OBJECT (reflow->items[i]));
+ g_object_run_dispose (G_OBJECT (reflow->items[i]));
}
g_free (reflow->items);
g_free (reflow->heights);
@@ -530,7 +530,7 @@ set_empty (EReflow *reflow)
reflow->minimum_width / 2,
0);
} else {
- gtk_object_destroy (GTK_OBJECT (reflow->empty_text));
+ g_object_run_dispose (G_OBJECT (reflow->empty_text));
reflow->empty_text = NULL;
}
} else {
@@ -553,7 +553,7 @@ set_empty (EReflow *reflow)
}
} else {
if (reflow->empty_text) {
- gtk_object_destroy (GTK_OBJECT (reflow->empty_text));
+ g_object_run_dispose (G_OBJECT (reflow->empty_text));
reflow->empty_text = NULL;
}
}