[gnome-todo] plugins: Fix default date
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] plugins: Fix default date
- Date: Mon, 17 Sep 2018 04:10:17 +0000 (UTC)
commit fad340fa1e8f5e8fef22dcea6028041795a5f1df
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Sep 17 01:06:43 2018 -0300
plugins: Fix default date
Missed after porting to use models.
plugins/next-week-panel/gtd-next-week-panel.c | 2 ++
plugins/scheduled-panel/gtd-panel-scheduled.c | 2 ++
plugins/today-panel/gtd-panel-today.c | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/plugins/next-week-panel/gtd-next-week-panel.c b/plugins/next-week-panel/gtd-next-week-panel.c
index 2d0dd35..f8e5a9a 100644
--- a/plugins/next-week-panel/gtd-next-week-panel.c
+++ b/plugins/next-week-panel/gtd-next-week-panel.c
@@ -474,6 +474,7 @@ gtd_next_week_panel_class_init (GtdNextWeekPanelClass *klass)
static void
gtd_next_week_panel_init (GtdNextWeekPanel *self)
{
+ g_autoptr (GDateTime) now = g_date_time_new_now_local ();
GtdManager *manager = gtd_manager_get_default ();
self->icon = g_themed_icon_new ("view-tasks-week-symbolic");
@@ -487,6 +488,7 @@ gtd_next_week_panel_init (GtdNextWeekPanel *self)
gtd_task_list_view_set_handle_subtasks (GTD_TASK_LIST_VIEW (self->view), FALSE);
gtd_task_list_view_set_show_list_name (GTD_TASK_LIST_VIEW (self->view), TRUE);
gtd_task_list_view_set_show_due_date (GTD_TASK_LIST_VIEW (self->view), FALSE);
+ gtd_task_list_view_set_default_date (self->view, now);
gtk_widget_set_hexpand (GTK_WIDGET (self->view), TRUE);
gtk_widget_set_vexpand (GTK_WIDGET (self->view), TRUE);
diff --git a/plugins/scheduled-panel/gtd-panel-scheduled.c b/plugins/scheduled-panel/gtd-panel-scheduled.c
index 86ee852..9ec4f0f 100644
--- a/plugins/scheduled-panel/gtd-panel-scheduled.c
+++ b/plugins/scheduled-panel/gtd-panel-scheduled.c
@@ -467,6 +467,7 @@ gtd_panel_scheduled_class_init (GtdPanelScheduledClass *klass)
static void
gtd_panel_scheduled_init (GtdPanelScheduled *self)
{
+ g_autoptr (GDateTime) now = g_date_time_new_now_local ();
GtdManager *manager = gtd_manager_get_default ();
self->icon = g_themed_icon_new ("alarm-symbolic");
@@ -480,6 +481,7 @@ gtd_panel_scheduled_init (GtdPanelScheduled *self)
gtd_task_list_view_set_handle_subtasks (self->view, FALSE);
gtd_task_list_view_set_show_list_name (self->view, TRUE);
gtd_task_list_view_set_show_due_date (self->view, FALSE);
+ gtd_task_list_view_set_default_date (self->view, now);
gtk_widget_set_hexpand (GTK_WIDGET (self->view), TRUE);
gtk_widget_set_vexpand (GTK_WIDGET (self->view), TRUE);
diff --git a/plugins/today-panel/gtd-panel-today.c b/plugins/today-panel/gtd-panel-today.c
index ef1c68e..8e6e939 100644
--- a/plugins/today-panel/gtd-panel-today.c
+++ b/plugins/today-panel/gtd-panel-today.c
@@ -402,7 +402,7 @@ gtd_panel_today_init (GtdPanelToday *self)
gtd_task_list_view_set_handle_subtasks (self->view, FALSE);
gtd_task_list_view_set_show_list_name (self->view, TRUE);
gtd_task_list_view_set_show_due_date (self->view, FALSE);
- gtd_task_list_view_set_default_date (self->view, FALSE);
+ gtd_task_list_view_set_default_date (self->view, now);
gtk_widget_set_hexpand (GTK_WIDGET (self->view), TRUE);
gtk_widget_set_vexpand (GTK_WIDGET (self->view), TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]