Commit 0162de44 authored by Sam Hocevar's avatar Sam Hocevar

* ./modules/gui/gtk/gtk_callbacks.c: fixed a bug that caused crashes when

    doing fullscreen or volume up from the popup menu.
parent b8afd5b8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* display.c: Gtk+ tools for main interface * display.c: Gtk+ tools for main interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: display.c,v 1.8 2003/01/27 17:41:01 ipkiss Exp $ * $Id: display.c,v 1.9 2003/02/05 22:11:52 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -214,7 +214,7 @@ gint E_(GtkModeManage)( intf_thread_t * p_intf ) ...@@ -214,7 +214,7 @@ gint E_(GtkModeManage)( intf_thread_t * p_intf )
FALSE ); FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"), gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"),
FALSE ); FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_audio"), FALSE ); gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_language"), FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_subpictures"), gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_subpictures"),
FALSE ); FALSE );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc * gnome.c : Gnome plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: gnome.c,v 1.9 2003/01/31 09:51:57 sam Exp $ * $Id: gnome.c,v 1.10 2003/02/05 22:11:52 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -252,6 +252,12 @@ static void Run( intf_thread_t *p_intf ) ...@@ -252,6 +252,12 @@ static void Run( intf_thread_t *p_intf )
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup), gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
"p_intf", p_intf ); "p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT( gtk_object_get_data(
GTK_OBJECT(p_intf->p_sys->p_popup),
"popup_audio" ) ), "p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT( gtk_object_get_data(
GTK_OBJECT(p_intf->p_sys->p_popup),
"popup_video" ) ), "p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playwin ), gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playwin ),
"p_intf", p_intf ); "p_intf", p_intf );
......
...@@ -1259,17 +1259,17 @@ ...@@ -1259,17 +1259,17 @@
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>audio1</name> <name>popup_audio</name>
<label>Audio</label> <label>Audio</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
<widget> <widget>
<class>GtkMenu</class> <class>GtkMenu</class>
<name>audio1_menu</name> <name>popup_audio_menu</name>
<widget> <widget>
<class>GtkPixmapMenuItem</class> <class>GtkPixmapMenuItem</class>
<name>popup_audio</name> <name>popup_language</name>
<sensitive>False</sensitive> <sensitive>False</sensitive>
<tooltip>Select audio channel</tooltip> <tooltip>Select audio channel</tooltip>
<label>_Language</label> <label>_Language</label>
...@@ -1343,13 +1343,13 @@ ...@@ -1343,13 +1343,13 @@
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>video1</name> <name>popup_video</name>
<label>Video</label> <label>Video</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
<widget> <widget>
<class>GtkMenu</class> <class>GtkMenu</class>
<name>video1_menu</name> <name>popup_video_menu</name>
<widget> <widget>
<class>GtkPixmapMenuItem</class> <class>GtkPixmapMenuItem</class>
......
...@@ -936,7 +936,7 @@ create_intf_window (void) ...@@ -936,7 +936,7 @@ create_intf_window (void)
return intf_window; return intf_window;
} }
static GnomeUIInfo audio1_menu_uiinfo[] = static GnomeUIInfo popup_audio_menu_uiinfo[] =
{ {
{ {
GNOME_APP_UI_ITEM, N_("_Language"), GNOME_APP_UI_ITEM, N_("_Language"),
...@@ -985,7 +985,7 @@ static GnomeUIInfo audio1_menu_uiinfo[] = ...@@ -985,7 +985,7 @@ static GnomeUIInfo audio1_menu_uiinfo[] =
GNOMEUIINFO_END GNOMEUIINFO_END
}; };
static GnomeUIInfo video1_menu_uiinfo[] = static GnomeUIInfo popup_video_menu_uiinfo[] =
{ {
{ {
GNOME_APP_UI_ITEM, N_("_Subtitles"), GNOME_APP_UI_ITEM, N_("_Subtitles"),
...@@ -1132,14 +1132,14 @@ static GnomeUIInfo intf_popup_uiinfo[] = ...@@ -1132,14 +1132,14 @@ static GnomeUIInfo intf_popup_uiinfo[] =
{ {
GNOME_APP_UI_SUBTREE, N_("Audio"), GNOME_APP_UI_SUBTREE, N_("Audio"),
NULL, NULL,
audio1_menu_uiinfo, NULL, NULL, popup_audio_menu_uiinfo, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL, GNOME_APP_PIXMAP_NONE, NULL,
0, (GdkModifierType) 0, NULL 0, (GdkModifierType) 0, NULL
}, },
{ {
GNOME_APP_UI_SUBTREE, N_("Video"), GNOME_APP_UI_SUBTREE, N_("Video"),
NULL, NULL,
video1_menu_uiinfo, NULL, NULL, popup_video_menu_uiinfo, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL, GNOME_APP_PIXMAP_NONE, NULL,
0, (GdkModifierType) 0, NULL 0, (GdkModifierType) 0, NULL
}, },
...@@ -1244,85 +1244,85 @@ create_intf_popup (void) ...@@ -1244,85 +1244,85 @@ create_intf_popup (void)
gtk_widget_set_sensitive (intf_popup_uiinfo[12].widget, FALSE); gtk_widget_set_sensitive (intf_popup_uiinfo[12].widget, FALSE);
gtk_widget_ref (intf_popup_uiinfo[13].widget); gtk_widget_ref (intf_popup_uiinfo[13].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "audio1", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio",
intf_popup_uiinfo[13].widget, intf_popup_uiinfo[13].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (audio1_menu_uiinfo[0].widget); gtk_widget_ref (popup_audio_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_language",
audio1_menu_uiinfo[0].widget, popup_audio_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_sensitive (audio1_menu_uiinfo[0].widget, FALSE); gtk_widget_set_sensitive (popup_audio_menu_uiinfo[0].widget, FALSE);
gtk_widget_ref (audio1_menu_uiinfo[1].widget); gtk_widget_ref (popup_audio_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator20", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator20",
audio1_menu_uiinfo[1].widget, popup_audio_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (audio1_menu_uiinfo[2].widget); gtk_widget_ref (popup_audio_menu_uiinfo[2].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_up", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_up",
audio1_menu_uiinfo[2].widget, popup_audio_menu_uiinfo[2].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (audio1_menu_uiinfo[3].widget); gtk_widget_ref (popup_audio_menu_uiinfo[3].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_down", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_down",
audio1_menu_uiinfo[3].widget, popup_audio_menu_uiinfo[3].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (audio1_menu_uiinfo[4].widget); gtk_widget_ref (popup_audio_menu_uiinfo[4].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_mute", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_mute",
audio1_menu_uiinfo[4].widget, popup_audio_menu_uiinfo[4].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (audio1_menu_uiinfo[5].widget); gtk_widget_ref (popup_audio_menu_uiinfo[5].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator21", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator21",
audio1_menu_uiinfo[5].widget, popup_audio_menu_uiinfo[5].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (audio1_menu_uiinfo[6].widget); gtk_widget_ref (popup_audio_menu_uiinfo[6].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_channels", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_channels",
audio1_menu_uiinfo[6].widget, popup_audio_menu_uiinfo[6].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (audio1_menu_uiinfo[7].widget); gtk_widget_ref (popup_audio_menu_uiinfo[7].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_device", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_device",
audio1_menu_uiinfo[7].widget, popup_audio_menu_uiinfo[7].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[14].widget); gtk_widget_ref (intf_popup_uiinfo[14].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "video1", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video",
intf_popup_uiinfo[14].widget, intf_popup_uiinfo[14].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (video1_menu_uiinfo[0].widget); gtk_widget_ref (popup_video_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_subpictures", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_subpictures",
video1_menu_uiinfo[0].widget, popup_video_menu_uiinfo[0].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_sensitive (video1_menu_uiinfo[0].widget, FALSE); gtk_widget_set_sensitive (popup_video_menu_uiinfo[0].widget, FALSE);
gtk_widget_ref (video1_menu_uiinfo[1].widget); gtk_widget_ref (popup_video_menu_uiinfo[1].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator18", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator18",
video1_menu_uiinfo[1].widget, popup_video_menu_uiinfo[1].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (video1_menu_uiinfo[2].widget); gtk_widget_ref (popup_video_menu_uiinfo[2].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_fullscreen", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_fullscreen",
video1_menu_uiinfo[2].widget, popup_video_menu_uiinfo[2].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (video1_menu_uiinfo[3].widget); gtk_widget_ref (popup_video_menu_uiinfo[3].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator19", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator19",
video1_menu_uiinfo[3].widget, popup_video_menu_uiinfo[3].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (video1_menu_uiinfo[4].widget); gtk_widget_ref (popup_video_menu_uiinfo[4].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_deinterlace", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_deinterlace",
video1_menu_uiinfo[4].widget, popup_video_menu_uiinfo[4].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (video1_menu_uiinfo[5].widget); gtk_widget_ref (popup_video_menu_uiinfo[5].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video_device", gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video_device",
video1_menu_uiinfo[5].widget, popup_video_menu_uiinfo[5].widget,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[15].widget); gtk_widget_ref (intf_popup_uiinfo[15].widget);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk.c : Gtk+ plugin for vlc * gtk.c : Gtk+ plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: gtk.c,v 1.14 2003/01/31 09:51:57 sam Exp $ * $Id: gtk.c,v 1.15 2003/02/05 22:11:52 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -258,6 +258,12 @@ static void Run( intf_thread_t *p_intf ) ...@@ -258,6 +258,12 @@ static void Run( intf_thread_t *p_intf )
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup), gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
"p_intf", p_intf ); "p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT( gtk_object_get_data(
GTK_OBJECT(p_intf->p_sys->p_popup),
"popup_audio" ) ), "p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT( gtk_object_get_data(
GTK_OBJECT(p_intf->p_sys->p_popup),
"popup_video" ) ), "p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playwin ), gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playwin ),
"p_intf", p_intf ); "p_intf", p_intf );
......
...@@ -1249,17 +1249,17 @@ ...@@ -1249,17 +1249,17 @@
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>audio1</name> <name>popup_audio</name>
<label>Audio</label> <label>Audio</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
<widget> <widget>
<class>GtkMenu</class> <class>GtkMenu</class>
<name>audio1_menu</name> <name>popup_audio_menu</name>
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>popup_audio</name> <name>popup_language</name>
<sensitive>False</sensitive> <sensitive>False</sensitive>
<label>_Language</label> <label>_Language</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
...@@ -1331,13 +1331,13 @@ ...@@ -1331,13 +1331,13 @@
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
<name>video1</name> <name>popup_video</name>
<label>Video</label> <label>Video</label>
<right_justify>False</right_justify> <right_justify>False</right_justify>
<widget> <widget>
<class>GtkMenu</class> <class>GtkMenu</class>
<name>video1_menu</name> <name>popup_video_menu</name>
<widget> <widget>
<class>GtkMenuItem</class> <class>GtkMenuItem</class>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin. * gtk_callbacks.c : Callbacks for the Gtk+ plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.c,v 1.11 2003/01/31 10:54:07 sam Exp $ * $Id: gtk_callbacks.c,v 1.12 2003/02/05 22:11:52 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -72,11 +72,15 @@ void * E_(__GtkGetIntf)( GtkWidget * widget ) ...@@ -72,11 +72,15 @@ void * E_(__GtkGetIntf)( GtkWidget * widget )
/* Otherwise, the parent widget has it */ /* Otherwise, the parent widget has it */
widget = gtk_menu_get_attach_widget( GTK_MENU( widget ) ); widget = gtk_menu_get_attach_widget( GTK_MENU( widget ) );
p_data = gtk_object_get_data( GTK_OBJECT( widget ), "p_intf" );
if( p_data )
{
return p_data;
}
} }
/* We look for the top widget */ /* We look for the top widget */
widget = gtk_widget_get_toplevel( GTK_WIDGET( widget ) ); widget = gtk_widget_get_toplevel( GTK_WIDGET( widget ) );
p_data = gtk_object_get_data( GTK_OBJECT( widget ), "p_intf" ); p_data = gtk_object_get_data( GTK_OBJECT( widget ), "p_intf" );
return p_data; return p_data;
......
...@@ -1104,10 +1104,10 @@ create_intf_popup (void) ...@@ -1104,10 +1104,10 @@ create_intf_popup (void)
GtkWidget *separator27; GtkWidget *separator27;
GtkWidget *popup_program; GtkWidget *popup_program;
GtkWidget *popup_navigation; GtkWidget *popup_navigation;
GtkWidget *audio1;
GtkWidget *audio1_menu;
GtkAccelGroup *audio1_menu_accels;
GtkWidget *popup_audio; GtkWidget *popup_audio;
GtkWidget *popup_audio_menu;
GtkAccelGroup *popup_audio_menu_accels;
GtkWidget *popup_language;
GtkWidget *separator19; GtkWidget *separator19;
GtkWidget *popup_volume_up; GtkWidget *popup_volume_up;
GtkWidget *popup_volume_down; GtkWidget *popup_volume_down;
...@@ -1115,9 +1115,9 @@ create_intf_popup (void) ...@@ -1115,9 +1115,9 @@ create_intf_popup (void)
GtkWidget *separator20; GtkWidget *separator20;
GtkWidget *popup_audio_channels; GtkWidget *popup_audio_channels;
GtkWidget *popup_audio_device; GtkWidget *popup_audio_device;
GtkWidget *video1; GtkWidget *popup_video;
GtkWidget *video1_menu; GtkWidget *popup_video_menu;
GtkAccelGroup *video1_menu_accels; GtkAccelGroup *popup_video_menu_accels;
GtkWidget *popup_subpictures; GtkWidget *popup_subpictures;
GtkWidget *separator21; GtkWidget *separator21;
GtkWidget *popup_fullscreen; GtkWidget *popup_fullscreen;
...@@ -1257,38 +1257,38 @@ create_intf_popup (void) ...@@ -1257,38 +1257,38 @@ create_intf_popup (void)
gtk_container_add (GTK_CONTAINER (intf_popup), popup_navigation); gtk_container_add (GTK_CONTAINER (intf_popup), popup_navigation);
gtk_widget_set_sensitive (popup_navigation, FALSE); gtk_widget_set_sensitive (popup_navigation, FALSE);
audio1 = gtk_menu_item_new_with_label (_("Audio")); popup_audio = gtk_menu_item_new_with_label (_("Audio"));
gtk_widget_ref (audio1); gtk_widget_ref (popup_audio);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "audio1", audio1, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio", popup_audio,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (audio1); gtk_widget_show (popup_audio);
gtk_container_add (GTK_CONTAINER (intf_popup), audio1); gtk_container_add (GTK_CONTAINER (intf_popup), popup_audio);
audio1_menu = gtk_menu_new (); popup_audio_menu = gtk_menu_new ();
gtk_widget_ref (audio1_menu); gtk_widget_ref (popup_audio_menu);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "audio1_menu", audio1_menu, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_menu", popup_audio_menu,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (audio1), audio1_menu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (popup_audio), popup_audio_menu);
audio1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (audio1_menu)); popup_audio_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (popup_audio_menu));
popup_audio = gtk_menu_item_new_with_label (""); popup_language = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_audio)->child), tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_language)->child),
_("_Language")); _("_Language"));
gtk_widget_add_accelerator (popup_audio, "activate_item", audio1_menu_accels, gtk_widget_add_accelerator (popup_language, "activate_item", popup_audio_menu_accels,
tmp_key, 0, 0); tmp_key, 0, 0);
gtk_widget_ref (popup_audio); gtk_widget_ref (popup_language);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio", popup_audio, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_language", popup_language,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_audio); gtk_widget_show (popup_language);
gtk_container_add (GTK_CONTAINER (audio1_menu), popup_audio); gtk_container_add (GTK_CONTAINER (popup_audio_menu), popup_language);
gtk_widget_set_sensitive (popup_audio, FALSE); gtk_widget_set_sensitive (popup_language, FALSE);
separator19 = gtk_menu_item_new (); separator19 = gtk_menu_item_new ();
gtk_widget_ref (separator19); gtk_widget_ref (separator19);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator19", separator19, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator19", separator19,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (separator19); gtk_widget_show (separator19);
gtk_container_add (GTK_CONTAINER (audio1_menu), separator19); gtk_container_add (GTK_CONTAINER (popup_audio_menu), separator19);
gtk_widget_set_sensitive (separator19, FALSE); gtk_widget_set_sensitive (separator19, FALSE);
popup_volume_up = gtk_menu_item_new_with_label (_("Volume Up")); popup_volume_up = gtk_menu_item_new_with_label (_("Volume Up"));
...@@ -1296,28 +1296,28 @@ create_intf_popup (void) ...@@ -1296,28 +1296,28 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_up", popup_volume_up, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_up", popup_volume_up,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_volume_up); gtk_widget_show (popup_volume_up);
gtk_container_add (GTK_CONTAINER (audio1_menu), popup_volume_up); gtk_container_add (GTK_CONTAINER (popup_audio_menu), popup_volume_up);
popup_volume_down = gtk_menu_item_new_with_label (_("Volume Down")); popup_volume_down = gtk_menu_item_new_with_label (_("Volume Down"));
gtk_widget_ref (popup_volume_down); gtk_widget_ref (popup_volume_down);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_down", popup_volume_down, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_down", popup_volume_down,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_volume_down); gtk_widget_show (popup_volume_down);
gtk_container_add (GTK_CONTAINER (audio1_menu), popup_volume_down); gtk_container_add (GTK_CONTAINER (popup_audio_menu), popup_volume_down);
popup_volume_mute = gtk_menu_item_new_with_label (_("Mute")); popup_volume_mute = gtk_menu_item_new_with_label (_("Mute"));
gtk_widget_ref (popup_volume_mute); gtk_widget_ref (popup_volume_mute);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_mute", popup_volume_mute, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_mute", popup_volume_mute,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_volume_mute); gtk_widget_show (popup_volume_mute);
gtk_container_add (GTK_CONTAINER (audio1_menu), popup_volume_mute); gtk_container_add (GTK_CONTAINER (popup_audio_menu), popup_volume_mute);
separator20 = gtk_menu_item_new (); separator20 = gtk_menu_item_new ();
gtk_widget_ref (separator20); gtk_widget_ref (separator20);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator20", separator20, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator20", separator20,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (separator20); gtk_widget_show (separator20);
gtk_container_add (GTK_CONTAINER (audio1_menu), separator20); gtk_container_add (GTK_CONTAINER (popup_audio_menu), separator20);
gtk_widget_set_sensitive (separator20, FALSE); gtk_widget_set_sensitive (separator20, FALSE);
popup_audio_channels = gtk_menu_item_new_with_label (_("Channels")); popup_audio_channels = gtk_menu_item_new_with_label (_("Channels"));
...@@ -1325,39 +1325,39 @@ create_intf_popup (void) ...@@ -1325,39 +1325,39 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_channels", popup_audio_channels, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_channels", popup_audio_channels,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_audio_channels); gtk_widget_show (popup_audio_channels);
gtk_container_add (GTK_CONTAINER (audio1_menu), popup_audio_channels); gtk_container_add (GTK_CONTAINER (popup_audio_menu), popup_audio_channels);
popup_audio_device = gtk_menu_item_new_with_label (_("Device")); popup_audio_device = gtk_menu_item_new_with_label (_("Device"));
gtk_widget_ref (popup_audio_device); gtk_widget_ref (popup_audio_device);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_device", popup_audio_device, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_device", popup_audio_device,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_audio_device); gtk_widget_show (popup_audio_device);
gtk_container_add (GTK_CONTAINER (audio1_menu), popup_audio_device); gtk_container_add (GTK_CONTAINER (popup_audio_menu), popup_audio_device);
video1 = gtk_menu_item_new_with_label (_("Video")); popup_video = gtk_menu_item_new_with_label (_("Video"));
gtk_widget_ref (video1); gtk_widget_ref (popup_video);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "video1", video1, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video", popup_video,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (video1); gtk_widget_show (popup_video);
gtk_container_add (GTK_CONTAINER (intf_popup), video1); gtk_container_add (GTK_CONTAINER (intf_popup), popup_video);
video1_menu = gtk_menu_new (); popup_video_menu = gtk_menu_new ();
gtk_widget_ref (video1_menu); gtk_widget_ref (popup_video_menu);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "video1_menu", video1_menu, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video_menu", popup_video_menu,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (video1), video1_menu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (popup_video), popup_video_menu);
video1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (video1_menu)); popup_video_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (popup_video_menu));
popup_subpictures = gtk_menu_item_new_with_label (""); popup_subpictures = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_subpictures)->child), tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_subpictures)->child),
_("_Subtitles")); _("_Subtitles"));
gtk_widget_add_accelerator (popup_subpictures, "activate_item", video1_menu_accels, gtk_widget_add_accelerator (popup_subpictures, "activate_item", popup_video_menu_accels,
tmp_key, 0, 0); tmp_key, 0, 0);
gtk_widget_ref (popup_subpictures); gtk_widget_ref (popup_subpictures);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_subpictures", popup_subpictures, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_subpictures", popup_subpictures,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_subpictures); gtk_widget_show (popup_subpictures);
gtk_container_add (GTK_CONTAINER (video1_menu), popup_subpictures); gtk_container_add (GTK_CONTAINER (popup_video_menu), popup_subpictures);
gtk_widget_set_sensitive (popup_subpictures, FALSE); gtk_widget_set_sensitive (popup_subpictures, FALSE);
separator21 = gtk_menu_item_new (); separator21 = gtk_menu_item_new ();
...@@ -1365,26 +1365,26 @@ create_intf_popup (void) ...@@ -1365,26 +1365,26 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator21", separator21, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator21", separator21,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (separator21); gtk_widget_show (separator21);
gtk_container_add (GTK_CONTAINER (video1_menu), separator21); gtk_container_add (GTK_CONTAINER (popup_video_menu), separator21);
gtk_widget_set_sensitive (separator21, FALSE); gtk_widget_set_sensitive (separator21, FALSE);
popup_fullscreen = gtk_menu_item_new_with_label (""); popup_fullscreen = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_fullscreen)->child), tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_fullscreen)->child),
_("_Fullscreen")); _("_Fullscreen"));
gtk_widget_add_accelerator (popup_fullscreen, "activate_item", video1_menu_accels, gtk_widget_add_accelerator (popup_fullscreen, "activate_item", popup_video_menu_accels,
tmp_key, 0, 0); tmp_key, 0, 0);
gtk_widget_ref (popup_fullscreen); gtk_widget_ref (popup_fullscreen);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_fullscreen", popup_fullscreen, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_fullscreen", popup_fullscreen,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_fullscreen); gtk_widget_show (popup_fullscreen);
gtk_container_add (GTK_CONTAINER (video1_menu), popup_fullscreen); gtk_container_add (GTK_CONTAINER (popup_video_menu), popup_fullscreen);
separator23 = gtk_menu_item_new (); separator23 = gtk_menu_item_new ();
gtk_widget_ref (separator23); gtk_widget_ref (separator23);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator23", separator23, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator23", separator23,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (separator23); gtk_widget_show (separator23);
gtk_container_add (GTK_CONTAINER (video1_menu), separator23); gtk_container_add (GTK_CONTAINER (popup_video_menu), separator23);
gtk_widget_set_sensitive (separator23, FALSE); gtk_widget_set_sensitive (separator23, FALSE);
popup_deinterlace = gtk_menu_item_new_with_label (_("Deinterlace")); popup_deinterlace = gtk_menu_item_new_with_label (_("Deinterlace"));
...@@ -1392,14 +1392,14 @@ create_intf_popup (void) ...@@ -1392,14 +1392,14 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_deinterlace", popup_deinterlace, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_deinterlace", popup_deinterlace,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_deinterlace); gtk_widget_show (popup_deinterlace);
gtk_container_add (GTK_CONTAINER (video1_menu), popup_deinterlace); gtk_container_add (GTK_CONTAINER (popup_video_menu), popup_deinterlace);
popup_video_device = gtk_menu_item_new_with_label (_("Screen")); popup_video_device = gtk_menu_item_new_with_label (_("Screen"));
gtk_widget_ref (popup_video_device); gtk_widget_ref (popup_video_device);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video_device", popup_video_device, gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video_device", popup_video_device,
(GtkDestroyNotify) gtk_widget_unref); (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_video_device); gtk_widget_show (popup_video_device);
gtk_container_add (GTK_CONTAINER (video1_menu), popup_video_device); gtk_container_add (GTK_CONTAINER (popup_video_menu), popup_video_device);
separator26 = gtk_menu_item_new (); separator26 = gtk_menu_item_new ();
gtk_widget_ref (separator26); gtk_widget_ref (separator26);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* menu.c : functions to handle menu items. * menu.c : functions to handle menu items.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: menu.c,v 1.7 2003/01/28 12:30:44 gbazin Exp $ * $Id: menu.c,v 1.8 2003/02/05 22:11:52 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -113,7 +113,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf ); ...@@ -113,7 +113,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf );
void GtkMenubarAudioToggle( GtkCheckMenuItem * menuitem, gpointer user_data ) void GtkMenubarAudioToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
{ {
GTKLANGTOGGLE( p_popup, "popup_audio", AUDIO_ES, GTKLANGTOGGLE( p_popup, "popup_language", AUDIO_ES,
GtkPopupAudioToggle, b_audio_update ); GtkPopupAudioToggle, b_audio_update );
} }
...@@ -1416,7 +1416,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf ) ...@@ -1416,7 +1416,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf )
p_intf->p_sys->p_window ), "menubar_audio" ) ); p_intf->p_sys->p_window ), "menubar_audio" ) );
p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_popup ), "popup_audio" ) ); p_intf->p_sys->p_popup ), "popup_language" ) );
p_intf->p_sys->b_audio_update = VLC_TRUE; p_intf->p_sys->b_audio_update = VLC_TRUE;
GtkLanguageMenus( p_intf, p_menubar_menu, p_audio_es, AUDIO_ES, GtkLanguageMenus( p_intf, p_menubar_menu, p_audio_es, AUDIO_ES,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment