[gupnp-tools] av-cp: Fix duration scale
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp-tools] av-cp: Fix duration scale
- Date: Sun, 12 Jul 2020 09:15:32 +0000 (UTC)
commit 6ae77b7d14eeaf539c4c8d5951a386116c8fa3c2
Author: Jens Georg <mail jensge org>
Date: Sun Jul 12 11:13:44 2020 +0200
av-cp: Fix duration scale
Also show current progress in the tooltip
src/av-cp/renderer-controls.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/av-cp/renderer-controls.c b/src/av-cp/renderer-controls.c
index bd56403..7a0e58d 100644
--- a/src/av-cp/renderer-controls.c
+++ b/src/av-cp/renderer-controls.c
@@ -522,6 +522,7 @@ get_position_info_cb (GUPnPServiceProxy *av_transport,
gpointer user_data)
{
gchar *position;
+ gchar *duration;
const gchar *udn;
GError *error;
@@ -534,6 +535,9 @@ get_position_info_cb (GUPnPServiceProxy *av_transport,
"AbsTime",
G_TYPE_STRING,
&position,
+ "TrackDuration",
+ G_TYPE_STRING,
+ &duration,
NULL)) {
g_warning ("Failed to get current media position"
"from media renderer '%s':%s\n",
@@ -545,7 +549,12 @@ get_position_info_cb (GUPnPServiceProxy *av_transport,
}
set_position_scale_position (position);
+ set_position_scale_duration (duration);
+ char *tooltip = g_strdup_printf ("%s/%s", position, duration);
+ gtk_widget_set_tooltip_text (GTK_WIDGET (position_scale), tooltip);
+ g_free (tooltip);
g_free (position);
+ g_free (duration);
return_point:
g_object_unref (av_transport);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]