views: get rid of current date

We can easily track the current date with GDateTime API,
so we don't actually need the current date field.
This commit is contained in:
Georges Basile Stavracas Neto
2017-03-17 15:49:12 -03:00
parent 1dadd34409
commit 002271ebb1
10 changed files with 73 additions and 125 deletions
-16
View File
@@ -69,7 +69,6 @@ struct _GcalWeekHeader
gint redraw_timeout_id;
icaltimetype *active_date;
icaltimetype *current_date;
gint selection_start;
gint selection_end;
@@ -1025,7 +1024,6 @@ gcal_week_header_finalize (GObject *object)
gint i;
g_clear_pointer (&self->active_date, g_free);
g_clear_pointer (&self->current_date, g_free);
if (self->redraw_timeout_id > 0)
{
@@ -1744,20 +1742,6 @@ gcal_week_header_get_children_by_uuid (GcalWeekHeader *self,
return result;
}
void
gcal_week_header_set_current_date (GcalWeekHeader *self,
icaltimetype *current_date)
{
g_return_if_fail (GCAL_IS_WEEK_HEADER (self));
g_clear_pointer (&self->current_date, g_free);
self->current_date = gcal_dup_icaltime (current_date);
update_title (self);
gtk_widget_queue_draw (GTK_WIDGET (self));
}
GtkSizeGroup*
gcal_week_header_get_sidebar_size_group (GcalWeekHeader *self)
{