[vlc-commits] VlcPluginGtk: added fullscreen to popup menu
Cheng Sun
git at videolan.org
Wed Dec 21 12:54:10 CET 2011
npapi-vlc | branch: master | Cheng Sun <chengsun9 at gmail.com> | Sun Dec 11 12:30:00 2011 +0000| [6985904e01d82f5dce54901efe971d17e21b1b06] | committer: Jean-Baptiste Kempf
VlcPluginGtk: added fullscreen to popup menu
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=6985904e01d82f5dce54901efe971d17e21b1b06
---
npapi/vlcplugin_base.cpp | 2 +-
npapi/vlcplugin_gtk.cpp | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/npapi/vlcplugin_base.cpp b/npapi/vlcplugin_base.cpp
index e28cdc4..d1d9bc6 100644
--- a/npapi/vlcplugin_base.cpp
+++ b/npapi/vlcplugin_base.cpp
@@ -891,7 +891,7 @@ void VlcPluginBase::control_handler(vlc_toolbar_clicked_t clicked)
case clicked_Fullscreen:
{
- set_fullscreen( 1 );
+ toggle_fullscreen();
}
break;
diff --git a/npapi/vlcplugin_gtk.cpp b/npapi/vlcplugin_gtk.cpp
index f3bd042..f501aca 100644
--- a/npapi/vlcplugin_gtk.cpp
+++ b/npapi/vlcplugin_gtk.cpp
@@ -105,7 +105,8 @@ static const tool_actions_t tool_actions[] = {
{GTK_STOCK_MEDIA_PAUSE, clicked_Pause},
{GTK_STOCK_MEDIA_STOP, clicked_Stop},
{"gtk-volume-muted", clicked_Mute},
- {"gtk-volume-unmuted", clicked_Unmute}
+ {"gtk-volume-unmuted", clicked_Unmute},
+ {GTK_STOCK_FULLSCREEN, clicked_Fullscreen}
};
static void toolbar_handler(GtkToolButton *btn, gpointer user_data)
@@ -152,7 +153,14 @@ void VlcPluginGtk::popup_menu()
GTK_STOCK_MEDIA_STOP, NULL);
g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(menu_handler), this);
gtk_menu_shell_append(GTK_MENU_SHELL(popupmenu), menuitem);
+ /* set fullscreen */
+ menuitem = gtk_image_menu_item_new_from_stock(
+ GTK_STOCK_FULLSCREEN, NULL);
+ g_signal_connect(G_OBJECT(menuitem), "activate", G_CALLBACK(menu_handler), this);
+ gtk_menu_shell_append(GTK_MENU_SHELL(popupmenu), menuitem);
+
+ /* show menu */
gtk_widget_show_all(popupmenu);
gtk_menu_attach_to_widget(GTK_MENU(popupmenu), video_container, NULL);
gtk_menu_popup(GTK_MENU(popupmenu), NULL, NULL, NULL, NULL,
More information about the vlc-commits
mailing list