diff options
-rw-r--r-- | calendar/ChangeLog | 19 | ||||
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 2 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-alarm-list.c | 10 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 12 | ||||
-rw-r--r-- | calendar/gui/e-meeting-attendee.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-meeting-store.c | 12 | ||||
-rw-r--r-- | calendar/gui/e-meeting-time-sel-item.c | 16 | ||||
-rw-r--r-- | calendar/gui/e-meeting-time-sel.c | 46 | ||||
-rw-r--r-- | calendar/gui/e-week-view-main-item.c | 20 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 46 | ||||
-rw-r--r-- | calendar/gui/gnome-cal.c | 28 | ||||
-rw-r--r-- | calendar/gui/goto.c | 6 |
14 files changed, 120 insertions, 103 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 9727771e43..cf85dd6d48 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,22 @@ +2006-12-04 Matthew Barnes <mbarnes@redhat.com> + + Fixes bug #357970 + + * gui/e-alarm-list.c: + * gui/e-calendar-table.c: + * gui/e-day-view.c: + * gui/e-meeting-attendee.c: + * gui/e-meeting-store.c: + * gui/e-meeting-time-sel-item.c: + * gui/e-meeting-time-sel.c: + * gui/e-week-view-main-item.c: + * gui/e-week-view.c: + * gui/gnome-cal.c: + * gui/goto.c: + * gui/dialogs/event-page.c: + * gui/dialogs/task-page.c: + Don't call deprecated GLib / GDK functions. + 2006-12-04 Nickolay V. Shmyrev <nshmyrev@yandex.ru> Fixes #270751. diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 4d419b317d..e0d27f5a35 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -1707,7 +1707,7 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp) const char *address; address = itip_strip_mailto (attendee->value); - if (address && !g_strcasecmp (ia_address, address)) { + if (address && !g_ascii_strcasecmp (ia_address, address)) { e_cal_component_free_attendee_list (attendees); return TRUE; } diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 130a113cd7..de35a55982 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1013,7 +1013,7 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp) const char *address; address = itip_strip_mailto (attendee->value); - if (address && !g_strcasecmp (ia_address, address)) { + if (address && !g_ascii_strcasecmp (ia_address, address)) { e_cal_component_free_attendee_list (attendees); return TRUE; } diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c index 8cfbaaa366..4b05579abf 100644 --- a/calendar/gui/e-alarm-list.c +++ b/calendar/gui/e-alarm-list.c @@ -393,31 +393,31 @@ get_alarm_duration_string (struct icaldurationtype *duration) if (duration->days >= 1) { /* Translator: Entire string is like "Pop up an alert %d days before start of appointment" */ - g_string_sprintf (string, ngettext("%d day", "%d days", duration->days), duration->days); + g_string_printf (string, ngettext("%d day", "%d days", duration->days), duration->days); have_something = TRUE; } if (duration->weeks >= 1) { /* Translator: Entire string is like "Pop up an alert %d weeks before start of appointment" */ - g_string_sprintf (string, ngettext("%d week","%d weeks", duration->weeks), duration->weeks); + g_string_printf (string, ngettext("%d week","%d weeks", duration->weeks), duration->weeks); have_something = TRUE; } if (duration->hours >= 1) { /* Translator: Entire string is like "Pop up an alert %d hours before start of appointment" */ - g_string_sprintf (string, ngettext("%d hour", "%d hours", duration->hours), duration->hours); + g_string_printf (string, ngettext("%d hour", "%d hours", duration->hours), duration->hours); have_something = TRUE; } if (duration->minutes >= 1) { /* Translator: Entire string is like "Pop up an alert %d minutes before start of appointment" */ - g_string_sprintf (string, ngettext("%d minute", "%d minutes", duration->minutes), duration->minutes); + g_string_printf (string, ngettext("%d minute", "%d minutes", duration->minutes), duration->minutes); have_something = TRUE; } if (duration->seconds >= 1) { /* Translator: Entire string is like "Pop up an alert %d seconds before start of appointment" */ - g_string_sprintf (string, ngettext("%d second", "%d seconds", duration->seconds), duration->seconds); + g_string_printf (string, ngettext("%d second", "%d seconds", duration->seconds), duration->seconds); have_something = TRUE; } diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 79fdd1bb1a..ef3badd22b 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -492,7 +492,7 @@ e_calendar_table_init (ECalendarTable *cal_table) pixbuf = e_icon_factory_get_icon ("stock_check-filled", E_ICON_SIZE_LIST); e_table_extras_add_pixbuf(extras, "complete", pixbuf); - gdk_pixbuf_unref(pixbuf); + g_object_unref(pixbuf); /* Create the table */ diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index cb10faac3f..23fe92437e 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -1529,7 +1529,7 @@ e_day_view_unrealize (GtkWidget *widget) day_view = E_DAY_VIEW (widget); - gdk_gc_unref (day_view->main_gc); + g_object_unref (day_view->main_gc); day_view->main_gc = NULL; colormap = gtk_widget_get_colormap (widget); @@ -2752,7 +2752,7 @@ e_day_view_find_work_week_start (EDayView *day_view, week start day. */ /* Get the weekday corresponding to start_time, 0 (Sun) to 6 (Sat). */ - weekday = g_date_weekday (&date) % 7; + weekday = g_date_get_weekday (&date) % 7; /* Calculate the first working day of the week, 0 (Sun) to 6 (Sat). It will automatically default to the week start day if no days @@ -2773,9 +2773,9 @@ e_day_view_find_work_week_start (EDayView *day_view, g_date_subtract_days (&date, offset); } - tt.year = g_date_year (&date); - tt.month = g_date_month (&date); - tt.day = g_date_day (&date); + tt.year = g_date_get_year (&date); + tt.month = g_date_get_month (&date); + tt.day = g_date_get_day (&date); return icaltime_as_timet_with_zone (tt, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view))); } @@ -3471,7 +3471,7 @@ e_day_view_convert_event_coords (EDayView *day_view, } while (event_window && event_window != window - && event_window != GDK_ROOT_PARENT()) { + && event_window != gdk_get_default_root_window ()) { gdk_window_get_position (event_window, &win_x, &win_y); event_x += win_x; event_y += win_y; diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c index 926cbd4925..b346b85154 100644 --- a/calendar/gui/e-meeting-attendee.c +++ b/calendar/gui/e-meeting-attendee.c @@ -875,7 +875,7 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia, priv->has_calendar_info = TRUE; priv->busy_periods_sorted = FALSE; - period_in_days = g_date_julian (&period.end.date) - g_date_julian (&period.start.date) + 1; + period_in_days = g_date_get_julian (&period.end.date) - g_date_get_julian (&period.start.date) + 1; priv->longest_period_in_days = MAX (priv->longest_period_in_days, period_in_days); return TRUE; diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c index ae06d037fc..b651c96bdb 100644 --- a/calendar/gui/e-meeting-store.c +++ b/calendar/gui/e-meeting-store.c @@ -1276,17 +1276,17 @@ refresh_busy_periods (gpointer data) struct icaltimetype itt; itt = icaltime_null_time (); - itt.year = g_date_year (&qdata->start.date); - itt.month = g_date_month (&qdata->start.date); - itt.day = g_date_day (&qdata->start.date); + itt.year = g_date_get_year (&qdata->start.date); + itt.month = g_date_get_month (&qdata->start.date); + itt.day = g_date_get_day (&qdata->start.date); itt.hour = qdata->start.hour; itt.minute = qdata->start.minute; fbd->startt = icaltime_as_timet_with_zone (itt, priv->zone); itt = icaltime_null_time (); - itt.year = g_date_year (&qdata->end.date); - itt.month = g_date_month (&qdata->end.date); - itt.day = g_date_day (&qdata->end.date); + itt.year = g_date_get_year (&qdata->end.date); + itt.month = g_date_get_month (&qdata->end.date); + itt.day = g_date_get_day (&qdata->end.date); itt.hour = qdata->end.hour; itt.minute = qdata->end.minute; fbd->endt = icaltime_as_timet_with_zone (itt, priv->zone); diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c index 4969f70c7f..a2acca67bb 100644 --- a/calendar/gui/e-meeting-time-sel-item.c +++ b/calendar/gui/e-meeting-time-sel-item.c @@ -218,9 +218,9 @@ e_meeting_time_selector_item_unrealize (GnomeCanvasItem *item) mts_item = E_MEETING_TIME_SELECTOR_ITEM (item); - gdk_gc_unref (mts_item->main_gc); + g_object_unref (mts_item->main_gc); mts_item->main_gc = NULL; - gdk_gc_unref (mts_item->stipple_gc); + g_object_unref (mts_item->stipple_gc); mts_item->stipple_gc = NULL; if (GNOME_CANVAS_ITEM_CLASS (e_meeting_time_selector_item_parent_class)->unrealize) @@ -891,14 +891,14 @@ e_meeting_time_selector_item_button_press (EMeetingTimeSelectorItem *mts_item, /* Set the new meeting time. */ e_meeting_time_selector_set_meeting_time (mts_item->mts, - g_date_year (start_date), - g_date_month (start_date), - g_date_day (start_date), + g_date_get_year (start_date), + g_date_get_month (start_date), + g_date_get_day (start_date), start_time.hour, start_time.minute, - g_date_year (end_date), - g_date_month (end_date), - g_date_day (end_date), + g_date_get_year (end_date), + g_date_get_month (end_date), + g_date_get_day (end_date), end_time.hour, end_time.minute); diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 36354c74a6..e0d261b1aa 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -271,7 +271,6 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em GtkWidget *hbox, *vbox, *separator, *label, *table, *sw; GtkWidget *alignment, *child_hbox, *arrow, *menuitem; GSList *group; - GdkColormap *colormap; guint accel_key; time_t meeting_start_time; struct tm *meeting_start_tm; @@ -284,7 +283,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em future, in working hours. */ meeting_start_time = time (NULL); g_date_clear (&mts->meeting_start_time.date, 1); - g_date_set_time (&mts->meeting_start_time.date, meeting_start_time); + g_date_set_time_t (&mts->meeting_start_time.date, meeting_start_time); meeting_start_tm = localtime (&meeting_start_time); mts->meeting_start_time.hour = meeting_start_tm->tm_hour; mts->meeting_start_time.minute = meeting_start_tm->tm_min; @@ -651,14 +650,13 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em gtk_table_set_row_spacing (GTK_TABLE (mts), 4, 12); /* Allocate the colors. */ - colormap = gtk_widget_get_colormap (GTK_WIDGET (mts)); e_meeting_time_selector_alloc_named_color (mts, "snow", &mts->bg_color); e_meeting_time_selector_alloc_named_color (mts, "snow3", &mts->all_attendees_bg_color); - gdk_color_black (colormap, &mts->grid_color); - gdk_color_white (colormap, &mts->grid_shadow_color); + e_meeting_time_selector_alloc_named_color (mts, "black", &mts->grid_color); + e_meeting_time_selector_alloc_named_color (mts, "white", &mts->grid_shadow_color); e_meeting_time_selector_alloc_named_color (mts, "gray50", &mts->grid_unused_color); - gdk_color_white (colormap, &mts->stipple_bg_color); - gdk_color_white (colormap, &mts->attendee_list_bg_color); + e_meeting_time_selector_alloc_named_color (mts, "white", &mts->stipple_bg_color); + e_meeting_time_selector_alloc_named_color (mts, "white", &mts->attendee_list_bg_color); e_meeting_time_selector_alloc_named_color (mts, "snow4", &mts->meeting_time_bg_color); e_meeting_time_selector_alloc_named_color (mts, "yellow", &mts->busy_colors[E_MEETING_FREE_BUSY_TENTATIVE]); @@ -866,7 +864,7 @@ e_meeting_time_selector_unrealize (GtkWidget *widget) mts = E_MEETING_TIME_SELECTOR (widget); - gdk_gc_unref (mts->color_key_gc); + g_object_unref (mts->color_key_gc); mts->color_key_gc = NULL; if (GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->unrealize) @@ -1031,15 +1029,15 @@ e_meeting_time_selector_get_meeting_time (EMeetingTimeSelector *mts, gint *end_hour, gint *end_minute) { - *start_year = g_date_year (&mts->meeting_start_time.date); - *start_month = g_date_month (&mts->meeting_start_time.date); - *start_day = g_date_day (&mts->meeting_start_time.date); + *start_year = g_date_get_year (&mts->meeting_start_time.date); + *start_month = g_date_get_month (&mts->meeting_start_time.date); + *start_day = g_date_get_day (&mts->meeting_start_time.date); *start_hour = mts->meeting_start_time.hour; *start_minute = mts->meeting_start_time.minute; - *end_year = g_date_year (&mts->meeting_end_time.date); - *end_month = g_date_month (&mts->meeting_end_time.date); - *end_day = g_date_day (&mts->meeting_end_time.date); + *end_year = g_date_get_year (&mts->meeting_end_time.date); + *end_month = g_date_get_month (&mts->meeting_end_time.date); + *end_day = g_date_get_day (&mts->meeting_end_time.date); *end_hour = mts->meeting_end_time.hour; *end_minute = mts->meeting_end_time.minute; } @@ -1667,7 +1665,7 @@ e_meeting_time_selector_calculate_time_difference (EMeetingTime*start, gint *hours, gint *minutes) { - *days = g_date_julian (&end->date) - g_date_julian (&start->date); + *days = g_date_get_julian (&end->date) - g_date_get_julian (&start->date); *hours = end->hour - start->hour; *minutes = end->minute - start->minute; if (*minutes < 0) { @@ -2188,7 +2186,7 @@ e_meeting_time_selector_on_start_time_changed (GtkWidget *widget, /* Date */ newtime = e_date_edit_get_time (E_DATE_EDIT (mts->start_date_edit)); g_date_clear (&mtstime.date, 1); - g_date_set_time (&mtstime.date, newtime); + g_date_set_time_t (&mtstime.date, newtime); /* Time */ e_date_edit_get_time_of_day (E_DATE_EDIT (mts->start_date_edit), &hour, &minute); @@ -2234,7 +2232,7 @@ e_meeting_time_selector_on_end_time_changed (GtkWidget *widget, /* Date */ newtime = e_date_edit_get_time (E_DATE_EDIT (mts->end_date_edit)); g_date_clear (&mtstime.date, 1); - g_date_set_time (&mtstime.date, newtime); + g_date_set_time_t (&mtstime.date, newtime); if (mts->all_day) g_date_add_days (&mtstime.date, 1); @@ -2649,9 +2647,9 @@ static void e_meeting_time_selector_update_start_date_edit (EMeetingTimeSelector *mts) { e_date_edit_set_date_and_time_of_day (E_DATE_EDIT (mts->start_date_edit), - g_date_year (&mts->meeting_start_time.date), - g_date_month (&mts->meeting_start_time.date), - g_date_day (&mts->meeting_start_time.date), + g_date_get_year (&mts->meeting_start_time.date), + g_date_get_month (&mts->meeting_start_time.date), + g_date_get_day (&mts->meeting_start_time.date), mts->meeting_start_time.hour, mts->meeting_start_time.minute); } @@ -2668,9 +2666,9 @@ e_meeting_time_selector_update_end_date_edit (EMeetingTimeSelector *mts) g_date_subtract_days (&date, 1); e_date_edit_set_date_and_time_of_day (E_DATE_EDIT (mts->end_date_edit), - g_date_year (&date), - g_date_month (&date), - g_date_day (&date), + g_date_get_year (&date), + g_date_get_month (&date), + g_date_get_day (&date), mts->meeting_end_time.hour, mts->meeting_end_time.minute); } @@ -2841,7 +2839,7 @@ e_meeting_time_selector_calculate_time_position (EMeetingTimeSelector *mts, /* Calculate the number of days since the first date shown in the entire canvas scroll region. */ - date_offset = g_date_julian (&mtstime->date) - g_date_julian (&mts->first_date_shown); + date_offset = g_date_get_julian (&mtstime->date) - g_date_get_julian (&mts->first_date_shown); /* Calculate the x pixel coordinate of the start of the day. */ x = date_offset * mts->day_width; diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c index 1d7203acb2..85bcc0224a 100644 --- a/calendar/gui/e-week-view-main-item.c +++ b/calendar/gui/e-week-view-main-item.c @@ -224,8 +224,8 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, g_return_if_fail (gc != NULL); - month = g_date_month (date); - day_of_month = g_date_day (date); + month = g_date_get_month (date); + day_of_month = g_date_get_day (date); line_y = y + E_WEEK_VIEW_DATE_T_PAD + PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) + PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) + @@ -341,9 +341,9 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, /* Check if we are drawing today */ tt = icaltime_from_timet_with_zone (time (NULL), FALSE, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))); - if (g_date_year (date) == tt.year - && g_date_month (date) == tt.month - && g_date_day (date) == tt.day) { + if (g_date_get_year (date) == tt.year + && g_date_get_month (date) == tt.month + && g_date_get_day (date) == tt.day) { gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_TODAY]); today = TRUE; } @@ -428,8 +428,8 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, g_return_if_fail (gc != NULL); - month = g_date_month (date); - day_of_month = g_date_day (date); + month = g_date_get_month (date); + day_of_month = g_date_get_day (date); line_y = y + E_WEEK_VIEW_DATE_T_PAD + PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) + PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) + @@ -556,9 +556,9 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, /* Check if we are drawing today */ tt = icaltime_from_timet_with_zone (time (NULL), FALSE, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))); - if (g_date_year (date) == tt.year - && g_date_month (date) == tt.month - && g_date_day (date) == tt.day) { + if (g_date_get_year (date) == tt.year + && g_date_get_month (date) == tt.month + && g_date_get_day (date) == tt.day) { gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_TODAY]); today = TRUE; } diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 50b3e4eb4d..b9555a30b9 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -250,7 +250,7 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))); /* Calculate the weekday of the given date, 0 = Mon. */ - weekday = g_date_weekday (&date) - 1; + weekday = g_date_get_weekday (&date) - 1; /* Convert it to an offset from the start of the display. */ week_start_offset = (weekday + 7 - week_view->display_start_day) % 7; @@ -432,9 +432,9 @@ timezone_changed_cb (ECalendarView *cal_view, icaltimezone *old_zone, /* Recalculate the new start of the first week. We just use exactly the same time, but with the new timezone. */ - tt.year = g_date_year (&week_view->first_day_shown); - tt.month = g_date_month (&week_view->first_day_shown); - tt.day = g_date_day (&week_view->first_day_shown); + tt.year = g_date_get_year (&week_view->first_day_shown); + tt.month = g_date_get_month (&week_view->first_day_shown); + tt.day = g_date_get_day (&week_view->first_day_shown); lower = icaltime_as_timet_with_zone (tt, new_zone); @@ -563,7 +563,7 @@ e_week_view_init (EWeekView *week_view) } week_view->focused_jump_button = E_WEEK_VIEW_JUMP_BUTTON_NO_FOCUS; - gdk_pixbuf_unref (pixbuf); + g_object_unref (pixbuf); /* * Scrollbar. @@ -714,7 +714,7 @@ e_week_view_unrealize (GtkWidget *widget) week_view = E_WEEK_VIEW (widget); - gdk_gc_unref (week_view->main_gc); + g_object_unref (week_view->main_gc); week_view->main_gc = NULL; colormap = gtk_widget_get_colormap (widget); @@ -1364,16 +1364,16 @@ e_week_view_set_selected_time_range (ECalendarView *cal_view, time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))); /* Set the selection to the given days. */ - week_view->selection_start_day = g_date_julian (&date) - - g_date_julian (&week_view->base_date); + week_view->selection_start_day = g_date_get_julian (&date) + - g_date_get_julian (&week_view->base_date); if (end_time == start_time || end_time <= time_add_day_with_zone (start_time, 1, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)))) week_view->selection_end_day = week_view->selection_start_day; else { time_to_gdate_with_zone (&end_date, end_time - 60, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))); - week_view->selection_end_day = g_date_julian (&end_date) - - g_date_julian (&week_view->base_date); + week_view->selection_end_day = g_date_get_julian (&end_date) + - g_date_get_julian (&week_view->base_date); } /* Make sure the selection is valid. */ @@ -1407,16 +1407,16 @@ e_week_view_set_selected_time_range_visible (EWeekView *week_view, time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))); /* Set the selection to the given days. */ - week_view->selection_start_day = g_date_julian (&date) - - g_date_julian (&week_view->first_day_shown); + week_view->selection_start_day = g_date_get_julian (&date) + - g_date_get_julian (&week_view->first_day_shown); if (end_time == start_time || end_time <= time_add_day_with_zone (start_time, 1, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)))) week_view->selection_end_day = week_view->selection_start_day; else { time_to_gdate_with_zone (&end_date, end_time - 60, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))); - week_view->selection_end_day = g_date_julian (&end_date) - - g_date_julian (&week_view->first_day_shown); + week_view->selection_end_day = g_date_get_julian (&end_date) + - g_date_get_julian (&week_view->first_day_shown); } /* Make sure the selection is valid. */ @@ -1506,15 +1506,15 @@ e_week_view_set_first_day_shown (EWeekView *week_view, /* Calculate the old selection range. */ if (week_view->selection_start_day != -1) { old_selection_start_julian = - g_date_julian (&week_view->base_date) + g_date_get_julian (&week_view->base_date) + week_view->selection_start_day; old_selection_end_julian = - g_date_julian (&week_view->base_date) + g_date_get_julian (&week_view->base_date) + week_view->selection_end_day; } /* Calculate the weekday of the given date, 0 = Mon. */ - weekday = g_date_weekday (date) - 1; + weekday = g_date_get_weekday (date) - 1; /* Convert it to an offset from the start of the display. */ day_offset = (weekday + 7 - week_view->display_start_day) % 7; @@ -1536,9 +1536,9 @@ e_week_view_set_first_day_shown (EWeekView *week_view, || g_date_compare (&week_view->first_day_shown, &base_date)) { week_view->first_day_shown = base_date; - start_tt.year = g_date_year (&base_date); - start_tt.month = g_date_month (&base_date); - start_tt.day = g_date_day (&base_date); + start_tt.year = g_date_get_year (&base_date); + start_tt.month = g_date_get_month (&base_date); + start_tt.day = g_date_get_day (&base_date); start_time = icaltime_as_timet_with_zone (start_tt, e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view))); @@ -1551,9 +1551,9 @@ e_week_view_set_first_day_shown (EWeekView *week_view, just select the first day. */ if (week_view->selection_start_day != -1) { week_view->selection_start_day = old_selection_start_julian - - g_date_julian (&base_date); + - g_date_get_julian (&base_date); week_view->selection_end_day = old_selection_end_julian - - g_date_julian (&base_date); + - g_date_get_julian (&base_date); /* Make sure the selection is valid. */ num_days = week_view->multi_week_view @@ -4141,7 +4141,7 @@ e_week_view_on_jump_button_event (GnomeCanvasItem *item, pixbuf, NULL); } if (pixbuf) - gdk_pixbuf_unref (pixbuf); + g_object_unref (pixbuf); } return FALSE; diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 5b80084fc2..c400cc1ec2 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -604,7 +604,7 @@ get_times_for_views (GnomeCalendar *gcal, GnomeCalendarViewType view_type, time_ week start day. */ /* Get the weekday corresponding to start_time, 0 (Sun) to 6 (Sat). */ - weekday = g_date_weekday (&date) % 7; + weekday = g_date_get_weekday (&date) % 7; /* Find the first working day in the week, 0 (Sun) to 6 (Sat). */ first_day = (E_DAY_VIEW (priv->views[view_type])->week_start_day + 1) % 7; @@ -641,9 +641,9 @@ get_times_for_views (GnomeCalendar *gcal, GnomeCalendarViewType view_type, time_ g_date_subtract_days (&date, offset); } - tt.year = g_date_year (&date); - tt.month = g_date_month (&date); - tt.day = g_date_day (&date); + tt.year = g_date_get_year (&date); + tt.month = g_date_get_month (&date); + tt.day = g_date_get_day (&date); *start_time = icaltime_as_timet_with_zone (tt, priv->zone); *end_time = time_add_day_with_zone (*start_time, days_shown, priv->zone); @@ -1342,17 +1342,17 @@ update_adjustment (GnomeCalendar *gcal, GtkAdjustment *adjustment, EWeekView *we g_date_add_days (&date, week_offset * 7); /* Convert the old & new first days shown to julian values. */ - old_first_day_julian = g_date_julian (&week_view->first_day_shown); - new_first_day_julian = g_date_julian (&date); + old_first_day_julian = g_date_get_julian (&week_view->first_day_shown); + new_first_day_julian = g_date_get_julian (&date); /* If we are already showing the date, just return. */ if (old_first_day_julian == new_first_day_julian) return; /* Convert it to a time_t. */ - start_tt.year = g_date_year (&date); - start_tt.month = g_date_month (&date); - start_tt.day = g_date_day (&date); + start_tt.year = g_date_get_year (&date); + start_tt.month = g_date_get_month (&date); + start_tt.day = g_date_get_day (&date); lower = icaltime_as_timet_with_zone (start_tt, gcal->priv->zone); @@ -3300,20 +3300,20 @@ gnome_calendar_on_date_navigator_selection_changed (ECalendarItem *calitem, Gnom && !g_date_compare (&end_date, &new_end_date)) return; - new_days_shown = g_date_julian (&new_end_date) - g_date_julian (&new_start_date) + 1; + new_days_shown = g_date_get_julian (&new_end_date) - g_date_get_julian (&new_start_date) + 1; /* If a complete week is selected we show the Week view. Note that if weekends are compressed and the week start day is set to Sunday we don't actually show complete weeks in the Week view, so this may need tweaking. */ - if (g_date_weekday (&new_start_date) % 7 == priv->week_start) + if (g_date_get_weekday (&new_start_date) % 7 == priv->week_start) starts_on_week_start_day = TRUE; /* Update selection to be in the new time range */ tt = icaltime_null_time (); - tt.year = g_date_year (&new_start_date); - tt.month = g_date_month (&new_start_date); - tt.day = g_date_day (&new_start_date); + tt.year = g_date_get_year (&new_start_date); + tt.month = g_date_get_month (&new_start_date); + tt.day = g_date_get_day (&new_start_date); new_time = icaltime_as_timet_with_zone (tt, priv->zone); /* Switch views as appropriate, and change the number of days or weeks diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c index 6397a02282..ed8b9f2fca 100644 --- a/calendar/gui/goto.c +++ b/calendar/gui/goto.c @@ -91,9 +91,9 @@ ecal_event (ECalendarItem *calitem, gpointer user_data) e_calendar_item_get_selection (calitem, &start_date, &end_date); - tt.year = g_date_year (&start_date); - tt.month = g_date_month (&start_date); - tt.day = g_date_day (&start_date); + tt.year = g_date_get_year (&start_date); + tt.month = g_date_get_month (&start_date); + tt.day = g_date_get_day (&start_date); et = icaltime_as_timet_with_zone (tt, gnome_calendar_get_timezone (dlg->gcal)); |