[gnome-calendar] view: cleanup unused code
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] view: cleanup unused code
- Date: Thu, 30 Mar 2017 14:38:54 +0000 (UTC)
commit b93fe11da883574b560a9568b00b8f735e48b3fe
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Mar 29 16:25:47 2017 -0300
view: cleanup unused code
src/gcal-view.c | 34 --------------------------
src/gcal-view.h | 8 ------
src/views/gcal-month-view.c | 53 ----------------------------------------
src/views/gcal-week-view.c | 56 -------------------------------------------
4 files changed, 0 insertions(+), 151 deletions(-)
---
diff --git a/src/gcal-view.c b/src/gcal-view.c
index 7ad4005..fae8a76 100644
--- a/src/gcal-view.c
+++ b/src/gcal-view.c
@@ -96,40 +96,6 @@ gcal_view_get_date (GcalView *view)
}
/**
- * gcal_view_get_initial_date:
- * @view: a #GcalView
- *
- * Return the initial date represented by the view.
- *
- * Returns: (transfer full): An #icaltimetype object
- **/
-icaltimetype*
-gcal_view_get_initial_date (GcalView *view)
-{
- g_return_val_if_fail (GCAL_IS_VIEW (view), NULL);
- g_return_val_if_fail (GCAL_VIEW_GET_IFACE (view)->get_initial_date, NULL);
-
- return GCAL_VIEW_GET_IFACE (view)->get_initial_date (view);
-}
-
-/**
- * gcal_view_get_final_date:
- * @view: a #GcalView
- *
- * Return the final date represented by the view.
- *
- * Returns: (transfer full): An #icaltimetype object
- **/
-icaltimetype*
-gcal_view_get_final_date (GcalView *view)
-{
- g_return_val_if_fail (GCAL_IS_VIEW (view), NULL);
- g_return_val_if_fail (GCAL_VIEW_GET_IFACE (view)->get_final_date, NULL);
-
- return GCAL_VIEW_GET_IFACE (view)->get_final_date (view);
-}
-
-/**
* gcal_view_clear_marks:
* @view: a #GcalView
*
diff --git a/src/gcal-view.h b/src/gcal-view.h
index 3c4ec90..8ec6e6c 100644
--- a/src/gcal-view.h
+++ b/src/gcal-view.h
@@ -42,10 +42,6 @@ struct _GcalViewInterface
icaltimetype *start_span,
icaltimetype *end_span);
- /* Time handling related API */
- icaltimetype* (*get_initial_date) (GcalView *view);
- icaltimetype* (*get_final_date) (GcalView *view);
-
/* Marks related API */
void (*clear_marks) (GcalView *view);
@@ -58,10 +54,6 @@ void gcal_view_set_date (GcalView *view,
icaltimetype* gcal_view_get_date (GcalView *view);
-icaltimetype* gcal_view_get_initial_date (GcalView *view);
-
-icaltimetype* gcal_view_get_final_date (GcalView *view);
-
void gcal_view_clear_marks (GcalView *view);
GList* gcal_view_get_children_by_uuid (GcalView *view,
diff --git a/src/views/gcal-month-view.c b/src/views/gcal-month-view.c
index b524fc0..82841a0 100644
--- a/src/views/gcal-month-view.c
+++ b/src/views/gcal-month-view.c
@@ -914,55 +914,6 @@ add_new_event_button_cb (GtkWidget *button,
}
/* GcalView Interface API */
-static icaltimetype*
-gcal_month_view_get_initial_date (GcalView *view)
-{
- //FIXME to retrieve the 35 days range
- GcalMonthView *self;
- icaltimetype *new_date;
-
- g_return_val_if_fail (GCAL_IS_MONTH_VIEW (view), NULL);
-
- self = GCAL_MONTH_VIEW (view);
-
- new_date = gcal_dup_icaltime (self->date);
- new_date->day = 1;
- new_date->is_date = 0;
- new_date->hour = 0;
- new_date->minute = 0;
- new_date->second = 0;
-
- return new_date;
-}
-
-/**
- * gcal_month_view_get_final_date:
- *
- * Since: 0.1
- * Return value: the last day of the month
- * Returns: (transfer full): Release with g_free()
- **/
-static icaltimetype*
-gcal_month_view_get_final_date (GcalView *view)
-{
- //FIXME to retrieve the 35 days range
- GcalMonthView *self;
- icaltimetype *new_date;
-
- g_return_val_if_fail (GCAL_IS_MONTH_VIEW (view), NULL);
-
- self = GCAL_MONTH_VIEW (view);
-
- new_date = gcal_dup_icaltime (self->date);
- new_date->day = icaltime_days_in_month (self->date->month, self->date->year);
- new_date->is_date = 0;
- new_date->hour = 23;
- new_date->minute = 59;
- new_date->second = 59;
-
- return new_date;
-}
-
static void
gcal_month_view_clear_marks (GcalView *view)
{
@@ -988,11 +939,7 @@ gcal_month_view_get_children_by_uuid (GcalView *view,
static void
gcal_view_interface_init (GcalViewInterface *iface)
{
- iface->get_initial_date = gcal_month_view_get_initial_date;
- iface->get_final_date = gcal_month_view_get_final_date;
-
iface->clear_marks = gcal_month_view_clear_marks;
-
iface->get_children_by_uuid = gcal_month_view_get_children_by_uuid;
}
diff --git a/src/views/gcal-week-view.c b/src/views/gcal-week-view.c
index 92abc47..b115919 100644
--- a/src/views/gcal-week-view.c
+++ b/src/views/gcal-week-view.c
@@ -162,60 +162,6 @@ schedule_position_scroll (GcalWeekView *self)
self);
}
-/**
- * gcal_week_view_get_initial_date:
- *
- * Since: 0.1
- * Return value: the first day of the week
- * Returns: (transfer full): Release with g_free()
- **/
-static icaltimetype*
-gcal_week_view_get_initial_date (GcalView *view)
-{
- GcalWeekView *self;
- icaltimetype *new_date;
-
- g_return_val_if_fail (GCAL_IS_WEEK_VIEW (view), NULL);
- self = GCAL_WEEK_VIEW(view);
- new_date = g_new0 (icaltimetype, 1);
- *new_date = icaltime_from_day_of_year (icaltime_start_doy_week (*(self->date),
- self->first_weekday + 1),
- self->date->year);
- new_date->is_date = 0;
- new_date->hour = 0;
- new_date->minute = 0;
- new_date->second = 0;
- *new_date = icaltime_set_timezone (new_date, self->date->zone);
- return new_date;
-}
-
-/**
- * gcal_week_view_get_final_date:
- *
- * Since: 0.1
- * Return value: the last day of the week
- * Returns: (transfer full): Release with g_free()
- **/
-static icaltimetype*
-gcal_week_view_get_final_date (GcalView *view)
-{
- GcalWeekView *self;
- icaltimetype *new_date;
-
- g_return_val_if_fail (GCAL_IS_WEEK_VIEW (view), NULL);
- self = GCAL_WEEK_VIEW(view);
- new_date = g_new0 (icaltimetype, 1);
- *new_date = icaltime_from_day_of_year (icaltime_start_doy_week (*(self->date),
- self->first_weekday + 1) + 6,
- self->date->year);
- new_date->is_date = 0;
- new_date->hour = 23;
- new_date->minute = 59;
- new_date->second = 0;
- *new_date = icaltime_set_timezone (new_date, self->date->zone);
- return new_date;
-}
-
static GList*
gcal_week_view_get_children_by_uuid (GcalView *view,
const gchar *uuid)
@@ -486,8 +432,6 @@ gcal_week_view_draw_hours (GcalWeekView *self,
static void
gcal_view_interface_init (GcalViewInterface *iface)
{
- iface->get_initial_date = gcal_week_view_get_initial_date;
- iface->get_final_date = gcal_week_view_get_final_date;
iface->get_children_by_uuid = gcal_week_view_get_children_by_uuid;
iface->clear_marks = gcal_week_view_clear_marks;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]