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
4238a153
Commit
4238a153
authored
Jan 21, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gui/gtk : added a subtitle option in open dialog box.
parent
045192a1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
659 additions
and
11 deletions
+659
-11
modules/gui/gtk/gnome.glade
modules/gui/gtk/gnome.glade
+187
-1
modules/gui/gtk/gnome_callbacks.c
modules/gui/gtk/gnome_callbacks.c
+24
-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
+100
-1
modules/gui/gtk/gtk.glade
modules/gui/gtk/gtk.glade
+182
-1
modules/gui/gtk/gtk_callbacks.c
modules/gui/gtk/gtk_callbacks.c
+1
-3
modules/gui/gtk/gtk_callbacks.h
modules/gui/gtk/gtk_callbacks.h
+5
-1
modules/gui/gtk/gtk_interface.c
modules/gui/gtk/gtk_interface.c
+97
-1
modules/gui/gtk/open.c
modules/gui/gtk/open.c
+59
-3
No files found.
modules/gui/gtk/gnome.glade
View file @
4238a153
...
...
@@ -1746,7 +1746,8 @@ http://www.videolan.org/
<signal>
<name>
clicked
</name>
<handler>
GtkFileShow
</handler>
<last_modification_time>
Wed, 10 Jul 2002 11:37:05 GMT
</last_modification_time>
<data>
"
entry_file
"
</data>
<last_modification_time>
Tue, 21 Jan 2003 01:55:20 GMT
</last_modification_time>
</signal>
<label>
Browse...
</label>
<relief>
GTK_RELIEF_NORMAL
</relief>
...
...
@@ -2906,6 +2907,191 @@ http://www.videolan.org/
</widget>
</widget>
</widget>
<widget>
<class>
GtkCheckButton
</class>
<name>
show_subtitle
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
clicked
</name>
<handler>
GtkOpenSubtitleShow
</handler>
<last_modification_time>
Tue, 21 Jan 2003 01:59:00 GMT
</last_modification_time>
</signal>
<label>
Subtitle
</label>
<active>
False
</active>
<draw_indicator>
True
</draw_indicator>
<child>
<padding>
0
</padding>
<expand>
False
</expand>
<fill>
False
</fill>
</child>
</widget>
<widget>
<class>
GtkHBox
</class>
<name>
hbox_subtitle
</name>
<border_width>
5
</border_width>
<homogeneous>
False
</homogeneous>
<spacing>
5
</spacing>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
<widget>
<class>
GtkCombo
</class>
<name>
combo3
</name>
<value_in_list>
False
</value_in_list>
<ok_if_empty>
True
</ok_if_empty>
<case_sensitive>
False
</case_sensitive>
<use_arrows>
True
</use_arrows>
<use_arrows_always>
False
</use_arrows_always>
<items></items>
<child>
<padding>
0
</padding>
<expand>
False
</expand>
<fill>
True
</fill>
</child>
<widget>
<class>
GtkEntry
</class>
<child_name>
GtkCombo:entry
</child_name>
<name>
entry_subtitle
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
changed
</name>
<handler>
GtkOpenChanged
</handler>
<last_modification_time>
Tue, 09 Jul 2002 13:22:33 GMT
</last_modification_time>
</signal>
<editable>
True
</editable>
<text_visible>
True
</text_visible>
<text_max_length>
0
</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>
GtkVBox
</class>
<name>
vbox14
</name>
<homogeneous>
True
</homogeneous>
<spacing>
0
</spacing>
<child>
<padding>
0
</padding>
<expand>
False
</expand>
<fill>
False
</fill>
</child>
<widget>
<class>
GtkButton
</class>
<name>
button4
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
clicked
</name>
<handler>
GtkFileShow
</handler>
<data>
"
entry_subtitle
"
</data>
<last_modification_time>
Tue, 21 Jan 2003 01:52:07 GMT
</last_modification_time>
</signal>
<label>
Browse...
</label>
<relief>
GTK_RELIEF_NORMAL
</relief>
<child>
<padding>
0
</padding>
<expand>
False
</expand>
<fill>
False
</fill>
</child>
</widget>
</widget>
<widget>
<class>
GtkLabel
</class>
<name>
label37
</name>
<label>
delay
</label>
<justify>
GTK_JUSTIFY_CENTER
</justify>
<wrap>
False
</wrap>
<xalign>
0.5
</xalign>
<yalign>
0.5
</yalign>
<xpad>
0
</xpad>
<ypad>
0
</ypad>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
</widget>
<widget>
<class>
GtkSpinButton
</class>
<name>
subtitle_delay
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
changed
</name>
<handler>
GtkOpenChanged
</handler>
<last_modification_time>
Tue, 21 Jan 2003 01:54:32 GMT
</last_modification_time>
</signal>
<climb_rate>
1
</climb_rate>
<digits>
1
</digits>
<numeric>
False
</numeric>
<update_policy>
GTK_UPDATE_ALWAYS
</update_policy>
<snap>
False
</snap>
<wrap>
False
</wrap>
<value>
0
</value>
<lower>
-1000
</lower>
<upper>
1000
</upper>
<step>
0.1
</step>
<page>
10
</page>
<page_size>
10
</page_size>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
</widget>
<widget>
<class>
GtkLabel
</class>
<name>
label38
</name>
<label>
fps
</label>
<justify>
GTK_JUSTIFY_CENTER
</justify>
<wrap>
False
</wrap>
<xalign>
0.5
</xalign>
<yalign>
0.5
</yalign>
<xpad>
0
</xpad>
<ypad>
0
</ypad>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
</widget>
<widget>
<class>
GtkSpinButton
</class>
<name>
subtitle_fps
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
changed
</name>
<handler>
GtkOpenChanged
</handler>
<last_modification_time>
Tue, 21 Jan 2003 01:54:41 GMT
</last_modification_time>
</signal>
<climb_rate>
1
</climb_rate>
<digits>
1
</digits>
<numeric>
False
</numeric>
<update_policy>
GTK_UPDATE_ALWAYS
</update_policy>
<snap>
False
</snap>
<wrap>
False
</wrap>
<value>
0
</value>
<lower>
0
</lower>
<upper>
100
</upper>
<step>
0.1
</step>
<page>
10
</page>
<page_size>
10
</page_size>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
</widget>
</widget>
</widget>
</widget>
...
...
modules/gui/gtk/gnome_callbacks.c
View file @
4238a153
/*****************************************************************************
* 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
)
{
}
modules/gui/gtk/gnome_callbacks.h
View file @
4238a153
...
...
@@ -2,3 +2,7 @@
* This file is not needed: everything is in gtk_callbacks.h
*****************************************************************************/
#include "gtk_callbacks.h"
void
GtkOpenSubtitleShow
(
GtkButton
*
button
,
gpointer
user_data
);
modules/gui/gtk/gnome_interface.c
View file @
4238a153
...
...
@@ -1420,6 +1420,18 @@ create_intf_open (void)
GList
*
sat_fec_items
=
NULL
;
GtkWidget
*
combo_entry1
;
GtkWidget
*
open_sat
;
GtkWidget
*
show_subtitle
;
GtkWidget
*
hbox_subtitle
;
GtkWidget
*
combo3
;
GtkWidget
*
entry_subtitle
;
GtkWidget
*
vbox14
;
GtkWidget
*
button4
;
GtkWidget
*
label37
;
GtkObject
*
subtitle_delay_adj
;
GtkWidget
*
subtitle_delay
;
GtkWidget
*
label38
;
GtkObject
*
subtitle_fps_adj
;
GtkWidget
*
subtitle_fps
;
GtkWidget
*
dialog_action_area5
;
GtkWidget
*
button1
;
GtkWidget
*
button3
;
...
...
@@ -1977,6 +1989,78 @@ create_intf_open (void)
gtk_widget_show
(
open_sat
);
gtk_notebook_set_tab_label
(
GTK_NOTEBOOK
(
open_notebook
),
gtk_notebook_get_nth_page
(
GTK_NOTEBOOK
(
open_notebook
),
3
),
open_sat
);
show_subtitle
=
gtk_check_button_new_with_label
(
_
(
"Subtitle"
));
gtk_widget_ref
(
show_subtitle
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"show_subtitle"
,
show_subtitle
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
show_subtitle
);
gtk_box_pack_start
(
GTK_BOX
(
dialog_vbox5
),
show_subtitle
,
FALSE
,
FALSE
,
0
);
hbox_subtitle
=
gtk_hbox_new
(
FALSE
,
5
);
gtk_widget_ref
(
hbox_subtitle
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"hbox_subtitle"
,
hbox_subtitle
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
hbox_subtitle
);
gtk_box_pack_start
(
GTK_BOX
(
dialog_vbox5
),
hbox_subtitle
,
TRUE
,
TRUE
,
0
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
hbox_subtitle
),
5
);
combo3
=
gtk_combo_new
();
gtk_widget_ref
(
combo3
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"combo3"
,
combo3
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
combo3
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
combo3
,
FALSE
,
TRUE
,
0
);
entry_subtitle
=
GTK_COMBO
(
combo3
)
->
entry
;
gtk_widget_ref
(
entry_subtitle
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"entry_subtitle"
,
entry_subtitle
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
entry_subtitle
);
vbox14
=
gtk_vbox_new
(
TRUE
,
0
);
gtk_widget_ref
(
vbox14
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"vbox14"
,
vbox14
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
vbox14
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
vbox14
,
FALSE
,
FALSE
,
0
);
button4
=
gtk_button_new_with_label
(
_
(
"Browse..."
));
gtk_widget_ref
(
button4
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"button4"
,
button4
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
button4
);
gtk_box_pack_start
(
GTK_BOX
(
vbox14
),
button4
,
FALSE
,
FALSE
,
0
);
label37
=
gtk_label_new
(
_
(
"delay"
));
gtk_widget_ref
(
label37
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"label37"
,
label37
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
label37
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
label37
,
TRUE
,
TRUE
,
0
);
subtitle_delay_adj
=
gtk_adjustment_new
(
0
,
-
1000
,
1000
,
0
.
1
,
10
,
10
);
subtitle_delay
=
gtk_spin_button_new
(
GTK_ADJUSTMENT
(
subtitle_delay_adj
),
1
,
1
);
gtk_widget_ref
(
subtitle_delay
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"subtitle_delay"
,
subtitle_delay
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
subtitle_delay
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
subtitle_delay
,
TRUE
,
TRUE
,
0
);
label38
=
gtk_label_new
(
_
(
"fps"
));
gtk_widget_ref
(
label38
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"label38"
,
label38
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
label38
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
label38
,
TRUE
,
TRUE
,
0
);
subtitle_fps_adj
=
gtk_adjustment_new
(
0
,
0
,
100
,
0
.
1
,
10
,
10
);
subtitle_fps
=
gtk_spin_button_new
(
GTK_ADJUSTMENT
(
subtitle_fps_adj
),
1
,
1
);
gtk_widget_ref
(
subtitle_fps
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"subtitle_fps"
,
subtitle_fps
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
subtitle_fps
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
subtitle_fps
,
TRUE
,
TRUE
,
0
);
dialog_action_area5
=
GNOME_DIALOG
(
intf_open
)
->
action_area
;
gtk_object_set_data
(
GTK_OBJECT
(
intf_open
),
"dialog_action_area5"
,
dialog_action_area5
);
gtk_widget_show
(
dialog_action_area5
);
...
...
@@ -2007,7 +2091,7 @@ create_intf_open (void)
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
open_browse
),
"clicked"
,
GTK_SIGNAL_FUNC
(
GtkFileShow
),
NULL
);
"entry_file"
);
gtk_signal_connect
(
GTK_OBJECT
(
disc_chapter
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
...
...
@@ -2068,6 +2152,21 @@ create_intf_open (void)
gtk_signal_connect
(
GTK_OBJECT
(
combo_entry1
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
show_subtitle
),
"clicked"
,
GTK_SIGNAL_FUNC
(
GtkOpenSubtitleShow
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
entry_subtitle
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
button4
),
"clicked"
,
GTK_SIGNAL_FUNC
(
GtkFileShow
),
"entry_subtitle"
);
gtk_signal_connect
(
GTK_OBJECT
(
subtitle_delay
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
subtitle_fps
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
button1
),
"clicked"
,
GTK_SIGNAL_FUNC
(
GtkOpenOk
),
NULL
);
...
...
modules/gui/gtk/gtk.glade
View file @
4238a153
...
...
@@ -1896,7 +1896,8 @@ http://www.videolan.org/</label>
<signal>
<name>
clicked
</name>
<handler>
GtkFileShow
</handler>
<last_modification_time>
Wed, 10 Jul 2002 11:37:05 GMT
</last_modification_time>
<data>
"
entry_file
"
</data>
<last_modification_time>
Mon, 20 Jan 2003 21:45:39 GMT
</last_modification_time>
</signal>
<label>
Browse...
</label>
<relief>
GTK_RELIEF_NORMAL
</relief>
...
...
@@ -3055,6 +3056,186 @@ http://www.videolan.org/</label>
<ypad>
0
</ypad>
</widget>
</widget>
<widget>
<class>
GtkCheckButton
</class>
<name>
show_subtitle
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
clicked
</name>
<handler>
GtkOpenSubtitleShow
</handler>
<last_modification_time>
Mon, 20 Jan 2003 21:09:27 GMT
</last_modification_time>
</signal>
<label>
Subtitle
</label>
<active>
False
</active>
<draw_indicator>
True
</draw_indicator>
<child>
<padding>
0
</padding>
<expand>
False
</expand>
<fill>
False
</fill>
</child>
</widget>
<widget>
<class>
GtkHBox
</class>
<name>
hbox_subtitle
</name>
<border_width>
5
</border_width>
<homogeneous>
False
</homogeneous>
<spacing>
5
</spacing>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
<widget>
<class>
GtkCombo
</class>
<name>
combo3
</name>
<value_in_list>
False
</value_in_list>
<ok_if_empty>
True
</ok_if_empty>
<case_sensitive>
False
</case_sensitive>
<use_arrows>
True
</use_arrows>
<use_arrows_always>
False
</use_arrows_always>
<items></items>
<child>
<padding>
0
</padding>
<expand>
False
</expand>
<fill>
True
</fill>
</child>
<widget>
<class>
GtkEntry
</class>
<child_name>
GtkCombo:entry
</child_name>
<name>
entry_subtitle
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
changed
</name>
<handler>
GtkOpenChanged
</handler>
<last_modification_time>
Tue, 09 Jul 2002 13:22:33 GMT
</last_modification_time>
</signal>
<editable>
True
</editable>
<text_visible>
True
</text_visible>
<text_max_length>
0
</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>
GtkVBox
</class>
<name>
vbox14
</name>
<homogeneous>
True
</homogeneous>
<spacing>
0
</spacing>
<child>
<padding>
0
</padding>
<expand>
False
</expand>
<fill>
False
</fill>
</child>
<widget>
<class>
GtkButton
</class>
<name>
open_browse_subtitle
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
clicked
</name>
<handler>
GtkFileShow
</handler>
<data>
"
entry_subtitle
"
</data>
<last_modification_time>
Mon, 20 Jan 2003 21:46:24 GMT
</last_modification_time>
</signal>
<label>
Browse...
</label>
<relief>
GTK_RELIEF_NORMAL
</relief>
<child>
<padding>
0
</padding>
<expand>
False
</expand>
<fill>
False
</fill>
</child>
</widget>
</widget>
<widget>
<class>
GtkLabel
</class>
<name>
label37
</name>
<label>
delay
</label>
<justify>
GTK_JUSTIFY_CENTER
</justify>
<wrap>
False
</wrap>
<xalign>
0.5
</xalign>
<yalign>
0.5
</yalign>
<xpad>
0
</xpad>
<ypad>
0
</ypad>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
</widget>
<widget>
<class>
GtkSpinButton
</class>
<name>
subtitle_delay
</name>
<can_focus>
True
</can_focus>
<signal>
<name>
changed
</name>
<handler>
GtkOpenChanged
</handler>
<last_modification_time>
Tue, 21 Jan 2003 00:09:20 GMT
</last_modification_time>
</signal>
<climb_rate>
1
</climb_rate>
<digits>
1
</digits>
<numeric>
False
</numeric>
<update_policy>
GTK_UPDATE_ALWAYS
</update_policy>
<snap>
False
</snap>
<wrap>
False
</wrap>
<value>
0
</value>
<lower>
-1000
</lower>
<upper>
1000
</upper>
<step>
0.1
</step>
<page>
10
</page>
<page_size>
10
</page_size>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
</widget>
<widget>
<class>
GtkLabel
</class>
<name>
label3
</name>
<label>
fps
</label>
<justify>
GTK_JUSTIFY_CENTER
</justify>
<wrap>
False
</wrap>
<xalign>
0.5
</xalign>
<yalign>
0.5
</yalign>
<xpad>
0
</xpad>
<ypad>
0
</ypad>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
</widget>
<widget>
<class>
GtkSpinButton
</class>
<name>
subtitle_fps
</name>
<can_focus>
True
</can_focus>
<climb_rate>
1
</climb_rate>
<digits>
1
</digits>
<numeric>
False
</numeric>
<update_policy>
GTK_UPDATE_ALWAYS
</update_policy>
<snap>
False
</snap>
<wrap>
False
</wrap>
<value>
0
</value>
<lower>
0
</lower>
<upper>
100
</upper>
<step>
0.1
</step>
<page>
10
</page>
<page_size>
10
</page_size>
<child>
<padding>
0
</padding>
<expand>
True
</expand>
<fill>
True
</fill>
</child>
</widget>
</widget>
</widget>
</widget>
</widget>
...
...
modules/gui/gtk/gtk_callbacks.c
View file @
4238a153
...
...
@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.c,v 1.
8 2003/01/20 20:07:06
fenrir Exp $
* $Id: gtk_callbacks.c,v 1.
9 2003/01/21 12:36:11
fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -688,5 +688,3 @@ GtkPopupDeinterlace (GtkRadioMenuItem *radiomenuitem,
msg_Dbg
(
p_intf
,
"GtkPopupDeinterlace"
);
}
modules/gui/gtk/gtk_callbacks.h
View file @
4238a153
...
...
@@ -2,7 +2,7 @@
* gtk_callbacks.h : Callbacks for the gtk plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.h,v 1.
3 2003/01/20 20:07:06
fenrir Exp $
* $Id: gtk_callbacks.h,v 1.
4 2003/01/21 12:36:11
fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -174,3 +174,7 @@ void
GtkPopupDeinterlace
(
GtkRadioMenuItem
*
radiomenuitem
,
gpointer
user_data
);
void
GtkOpenSubtitleShow
(
GtkButton
*
button
,
gpointer
user_data
);
modules/gui/gtk/gtk_interface.c
View file @
4238a153
...
...
@@ -1684,6 +1684,18 @@ create_intf_open (void)
GList
*
sat_fec_items
=
NULL
;
GtkWidget
*
combo_entry1
;
GtkWidget
*
open_sat
;
GtkWidget
*
show_subtitle
;
GtkWidget
*
hbox_subtitle
;
GtkWidget
*
combo3
;
GtkWidget
*
entry_subtitle
;
GtkWidget
*
vbox14
;
GtkWidget
*
open_browse_subtitle
;
GtkWidget
*
label37
;
GtkObject
*
subtitle_delay_adj
;
GtkWidget
*
subtitle_delay
;
GtkWidget
*
label3
;
GtkObject
*
subtitle_fps_adj
;
GtkWidget
*
subtitle_fps
;
GtkWidget
*
dialog_action_area6
;
GtkWidget
*
hbox18
;
GtkWidget
*
hbox19
;
...
...
@@ -2245,6 +2257,78 @@ create_intf_open (void)
gtk_widget_show
(
open_sat
);
gtk_notebook_set_tab_label
(
GTK_NOTEBOOK
(
open_notebook
),
gtk_notebook_get_nth_page
(
GTK_NOTEBOOK
(
open_notebook
),
3
),
open_sat
);
show_subtitle
=
gtk_check_button_new_with_label
(
_
(
"Subtitle"
));
gtk_widget_ref
(
show_subtitle
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"show_subtitle"
,
show_subtitle
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
show_subtitle
);
gtk_box_pack_start
(
GTK_BOX
(
open_vbox
),
show_subtitle
,
FALSE
,
FALSE
,
0
);
hbox_subtitle
=
gtk_hbox_new
(
FALSE
,
5
);
gtk_widget_ref
(
hbox_subtitle
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"hbox_subtitle"
,
hbox_subtitle
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
hbox_subtitle
);
gtk_box_pack_start
(
GTK_BOX
(
open_vbox
),
hbox_subtitle
,
TRUE
,
TRUE
,
0
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
hbox_subtitle
),
5
);
combo3
=
gtk_combo_new
();
gtk_widget_ref
(
combo3
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"combo3"
,
combo3
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
combo3
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
combo3
,
FALSE
,
TRUE
,
0
);
entry_subtitle
=
GTK_COMBO
(
combo3
)
->
entry
;
gtk_widget_ref
(
entry_subtitle
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"entry_subtitle"
,
entry_subtitle
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
entry_subtitle
);
vbox14
=
gtk_vbox_new
(
TRUE
,
0
);
gtk_widget_ref
(
vbox14
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"vbox14"
,
vbox14
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
vbox14
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
vbox14
,
FALSE
,
FALSE
,
0
);
open_browse_subtitle
=
gtk_button_new_with_label
(
_
(
"Browse..."
));
gtk_widget_ref
(
open_browse_subtitle
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"open_browse_subtitle"
,
open_browse_subtitle
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
open_browse_subtitle
);
gtk_box_pack_start
(
GTK_BOX
(
vbox14
),
open_browse_subtitle
,
FALSE
,
FALSE
,
0
);
label37
=
gtk_label_new
(
_
(
"delay"
));
gtk_widget_ref
(
label37
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"label37"
,
label37
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
label37
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
label37
,
TRUE
,
TRUE
,
0
);
subtitle_delay_adj
=
gtk_adjustment_new
(
0
,
-
1000
,
1000
,
0
.
1
,
10
,
10
);
subtitle_delay
=
gtk_spin_button_new
(
GTK_ADJUSTMENT
(
subtitle_delay_adj
),
1
,
1
);
gtk_widget_ref
(
subtitle_delay
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"subtitle_delay"
,
subtitle_delay
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
subtitle_delay
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
subtitle_delay
,
TRUE
,
TRUE
,
0
);
label3
=
gtk_label_new
(
_
(
"fps"
));
gtk_widget_ref
(
label3
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"label3"
,
label3
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
label3
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
label3
,
TRUE
,
TRUE
,
0
);
subtitle_fps_adj
=
gtk_adjustment_new
(
0
,
0
,
100
,
0
.
1
,
10
,
10
);
subtitle_fps
=
gtk_spin_button_new
(
GTK_ADJUSTMENT
(
subtitle_fps_adj
),
1
,
1
);
gtk_widget_ref
(
subtitle_fps
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_open
),
"subtitle_fps"
,
subtitle_fps
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
subtitle_fps
);
gtk_box_pack_start
(
GTK_BOX
(
hbox_subtitle
),
subtitle_fps
,
TRUE
,
TRUE
,
0
);
dialog_action_area6
=
GTK_DIALOG
(
intf_open
)
->
action_area
;
gtk_object_set_data
(
GTK_OBJECT
(
intf_open
),
"dialog_action_area6"
,
dialog_action_area6
);
gtk_widget_show
(
dialog_action_area6
);
...
...
@@ -2292,7 +2376,7 @@ create_intf_open (void)
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
open_browse
),
"clicked"
,
GTK_SIGNAL_FUNC
(
GtkFileShow
),
NULL
);
"entry_file"
);
gtk_signal_connect
(
GTK_OBJECT
(
disc_chapter
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
...
...
@@ -2353,6 +2437,18 @@ create_intf_open (void)
gtk_signal_connect
(
GTK_OBJECT
(
combo_entry1
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
show_subtitle
),
"clicked"
,
GTK_SIGNAL_FUNC
(
GtkOpenSubtitleShow
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
entry_subtitle
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
open_browse_subtitle
),
"clicked"
,
GTK_SIGNAL_FUNC
(
GtkFileShow
),
"entry_subtitle"
);
gtk_signal_connect
(
GTK_OBJECT
(
subtitle_delay
),
"changed"
,
GTK_SIGNAL_FUNC
(
GtkOpenChanged
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
open_ok
),
"clicked"
,
GTK_SIGNAL_FUNC
(
GtkOpenOk
),
NULL
);
...
...
modules/gui/gtk/open.c
View file @
4238a153
...
...
@@ -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.
8 2003/01/10 17:30:18 lool
Exp $
* $Id: open.c,v 1.
9 2003/01/21 12:36:11 fenrir
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -67,6 +67,10 @@ void GtkFileShow( GtkButton * button, gpointer user_data )
gtk_object_set_data
(
GTK_OBJECT
(
p_file
),
"p_intf"
,
GtkGetIntf
(
button
)
);
/* entry <- entry_file or entry_subtitle */
gtk_object_set_data
(
GTK_OBJECT
(
p_file
),
"entry"
,
user_data
);
gtk_widget_show
(
p_file
);
gdk_window_raise
(
p_file
->
window
);
}
...
...
@@ -75,14 +79,16 @@ void GtkFileOk( GtkButton * button, gpointer user_data )
{
GtkWidget
*
p_file
=
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
);
char
*
psz_entry
;
char
*
psz_filename
;
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
/* add the new file to the dialog box */
psz_entry
=
gtk_object_get_data
(
GTK_OBJECT
(
p_file
),
"entry"
);
psz_filename
=
gtk_file_selection_get_filename
(
GTK_FILE_SELECTION
(
p_file
)
);
gtk_entry_set_text
(
GTK_ENTRY
(
lookup_widget
(
p_intf
->
p_sys
->
p_open
,
"entry_file"
)
),
psz_entry
)
),
psz_filename
);
gtk_widget_destroy
(
p_file
);
}
...
...
@@ -411,6 +417,29 @@ GtkSatOpenToggle (GtkToggleButton *togglebutton,
}
}
/*****************************************************************************
* Open subtitle callbacks
*****************************************************************************
* The following callbacks are related to the subtitle
*****************************************************************************/
void
GtkOpenSubtitleShow
(
GtkButton
*
button
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
button
);
if
(
GTK_TOGGLE_BUTTON
(
button
)
->
active
)
{
/* show hbox_subtitle */
gtk_widget_show_all
(
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_open
),
"hbox_subtitle"
)
)
);
}
else
{
/* hide hbox_subtitle */
gtk_widget_hide_all
(
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_open
),
"hbox_subtitle"
)
)
);
}
}
/******************************
******************************/
...
...
@@ -493,6 +522,10 @@ static void GtkOpenShow( intf_thread_t *p_intf, int i_page )
free
(
psz_var
);
}
/* subtitle stuff */
/* hide hbox_subtitle */
gtk_widget_hide_all
(
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_open
),
"hbox_subtitle"
)
)
);
/* Set the right page */
setpage:
p_notebook
=
lookup_widget
(
GTK_WIDGET
(
p_intf
->
p_sys
->
p_open
),
...
...
@@ -534,10 +567,33 @@ void GtkOpenOk( GtkButton * button, gpointer user_data )
vlc_object_release
(
p_playlist
);
/* export subtitle */
if
(
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"show_subtitle"
)
)
->
active
)
{
/* yeah subtitle */
char
*
psz_subtitle
;
gfloat
delay
;
gfloat
fps
;
psz_subtitle
=
gtk_entry_get_text
(
GTK_ENTRY
(
lookup_widget
(
GTK_WIDGET
(
button
),
"entry_subtitle"
)
)
);
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"
)
)
);
msg_Warn
(
p_intf
,
"%s - %f, %f"
,
psz_subtitle
,
delay
,
fps
);
config_PutPsz
(
p_intf
,
"sub-file"
,
psz_subtitle
);
config_PutInt
(
p_intf
,
"sub-delay"
,
(
int
)(
delay
*
10
)
);
config_PutFloat
(
p_intf
,
"sub-fps"
,
fps
);
}
else
{
config_PutPsz
(
p_intf
,
"sub-file"
,
""
);
}
/* Enable the channel box when network channel is selected */
if
(
GTK_TOGGLE_BUTTON
(
lookup_widget
(
GTK_WIDGET
(
button
),
"network_channel"
)
)
->
active
)
{
{
GtkWidget
*
p_network_box
;
GtkWidget
*
p_channel
;
GtkWidget
*
p_label
;
...
...
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