[totem] backend: Add some (non-working) buttons to bvw-test



commit 47fbb6f9f7b37fa6f50010e5e6f265b36986fc9a
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Apr 4 19:18:28 2013 +0200

    backend: Add some (non-working) buttons to bvw-test
    
    So we can chase layout issues here instead of in the main player.

 src/backend/bvw-test.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bvw-test.c b/src/backend/bvw-test.c
index 5d9103b..420993e 100644
--- a/src/backend/bvw-test.c
+++ b/src/backend/bvw-test.c
@@ -77,6 +77,9 @@ int main
        GError *error = NULL;
        GtkWidget *win, *bvw;
        GtkSettings *gtk_settings;
+       GtkBox *box;
+       GtkToolItem *item;
+       GtkWidget *image;
 
 #ifdef GDK_WINDOWING_X11
        XInitThreads ();
@@ -122,6 +125,34 @@ int main
        g_signal_connect (G_OBJECT (bvw), "got-redirect", G_CALLBACK (on_redirect), NULL);
        g_signal_connect (G_OBJECT (bvw), "error", G_CALLBACK (error_cb), NULL);
 
+       box = g_object_get_data (bacon_video_widget_get_controls_object (BACON_VIDEO_WIDGET (bvw)), 
"controls_box");
+
+       /* Previous */
+       item = gtk_tool_button_new (NULL, NULL);
+       gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "media-skip-backward-symbolic");
+       gtk_box_pack_start (box, GTK_WIDGET (item), FALSE, FALSE, 0);
+
+       /* Play/Pause */
+       item = gtk_tool_button_new (NULL, NULL);
+       gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "media-playback-start-symbolic");
+       gtk_box_pack_start (box, GTK_WIDGET (item), FALSE, FALSE, 0);
+
+       /* Next */
+       item = gtk_tool_button_new (NULL, NULL);
+       gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "media-skip-forward-symbolic");
+       gtk_box_pack_start (box, GTK_WIDGET (item), FALSE, FALSE, 0);
+
+       /* Separator */
+       item = gtk_separator_tool_item_new ();
+       gtk_box_pack_start (box, GTK_WIDGET (item), FALSE, FALSE, 0);
+
+       /* Fullscreen button */
+       item = g_object_get_data (bacon_video_widget_get_controls_object (BACON_VIDEO_WIDGET (bvw)), 
"fullscreen_button");
+       image = gtk_image_new_from_icon_name ("view-fullscreen-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR);
+       gtk_button_set_image (GTK_BUTTON (item), image);
+
+       gtk_widget_show_all (GTK_WIDGET (box));
+
        gtk_container_add (GTK_CONTAINER (win),bvw);
 
        gtk_widget_realize (GTK_WIDGET (win));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]