Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
1d60757b
Commit
1d60757b
authored
Dec 13, 2003
by
Rocky Bernstein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor code cleanups. Non-existent satellite options #ifdef'd out.
parent
04c4affb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
32 deletions
+49
-32
modules/gui/gtk/open.c
modules/gui/gtk/open.c
+49
-32
No files found.
modules/gui/gtk/open.c
View file @
1d60757b
...
@@ -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, 2003 VideoLAN
* Copyright (C) 2000, 2001, 2003 VideoLAN
* $Id: open.c,v 1.
19 2003/12/12 22:46:2
5 rocky Exp $
* $Id: open.c,v 1.
20 2003/12/13 00:00:4
5 rocky 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>
...
@@ -46,6 +46,18 @@
...
@@ -46,6 +46,18 @@
#include "playlist.h"
#include "playlist.h"
#include "common.h"
#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
static
void
GtkOpenShow
(
intf_thread_t
*
,
int
);
static
void
GtkOpenShow
(
intf_thread_t
*
,
int
);
static
void
GtkFileOpenChanged
(
GtkWidget
*
,
gpointer
);
static
void
GtkFileOpenChanged
(
GtkWidget
*
,
gpointer
);
...
@@ -177,6 +189,10 @@ void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data )
...
@@ -177,6 +189,10 @@ void GtkDiscOpenVcd( GtkToggleButton * togglebutton, gpointer user_data )
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_entry_set_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
togglebutton
),
"disc_name"
)
),
""
);
}
}
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
}
}
...
@@ -195,6 +211,10 @@ void GtkDiscOpenCDDA( GtkToggleButton * togglebutton, gpointer user_data )
...
@@ -195,6 +211,10 @@ void GtkDiscOpenCDDA( GtkToggleButton * togglebutton, gpointer user_data )
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_entry_set_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
togglebutton
),
"disc_name"
)
),
""
);
}
}
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
GtkDiscOpenChanged
(
(
GtkWidget
*
)
togglebutton
,
user_data
);
}
}
...
@@ -204,15 +224,17 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
...
@@ -204,15 +224,17 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
{
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
GString
*
p_target
=
g_string_new
(
""
);
GString
*
p_target
=
g_string_new
(
""
);
GtkWidget
*
p_open
;
GtkWidget
*
p_open
=
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
)
;
vlc_bool_t
b_menus
=
VLC_FALSE
;
vlc_bool_t
b_menus
=
VLC_FALSE
;
vlc_bool_t
b_chapter_menu
=
VLC_TRUE
;
vlc_bool_t
b_chapter_menu
=
VLC_TRUE
;
GtkWidget
*
p_label
=
gtk_object_get_data
(
GTK_OBJECT
(
p_open
),
p_open
=
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
);
"disc_title_label"
);
if
(
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
if
(
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_dvd"
)
)
->
active
)
"disc_dvd"
)
)
->
active
)
{
{
gtk_label_set_text
(
GTK_LABEL
(
p_label
),
_
(
"Title"
)
);
b_menus
=
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
b_menus
=
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_dvd_use_menu"
)
)
->
active
;
"disc_dvd_use_menu"
)
)
->
active
;
...
@@ -243,60 +265,53 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
...
@@ -243,60 +265,53 @@ static void GtkDiscOpenChanged( GtkWidget * button, gpointer user_data )
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
)
{
{
#ifdef HAVE_VCDX
int
i
=
gtk_spin_button_get_value_as_int
(
int
i
=
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
);
GTK_WIDGET
(
button
),
"disc_title"
)
)
);
g_string_append
(
p_target
,
"vcdx://"
);
#ifdef HAVE_VCDX
int
i_pbc
=
config_GetInt
(
p_intf
,
"vcdx-PBC"
);
gtk_label_set_text
(
GTK_LABEL
(
p_label
),
i_pbc
?
_
(
"PBC LID"
)
:
_
(
"Entry"
)
);
g_string_append
(
p_target
,
VCD_MRL
);
g_string_append
(
p_target
,
g_string_append
(
p_target
,
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_name"
)
)
)
);
GTK_WIDGET
(
button
),
"disc_name"
)
)
)
);
if
(
i
)
if
(
i
)
g_string_sprintfa
(
p_target
,
"@%c%d"
,
g_string_sprintfa
(
p_target
,
"@%c%d"
,
i_pbc
?
'P'
:
'E'
,
i
);
config_GetInt
(
p_intf
,
"vcdx-PBC"
)
?
'P'
:
'E'
,
i
);
#else
#else
g_string_append
(
p_target
,
"vcd://"
);
gtk_label_set_text
(
GTK_LABEL
(
p_label
),
_
(
"Track"
)
);
g_string_sprintfa
(
p_target
,
"@%d"
,
g_string_append
(
p_target
,
VCD_MRL
);
gtk_spin_button_get_value_as_int
(
g_string_sprintfa
(
p_target
,
"@%d"
,
i
);
GTK_SPIN_BUTTON
(
lookup_widget
(
#endif
/* HAVE_VCDX */
GTK_WIDGET
(
button
),
"disc_title"
)
)
)
);
b_chapter_menu
=
VLC_FALSE
;
#endif
}
}
else
if
(
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
else
if
(
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_cdda"
)
)
->
active
)
"disc_cdda"
)
)
->
active
)
{
{
#ifdef HAVE_CDDAX
int
i
=
gtk_spin_button_get_value_as_int
(
int
i
=
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
);
GTK_WIDGET
(
button
),
"disc_title"
)
)
);
g_string_append
(
p_target
,
"cddax://"
);
gtk_label_set_text
(
GTK_LABEL
(
p_label
),
_
(
"Track"
)
);
b_chapter_menu
=
VLC_FALSE
;
g_string_append
(
p_target
,
CDDA_MRL
);
g_string_append
(
p_target
,
g_string_append
(
p_target
,
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_name"
)
)
)
);
GTK_WIDGET
(
button
),
"disc_name"
)
)
)
);
#ifdef HAVE_CDDAX
if
(
i
)
if
(
i
)
g_string_sprintfa
(
p_target
,
"@T%i"
,
g_string_sprintfa
(
p_target
,
"@T%i"
,
i
);
gtk_spin_button_get_value_as_int
(
GTK_SPIN_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"disc_title"
)
)
)
);
#else
#else
g_string_append
(
p_target
,
"cdda://"
);
g_string_sprintfa
(
p_target
,
"@%i"
,
i
);
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"
)
)
)
);
#endif
#endif
b_chapter_menu
=
VLC_FALSE
;
}
}
gtk_widget_set_sensitive
(
gtk_object_get_data
(
GTK_OBJECT
(
p_open
),
gtk_widget_set_sensitive
(
gtk_object_get_data
(
GTK_OBJECT
(
p_open
),
...
@@ -567,6 +582,7 @@ static void GtkOpenShow( intf_thread_t *p_intf, int i_page )
...
@@ -567,6 +582,7 @@ static void GtkOpenShow( intf_thread_t *p_intf, int i_page )
GTK_OBJECT
(
p_intf
->
p_sys
->
p_open
),
"network_http_url"
)
),
GTK_OBJECT
(
p_intf
->
p_sys
->
p_open
),
"network_http_url"
)
),
"http://"
);
"http://"
);
#if SATELLITE_OPTIONS_FIXED
/* Satellite stuff */
/* Satellite stuff */
psz_var
=
config_GetPsz
(
p_intf
,
"frequency"
);
psz_var
=
config_GetPsz
(
p_intf
,
"frequency"
);
if
(
psz_var
)
if
(
psz_var
)
...
@@ -585,6 +601,7 @@ static void GtkOpenShow( intf_thread_t *p_intf, int i_page )
...
@@ -585,6 +601,7 @@ static void GtkOpenShow( intf_thread_t *p_intf, int i_page )
psz_var
);
psz_var
);
free
(
psz_var
);
free
(
psz_var
);
}
}
#endif
/*SATELITE_OPTIONS_FIXED*/
/* subtitle stuff */
/* subtitle stuff */
/* hide hbox_subtitle */
/* hide hbox_subtitle */
...
...
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