[gnome-calendar] year-view: Trivial code cleanup
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] year-view: Trivial code cleanup
- Date: Wed, 9 Oct 2019 16:07:33 +0000 (UTC)
commit cafd17627c728ecb338e21aab0c1026919a91110
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Oct 9 12:35:38 2019 -0300
year-view: Trivial code cleanup
src/views/gcal-year-view.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/views/gcal-year-view.c b/src/views/gcal-year-view.c
index 43e8b1b6..d32bc0d8 100644
--- a/src/views/gcal-year-view.c
+++ b/src/views/gcal-year-view.c
@@ -268,8 +268,8 @@ static void
update_no_events_page (GcalYearView *year_view)
{
g_autoptr (GDateTime) now = NULL;
+ g_autofree gchar *title = NULL;
gboolean has_range;
- gchar *title;
now = g_date_time_new_now_local ();
has_range = gcal_date_time_compare_date (year_view->start_selected_date, year_view->end_selected_date);
@@ -297,7 +297,6 @@ update_no_events_page (GcalYearView *year_view)
gtk_label_set_text (GTK_LABEL (year_view->no_events_title), title);
update_weather (year_view);
- g_free (title);
}
static void
@@ -1976,7 +1975,7 @@ gcal_year_view_component_removed (ECalDataModelSubscriber *subscriber,
*/
if (number_of_children == 0)
{
- update_no_events_page (GCAL_YEAR_VIEW (subscriber));
+ update_no_events_page (year_view);
gtk_stack_set_visible_child_name (GTK_STACK (year_view->navigator_stack), "no-events");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]