[gnome-todo] panel-today: default to create tasks today
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] panel-today: default to create tasks today
- Date: Thu, 6 Oct 2016 01:16:59 +0000 (UTC)
commit fbf86bd600f489503831e83ffaf785468da8aa1f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Oct 5 21:13:12 2016 -0300
panel-today: default to create tasks today
plugins/eds/gtd-panel-today.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/plugins/eds/gtd-panel-today.c b/plugins/eds/gtd-panel-today.c
index 247a354..f26063e 100644
--- a/plugins/eds/gtd-panel-today.c
+++ b/plugins/eds/gtd-panel-today.c
@@ -168,6 +168,8 @@ gtd_panel_today_update_today_timeout_cb (GtdPanelToday *panel)
(GSourceFunc)
gtd_panel_today_update_today_timeout_cb,
panel);
+ gtd_task_list_view_set_default_date (GTD_TASK_LIST_VIEW (panel->view), now);
+
g_clear_pointer (&tomorrow, g_date_time_unref);
g_clear_pointer (&today, g_date_time_unref);
g_clear_pointer (&now, g_date_time_unref);
@@ -278,9 +280,11 @@ static void
gtd_panel_today_init (GtdPanelToday *self)
{
GtdManager *manager;
+ GDateTime *now;
/* Connect to GtdManager::list-* signals to update the title */
manager = gtd_manager_get_default ();
+ now = g_date_time_new_now_local ();
g_signal_connect_swapped (manager,
"list-added",
@@ -309,6 +313,7 @@ gtd_panel_today_init (GtdPanelToday *self)
/* The main view */
self->view = gtd_task_list_view_new ();
gtd_task_list_view_set_show_list_name (GTD_TASK_LIST_VIEW (self->view), TRUE);
+ gtd_task_list_view_set_default_date (GTD_TASK_LIST_VIEW (self->view), now);
gtk_widget_set_hexpand (self->view, TRUE);
gtk_widget_set_vexpand (self->view, TRUE);
@@ -318,6 +323,8 @@ gtd_panel_today_init (GtdPanelToday *self)
/* Start timer */
gtd_panel_today_update_today_timeout_cb (self);
+
+ g_clear_pointer (&now, g_date_time_unref);
}
GtkWidget*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]