diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c index 8d0d327c..c6e88079 100644 --- a/src/gcal-month-view.c +++ b/src/gcal-month-view.c @@ -165,10 +165,6 @@ static icaltimetype* gcal_month_view_get_final_date (GcalView *vie static void gcal_month_view_clear_marks (GcalView *view); -static gchar* gcal_month_view_get_left_header (GcalView *view); - -static gchar* gcal_month_view_get_right_header (GcalView *view); - static GList* gcal_month_view_get_children_by_uuid (GcalView *view, const gchar *uuid); @@ -599,8 +595,6 @@ gcal_view_interface_init (GcalViewIface *iface) iface->clear_marks = gcal_month_view_clear_marks; - iface->get_left_header = gcal_month_view_get_left_header; - iface->get_right_header = gcal_month_view_get_right_header; iface->get_children_by_uuid = gcal_month_view_get_children_by_uuid; } @@ -1689,24 +1683,6 @@ gcal_month_view_get_children_by_uuid (GcalView *view, return NULL; } -static gchar* -gcal_month_view_get_left_header (GcalView *view) -{ - GcalMonthViewPrivate *priv = gcal_month_view_get_instance_private (GCAL_MONTH_VIEW (view)); - - return g_strdup_printf ("%s", gcal_get_month_name (priv->date->month - 1)); -} - -static gchar* -gcal_month_view_get_right_header (GcalView *view) -{ - GcalMonthViewPrivate *priv; - - priv = gcal_month_view_get_instance_private (GCAL_MONTH_VIEW (view)); - - return g_strdup_printf ("%d", priv->date->year); -} - /* Public API */ /** * gcal_month_view_new: diff --git a/src/gcal-view.c b/src/gcal-view.c index c0202ea7..cd04e64c 100644 --- a/src/gcal-view.c +++ b/src/gcal-view.c @@ -158,42 +158,6 @@ gcal_view_clear_marks (GcalView *view) GCAL_VIEW_GET_INTERFACE (view)->clear_marks (view); } -/** - * gcal_view_get_left_header: - * @view: a #GcalView - * - * Returns the string representing for the left header of the unit. - * e.g.: for #GcalMonthView returns the month name - * - * Returns: (transfer full): a string. - **/ -gchar* -gcal_view_get_left_header (GcalView *view) -{ - g_return_val_if_fail (GCAL_IS_VIEW (view), NULL); - g_return_val_if_fail (GCAL_VIEW_GET_INTERFACE (view)->get_left_header, NULL); - - return GCAL_VIEW_GET_INTERFACE (view)->get_left_header (view); -} - -/** - * gcal_view_get_right_header: - * @view: a #GcalView - * - * Returns the string representing for the right header of the unit. - * e.g.: for #GcalMonthView returns the year - * - * Returns: (transfer full): a string. - **/ -gchar* -gcal_view_get_right_header (GcalView *view) -{ - g_return_val_if_fail (GCAL_IS_VIEW (view), NULL); - g_return_val_if_fail (GCAL_VIEW_GET_INTERFACE (view)->get_right_header, NULL); - - return GCAL_VIEW_GET_INTERFACE (view)->get_right_header (view); -} - /** * gcal_view_get_children_by_uuid: * @view: a #GcalView diff --git a/src/gcal-view.h b/src/gcal-view.h index e28a8ad1..84722878 100644 --- a/src/gcal-view.h +++ b/src/gcal-view.h @@ -55,10 +55,6 @@ struct _GcalViewIface /* Marks related API */ void (*clear_marks) (GcalView *view); - /* Update NavBar headings */ - gchar* (*get_left_header) (GcalView *view); - gchar* (*get_right_header) (GcalView *view); - GList* (*get_children_by_uuid) (GcalView *view, const gchar *uuid); }; @@ -76,10 +72,6 @@ icaltimetype* gcal_view_get_final_date (GcalView *view); void gcal_view_clear_marks (GcalView *view); -gchar* gcal_view_get_left_header (GcalView *view); - -gchar* gcal_view_get_right_header (GcalView *view); - GList* gcal_view_get_children_by_uuid (GcalView *view, const gchar *uuid); diff --git a/src/gcal-week-view.c b/src/gcal-week-view.c index 703f517d..b97891ba 100644 --- a/src/gcal-week-view.c +++ b/src/gcal-week-view.c @@ -155,10 +155,6 @@ static icaltimetype* gcal_week_view_get_initial_date (GcalView *view static icaltimetype* gcal_week_view_get_final_date (GcalView *view); -static gchar* gcal_week_view_get_left_header (GcalView *view); - -static gchar* gcal_week_view_get_right_header (GcalView *view); - static GtkWidget* gcal_week_view_get_by_uuid (GcalSubscriberView *view, const gchar *uuid); @@ -563,9 +559,6 @@ gcal_view_interface_init (GcalViewIface *iface) iface->get_final_date = gcal_week_view_get_final_date; /* iface->clear_marks = gcal_week_view_clear_marks; */ - - iface->get_left_header = gcal_week_view_get_left_header; - iface->get_right_header = gcal_week_view_get_right_header; } static void @@ -1338,52 +1331,6 @@ gcal_week_view_get_final_date (GcalView *view) return new_date; } -static gchar* -gcal_week_view_get_left_header (GcalView *view) -{ - icaltimetype *start_of_week; - icaltimetype *end_of_week; - gchar start_date[64]; - gchar end_date[64]; - struct tm tm_date; - gchar *header; - - start_of_week = gcal_week_view_get_initial_date (view); - tm_date = icaltimetype_to_tm (start_of_week); - e_utf8_strftime_fix_am_pm (start_date, 64, "%b %d", &tm_date); - - end_of_week = gcal_week_view_get_final_date (view); - tm_date = icaltimetype_to_tm (end_of_week); - e_utf8_strftime_fix_am_pm (end_date, 64, "%b %d", &tm_date); - - header = g_strdup_printf ("%s - %s", start_date, end_date); - - g_free (start_of_week); - g_free (end_of_week); - - return header; -} - -static gchar* -gcal_week_view_get_right_header (GcalView *view) -{ - GcalWeekViewPrivate *priv; - - icaltimetype *start_of_week; - gchar *header; - - priv = gcal_week_view_get_instance_private (GCAL_WEEK_VIEW (view)); - start_of_week = gcal_week_view_get_initial_date (view); - header = g_strdup_printf ("%s %d, %d", - _("Week"), - icaltime_week_number (*start_of_week) + 1, - priv->date->year); - - g_free (start_of_week); - - return header; -} - static GtkWidget* gcal_week_view_get_by_uuid (GcalSubscriberView *subscriber_view, const gchar *uuid) diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c index 8c034b3a..1d5623ba 100644 --- a/src/gcal-year-view.c +++ b/src/gcal-year-view.c @@ -1035,20 +1035,6 @@ gcal_year_view_direction_changed (GtkWidget *widget, priv->k = 1; } -static gchar* -gcal_year_view_get_left_header (GcalView *view) -{ - GcalYearViewPrivate *priv = GCAL_YEAR_VIEW (view)->priv; - - return g_strdup_printf ("%d", priv->date->year); -} - -static gchar* -gcal_year_view_get_right_header (GcalView *view) -{ - return g_strdup (""); -} - static GList* gcal_year_view_get_children_by_uuid (GcalView *view, const gchar *uuid) @@ -1206,8 +1192,6 @@ static void gcal_view_interface_init (GcalViewIface *iface) { /* FIXME: implement what's needed */ - iface->get_left_header = gcal_year_view_get_left_header; - iface->get_right_header = gcal_year_view_get_right_header; iface->get_children_by_uuid = gcal_year_view_get_children_by_uuid; }