~ubuntu-branches/ubuntu/precise/evolution/precise

« back to all changes in this revision

Viewing changes to calendar/gui/e-day-view-top-item.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-06-24 00:27:53 UTC
  • mfrom: (1.1.80 upstream)
  • Revision ID: james.westby@ubuntu.com-20110624002753-2vh1vjavlya7r103
Tags: 3.1.2-0ubuntu1
* New upstream release 3.1.2.
* debian/control: adjust Build-Depends to match new upstream requirements for
  the new release.
* debian/control: update evolution and evolution-dev Depends to require the
  right versions of e-d-s (>= 3.1, << 3.2), and drop libunique-3.0-dev.
* debian/control,
  debian/evolution.install: remove groupwise-features from the plugin list,
  it's now split out into a separate module.
* debian/patches/03_lpi.patch: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <config.h>
29
29
#endif
30
30
 
31
 
#include <glib.h>
32
31
#include <glib/gi18n.h>
33
32
#include "e-util/e-categories-config.h"
34
33
#include <libecal/e-cal-time-util.h>
621
620
        if (!show_dates) {
622
621
                /* Clear the main area background. */
623
622
                cairo_save (cr);
624
 
                gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS]);
 
623
                gdk_cairo_set_source_color (
 
624
                        cr, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS]);
625
625
                cairo_rectangle (cr, left_edge - x, - y,
626
626
                                 canvas_width - left_edge,
627
627
                                 canvas_height);
816
816
}
817
817
 
818
818
void
819
 
e_day_view_top_item_get_day_label (EDayView *day_view, gint day,
820
 
                                   gchar *buffer, gint buffer_len)
 
819
e_day_view_top_item_get_day_label (EDayView *day_view,
 
820
                                   gint day,
 
821
                                   gchar *buffer,
 
822
                                   gint buffer_len)
821
823
{
 
824
        ECalendarView *view;
822
825
        struct icaltimetype day_start_tt;
 
826
        const icaltimezone *zone;
823
827
        struct tm day_start = { 0 };
824
828
        const gchar *format;
825
829
 
826
 
        day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day],
827
 
                                                      FALSE,
828
 
                                                      e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
 
830
        view = E_CALENDAR_VIEW (day_view);
 
831
        zone = e_calendar_view_get_timezone (view);
 
832
 
 
833
        day_start_tt = icaltime_from_timet_with_zone (
 
834
                day_view->day_starts[day], FALSE, zone);
829
835
        day_start.tm_year = day_start_tt.year - 1900;
830
836
        day_start.tm_mon = day_start_tt.month - 1;
831
837
        day_start.tm_mday = day_start_tt.day;
832
838
        day_start.tm_isdst = -1;
833
839
 
834
 
        day_start.tm_wday = time_day_of_week (day_start_tt.day,
835
 
                                              day_start_tt.month - 1,
836
 
                                              day_start_tt.year);
 
840
        day_start.tm_wday = time_day_of_week (
 
841
                day_start_tt.day,
 
842
                day_start_tt.month - 1,
 
843
                day_start_tt.year);
837
844
 
838
845
        if (day_view->date_format == E_DAY_VIEW_DATE_FULL)
839
846
                /* strftime format %A = full weekday name, %d = day of month,