[gnome-todo] clock: Remove GtdClock:update
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] clock: Remove GtdClock:update
- Date: Sun, 31 Mar 2019 00:12:34 +0000 (UTC)
commit d1acb88b98845310bea0c91404f4ef170de68426
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Mar 30 20:19:13 2019 -0300
clock: Remove GtdClock:update
Better alternatives are available already.
plugins/all-tasks-panel/gtd-all-tasks-panel.c | 8 ++++----
plugins/background/gtd-plugin-background.c | 2 +-
plugins/next-week-panel/gtd-next-week-panel.c | 8 ++++----
plugins/scheduled-panel/gtd-panel-scheduled.c | 8 ++++----
plugins/today-panel/gtd-panel-today.c | 8 ++++----
src/gtd-clock.c | 16 ----------------
6 files changed, 17 insertions(+), 33 deletions(-)
---
diff --git a/plugins/all-tasks-panel/gtd-all-tasks-panel.c b/plugins/all-tasks-panel/gtd-all-tasks-panel.c
index 1fa6b60..8cfd075 100644
--- a/plugins/all-tasks-panel/gtd-all-tasks-panel.c
+++ b/plugins/all-tasks-panel/gtd-all-tasks-panel.c
@@ -270,8 +270,8 @@ on_model_items_changed_cb (GListModel *model,
}
static void
-on_clock_updated_cb (GtdClock *clock,
- GtdAllTasksPanel *self)
+on_clock_day_changed_cb (GtdClock *clock,
+ GtdAllTasksPanel *self)
{
g_autoptr (GDateTime) now = NULL;
@@ -455,8 +455,8 @@ gtd_all_tasks_panel_init (GtdAllTasksPanel *self)
0);
g_signal_connect_object (gtd_manager_get_clock (manager),
- "update",
- G_CALLBACK (on_clock_updated_cb),
+ "day-changed",
+ G_CALLBACK (on_clock_day_changed_cb),
self,
G_CONNECT_SWAPPED);
}
diff --git a/plugins/background/gtd-plugin-background.c b/plugins/background/gtd-plugin-background.c
index c58912f..9778bb7 100644
--- a/plugins/background/gtd-plugin-background.c
+++ b/plugins/background/gtd-plugin-background.c
@@ -330,7 +330,7 @@ watch_manager_for_new_lists (GtdPluginBackground *self)
self);
g_signal_connect_swapped (gtd_manager_get_clock (manager),
- "update",
+ "day-changed",
G_CALLBACK (send_notification),
self);
}
diff --git a/plugins/next-week-panel/gtd-next-week-panel.c b/plugins/next-week-panel/gtd-next-week-panel.c
index 29c0400..21dbc42 100644
--- a/plugins/next-week-panel/gtd-next-week-panel.c
+++ b/plugins/next-week-panel/gtd-next-week-panel.c
@@ -318,8 +318,8 @@ on_model_items_changed_cb (GListModel *model,
}
static void
-on_clock_updated_cb (GtdClock *clock,
- GtdNextWeekPanel *self)
+on_clock_day_changed_cb (GtdClock *clock,
+ GtdNextWeekPanel *self)
{
g_autoptr (GDateTime) now = NULL;
@@ -505,8 +505,8 @@ gtd_next_week_panel_init (GtdNextWeekPanel *self)
0);
g_signal_connect_object (gtd_manager_get_clock (manager),
- "update",
- G_CALLBACK (on_clock_updated_cb),
+ "day-changed",
+ G_CALLBACK (on_clock_day_changed_cb),
self,
G_CONNECT_SWAPPED);
}
diff --git a/plugins/scheduled-panel/gtd-panel-scheduled.c b/plugins/scheduled-panel/gtd-panel-scheduled.c
index 804f670..647c8d3 100644
--- a/plugins/scheduled-panel/gtd-panel-scheduled.c
+++ b/plugins/scheduled-panel/gtd-panel-scheduled.c
@@ -316,8 +316,8 @@ on_model_items_changed_cb (GListModel *model,
}
static void
-on_clock_updated_cb (GtdClock *clock,
- GtdPanelScheduled *self)
+on_clock_day_changed_cb (GtdClock *clock,
+ GtdPanelScheduled *self)
{
g_autoptr (GDateTime) now = NULL;
@@ -498,8 +498,8 @@ gtd_panel_scheduled_init (GtdPanelScheduled *self)
0);
g_signal_connect_object (gtd_manager_get_clock (manager),
- "update",
- G_CALLBACK (on_clock_updated_cb),
+ "day-changed",
+ G_CALLBACK (on_clock_day_changed_cb),
self,
G_CONNECT_SWAPPED);
}
diff --git a/plugins/today-panel/gtd-panel-today.c b/plugins/today-panel/gtd-panel-today.c
index a677faa..b5fe518 100644
--- a/plugins/today-panel/gtd-panel-today.c
+++ b/plugins/today-panel/gtd-panel-today.c
@@ -230,8 +230,8 @@ on_model_items_changed_cb (GListModel *model,
}
static void
-on_clock_updated_cb (GtdClock *clock,
- GtdPanelToday *self)
+on_clock_day_changed_cb (GtdClock *clock,
+ GtdPanelToday *self)
{
g_autoptr (GDateTime) now = NULL;
@@ -417,8 +417,8 @@ gtd_panel_today_init (GtdPanelToday *self)
0);
g_signal_connect_object (gtd_manager_get_clock (manager),
- "update",
- G_CALLBACK (on_clock_updated_cb),
+ "day-changed",
+ G_CALLBACK (on_clock_day_changed_cb),
self,
G_CONNECT_SWAPPED);
}
diff --git a/src/gtd-clock.c b/src/gtd-clock.c
index d0cb709..c947254 100644
--- a/src/gtd-clock.c
+++ b/src/gtd-clock.c
@@ -44,7 +44,6 @@ enum
DAY_CHANGED,
HOUR_CHANGED,
MINUTE_CHANGED,
- UPDATE,
N_SIGNALS
};
@@ -80,8 +79,6 @@ update_current_date (GtdClock *self)
if (minute_changed)
g_signal_emit (self, signals[MINUTE_CHANGED], 0);
- g_signal_emit (self, signals[UPDATE], 0);
-
GTD_TRACE_MSG ("Ticking clock");
g_clear_pointer (&self->current, g_date_time_unref);
@@ -265,19 +262,6 @@ gtd_clock_class_init (GtdClockClass *klass)
0, NULL, NULL, NULL,
G_TYPE_NONE,
0);
-
- /**
- * GtdClock:update:
- *
- * Emited when an update is required. This is emited usually
- * after a session resume, or a day change.
- */
- signals[UPDATE] = g_signal_new ("update",
- GTD_TYPE_CLOCK,
- G_SIGNAL_RUN_LAST,
- 0, NULL, NULL, NULL,
- G_TYPE_NONE,
- 0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]