utils: add print_date debug method
This commit is contained in:
@@ -22,6 +22,7 @@
|
|||||||
#include "gcal-event-widget.h"
|
#include "gcal-event-widget.h"
|
||||||
#include "gcal-view.h"
|
#include "gcal-view.h"
|
||||||
|
|
||||||
|
#include <libecal/libecal.h>
|
||||||
#include <libedataserver/libedataserver.h>
|
#include <libedataserver/libedataserver.h>
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
@@ -278,6 +279,19 @@ gcal_compare_event_widget_by_date (gconstpointer a,
|
|||||||
return icaltime_compare (*a_date, *b_date);
|
return icaltime_compare (*a_date, *b_date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void print_date (const gchar* prefix,
|
||||||
|
const icaltimetype* icaltime)
|
||||||
|
{
|
||||||
|
gchar* temp =
|
||||||
|
isodate_from_time_t (icaltime_as_timet_with_zone (*icaltime,
|
||||||
|
icaltime->zone));
|
||||||
|
g_debug ("%s: %s -- zone: %s",
|
||||||
|
prefix,
|
||||||
|
temp,
|
||||||
|
icaltimezone_get_display_name (icaltime->zone));
|
||||||
|
g_free (temp);
|
||||||
|
}
|
||||||
|
|
||||||
/* Function to do a last minute fixup of the AM/PM stuff if the locale
|
/* Function to do a last minute fixup of the AM/PM stuff if the locale
|
||||||
* and gettext haven't done it right. Most English speaking countries
|
* and gettext haven't done it right. Most English speaking countries
|
||||||
* except the USA use the 24 hour clock (UK, Australia etc). However
|
* except the USA use the 24 hour clock (UK, Australia etc). However
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ GdkPixbuf* gcal_get_pixbuf_from_color (GdkColor
|
|||||||
gint gcal_compare_event_widget_by_date (gconstpointer a,
|
gint gcal_compare_event_widget_by_date (gconstpointer a,
|
||||||
gconstpointer b);
|
gconstpointer b);
|
||||||
|
|
||||||
|
void print_date (const gchar* prefix,
|
||||||
|
const icaltimetype* icaltime);
|
||||||
|
|
||||||
/* code brought from evolution */
|
/* code brought from evolution */
|
||||||
gsize e_strftime_fix_am_pm (gchar *str,
|
gsize e_strftime_fix_am_pm (gchar *str,
|
||||||
gsize max,
|
gsize max,
|
||||||
|
|||||||
Reference in New Issue
Block a user