Pidgin 2.13.0 has been released!!
David Woodhouse
dwmw2 at infradead.org
Fri Mar 9 12:08:41 EST 2018
On Fri, 2018-03-09 at 16:58 +0000, David Woodhouse wrote:
>
> I wonder if instead of just *not* multiplying by five, instead we
> should apply a logarithmic scale? Otherwise when I speak I'm only
> changing a few pixels at the far left-hand-side...
Or just scale and clip. Joakim?
diff --git a/pidgin/gtkmedia.c b/pidgin/gtkmedia.c
index 2c1fdea..43c697b 100644
--- a/pidgin/gtkmedia.c
+++ b/pidgin/gtkmedia.c
@@ -457,8 +457,12 @@ level_message_cb(PurpleMedia *media, gchar *session_id, gchar *participant,
else
progress = pidgin_media_get_widget(gtkmedia, session_id, participant);
+ level *= 5;
+ if (level > 1.0)
+ level = 1.0;
+
if (progress)
- gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), level * 5);
+ gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress), level);
}
diff --git a/pidgin/plugins/vvconfig.c b/pidgin/plugins/vvconfig.c
index 10cea48..67963ab 100644
--- a/pidgin/plugins/vvconfig.c
+++ b/pidgin/plugins/vvconfig.c
@@ -665,7 +665,11 @@ gst_bus_cb(GstBus *bus, GstMessage *msg, BusCbCtx *ctx)
GstElement *valve;
percent = gst_msg_db_to_percent(msg, "rms");
- gtk_progress_bar_set_fraction(ctx->level, percent * 5);
+ percent *= 5;
+ if (percent > 1.0)
+ percent = 1.0;
+
+ gtk_progress_bar_set_fraction(ctx->level, percent);
percent = gst_msg_db_to_percent(msg, "decay");
threshold = gtk_range_get_value(ctx->threshold) / 100.0;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5213 bytes
Desc: not available
URL: <https://pidgin.im/pipermail/devel/attachments/20180309/3e5704e5/attachment.bin>
More information about the Devel
mailing list