totem r5593 - in trunk: . browser-plugin
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5593 - in trunk: . browser-plugin
- Date: Fri, 22 Aug 2008 13:16:37 +0000 (UTC)
Author: hadess
Date: Fri Aug 22 13:16:37 2008
New Revision: 5593
URL: http://svn.gnome.org/viewvc/totem?rev=5593&view=rev
Log:
2008-08-22 Bastien Nocera <hadess hadess net>
* browser-plugin/totem-plugin-viewer.c
(video_widget_size_allocate_cb), (totem_embedded_construct):
Don't show visuals if the video widget size is under 150 pixels
(Closes: #542491)
Modified:
trunk/ChangeLog
trunk/browser-plugin/totem-plugin-viewer.c
Modified: trunk/browser-plugin/totem-plugin-viewer.c
==============================================================================
--- trunk/browser-plugin/totem-plugin-viewer.c (original)
+++ trunk/browser-plugin/totem-plugin-viewer.c Fri Aug 22 13:16:37 2008
@@ -60,6 +60,7 @@
#define VOLUME_DOWN_OFFSET (-0.08)
#define VOLUME_UP_OFFSET (0.08)
+#define MINIMUM_VIDEO_SIZE 150
/* For newer D-Bus version */
#ifndef DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT
@@ -1647,6 +1648,15 @@
#endif
static void
+video_widget_size_allocate_cb (GtkWidget *controls,
+ GtkAllocation *allocation,
+ BaconVideoWidget *bvw)
+{
+ bacon_video_widget_set_show_visuals (bvw, allocation->height > MINIMUM_VIDEO_SIZE);
+ g_signal_handlers_disconnect_by_func (controls, G_CALLBACK (video_widget_size_allocate_cb), NULL);
+}
+
+static void
totem_embedded_action_volume_relative (TotemEmbedded *emb, double off_pct)
{
double vol;
@@ -1828,7 +1838,10 @@
/* FIXME: why can't this wait until the whole window is realised? */
gtk_widget_realize (GTK_WIDGET (emb->bvw));
gtk_widget_show (GTK_WIDGET (emb->bvw));
- bacon_video_widget_set_show_visuals (emb->bvw, TRUE);
+
+ /* Let us know when the size has been allocated for the video widget */
+ g_signal_connect_after (G_OBJECT (emb->bvw), "size-allocate",
+ G_CALLBACK (video_widget_size_allocate_cb), emb->bvw);
} else if (emb->audioonly != FALSE) {
gtk_widget_hide (container);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]