Commit 0a8f461f authored by Laurent Aimar's avatar Laurent Aimar

* added "use DVD menu" choice.

parent 28ad4a41
...@@ -1961,6 +1961,25 @@ http://www.videolan.org/ ...@@ -1961,6 +1961,25 @@ http://www.videolan.org/
<fill>False</fill> <fill>False</fill>
</child> </child>
</widget> </widget>
<widget>
<class>GtkCheckButton</class>
<name>disc_dvd_use_menu</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkOpenChanged</handler>
<last_modification_time>Tue, 21 Jan 2003 13:39:20 GMT</last_modification_time>
</signal>
<label>Use DVD menus</label>
<active>True</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget> </widget>
<widget> <widget>
...@@ -2088,7 +2107,7 @@ http://www.videolan.org/ ...@@ -2088,7 +2107,7 @@ http://www.videolan.org/
<handler>GtkNetworkOpenUDP</handler> <handler>GtkNetworkOpenUDP</handler>
<last_modification_time>Thu, 16 May 2002 00:47:18 GMT</last_modification_time> <last_modification_time>Thu, 16 May 2002 00:47:18 GMT</last_modification_time>
</signal> </signal>
<label>UDP</label> <label>UDP/RTP</label>
<active>False</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<child> <child>
...@@ -2116,7 +2135,7 @@ http://www.videolan.org/ ...@@ -2116,7 +2135,7 @@ http://www.videolan.org/
<handler>GtkNetworkOpenMulticast</handler> <handler>GtkNetworkOpenMulticast</handler>
<last_modification_time>Thu, 16 May 2002 00:47:05 GMT</last_modification_time> <last_modification_time>Thu, 16 May 2002 00:47:05 GMT</last_modification_time>
</signal> </signal>
<label>UDP Multicast</label> <label>UDP/RTP Multicast</label>
<active>False</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<child> <child>
...@@ -2172,7 +2191,7 @@ http://www.videolan.org/ ...@@ -2172,7 +2191,7 @@ http://www.videolan.org/
<handler>GtkNetworkOpenHTTP</handler> <handler>GtkNetworkOpenHTTP</handler>
<last_modification_time>Thu, 16 May 2002 00:47:42 GMT</last_modification_time> <last_modification_time>Thu, 16 May 2002 00:47:42 GMT</last_modification_time>
</signal> </signal>
<label>HTTP</label> <label>HTTP/FTP/MMS</label>
<active>False</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<child> <child>
......
/***************************************************************************** /*****************************************************************************
* This file is not used: everything is in gtk_callbacks.c * This file is not used: everything is in gtk_callbacks.c
*****************************************************************************/ *****************************************************************************/
void
GtkFileShow (GtkButton *button,
gpointer user_data)
{
}
void
GtkOpenChanged (GtkEditable *editable,
gpointer user_data)
{
}
void
GtkOpenSubtitleShow (GtkButton *button,
gpointer user_data)
{
}
...@@ -3,6 +3,3 @@ ...@@ -3,6 +3,3 @@
*****************************************************************************/ *****************************************************************************/
#include "gtk_callbacks.h" #include "gtk_callbacks.h"
void
GtkOpenSubtitleShow (GtkButton *button,
gpointer user_data);
...@@ -1374,6 +1374,7 @@ create_intf_open (void) ...@@ -1374,6 +1374,7 @@ create_intf_open (void)
GSList *disc_group = NULL; GSList *disc_group = NULL;
GtkWidget *disc_dvd; GtkWidget *disc_dvd;
GtkWidget *disc_vcd; GtkWidget *disc_vcd;
GtkWidget *disc_dvd_use_menu;
GtkWidget *label19; GtkWidget *label19;
GtkObject *disc_title_adj; GtkObject *disc_title_adj;
GtkWidget *disc_title; GtkWidget *disc_title;
...@@ -1628,6 +1629,14 @@ create_intf_open (void) ...@@ -1628,6 +1629,14 @@ create_intf_open (void)
gtk_widget_show (disc_vcd); gtk_widget_show (disc_vcd);
gtk_box_pack_start (GTK_BOX (hbox24), disc_vcd, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox24), disc_vcd, FALSE, FALSE, 0);
disc_dvd_use_menu = gtk_check_button_new_with_label (_("Use DVD menus"));
gtk_widget_ref (disc_dvd_use_menu);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "disc_dvd_use_menu", disc_dvd_use_menu,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (disc_dvd_use_menu);
gtk_box_pack_start (GTK_BOX (hbox24), disc_dvd_use_menu, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (disc_dvd_use_menu), TRUE);
label19 = gtk_label_new (_("Device name")); label19 = gtk_label_new (_("Device name"));
gtk_widget_ref (label19); gtk_widget_ref (label19);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "label19", label19, gtk_object_set_data_full (GTK_OBJECT (intf_open), "label19", label19,
...@@ -1674,7 +1683,7 @@ create_intf_open (void) ...@@ -1674,7 +1683,7 @@ create_intf_open (void)
gtk_table_set_row_spacings (GTK_TABLE (table4), 5); gtk_table_set_row_spacings (GTK_TABLE (table4), 5);
gtk_table_set_col_spacings (GTK_TABLE (table4), 5); gtk_table_set_col_spacings (GTK_TABLE (table4), 5);
network_udp = gtk_radio_button_new_with_label (table4_group, _("UDP")); network_udp = gtk_radio_button_new_with_label (table4_group, _("UDP/RTP"));
table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_udp)); table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_udp));
gtk_widget_ref (network_udp); gtk_widget_ref (network_udp);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_udp", network_udp, gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_udp", network_udp,
...@@ -1684,7 +1693,7 @@ create_intf_open (void) ...@@ -1684,7 +1693,7 @@ create_intf_open (void)
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
network_multicast = gtk_radio_button_new_with_label (table4_group, _("UDP Multicast")); network_multicast = gtk_radio_button_new_with_label (table4_group, _("UDP/RTP Multicast"));
table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_multicast)); table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_multicast));
gtk_widget_ref (network_multicast); gtk_widget_ref (network_multicast);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_multicast", network_multicast, gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_multicast", network_multicast,
...@@ -1704,7 +1713,7 @@ create_intf_open (void) ...@@ -1704,7 +1713,7 @@ create_intf_open (void)
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
network_http = gtk_radio_button_new_with_label (table4_group, _("HTTP")); network_http = gtk_radio_button_new_with_label (table4_group, _("HTTP/FTP/MMS"));
table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_http)); table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_http));
gtk_widget_ref (network_http); gtk_widget_ref (network_http);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_http", network_http, gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_http", network_http,
...@@ -2101,6 +2110,9 @@ create_intf_open (void) ...@@ -2101,6 +2110,9 @@ create_intf_open (void)
gtk_signal_connect (GTK_OBJECT (disc_vcd), "toggled", gtk_signal_connect (GTK_OBJECT (disc_vcd), "toggled",
GTK_SIGNAL_FUNC (GtkDiscOpenVcd), GTK_SIGNAL_FUNC (GtkDiscOpenVcd),
NULL); NULL);
gtk_signal_connect (GTK_OBJECT (disc_dvd_use_menu), "toggled",
GTK_SIGNAL_FUNC (GtkOpenChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (disc_title), "changed", gtk_signal_connect (GTK_OBJECT (disc_title), "changed",
GTK_SIGNAL_FUNC (GtkOpenChanged), GTK_SIGNAL_FUNC (GtkOpenChanged),
NULL); NULL);
......
...@@ -2111,6 +2111,25 @@ http://www.videolan.org/</label> ...@@ -2111,6 +2111,25 @@ http://www.videolan.org/</label>
<fill>False</fill> <fill>False</fill>
</child> </child>
</widget> </widget>
<widget>
<class>GtkCheckButton</class>
<name>disc_dvd_use_menu</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkOpenChanged</handler>
<last_modification_time>Tue, 21 Jan 2003 13:27:40 GMT</last_modification_time>
</signal>
<label>Use DVD menus</label>
<active>True</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget> </widget>
<widget> <widget>
...@@ -2238,7 +2257,7 @@ http://www.videolan.org/</label> ...@@ -2238,7 +2257,7 @@ http://www.videolan.org/</label>
<handler>GtkNetworkOpenUDP</handler> <handler>GtkNetworkOpenUDP</handler>
<last_modification_time>Thu, 16 May 2002 00:47:18 GMT</last_modification_time> <last_modification_time>Thu, 16 May 2002 00:47:18 GMT</last_modification_time>
</signal> </signal>
<label>UDP</label> <label>UDP/RTP</label>
<active>False</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<child> <child>
...@@ -2266,7 +2285,7 @@ http://www.videolan.org/</label> ...@@ -2266,7 +2285,7 @@ http://www.videolan.org/</label>
<handler>GtkNetworkOpenMulticast</handler> <handler>GtkNetworkOpenMulticast</handler>
<last_modification_time>Thu, 16 May 2002 00:47:05 GMT</last_modification_time> <last_modification_time>Thu, 16 May 2002 00:47:05 GMT</last_modification_time>
</signal> </signal>
<label>UDP Multicast</label> <label>UDP/RTP Multicast</label>
<active>False</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<child> <child>
...@@ -2322,7 +2341,7 @@ http://www.videolan.org/</label> ...@@ -2322,7 +2341,7 @@ http://www.videolan.org/</label>
<handler>GtkNetworkOpenHTTP</handler> <handler>GtkNetworkOpenHTTP</handler>
<last_modification_time>Thu, 16 May 2002 00:47:42 GMT</last_modification_time> <last_modification_time>Thu, 16 May 2002 00:47:42 GMT</last_modification_time>
</signal> </signal>
<label>HTTP</label> <label>HTTP/FTP/MMS</label>
<active>False</active> <active>False</active>
<draw_indicator>True</draw_indicator> <draw_indicator>True</draw_indicator>
<child> <child>
......
...@@ -1638,6 +1638,7 @@ create_intf_open (void) ...@@ -1638,6 +1638,7 @@ create_intf_open (void)
GSList *disc_group = NULL; GSList *disc_group = NULL;
GtkWidget *disc_dvd; GtkWidget *disc_dvd;
GtkWidget *disc_vcd; GtkWidget *disc_vcd;
GtkWidget *disc_dvd_use_menu;
GtkWidget *label19; GtkWidget *label19;
GtkObject *disc_title_adj; GtkObject *disc_title_adj;
GtkWidget *disc_title; GtkWidget *disc_title;
...@@ -1896,6 +1897,14 @@ create_intf_open (void) ...@@ -1896,6 +1897,14 @@ create_intf_open (void)
gtk_widget_show (disc_vcd); gtk_widget_show (disc_vcd);
gtk_box_pack_start (GTK_BOX (hbox24), disc_vcd, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox24), disc_vcd, FALSE, FALSE, 0);
disc_dvd_use_menu = gtk_check_button_new_with_label (_("Use DVD menus"));
gtk_widget_ref (disc_dvd_use_menu);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "disc_dvd_use_menu", disc_dvd_use_menu,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (disc_dvd_use_menu);
gtk_box_pack_start (GTK_BOX (hbox24), disc_dvd_use_menu, FALSE, FALSE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (disc_dvd_use_menu), TRUE);
label19 = gtk_label_new (_("Device name")); label19 = gtk_label_new (_("Device name"));
gtk_widget_ref (label19); gtk_widget_ref (label19);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "label19", label19, gtk_object_set_data_full (GTK_OBJECT (intf_open), "label19", label19,
...@@ -1942,7 +1951,7 @@ create_intf_open (void) ...@@ -1942,7 +1951,7 @@ create_intf_open (void)
gtk_table_set_row_spacings (GTK_TABLE (table4), 5); gtk_table_set_row_spacings (GTK_TABLE (table4), 5);
gtk_table_set_col_spacings (GTK_TABLE (table4), 5); gtk_table_set_col_spacings (GTK_TABLE (table4), 5);
network_udp = gtk_radio_button_new_with_label (table4_group, _("UDP")); network_udp = gtk_radio_button_new_with_label (table4_group, _("UDP/RTP"));
table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_udp)); table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_udp));
gtk_widget_ref (network_udp); gtk_widget_ref (network_udp);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_udp", network_udp, gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_udp", network_udp,
...@@ -1952,7 +1961,7 @@ create_intf_open (void) ...@@ -1952,7 +1961,7 @@ create_intf_open (void)
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
network_multicast = gtk_radio_button_new_with_label (table4_group, _("UDP Multicast")); network_multicast = gtk_radio_button_new_with_label (table4_group, _("UDP/RTP Multicast"));
table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_multicast)); table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_multicast));
gtk_widget_ref (network_multicast); gtk_widget_ref (network_multicast);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_multicast", network_multicast, gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_multicast", network_multicast,
...@@ -1972,7 +1981,7 @@ create_intf_open (void) ...@@ -1972,7 +1981,7 @@ create_intf_open (void)
(GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0); (GtkAttachOptions) (0), 0, 0);
network_http = gtk_radio_button_new_with_label (table4_group, _("HTTP")); network_http = gtk_radio_button_new_with_label (table4_group, _("HTTP/FTP/MMS"));
table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_http)); table4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (network_http));
gtk_widget_ref (network_http); gtk_widget_ref (network_http);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_http", network_http, gtk_object_set_data_full (GTK_OBJECT (intf_open), "network_http", network_http,
...@@ -2386,6 +2395,9 @@ create_intf_open (void) ...@@ -2386,6 +2395,9 @@ create_intf_open (void)
gtk_signal_connect (GTK_OBJECT (disc_vcd), "toggled", gtk_signal_connect (GTK_OBJECT (disc_vcd), "toggled",
GTK_SIGNAL_FUNC (GtkDiscOpenVcd), GTK_SIGNAL_FUNC (GtkDiscOpenVcd),
NULL); NULL);
gtk_signal_connect (GTK_OBJECT (disc_dvd_use_menu), "toggled",
GTK_SIGNAL_FUNC (GtkOpenChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (disc_title), "changed", gtk_signal_connect (GTK_OBJECT (disc_title), "changed",
GTK_SIGNAL_FUNC (GtkOpenChanged), GTK_SIGNAL_FUNC (GtkOpenChanged),
NULL); NULL);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_open.c : functions to handle file/disc/network open widgets. * gtk_open.c : functions to handle file/disc/network open widgets.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: open.c,v 1.9 2003/01/21 12:36:11 fenrir Exp $ * $Id: open.c,v 1.10 2003/01/21 17:00:41 fenrir 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>
...@@ -146,11 +146,17 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data ) ...@@ -146,11 +146,17 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
if( togglebutton->active if( togglebutton->active
&& (psz_device = config_GetPsz( p_intf, "dvd" )) ) && (psz_device = config_GetPsz( p_intf, "dvd" )) )
{ {
gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "disc_dvd_use_menu" ) ) , TRUE);
gtk_entry_set_text( gtk_entry_set_text(
GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton), GTK_ENTRY( lookup_widget( GTK_WIDGET(togglebutton),
"disc_name" ) ), psz_device ); "disc_name" ) ), psz_device );
free( psz_device ); free( psz_device );
} }
else
{
gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "disc_dvd_use_menu" ) ), FALSE );
}
} }
void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data ) void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data )
...@@ -175,7 +181,14 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data ) ...@@ -175,7 +181,14 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
"disc_dvd" ) )->active ) "disc_dvd" ) )->active )
{ {
g_string_append( p_target, "dvd://" ); if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), "disc_dvd_use_menu" ) )->active )
{
g_string_append( p_target, "dvd://" );
}
else
{
g_string_append( p_target, "dvdold://" );
}
} }
else if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), else if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
"disc_vcd" ) )->active ) "disc_vcd" ) )->active )
...@@ -580,7 +593,6 @@ void GtkOpenOk( GtkButton * button, gpointer user_data ) ...@@ -580,7 +593,6 @@ void GtkOpenOk( GtkButton * button, gpointer user_data )
delay = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( lookup_widget( GTK_WIDGET(button), "subtitle_delay" ) ) ); delay = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( lookup_widget( GTK_WIDGET(button), "subtitle_delay" ) ) );
fps = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( lookup_widget( GTK_WIDGET(button), "subtitle_fps" ) ) ); fps = gtk_spin_button_get_value_as_float( GTK_SPIN_BUTTON( lookup_widget( GTK_WIDGET(button), "subtitle_fps" ) ) );
msg_Warn( p_intf, "%s - %f, %f", psz_subtitle, delay, fps);
config_PutPsz( p_intf, "sub-file", psz_subtitle ); config_PutPsz( p_intf, "sub-file", psz_subtitle );
config_PutInt( p_intf, "sub-delay", (int)( delay * 10 ) ); config_PutInt( p_intf, "sub-delay", (int)( delay * 10 ) );
config_PutFloat( p_intf, "sub-fps", fps ); config_PutFloat( p_intf, "sub-fps", fps );
......
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