[totem/wip/hadess/precise-stepping: 3/10] backend: Add helper to reset time labels
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/precise-stepping: 3/10] backend: Add helper to reset time labels
- Date: Thu, 17 Feb 2022 21:42:27 +0000 (UTC)
commit 8d7350d2c287ab2d3ef6f83c272226272869becf
Author: Bastien Nocera <hadess hadess net>
Date: Thu Feb 17 18:04:20 2022 +0100
backend: Add helper to reset time labels
src/backend/bacon-time-label.c | 8 ++++++++
src/backend/bacon-time-label.h | 6 ++++--
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/backend/bacon-time-label.c b/src/backend/bacon-time-label.c
index f9215dc46..e666c8036 100644
--- a/src/backend/bacon-time-label.c
+++ b/src/backend/bacon-time-label.c
@@ -152,6 +152,14 @@ bacon_time_label_set_time (BaconTimeLabel *label,
update_label_text (label);
}
+void
+bacon_time_label_reset (BaconTimeLabel *label)
+{
+ g_return_if_fail (BACON_IS_TIME_LABEL (label));
+
+ bacon_time_label_set_time (label, 0, 0);
+}
+
void
bacon_time_label_set_remaining (BaconTimeLabel *label,
gboolean remaining)
diff --git a/src/backend/bacon-time-label.h b/src/backend/bacon-time-label.h
index 101e7517d..eb4e624c1 100644
--- a/src/backend/bacon-time-label.h
+++ b/src/backend/bacon-time-label.h
@@ -29,8 +29,10 @@ G_DECLARE_FINAL_TYPE(BaconTimeLabel, bacon_time_label, BACON, TIME_LABEL, GtkLab
G_MODULE_EXPORT GType bacon_time_label_get_type (void);
GtkWidget *bacon_time_label_new (void);
void bacon_time_label_set_time (BaconTimeLabel *label,
- gint64 time,
- gint64 length);
+ gint64 time_msecs,
+ gint64 length_msecs);
+void bacon_time_label_reset (BaconTimeLabel *label);
+
void
bacon_time_label_set_remaining (BaconTimeLabel *label,
gboolean remaining);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]