mirror of
https://github.com/videolan/vlc.git
synced 2025-01-06 07:48:29 +08:00
* modules/gui/gtk/*: changed the disc open dialog to allow for title and
chapter 0. When title or chapter 0 are selected, they do not appear in the MRL.
This commit is contained in:
parent
abd941fea7
commit
e15a35bfd2
@ -1854,8 +1854,8 @@ http://www.videolan.org/
|
||||
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
|
||||
<snap>False</snap>
|
||||
<wrap>False</wrap>
|
||||
<value>1</value>
|
||||
<lower>1</lower>
|
||||
<value>0</value>
|
||||
<lower>0</lower>
|
||||
<upper>65536</upper>
|
||||
<step>1</step>
|
||||
<page>10</page>
|
||||
@ -2023,8 +2023,8 @@ http://www.videolan.org/
|
||||
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
|
||||
<snap>False</snap>
|
||||
<wrap>False</wrap>
|
||||
<value>1</value>
|
||||
<lower>1</lower>
|
||||
<value>0</value>
|
||||
<lower>0</lower>
|
||||
<upper>65536</upper>
|
||||
<step>1</step>
|
||||
<page>10</page>
|
||||
|
@ -1587,7 +1587,7 @@ create_intf_open (void)
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment (GTK_MISC (label20), 0, 0.5);
|
||||
|
||||
disc_chapter_adj = gtk_adjustment_new (1, 1, 65536, 1, 10, 10);
|
||||
disc_chapter_adj = gtk_adjustment_new (0, 0, 65536, 1, 10, 10);
|
||||
disc_chapter = gtk_spin_button_new (GTK_ADJUSTMENT (disc_chapter_adj), 1, 0);
|
||||
gtk_widget_ref (disc_chapter);
|
||||
gtk_object_set_data_full (GTK_OBJECT (intf_open), "disc_chapter", disc_chapter,
|
||||
@ -1649,7 +1649,7 @@ create_intf_open (void)
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
|
||||
disc_title_adj = gtk_adjustment_new (1, 1, 65536, 1, 10, 10);
|
||||
disc_title_adj = gtk_adjustment_new (0, 0, 65536, 1, 10, 10);
|
||||
disc_title = gtk_spin_button_new (GTK_ADJUSTMENT (disc_title_adj), 1, 0);
|
||||
gtk_widget_ref (disc_title);
|
||||
gtk_object_set_data_full (GTK_OBJECT (intf_open), "disc_title", disc_title,
|
||||
|
@ -2004,8 +2004,8 @@ http://www.videolan.org/</label>
|
||||
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
|
||||
<snap>False</snap>
|
||||
<wrap>False</wrap>
|
||||
<value>1</value>
|
||||
<lower>1</lower>
|
||||
<value>0</value>
|
||||
<lower>0</lower>
|
||||
<upper>65536</upper>
|
||||
<step>1</step>
|
||||
<page>10</page>
|
||||
@ -2173,8 +2173,8 @@ http://www.videolan.org/</label>
|
||||
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
|
||||
<snap>False</snap>
|
||||
<wrap>False</wrap>
|
||||
<value>1</value>
|
||||
<lower>1</lower>
|
||||
<value>0</value>
|
||||
<lower>0</lower>
|
||||
<upper>65536</upper>
|
||||
<step>1</step>
|
||||
<page>10</page>
|
||||
|
@ -1859,7 +1859,7 @@ create_intf_open (void)
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
gtk_misc_set_alignment (GTK_MISC (label20), 0, 0.5);
|
||||
|
||||
disc_chapter_adj = gtk_adjustment_new (1, 1, 65536, 1, 10, 10);
|
||||
disc_chapter_adj = gtk_adjustment_new (0, 0, 65536, 1, 10, 10);
|
||||
disc_chapter = gtk_spin_button_new (GTK_ADJUSTMENT (disc_chapter_adj), 1, 0);
|
||||
gtk_widget_ref (disc_chapter);
|
||||
gtk_object_set_data_full (GTK_OBJECT (intf_open), "disc_chapter", disc_chapter,
|
||||
@ -1921,7 +1921,7 @@ create_intf_open (void)
|
||||
(GtkAttachOptions) (GTK_FILL),
|
||||
(GtkAttachOptions) (0), 0, 0);
|
||||
|
||||
disc_title_adj = gtk_adjustment_new (1, 1, 65536, 1, 10, 10);
|
||||
disc_title_adj = gtk_adjustment_new (0, 0, 65536, 1, 10, 10);
|
||||
disc_title = gtk_spin_button_new (GTK_ADJUSTMENT (disc_title_adj), 1, 0);
|
||||
gtk_widget_ref (disc_title);
|
||||
gtk_object_set_data_full (GTK_OBJECT (intf_open), "disc_title", disc_title,
|
||||
|
@ -2,7 +2,7 @@
|
||||
* gtk_open.c : functions to handle file/disc/network open widgets.
|
||||
*****************************************************************************
|
||||
* Copyright (C) 2000, 2001 VideoLAN
|
||||
* $Id: open.c,v 1.11 2003/01/26 14:49:09 fenrir Exp $
|
||||
* $Id: open.c,v 1.12 2003/01/29 17:28:22 gbazin Exp $
|
||||
*
|
||||
* Authors: Samuel Hocevar <sam@zoy.org>
|
||||
* Stéphane Borel <stef@via.ecp.fr>
|
||||
@ -177,6 +177,7 @@ void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data )
|
||||
static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
|
||||
{
|
||||
GString * p_target = g_string_new( "" );
|
||||
int i_title, i_chapter;
|
||||
|
||||
if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
|
||||
"disc_dvd" ) )->active )
|
||||
@ -199,13 +200,25 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
|
||||
g_string_append( p_target,
|
||||
gtk_entry_get_text( GTK_ENTRY( lookup_widget(
|
||||
GTK_WIDGET(button), "disc_name" ) ) ) );
|
||||
g_string_sprintfa( p_target, "@%i,%i",
|
||||
gtk_spin_button_get_value_as_int(
|
||||
GTK_SPIN_BUTTON( lookup_widget(
|
||||
GTK_WIDGET(button), "disc_title" ) ) ),
|
||||
gtk_spin_button_get_value_as_int(
|
||||
GTK_SPIN_BUTTON( lookup_widget(
|
||||
GTK_WIDGET(button), "disc_chapter" ) ) ) );
|
||||
|
||||
i_title = gtk_spin_button_get_value_as_int(
|
||||
GTK_SPIN_BUTTON( lookup_widget( GTK_WIDGET(button),
|
||||
"disc_title" ) ) );
|
||||
i_chapter = gtk_spin_button_get_value_as_int(
|
||||
GTK_SPIN_BUTTON( lookup_widget( GTK_WIDGET(button),
|
||||
"disc_chapter" ) ) );
|
||||
if( i_title )
|
||||
{
|
||||
if( i_chapter )
|
||||
g_string_sprintfa( p_target, "@%i,%i", i_title, i_chapter );
|
||||
else
|
||||
g_string_sprintfa( p_target, "@%i", i_title );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( i_chapter )
|
||||
g_string_sprintfa( p_target, "@,%i", i_chapter );
|
||||
}
|
||||
|
||||
gtk_entry_set_text( GTK_ENTRY( lookup_widget(
|
||||
GTK_WIDGET(button), "entry_open" ) ),
|
||||
|
Loading…
Reference in New Issue
Block a user