aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-10-07 01:26:08 +0800
committerMilan Crha <mcrha@redhat.com>2010-10-07 01:26:08 +0800
commit1c6f2d154e74f908e2c4a137de0233b5faf4f6b6 (patch)
tree77a33236e48ed59a7c7c65e8a1c91481dd09f3eb /calendar
parent1b2fefb086c3e34089beb8b89b22d79005cc7725 (diff)
downloadgsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.tar
gsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.tar.gz
gsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.tar.bz2
gsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.tar.lz
gsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.tar.xz
gsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.tar.zst
gsoc2013-evolution-1c6f2d154e74f908e2c4a137de0233b5faf4f6b6.zip
Bug #631320 - GtkObject is gone in GTK3
Diffstat (limited to 'calendar')
-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
13 files changed, 68 insertions, 72 deletions
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);
}
/**