Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
d5f41845
Commit
d5f41845
authored
Dec 12, 2003
by
Rocky Bernstein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make MRL's more regular across GUIs fix plugin names, and add CD-DA to list.
parent
eff9d25c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
229 additions
and
60 deletions
+229
-60
modules/gui/gtk/gnome.glade
modules/gui/gtk/gnome.glade
+23
-3
modules/gui/gtk/gnome_callbacks.c
modules/gui/gtk/gnome_callbacks.c
+8
-0
modules/gui/gtk/gnome_callbacks.h
modules/gui/gtk/gnome_callbacks.h
+4
-0
modules/gui/gtk/gnome_interface.c
modules/gui/gtk/gnome_interface.c
+33
-17
modules/gui/gtk/gtk_callbacks.c
modules/gui/gtk/gtk_callbacks.c
+37
-11
modules/gui/gtk/gtk_interface.c
modules/gui/gtk/gtk_interface.c
+15
-3
modules/gui/gtk/open.c
modules/gui/gtk/open.c
+107
-25
modules/gui/gtk/open.h
modules/gui/gtk/open.h
+2
-1
No files found.
modules/gui/gtk/gnome.glade
View file @
d5f41845
...
...
@@ -101,7 +101,7 @@
<widget>
<class>
GtkPixmapMenuItem
</class>
<name>
menubar_disc
</name>
<tooltip>
Open
a DVD or VCD
</tooltip>
<tooltip>
Open
Disc Media
</tooltip>
<signal>
<name>
activate
</name>
<handler>
GtkDiscOpenShow
</handler>
...
...
@@ -511,7 +511,7 @@
<class>
GtkButton
</class>
<child_name>
Toolbar:button
</child_name>
<name>
toolbar_disc
</name>
<tooltip>
Open
a DVD or VCD
</tooltip>
<tooltip>
Open
Disc Media
</tooltip>
<signal>
<name>
clicked
</name>
<handler>
GtkDiscOpenShow
</handler>
...
...
@@ -1851,6 +1851,26 @@ http://www.videolan.org/
<fill>
False
</fill>
</child>
</widget>
<widget>
<class>
GtkRadioButton
</class>
<name>
disc_cdda
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
toggled
</name>
<handler>
GtkDiscOpenCDDA
</handler>
<last_modification_time>
Fri, 12 Dec 2003 01:00:17 GMT
</last_modification_time>
</signal>
<label>
Audio CD
</label>
<active>
False
</active>
<draw_indicator>
True
</draw_indicator>
<group>
disc
</group>
<child>
<padding>
0
</padding>
<expand>
False
</expand>
<fill>
False
</fill>
</child>
</widget>
</widget>
<widget>
...
...
@@ -2004,7 +2024,7 @@ http://www.videolan.org/
<snap>
False
</snap>
<wrap>
False
</wrap>
<value>
1
</value>
<lower>
1
</lower>
<lower>
0
</lower>
<upper>
65536
</upper>
<step>
1
</step>
<page>
10
</page>
...
...
modules/gui/gtk/gnome_callbacks.c
View file @
d5f41845
/*****************************************************************************
* This file is not used: everything is in gtk_callbacks.c
*****************************************************************************/
void
GtkDiscOpenCDDA
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
)
{
}
modules/gui/gtk/gnome_callbacks.h
View file @
d5f41845
...
...
@@ -2,3 +2,7 @@
* This file is not needed: everything is in gtk_callbacks.h
*****************************************************************************/
#include "gtk_callbacks.h"
void
GtkDiscOpenCDDA
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
);
modules/gui/gtk/gnome_interface.c
View file @
d5f41845
/* This file was created automatically by glade and fixed by bootstrap */
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#include <vlc/vlc.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
...
...
@@ -24,7 +28,7 @@ static GnomeUIInfo menubar_file_menu_uiinfo[] =
},
{
GNOME_APP_UI_ITEM
,
N_
(
"Open _Disc..."
),
N_
(
"Open
a DVD or VCD
"
),
N_
(
"Open
Disc Media
"
),
(
gpointer
)
GtkDiscOpenShow
,
NULL
,
NULL
,
GNOME_APP_PIXMAP_STOCK
,
GNOME_STOCK_MENU_CDROM
,
0
,
(
GdkModifierType
)
0
,
NULL
...
...
@@ -513,7 +517,7 @@ create_intf_window (void)
GTK_TOOLBAR_CHILD_BUTTON
,
NULL
,
_
(
"Disc"
),
_
(
"Open
a DVD or VCD
"
),
NULL
,
_
(
"Open
Disc Media
"
),
NULL
,
tmp_toolbar_icon
,
NULL
,
NULL
);
gtk_widget_ref
(
toolbar_disc
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_window
),
"toolbar_disc"
,
toolbar_disc
,
...
...
@@ -679,7 +683,7 @@ create_intf_window (void)
gtk_widget_show
(
vbox8
);
gnome_app_set_contents
(
GNOME_APP
(
intf_window
),
vbox8
);
slider_frame
=
gtk_frame_new
(
"-:--:--"
);
slider_frame
=
gtk_frame_new
(
_
(
"-:--:--"
)
);
gtk_widget_ref
(
slider_frame
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_window
),
"slider_frame"
,
slider_frame
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
...
...
@@ -736,7 +740,7 @@ create_intf_window (void)
gtk_widget_show
(
label19
);
gtk_box_pack_start
(
GTK_BOX
(
title_chapter_box
),
label19
,
FALSE
,
FALSE
,
0
);
title_label
=
gtk_label_new
(
"--"
);
title_label
=
gtk_label_new
(
_
(
"--"
)
);
gtk_widget_ref
(
title_label
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_window
),
"title_label"
,
title_label
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
...
...
@@ -779,7 +783,7 @@ create_intf_window (void)
gtk_widget_show
(
label20
);
gtk_box_pack_start
(
GTK_BOX
(
dvd_chapter_box
),
label20
,
FALSE
,
FALSE
,
0
);
chapter_label
=
gtk_label_new
(
"---"
);
chapter_label
=
gtk_label_new
(
_
(
"---"
)
);
gtk_widget_ref
(
chapter_label
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_window
),
"chapter_label"
,
chapter_label
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
...
...
@@ -990,7 +994,7 @@ static GnomeUIInfo popup_file_menu_uiinfo[] =
},
{
GNOME_APP_UI_ITEM
,
N_
(
"Open _Disc..."
),
N_
(
"Open
a DVD or VCD
"
),
N_
(
"Open
Disc Media
"
),
(
gpointer
)
GtkDiscOpenShow
,
NULL
,
NULL
,
GNOME_APP_PIXMAP_STOCK
,
GNOME_STOCK_MENU_CDROM
,
0
,
(
GdkModifierType
)
0
,
NULL
...
...
@@ -1393,6 +1397,7 @@ create_intf_open (void)
GSList
*
disc_group
=
NULL
;
GtkWidget
*
disc_dvd
;
GtkWidget
*
disc_vcd
;
GtkWidget
*
disc_cdda
;
GtkWidget
*
label19
;
GtkWidget
*
disc_name
;
GtkWidget
*
disc_chapter_label
;
...
...
@@ -1618,6 +1623,14 @@ create_intf_open (void)
gtk_widget_show
(
disc_vcd
);
gtk_box_pack_start
(
GTK_BOX
(
hbox24
),
disc_vcd
,
FALSE
,
FALSE
,
0
);
disc_cdda
=
gtk_radio_button_new_with_label
(
disc_group
,
_
(
"Audio CD"
));
disc_group
=
gtk_radio_button_group
(
GTK_RADIO_BUTTON
(
disc_cdda
));
gtk_widget_ref
(
disc_cdda
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"disc_cdda"
,
disc_cdda
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
disc_cdda
);
gtk_box_pack_start
(
GTK_BOX
(
hbox24
),
disc_cdda
,
FALSE
,
FALSE
,
0
);
label19
=
gtk_label_new
(
_
(
"Device name"
));
gtk_widget_ref
(
label19
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"label19"
,
label19
,
...
...
@@ -1635,7 +1648,7 @@ create_intf_open (void)
gtk_table_attach
(
GTK_TABLE
(
table5
),
disc_name
,
1
,
2
,
1
,
2
,
(
GtkAttachOptions
)
(
GTK_FILL
),
(
GtkAttachOptions
)
(
0
),
0
,
0
);
gtk_entry_set_text
(
GTK_ENTRY
(
disc_name
),
"/dev/dvd"
);
gtk_entry_set_text
(
GTK_ENTRY
(
disc_name
),
_
(
"/dev/dvd"
)
);
disc_chapter_label
=
gtk_label_new
(
_
(
"Chapter"
));
gtk_widget_ref
(
disc_chapter_label
);
...
...
@@ -1667,7 +1680,7 @@ create_intf_open (void)
(
GtkAttachOptions
)
(
0
),
0
,
0
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
disc_dvd_use_menu
),
TRUE
);
disc_title_adj
=
gtk_adjustment_new
(
1
,
1
,
65536
,
1
,
10
,
10
);
disc_title_adj
=
gtk_adjustment_new
(
1
,
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
,
...
...
@@ -1937,12 +1950,12 @@ create_intf_open (void)
gtk_table_attach
(
GTK_TABLE
(
table3
),
sat_fec
,
1
,
2
,
3
,
4
,
(
GtkAttachOptions
)
(
GTK_FILL
),
(
GtkAttachOptions
)
(
0
),
0
,
0
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
"1/2"
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
"2/3"
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
"3/4"
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
"4/5"
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
"5/6"
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
"7/8"
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
_
(
"1/2"
)
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
_
(
"2/3"
)
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
_
(
"3/4"
)
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
_
(
"4/5"
)
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
_
(
"5/6"
)
);
sat_fec_items
=
g_list_append
(
sat_fec_items
,
(
gpointer
)
_
(
"7/8"
)
);
gtk_combo_set_popdown_strings
(
GTK_COMBO
(
sat_fec
),
sat_fec_items
);
g_list_free
(
sat_fec_items
);
...
...
@@ -1951,7 +1964,7 @@ create_intf_open (void)
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"combo_entry1"
,
combo_entry1
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
combo_entry1
);
gtk_entry_set_text
(
GTK_ENTRY
(
combo_entry1
),
"3/4"
);
gtk_entry_set_text
(
GTK_ENTRY
(
combo_entry1
),
_
(
"3/4"
)
);
open_sat
=
gtk_label_new
(
_
(
"Satellite"
));
gtk_widget_ref
(
open_sat
);
...
...
@@ -2090,6 +2103,9 @@ create_intf_open (void)
gtk_signal_connect
(
GTK_OBJECT
(
disc_vcd
),
"toggled"
,
GTK_SIGNAL_FUNC
(
GtkDiscOpenVcd
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
disc_cdda
),
"toggled"
,
GTK_SIGNAL_FUNC
(
GtkDiscOpenCDDA
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
disc_name
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
...
...
modules/gui/gtk/gtk_callbacks.c
View file @
d5f41845
/*****************************************************************************
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.c,v 1.1
4 2003/05/05 16:09:39 gbazin
Exp $
* Copyright (C) 2000, 2001
, 2003
VideoLAN
* $Id: gtk_callbacks.c,v 1.1
5 2003/12/12 03:01:12 rocky
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -46,6 +46,18 @@
#include "common.h"
#ifdef HAVE_CDDAX
#define CDDA_MRL "cddax://"
#else
#define CDDA_MRL "cdda://"
#endif
#ifdef HAVE_VCDX
#define VCD_MRL "vcdx://"
#else
#define VCD_MRL "vcdx://"
#endif
/*****************************************************************************
* Useful function to retrieve p_intf
****************************************************************************/
...
...
@@ -447,31 +459,45 @@ gboolean GtkDiscEject ( GtkWidget *widget, gpointer user_data )
if
(
psz_current
!=
NULL
)
{
if
(
!
strncmp
(
psz_current
,
"dvd:"
,
4
)
)
if
(
!
strncmp
(
psz_current
,
"dvd:
//
"
,
4
)
)
{
switch
(
psz_current
[
4
]
)
switch
(
psz_current
[
strlen
(
"dvd://"
)
]
)
{
case
'\0'
:
case
'@'
:
psz_device
=
config_GetPsz
(
p_intf
,
"dvd"
);
break
;
default:
/* Omit the first 4 characters */
psz_device
=
strdup
(
psz_current
+
4
);
/* Omit the first MRL-selector characters */
psz_device
=
strdup
(
psz_current
+
strlen
(
"dvd://"
)
);
break
;
}
}
else
if
(
!
strncmp
(
psz_current
,
"vcd:"
,
strlen
(
"vcd:"
))
)
{
switch
(
psz_current
[
strlen
(
"vcd:"
)]
)
{
case
'\0'
:
case
'@'
:
psz_device
=
config_GetPsz
(
p_intf
,
VCD_MRL
);
break
;
default:
/* Omit the beginning MRL-selector characters */
psz_device
=
strdup
(
psz_current
+
strlen
(
VCD_MRL
)
);
break
;
}
}
else
if
(
!
strncmp
(
psz_current
,
"vcd:"
,
4
)
)
else
if
(
!
strncmp
(
psz_current
,
CDDA_MRL
,
strlen
(
CDDA_MRL
)
)
)
{
switch
(
psz_current
[
4
]
)
switch
(
psz_current
[
strlen
(
CDDA_MRL
)
]
)
{
case
'\0'
:
case
'@'
:
psz_device
=
config_GetPsz
(
p_intf
,
"
vcd
"
);
psz_device
=
config_GetPsz
(
p_intf
,
"
cd-audio
"
);
break
;
default:
/* Omit the
first 4
characters */
psz_device
=
strdup
(
psz_current
+
4
);
/* Omit the
beginning MRL-selector
characters */
psz_device
=
strdup
(
psz_current
+
strlen
(
CDDA_MRL
)
);
break
;
}
}
...
...
modules/gui/gtk/gtk_interface.c
View file @
d5f41845
...
...
@@ -627,7 +627,7 @@ create_intf_window (void)
GTK_TOOLBAR_CHILD_BUTTON
,
NULL
,
_
(
"Disc"
),
_
(
"Open
a DVD or VCD
"
),
NULL
,
_
(
"Open
Disc Media
"
),
NULL
,
NULL
,
NULL
,
NULL
);
gtk_widget_ref
(
toolbar_disc
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_window
),
"toolbar_disc"
,
toolbar_disc
,
...
...
@@ -1408,7 +1408,7 @@ create_intf_popup (void)
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
popup_disc
);
gtk_container_add
(
GTK_CONTAINER
(
popup_open_menu
),
popup_disc
);
gtk_tooltips_set_tip
(
tooltips
,
popup_disc
,
_
(
"Open
a DVD or VCD
"
),
NULL
);
gtk_tooltips_set_tip
(
tooltips
,
popup_disc
,
_
(
"Open
Disc Media
"
),
NULL
);
popup_network
=
gtk_menu_item_new_with_label
(
""
);
tmp_key
=
gtk_label_parse_uline
(
GTK_LABEL
(
GTK_BIN
(
popup_network
)
->
child
),
...
...
@@ -1700,6 +1700,7 @@ create_intf_open (void)
GSList
*
disc_group
=
NULL
;
GtkWidget
*
disc_dvd
;
GtkWidget
*
disc_vcd
;
GtkWidget
*
disc_cdda
;
GtkWidget
*
label19
;
GtkWidget
*
disc_chapter_label
;
GtkWidget
*
disc_title_label
;
...
...
@@ -1913,7 +1914,7 @@ create_intf_open (void)
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"hbox24"
,
hbox24
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
hbox24
);
gtk_table_attach
(
GTK_TABLE
(
table5
),
hbox24
,
1
,
2
,
0
,
1
,
gtk_table_attach
(
GTK_TABLE
(
table5
),
hbox24
,
1
,
3
,
0
,
1
,
(
GtkAttachOptions
)
(
GTK_FILL
),
(
GtkAttachOptions
)
(
GTK_FILL
),
0
,
0
);
...
...
@@ -1933,6 +1934,14 @@ create_intf_open (void)
gtk_widget_show
(
disc_vcd
);
gtk_box_pack_start
(
GTK_BOX
(
hbox24
),
disc_vcd
,
FALSE
,
FALSE
,
0
);
disc_cdda
=
gtk_radio_button_new_with_label
(
disc_group
,
_
(
"Audio CD"
));
disc_group
=
gtk_radio_button_group
(
GTK_RADIO_BUTTON
(
disc_cdda
));
gtk_widget_ref
(
disc_cdda
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"disc_cdda"
,
disc_cdda
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
disc_cdda
);
gtk_box_pack_start
(
GTK_BOX
(
hbox24
),
disc_cdda
,
FALSE
,
FALSE
,
0
);
label19
=
gtk_label_new
(
_
(
"Device name"
));
gtk_widget_ref
(
label19
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"label19"
,
label19
,
...
...
@@ -2428,6 +2437,9 @@ create_intf_open (void)
gtk_signal_connect
(
GTK_OBJECT
(
disc_vcd
),
"toggled"
,
GTK_SIGNAL_FUNC
(
GtkDiscOpenVcd
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
disc_cdda
),
"toggled"
,
GTK_SIGNAL_FUNC
(
GtkDiscOpenCDDA
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
disc_name
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
...
...
modules/gui/gtk/open.c
View file @
d5f41845
/*****************************************************************************
* gtk_open.c : functions to handle file/disc/network open widgets.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: open.c,v 1.1
5 2003/07/23 01:13:47 gbazin
Exp $
* Copyright (C) 2000, 2001
, 2003
VideoLAN
* $Id: open.c,v 1.1
6 2003/12/12 03:01:13 rocky
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -141,19 +141,26 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
intf_thread_t
*
p_intf
=
GtkGetIntf
(
togglebutton
);
char
*
psz_device
;
if
(
togglebutton
->
active
&&
(
psz_device
=
config_GetPsz
(
p_intf
,
"dvd"
))
)
if
(
togglebutton
->
active
)
{
gtk_widget_set_sensitive
(
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_open
),
"disc_dvd_use_menu"
)
)
,
TRUE
);
if
(
(
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
),
"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
);
}
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
}
else
{
gtk_widget_set_sensitive
(
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_open
),
"disc_dvd_use_menu"
)
),
FALSE
);
gtk_widget_set_sensitive
(
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_open
),
"disc_dvd_use_menu"
)
),
FALSE
);
}
}
...
...
@@ -162,18 +169,40 @@ void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data )
intf_thread_t
*
p_intf
=
GtkGetIntf
(
togglebutton
);
char
*
psz_device
;
if
(
togglebutton
->
active
&&
(
psz_device
=
config_GetPsz
(
p_intf
,
"vcd"
))
)
{
gtk_entry_set_text
(
if
(
togglebutton
->
active
)
{
if
(
(
psz_device
=
config_GetPsz
(
p_intf
,
"vcd"
))
)
{
gtk_entry_set_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
togglebutton
),
"disc_name"
)
),
psz_device
);
free
(
psz_device
);
}
free
(
psz_device
);
}
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
}
}
void
GtkDiscOpenCDDA
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
togglebutton
);
char
*
psz_device
;
if
(
togglebutton
->
active
)
{
if
(
(
psz_device
=
config_GetPsz
(
p_intf
,
"cd-audio"
))
)
{
gtk_entry_set_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
togglebutton
),
"disc_name"
)
),
psz_device
);
free
(
psz_device
);
}
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
}
}
static
void
GtkDiscOpenChanged
(
GtkWidget
*
button
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
GString
*
p_target
=
g_string_new
(
""
);
GtkWidget
*
p_open
;
vlc_bool_t
b_menus
=
VLC_FALSE
;
...
...
@@ -192,28 +221,81 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
}
else
{
g_string_append
(
p_target
,
"dvd
old
://"
);
g_string_append
(
p_target
,
"dvd
simple
://"
);
}
g_string_append
(
p_target
,
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_name"
)
)
)
);
if
(
!
b_menus
)
{
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"
)
)
)
);
}
}
else
if
(
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_vcd"
)
)
->
active
)
{
g_string_append
(
p_target
,
"vcd://"
);
#ifdef HAVE_VCDX
int
i
=
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
);
g_string_append
(
p_target
,
"vcdx://"
);
g_string_append
(
p_target
,
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_name"
)
)
)
);
if
(
i
)
g_string_sprintfa
(
p_target
,
"@%c%d"
,
config_GetInt
(
p_intf
,
"vcdx-PBC"
)
?
'P'
:
'E'
,
i
);
}
#else
g_string_append
(
p_target
,
"vcd://"
);
g_string_sprintfa
(
p_target
,
"@%d"
,
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
)
);
#endif
g_string_append
(
p_target
,
else
if
(
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_cdda"
)
)
->
active
)
{
#ifdef HAVE_CDDAX
int
i
=
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
);
g_string_append
(
p_target
,
"cddax://"
);
g_string_append
(
p_target
,
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_name"
)
)
)
);
if
(
!
b_menus
)
{
g_string_sprintfa
(
p_target
,
"@%i,%i"
,
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
),
if
(
i
)
g_string_sprintfa
(
p_target
,
"@T%i"
,
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
)
);
#else
g_string_append
(
p_target
,
"cdda://"
);
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_chapter"
)
)
)
);
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
)
);
#endif
}
gtk_widget_set_sensitive
(
gtk_object_get_data
(
GTK_OBJECT
(
p_open
),
...
...
modules/gui/gtk/open.h
View file @
d5f41845
...
...
@@ -2,7 +2,7 @@
* gtk_open.h: prototypes for open functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: open.h,v 1.
1 2002/08/04 17:23:43 sam
Exp $
* $Id: open.h,v 1.
2 2003/12/12 03:01:13 rocky
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -29,6 +29,7 @@ void GtkFileOpenOk ( GtkButton *, gpointer );
gboolean
GtkDiscOpenShow
(
GtkWidget
*
,
gpointer
);
void
GtkDiscOpenDvd
(
GtkToggleButton
*
,
gpointer
);
void
GtkDiscOpenVcd
(
GtkToggleButton
*
,
gpointer
);
void
GtkDiscOpenCDDA
(
GtkToggleButton
*
,
gpointer
);
void
GtkDiscOpenOk
(
GtkButton
*
,
gpointer
);
void
GtkDiscOpenCancel
(
GtkButton
*
,
gpointer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment