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 @@
* display.c: Gtk+ tools for main interface
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -214,7 +214,7 @@ gint E_(GtkModeManage)( intf_thread_t * p_intf )
FALSE );
gtk_widget_set_sensitive( GETWIDGET(p_popup,"popup_navigation"),
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"),
FALSE );
}
......
......@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc
*****************************************************************************
* 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>
*
......@@ -252,6 +252,12 @@ static void Run( intf_thread_t *p_intf )
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
"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 ),
"p_intf", p_intf );
......
......@@ -1259,17 +1259,17 @@
<widget>
<class>GtkMenuItem</class>
<name>audio1</name>
<name>popup_audio</name>
<label>Audio</label>
<right_justify>False</right_justify>
<widget>
<class>GtkMenu</class>
<name>audio1_menu</name>
<name>popup_audio_menu</name>
<widget>
<class>GtkPixmapMenuItem</class>
<name>popup_audio</name>
<name>popup_language</name>
<sensitive>False</sensitive>
<tooltip>Select audio channel</tooltip>
<label>_Language</label>
......@@ -1343,13 +1343,13 @@
<widget>
<class>GtkMenuItem</class>
<name>video1</name>
<name>popup_video</name>
<label>Video</label>
<right_justify>False</right_justify>
<widget>
<class>GtkMenu</class>
<name>video1_menu</name>
<name>popup_video_menu</name>
<widget>
<class>GtkPixmapMenuItem</class>
......
......@@ -936,7 +936,7 @@ create_intf_window (void)
return intf_window;
}
static GnomeUIInfo audio1_menu_uiinfo[] =
static GnomeUIInfo popup_audio_menu_uiinfo[] =
{
{
GNOME_APP_UI_ITEM, N_("_Language"),
......@@ -985,7 +985,7 @@ static GnomeUIInfo audio1_menu_uiinfo[] =
GNOMEUIINFO_END
};
static GnomeUIInfo video1_menu_uiinfo[] =
static GnomeUIInfo popup_video_menu_uiinfo[] =
{
{
GNOME_APP_UI_ITEM, N_("_Subtitles"),
......@@ -1132,14 +1132,14 @@ static GnomeUIInfo intf_popup_uiinfo[] =
{
GNOME_APP_UI_SUBTREE, N_("Audio"),
NULL,
audio1_menu_uiinfo, NULL, NULL,
popup_audio_menu_uiinfo, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, (GdkModifierType) 0, NULL
},
{
GNOME_APP_UI_SUBTREE, N_("Video"),
NULL,
video1_menu_uiinfo, NULL, NULL,
popup_video_menu_uiinfo, NULL, NULL,
GNOME_APP_PIXMAP_NONE, NULL,
0, (GdkModifierType) 0, NULL
},
......@@ -1244,85 +1244,85 @@ create_intf_popup (void)
gtk_widget_set_sensitive (intf_popup_uiinfo[12].widget, FALSE);
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,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (audio1_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio",
audio1_menu_uiinfo[0].widget,
gtk_widget_ref (popup_audio_menu_uiinfo[0].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_language",
popup_audio_menu_uiinfo[0].widget,
(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",
audio1_menu_uiinfo[1].widget,
popup_audio_menu_uiinfo[1].widget,
(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",
audio1_menu_uiinfo[2].widget,
popup_audio_menu_uiinfo[2].widget,
(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",
audio1_menu_uiinfo[3].widget,
popup_audio_menu_uiinfo[3].widget,
(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",
audio1_menu_uiinfo[4].widget,
popup_audio_menu_uiinfo[4].widget,
(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",
audio1_menu_uiinfo[5].widget,
popup_audio_menu_uiinfo[5].widget,
(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",
audio1_menu_uiinfo[6].widget,
popup_audio_menu_uiinfo[6].widget,
(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",
audio1_menu_uiinfo[7].widget,
popup_audio_menu_uiinfo[7].widget,
(GtkDestroyNotify) gtk_widget_unref);
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,
(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",
video1_menu_uiinfo[0].widget,
popup_video_menu_uiinfo[0].widget,
(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",
video1_menu_uiinfo[1].widget,
popup_video_menu_uiinfo[1].widget,
(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",
video1_menu_uiinfo[2].widget,
popup_video_menu_uiinfo[2].widget,
(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",
video1_menu_uiinfo[3].widget,
popup_video_menu_uiinfo[3].widget,
(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",
video1_menu_uiinfo[4].widget,
popup_video_menu_uiinfo[4].widget,
(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",
video1_menu_uiinfo[5].widget,
popup_video_menu_uiinfo[5].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[15].widget);
......
......@@ -2,7 +2,7 @@
* gtk.c : Gtk+ plugin for vlc
*****************************************************************************
* 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>
*
......@@ -258,6 +258,12 @@ static void Run( intf_thread_t *p_intf )
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_popup),
"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 ),
"p_intf", p_intf );
......
......@@ -1249,17 +1249,17 @@
<widget>
<class>GtkMenuItem</class>
<name>audio1</name>
<name>popup_audio</name>
<label>Audio</label>
<right_justify>False</right_justify>
<widget>
<class>GtkMenu</class>
<name>audio1_menu</name>
<name>popup_audio_menu</name>
<widget>
<class>GtkMenuItem</class>
<name>popup_audio</name>
<name>popup_language</name>
<sensitive>False</sensitive>
<label>_Language</label>
<right_justify>False</right_justify>
......@@ -1331,13 +1331,13 @@
<widget>
<class>GtkMenuItem</class>
<name>video1</name>
<name>popup_video</name>
<label>Video</label>
<right_justify>False</right_justify>
<widget>
<class>GtkMenu</class>
<name>video1_menu</name>
<name>popup_video_menu</name>
<widget>
<class>GtkMenuItem</class>
......
......@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -72,11 +72,15 @@ void * E_(__GtkGetIntf)( GtkWidget * widget )
/* Otherwise, the parent widget has it */
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 */
widget = gtk_widget_get_toplevel( GTK_WIDGET( widget ) );
p_data = gtk_object_get_data( GTK_OBJECT( widget ), "p_intf" );
return p_data;
......
......@@ -1104,10 +1104,10 @@ create_intf_popup (void)
GtkWidget *separator27;
GtkWidget *popup_program;
GtkWidget *popup_navigation;
GtkWidget *audio1;
GtkWidget *audio1_menu;
GtkAccelGroup *audio1_menu_accels;
GtkWidget *popup_audio;
GtkWidget *popup_audio_menu;
GtkAccelGroup *popup_audio_menu_accels;
GtkWidget *popup_language;
GtkWidget *separator19;
GtkWidget *popup_volume_up;
GtkWidget *popup_volume_down;
......@@ -1115,9 +1115,9 @@ create_intf_popup (void)
GtkWidget *separator20;
GtkWidget *popup_audio_channels;
GtkWidget *popup_audio_device;
GtkWidget *video1;
GtkWidget *video1_menu;
GtkAccelGroup *video1_menu_accels;
GtkWidget *popup_video;
GtkWidget *popup_video_menu;
GtkAccelGroup *popup_video_menu_accels;
GtkWidget *popup_subpictures;
GtkWidget *separator21;
GtkWidget *popup_fullscreen;
......@@ -1257,38 +1257,38 @@ create_intf_popup (void)
gtk_container_add (GTK_CONTAINER (intf_popup), popup_navigation);
gtk_widget_set_sensitive (popup_navigation, FALSE);
audio1 = gtk_menu_item_new_with_label (_("Audio"));
gtk_widget_ref (audio1);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "audio1", audio1,
popup_audio = gtk_menu_item_new_with_label (_("Audio"));
gtk_widget_ref (popup_audio);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio", popup_audio,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (audio1);
gtk_container_add (GTK_CONTAINER (intf_popup), audio1);
gtk_widget_show (popup_audio);
gtk_container_add (GTK_CONTAINER (intf_popup), popup_audio);
audio1_menu = gtk_menu_new ();
gtk_widget_ref (audio1_menu);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "audio1_menu", audio1_menu,
popup_audio_menu = gtk_menu_new ();
gtk_widget_ref (popup_audio_menu);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_menu", popup_audio_menu,
(GtkDestroyNotify) gtk_widget_unref);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (audio1), audio1_menu);
audio1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (audio1_menu));
gtk_menu_item_set_submenu (GTK_MENU_ITEM (popup_audio), popup_audio_menu);
popup_audio_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (popup_audio_menu));
popup_audio = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_audio)->child),
popup_language = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_language)->child),
_("_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);
gtk_widget_ref (popup_audio);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio", popup_audio,
gtk_widget_ref (popup_language);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_language", popup_language,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (popup_audio);
gtk_container_add (GTK_CONTAINER (audio1_menu), popup_audio);
gtk_widget_set_sensitive (popup_audio, FALSE);
gtk_widget_show (popup_language);
gtk_container_add (GTK_CONTAINER (popup_audio_menu), popup_language);
gtk_widget_set_sensitive (popup_language, FALSE);
separator19 = gtk_menu_item_new ();
gtk_widget_ref (separator19);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator19", separator19,
(GtkDestroyNotify) gtk_widget_unref);
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);
popup_volume_up = gtk_menu_item_new_with_label (_("Volume Up"));
......@@ -1296,28 +1296,28 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_up", popup_volume_up,
(GtkDestroyNotify) gtk_widget_unref);
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"));
gtk_widget_ref (popup_volume_down);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_down", popup_volume_down,
(GtkDestroyNotify) gtk_widget_unref);
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"));
gtk_widget_ref (popup_volume_mute);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_volume_mute", popup_volume_mute,
(GtkDestroyNotify) gtk_widget_unref);
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 ();
gtk_widget_ref (separator20);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator20", separator20,
(GtkDestroyNotify) gtk_widget_unref);
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);
popup_audio_channels = gtk_menu_item_new_with_label (_("Channels"));
......@@ -1325,39 +1325,39 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_channels", popup_audio_channels,
(GtkDestroyNotify) gtk_widget_unref);
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"));
gtk_widget_ref (popup_audio_device);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_audio_device", popup_audio_device,
(GtkDestroyNotify) gtk_widget_unref);
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"));
gtk_widget_ref (video1);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "video1", video1,
popup_video = gtk_menu_item_new_with_label (_("Video"));
gtk_widget_ref (popup_video);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video", popup_video,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (video1);
gtk_container_add (GTK_CONTAINER (intf_popup), video1);
gtk_widget_show (popup_video);
gtk_container_add (GTK_CONTAINER (intf_popup), popup_video);
video1_menu = gtk_menu_new ();
gtk_widget_ref (video1_menu);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "video1_menu", video1_menu,
popup_video_menu = gtk_menu_new ();
gtk_widget_ref (popup_video_menu);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video_menu", popup_video_menu,
(GtkDestroyNotify) gtk_widget_unref);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (video1), video1_menu);
video1_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (video1_menu));
gtk_menu_item_set_submenu (GTK_MENU_ITEM (popup_video), popup_video_menu);
popup_video_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (popup_video_menu));
popup_subpictures = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_subpictures)->child),
_("_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);
gtk_widget_ref (popup_subpictures);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_subpictures", popup_subpictures,
(GtkDestroyNotify) gtk_widget_unref);
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);
separator21 = gtk_menu_item_new ();
......@@ -1365,26 +1365,26 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator21", separator21,
(GtkDestroyNotify) gtk_widget_unref);
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);
popup_fullscreen = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_fullscreen)->child),
_("_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);
gtk_widget_ref (popup_fullscreen);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_fullscreen", popup_fullscreen,
(GtkDestroyNotify) gtk_widget_unref);
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 ();
gtk_widget_ref (separator23);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "separator23", separator23,
(GtkDestroyNotify) gtk_widget_unref);
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);
popup_deinterlace = gtk_menu_item_new_with_label (_("Deinterlace"));
......@@ -1392,14 +1392,14 @@ create_intf_popup (void)
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_deinterlace", popup_deinterlace,
(GtkDestroyNotify) gtk_widget_unref);
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"));
gtk_widget_ref (popup_video_device);
gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_video_device", popup_video_device,
(GtkDestroyNotify) gtk_widget_unref);
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 ();
gtk_widget_ref (separator26);
......
......@@ -2,7 +2,7 @@
* menu.c : functions to handle menu items.
*****************************************************************************
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -113,7 +113,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf );
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 );
}
......@@ -1416,7 +1416,7 @@ gint GtkSetupMenus( intf_thread_t * p_intf )
p_intf->p_sys->p_window ), "menubar_audio" ) );
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;
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