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
32ef13cf
Commit
32ef13cf
authored
May 15, 2001
by
Stéphane Borel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*Bugfixes, cleanings in gtk.
parent
9530fc9f
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
362 additions
and
677 deletions
+362
-677
plugins/dvd/input_dvd.c
plugins/dvd/input_dvd.c
+2
-2
plugins/gtk/gtk_callbacks.c
plugins/gtk/gtk_callbacks.c
+61
-118
plugins/gtk/gtk_callbacks.h
plugins/gtk/gtk_callbacks.h
+28
-290
plugins/gtk/gtk_control.c
plugins/gtk/gtk_control.c
+20
-6
plugins/gtk/gtk_interface.c
plugins/gtk/gtk_interface.c
+22
-19
plugins/gtk/gtk_menu.c
plugins/gtk/gtk_menu.c
+18
-22
plugins/gtk/gtk_menu.h
plugins/gtk/gtk_menu.h
+1
-16
plugins/gtk/gtk_modules.c
plugins/gtk/gtk_modules.c
+8
-1
plugins/gtk/gtk_modules.h
plugins/gtk/gtk_modules.h
+4
-6
plugins/gtk/gtk_open.c
plugins/gtk/gtk_open.c
+40
-90
plugins/gtk/gtk_open.h
plugins/gtk/gtk_open.h
+16
-30
plugins/gtk/gtk_playlist.c
plugins/gtk/gtk_playlist.c
+45
-31
plugins/gtk/gtk_playlist.h
plugins/gtk/gtk_playlist.h
+8
-2
plugins/gtk/gtk_preferences.c
plugins/gtk/gtk_preferences.c
+9
-1
plugins/gtk/gtk_preferences.h
plugins/gtk/gtk_preferences.h
+6
-5
plugins/gtk/intf_gtk.c
plugins/gtk/intf_gtk.c
+34
-12
plugins/gtk/intf_gtk.glade
plugins/gtk/intf_gtk.glade
+30
-22
src/interface/interface.c
src/interface/interface.c
+8
-1
src/interface/intf_playlist.c
src/interface/intf_playlist.c
+2
-3
No files found.
plugins/dvd/input_dvd.c
View file @
32ef13cf
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* -dvd_udf to find files
* -dvd_udf to find files
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.5
8 2001/05/15 01:01:44
stef Exp $
* $Id: input_dvd.c,v 1.5
9 2001/05/15 14:49:47
stef Exp $
*
*
* Author: Stphane Borel <stef@via.ecp.fr>
* Author: Stphane Borel <stef@via.ecp.fr>
*
*
...
@@ -1043,7 +1043,7 @@ static int DVDRead( input_thread_t * p_input,
...
@@ -1043,7 +1043,7 @@ static int DVDRead( input_thread_t * p_input,
p_input
->
stream
.
p_selected_area
->
i_tell
=
i_off
-
p_input
->
stream
.
p_selected_area
->
i_tell
=
i_off
-
p_input
->
stream
.
p_selected_area
->
i_start
;
p_input
->
stream
.
p_selected_area
->
i_start
;
p_input
->
stream
.
p_selected_area
->
i_part
=
p_dvd
->
i_chapter
;
p_input
->
stream
.
p_selected_area
->
i_part
=
p_dvd
->
i_chapter
;
intf_WarnMsg
(
2
,
"chapter %d"
,
p_dvd
->
i_chapter
);
/* the synchro has to be reinitialized when we change cell */
/* the synchro has to be reinitialized when we change cell */
p_input
->
stream
.
pp_programs
[
0
]
->
i_synchro_state
=
SYNCHRO_REINIT
;
p_input
->
stream
.
pp_programs
[
0
]
->
i_synchro_state
=
SYNCHRO_REINIT
;
...
...
plugins/gtk/gtk_callbacks.c
View file @
32ef13cf
This diff is collapsed.
Click to expand it.
plugins/gtk/gtk_callbacks.h
View file @
32ef13cf
This diff is collapsed.
Click to expand it.
plugins/gtk/gtk_control.c
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_control.c : functions to handle stream control buttons.
* gtk_control.c : functions to handle stream control buttons.
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_control.c,v 1.
1 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_control.c,v 1.
2 2001/05/15 14:49:48
stef 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>
...
@@ -83,12 +83,12 @@ gboolean GtkControlStop( GtkWidget *widget,
...
@@ -83,12 +83,12 @@ gboolean GtkControlStop( GtkWidget *widget,
p_intf
->
p_input
->
b_eof
=
1
;
p_intf
->
p_input
->
b_eof
=
1
;
/* update playlist */
/* update playlist */
//
vlc_mutex_lock( &p_main->p_playlist->change_lock );
vlc_mutex_lock
(
&
p_main
->
p_playlist
->
change_lock
);
p_main
->
p_playlist
->
i_index
--
;
p_main
->
p_playlist
->
i_index
--
;
p_main
->
p_playlist
->
b_stopped
=
1
;
p_main
->
p_playlist
->
b_stopped
=
1
;
//
vlc_mutex_unlock( &p_main->p_playlist->change_lock );
vlc_mutex_unlock
(
&
p_main
->
p_playlist
->
change_lock
);
}
}
...
@@ -109,23 +109,28 @@ gboolean GtkControlPlay( GtkWidget *widget,
...
@@ -109,23 +109,28 @@ gboolean GtkControlPlay( GtkWidget *widget,
}
}
else
else
{
{
//
vlc_mutex_lock( &p_main->p_playlist->change_lock );
vlc_mutex_lock
(
&
p_main
->
p_playlist
->
change_lock
);
if
(
p_main
->
p_playlist
->
b_stopped
)
if
(
p_main
->
p_playlist
->
b_stopped
)
{
{
if
(
p_main
->
p_playlist
->
i_size
)
if
(
p_main
->
p_playlist
->
i_size
)
{
{
vlc_mutex_unlock
(
&
p_main
->
p_playlist
->
change_lock
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
p_main
->
p_playlist
->
i_index
);
p_main
->
p_playlist
->
i_index
);
p_main
->
p_playlist
->
b_stopped
=
0
;
}
}
else
else
{
{
vlc_mutex_unlock
(
&
p_main
->
p_playlist
->
change_lock
);
GtkFileOpenShow
(
widget
,
event
,
user_data
);
GtkFileOpenShow
(
widget
,
event
,
user_data
);
}
}
}
}
else
{
vlc_mutex_unlock
(
&
p_main
->
p_playlist
->
change_lock
);
}
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
return
TRUE
;
return
TRUE
;
...
@@ -141,7 +146,10 @@ gboolean GtkControlPause( GtkWidget *widget,
...
@@ -141,7 +146,10 @@ gboolean GtkControlPause( GtkWidget *widget,
if
(
p_intf
->
p_input
!=
NULL
)
if
(
p_intf
->
p_input
!=
NULL
)
{
{
input_SetStatus
(
p_intf
->
p_input
,
INPUT_STATUS_PAUSE
);
input_SetStatus
(
p_intf
->
p_input
,
INPUT_STATUS_PAUSE
);
vlc_mutex_lock
(
&
p_main
->
p_playlist
->
change_lock
);
p_main
->
p_playlist
->
b_stopped
=
0
;
p_main
->
p_playlist
->
b_stopped
=
0
;
vlc_mutex_unlock
(
&
p_main
->
p_playlist
->
change_lock
);
}
}
return
TRUE
;
return
TRUE
;
...
@@ -157,7 +165,10 @@ gboolean GtkControlSlow( GtkWidget *widget,
...
@@ -157,7 +165,10 @@ gboolean GtkControlSlow( GtkWidget *widget,
if
(
p_intf
->
p_input
!=
NULL
)
if
(
p_intf
->
p_input
!=
NULL
)
{
{
input_SetStatus
(
p_intf
->
p_input
,
INPUT_STATUS_SLOWER
);
input_SetStatus
(
p_intf
->
p_input
,
INPUT_STATUS_SLOWER
);
vlc_mutex_lock
(
&
p_main
->
p_playlist
->
change_lock
);
p_main
->
p_playlist
->
b_stopped
=
0
;
p_main
->
p_playlist
->
b_stopped
=
0
;
vlc_mutex_unlock
(
&
p_main
->
p_playlist
->
change_lock
);
}
}
return
TRUE
;
return
TRUE
;
...
@@ -173,7 +184,10 @@ gboolean GtkControlFast( GtkWidget *widget,
...
@@ -173,7 +184,10 @@ gboolean GtkControlFast( GtkWidget *widget,
if
(
p_intf
->
p_input
!=
NULL
)
if
(
p_intf
->
p_input
!=
NULL
)
{
{
input_SetStatus
(
p_intf
->
p_input
,
INPUT_STATUS_FASTER
);
input_SetStatus
(
p_intf
->
p_input
,
INPUT_STATUS_FASTER
);
vlc_mutex_lock
(
&
p_main
->
p_playlist
->
change_lock
);
p_main
->
p_playlist
->
b_stopped
=
0
;
p_main
->
p_playlist
->
b_stopped
=
0
;
vlc_mutex_unlock
(
&
p_main
->
p_playlist
->
change_lock
);
}
}
return
TRUE
;
return
TRUE
;
...
...
plugins/gtk/gtk_interface.c
View file @
32ef13cf
...
@@ -958,7 +958,7 @@ create_intf_popup (void)
...
@@ -958,7 +958,7 @@ create_intf_popup (void)
gtk_container_add
(
GTK_CONTAINER
(
intf_popup
),
separator6
);
gtk_container_add
(
GTK_CONTAINER
(
intf_popup
),
separator6
);
gtk_widget_set_sensitive
(
separator6
,
FALSE
);
gtk_widget_set_sensitive
(
separator6
,
FALSE
);
popup_interface_toggle
=
gtk_
check_
menu_item_new_with_label
(
""
);
popup_interface_toggle
=
gtk_menu_item_new_with_label
(
""
);
tmp_key
=
gtk_label_parse_uline
(
GTK_LABEL
(
GTK_BIN
(
popup_interface_toggle
)
->
child
),
tmp_key
=
gtk_label_parse_uline
(
GTK_LABEL
(
GTK_BIN
(
popup_interface_toggle
)
->
child
),
_
(
"Toggle _Interface"
));
_
(
"Toggle _Interface"
));
gtk_widget_add_accelerator
(
popup_interface_toggle
,
"activate_item"
,
intf_popup_accels
,
gtk_widget_add_accelerator
(
popup_interface_toggle
,
"activate_item"
,
intf_popup_accels
,
...
@@ -968,10 +968,8 @@ create_intf_popup (void)
...
@@ -968,10 +968,8 @@ create_intf_popup (void)
(
GtkDestroyNotify
)
gtk_widget_unref
);
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
popup_interface_toggle
);
gtk_widget_show
(
popup_interface_toggle
);
gtk_container_add
(
GTK_CONTAINER
(
intf_popup
),
popup_interface_toggle
);
gtk_container_add
(
GTK_CONTAINER
(
intf_popup
),
popup_interface_toggle
);
gtk_check_menu_item_set_active
(
GTK_CHECK_MENU_ITEM
(
popup_interface_toggle
),
TRUE
);
gtk_check_menu_item_set_show_toggle
(
GTK_CHECK_MENU_ITEM
(
popup_interface_toggle
),
TRUE
);
popup_fullscreen
=
gtk_
check_
menu_item_new_with_label
(
""
);
popup_fullscreen
=
gtk_menu_item_new_with_label
(
""
);
tmp_key
=
gtk_label_parse_uline
(
GTK_LABEL
(
GTK_BIN
(
popup_fullscreen
)
->
child
),
tmp_key
=
gtk_label_parse_uline
(
GTK_LABEL
(
GTK_BIN
(
popup_fullscreen
)
->
child
),
_
(
"_Fullscreen"
));
_
(
"_Fullscreen"
));
gtk_widget_add_accelerator
(
popup_fullscreen
,
"activate_item"
,
intf_popup_accels
,
gtk_widget_add_accelerator
(
popup_fullscreen
,
"activate_item"
,
intf_popup_accels
,
...
@@ -981,7 +979,6 @@ create_intf_popup (void)
...
@@ -981,7 +979,6 @@ create_intf_popup (void)
(
GtkDestroyNotify
)
gtk_widget_unref
);
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
popup_fullscreen
);
gtk_widget_show
(
popup_fullscreen
);
gtk_container_add
(
GTK_CONTAINER
(
intf_popup
),
popup_fullscreen
);
gtk_container_add
(
GTK_CONTAINER
(
intf_popup
),
popup_fullscreen
);
gtk_check_menu_item_set_show_toggle
(
GTK_CHECK_MENU_ITEM
(
popup_fullscreen
),
TRUE
);
separator5
=
gtk_menu_item_new
();
separator5
=
gtk_menu_item_new
();
gtk_widget_ref
(
separator5
);
gtk_widget_ref
(
separator5
);
...
@@ -1803,9 +1800,9 @@ create_intf_jump (void)
...
@@ -1803,9 +1800,9 @@ create_intf_jump (void)
GtkWidget
*
dialog_vbox3
;
GtkWidget
*
dialog_vbox3
;
GtkWidget
*
jump_frame
;
GtkWidget
*
jump_frame
;
GtkWidget
*
hbox13
;
GtkWidget
*
hbox13
;
GtkWidget
*
jump_second
e
_label
;
GtkWidget
*
jump_second_label
;
GtkObject
*
jump_second
e
_spinbutton_adj
;
GtkObject
*
jump_second_spinbutton_adj
;
GtkWidget
*
jump_second
e
_spinbutton
;
GtkWidget
*
jump_second_spinbutton
;
GtkWidget
*
jump_minute_label
;
GtkWidget
*
jump_minute_label
;
GtkObject
*
jump_minute_spinbutton_adj
;
GtkObject
*
jump_minute_spinbutton_adj
;
GtkWidget
*
jump_minute_spinbutton
;
GtkWidget
*
jump_minute_spinbutton
;
...
@@ -1841,20 +1838,20 @@ create_intf_jump (void)
...
@@ -1841,20 +1838,20 @@ create_intf_jump (void)
gtk_widget_show
(
hbox13
);
gtk_widget_show
(
hbox13
);
gtk_container_add
(
GTK_CONTAINER
(
jump_frame
),
hbox13
);
gtk_container_add
(
GTK_CONTAINER
(
jump_frame
),
hbox13
);
jump_second
e
_label
=
gtk_label_new
(
_
(
"s."
));
jump_second_label
=
gtk_label_new
(
_
(
"s."
));
gtk_widget_ref
(
jump_second
e
_label
);
gtk_widget_ref
(
jump_second_label
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_jump
),
"jump_second
e_label"
,
jump_seconde
_label
,
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_jump
),
"jump_second
_label"
,
jump_second
_label
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
jump_second
e
_label
);
gtk_widget_show
(
jump_second_label
);
gtk_box_pack_end
(
GTK_BOX
(
hbox13
),
jump_second
e
_label
,
FALSE
,
FALSE
,
5
);
gtk_box_pack_end
(
GTK_BOX
(
hbox13
),
jump_second_label
,
FALSE
,
FALSE
,
5
);
jump_second
e
_spinbutton_adj
=
gtk_adjustment_new
(
0
,
0
,
60
,
1
,
10
,
10
);
jump_second_spinbutton_adj
=
gtk_adjustment_new
(
0
,
0
,
60
,
1
,
10
,
10
);
jump_second
e_spinbutton
=
gtk_spin_button_new
(
GTK_ADJUSTMENT
(
jump_seconde
_spinbutton_adj
),
1
,
0
);
jump_second
_spinbutton
=
gtk_spin_button_new
(
GTK_ADJUSTMENT
(
jump_second
_spinbutton_adj
),
1
,
0
);
gtk_widget_ref
(
jump_second
e
_spinbutton
);
gtk_widget_ref
(
jump_second_spinbutton
);
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_jump
),
"jump_second
e_spinbutton"
,
jump_seconde
_spinbutton
,
gtk_object_set_data_full
(
GTK_OBJECT
(
intf_jump
),
"jump_second
_spinbutton"
,
jump_second
_spinbutton
,
(
GtkDestroyNotify
)
gtk_widget_unref
);
(
GtkDestroyNotify
)
gtk_widget_unref
);
gtk_widget_show
(
jump_second
e
_spinbutton
);
gtk_widget_show
(
jump_second_spinbutton
);
gtk_box_pack_end
(
GTK_BOX
(
hbox13
),
jump_second
e
_spinbutton
,
FALSE
,
TRUE
,
0
);
gtk_box_pack_end
(
GTK_BOX
(
hbox13
),
jump_second_spinbutton
,
FALSE
,
TRUE
,
0
);
jump_minute_label
=
gtk_label_new
(
_
(
"m:"
));
jump_minute_label
=
gtk_label_new
(
_
(
"m:"
));
gtk_widget_ref
(
jump_minute_label
);
gtk_widget_ref
(
jump_minute_label
);
...
@@ -2136,6 +2133,12 @@ create_intf_playlist (void)
...
@@ -2136,6 +2133,12 @@ create_intf_playlist (void)
gtk_widget_show
(
playlist_cancel_button
);
gtk_widget_show
(
playlist_cancel_button
);
gtk_box_pack_start
(
GTK_BOX
(
dialog_action_area3
),
playlist_cancel_button
,
TRUE
,
TRUE
,
0
);
gtk_box_pack_start
(
GTK_BOX
(
dialog_action_area3
),
playlist_cancel_button
,
TRUE
,
TRUE
,
0
);
gtk_signal_connect
(
GTK_OBJECT
(
intf_playlist
),
"destroy"
,
GTK_SIGNAL_FUNC
(
gtk_widget_hide
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
intf_playlist
),
"delete_event"
,
GTK_SIGNAL_FUNC
(
gtk_widget_hide
),
NULL
);
gtk_signal_connect
(
GTK_OBJECT
(
playlist_add_disc
),
"activate"
,
gtk_signal_connect
(
GTK_OBJECT
(
playlist_add_disc
),
"activate"
,
GTK_SIGNAL_FUNC
(
GtkDiscOpenActivate
),
GTK_SIGNAL_FUNC
(
GtkDiscOpenActivate
),
"intf_playlist"
);
"intf_playlist"
);
...
...
plugins/gtk/gtk_menu.c
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_menu.c : functions to handle menu items.
* gtk_menu.c : functions to handle menu items.
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_menu.c,v 1.
1 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_menu.c,v 1.
2 2001/05/15 14:49:48
stef 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>
...
@@ -347,11 +347,14 @@ static gint GtkRadioMenu( intf_thread_t * p_intf,
...
@@ -347,11 +347,14 @@ static gint GtkRadioMenu( intf_thread_t * p_intf,
/* link the new menu to the title menu item */
/* link the new menu to the title menu item */
gtk_menu_item_set_submenu
(
GTK_MENU_ITEM
(
p_root
),
p_menu
);
gtk_menu_item_set_submenu
(
GTK_MENU_ITEM
(
p_root
),
p_menu
);
/* toggle currently selected chapter */
/* toggle currently selected chapter
* We have to release the lock since input_ToggleES needs it */
if
(
p_item_selected
!=
NULL
)
if
(
p_item_selected
!=
NULL
)
{
{
vlc_mutex_unlock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
gtk_check_menu_item_set_active
(
GTK_CHECK_MENU_ITEM
(
p_item_selected
),
gtk_check_menu_item_set_active
(
GTK_CHECK_MENU_ITEM
(
p_item_selected
),
TRUE
);
TRUE
);
vlc_mutex_lock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
}
}
/* be sure that menu is sensitive, if there are several items */
/* be sure that menu is sensitive, if there are several items */
...
@@ -427,7 +430,6 @@ static gint GtkLanguageMenus( gpointer p_data,
...
@@ -427,7 +430,6 @@ static gint GtkLanguageMenus( gpointer p_data,
gtk_widget_show
(
p_separator
);
gtk_widget_show
(
p_separator
);
gtk_menu_append
(
GTK_MENU
(
p_menu
),
p_separator
);
gtk_menu_append
(
GTK_MENU
(
p_menu
),
p_separator
);
vlc_mutex_lock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
p_item_active
=
NULL
;
p_item_active
=
NULL
;
i_item
=
0
;
i_item
=
0
;
...
@@ -466,17 +468,19 @@ static gint GtkLanguageMenus( gpointer p_data,
...
@@ -466,17 +468,19 @@ static gint GtkLanguageMenus( gpointer p_data,
}
}
}
}
vlc_mutex_unlock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
/* link the new menu to the menubar item */
/* link the new menu to the menubar item */
gtk_menu_item_set_submenu
(
GTK_MENU_ITEM
(
p_root
),
p_menu
);
gtk_menu_item_set_submenu
(
GTK_MENU_ITEM
(
p_root
),
p_menu
);
/* acitvation will call signals so we can only do it
/* acitvation will call signals so we can only do it
* when submenu is attached to menu - to get intf_window */
* when submenu is attached to menu - to get intf_window
* We have to release the lock since input_ToggleES needs it */
if
(
p_item_active
!=
NULL
)
if
(
p_item_active
!=
NULL
)
{
{
vlc_mutex_unlock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
gtk_check_menu_item_set_active
(
GTK_CHECK_MENU_ITEM
(
p_item_active
),
gtk_check_menu_item_set_active
(
GTK_CHECK_MENU_ITEM
(
p_item_active
),
TRUE
);
TRUE
);
vlc_mutex_lock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
}
}
/* be sure that menu is sensitive if non empty */
/* be sure that menu is sensitive if non empty */
...
@@ -487,6 +491,7 @@ static gint GtkLanguageMenus( gpointer p_data,
...
@@ -487,6 +491,7 @@ static gint GtkLanguageMenus( gpointer p_data,
return
TRUE
;
return
TRUE
;
}
}
#if 1
#if 1
/*****************************************************************************
/*****************************************************************************
* GtkTitleMenu: sets menus for titles and chapters selection
* GtkTitleMenu: sets menus for titles and chapters selection
...
@@ -708,10 +713,14 @@ static gint GtkTitleMenu( gpointer p_data,
...
@@ -708,10 +713,14 @@ static gint GtkTitleMenu( gpointer p_data,
/* link the new menu to the menubar item */
/* link the new menu to the menubar item */
gtk_menu_item_set_submenu
(
GTK_MENU_ITEM
(
p_navigation
),
p_title_menu
);
gtk_menu_item_set_submenu
(
GTK_MENU_ITEM
(
p_navigation
),
p_title_menu
);
/* Default selected chapter
* We have to release the lock since input_ToggleES needs it */
if
(
p_item_active
!=
NULL
)
if
(
p_item_active
!=
NULL
)
{
{
vlc_mutex_unlock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
gtk_check_menu_item_set_active
(
GTK_CHECK_MENU_ITEM
(
p_item_active
),
gtk_check_menu_item_set_active
(
GTK_CHECK_MENU_ITEM
(
p_item_active
),
TRUE
);
TRUE
);
vlc_mutex_lock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
}
}
#if 0
#if 0
if( p_intf->p_input->stream.i_area_nb > 1 )
if( p_intf->p_input->stream.i_area_nb > 1 )
...
@@ -724,6 +733,7 @@ static gint GtkTitleMenu( gpointer p_data,
...
@@ -724,6 +733,7 @@ static gint GtkTitleMenu( gpointer p_data,
return
TRUE
;
return
TRUE
;
}
}
#endif
#endif
/*****************************************************************************
/*****************************************************************************
* GtkSetupMenu: function that generates title/chapter/audio/subpic
* GtkSetupMenu: function that generates title/chapter/audio/subpic
* menus with help from preceding functions
* menus with help from preceding functions
...
@@ -736,7 +746,9 @@ gint GtkSetupMenu( intf_thread_t * p_intf )
...
@@ -736,7 +746,9 @@ gint GtkSetupMenu( intf_thread_t * p_intf )
GtkWidget
*
p_popup_menu
;
GtkWidget
*
p_popup_menu
;
gint
i
;
gint
i
;
p_intf
->
p_sys
->
b_chapter_update
|=
p_intf
->
p_sys
->
b_title_update
;
p_intf
->
p_sys
->
b_chapter_update
|=
p_intf
->
p_sys
->
b_title_update
|
(
p_intf
->
p_sys
->
i_part
!=
p_intf
->
p_input
->
stream
.
p_selected_area
->
i_part
);
p_intf
->
p_sys
->
b_angle_update
|=
p_intf
->
p_sys
->
b_title_update
;
p_intf
->
p_sys
->
b_angle_update
|=
p_intf
->
p_sys
->
b_title_update
;
p_intf
->
p_sys
->
b_audio_update
|=
p_intf
->
p_sys
->
b_title_update
;
p_intf
->
p_sys
->
b_audio_update
|=
p_intf
->
p_sys
->
b_title_update
;
p_intf
->
p_sys
->
b_spu_update
|=
p_intf
->
p_sys
->
b_title_update
;
p_intf
->
p_sys
->
b_spu_update
|=
p_intf
->
p_sys
->
b_title_update
;
...
@@ -865,22 +877,6 @@ gint GtkSetupMenu( intf_thread_t * p_intf )
...
@@ -865,22 +877,6 @@ gint GtkSetupMenu( intf_thread_t * p_intf )
p_intf
->
p_sys
->
b_spu_update
=
0
;
p_intf
->
p_sys
->
b_spu_update
=
0
;
}
}
/* handle fullscreen check items */
if
(
p_vout_bank
->
i_count
)
{
p_menubar_menu
=
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_window
),
"menubar_fullscreen"
)
);
p_popup_menu
=
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_popup
),
"popup_fullscreen"
)
);
gtk_check_menu_item_set_active
(
GTK_CHECK_MENU_ITEM
(
p_menubar_menu
),
p_vout_bank
->
pp_vout
[
0
]
->
b_fullscreen
);
gtk_check_menu_item_set_active
(
GTK_CHECK_MENU_ITEM
(
p_popup_menu
),
p_vout_bank
->
pp_vout
[
0
]
->
b_fullscreen
);
}
return
TRUE
;
return
TRUE
;
}
}
plugins/gtk/gtk_menu.h
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_menu.h: prototypes for menu functions
* gtk_menu.h: prototypes for menu functions
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_menu.h,v 1.
1 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_menu.h,v 1.
2 2001/05/15 14:49:48
stef Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
...
@@ -21,18 +21,3 @@
...
@@ -21,18 +21,3 @@
* along with this program; if not, write to the Free Software
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
*****************************************************************************/
#if 0
void GtkMenubarAudioToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupAudioToggle ( GtkCheckMenuItem *, gpointer );
void GtkMenubarSubtitleToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupSubtitleToggle ( GtkCheckMenuItem *, gpointer );
void GtkMenubarTitleToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupTitleToggle ( GtkCheckMenuItem *, gpointer );
void GtkMenubarChapterToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupChapterToggle ( GtkCheckMenuItem *, gpointer );
void GtkMenubarAngleToggle ( GtkCheckMenuItem *, gpointer );
void GtkPopupAngleToggle ( GtkCheckMenuItem *, gpointer );
#endif
plugins/gtk/gtk_modules.c
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_modules.c : functions to build modules configuration boxes.
* gtk_modules.c : functions to build modules configuration boxes.
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_modules.c,v 1.
1 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_modules.c,v 1.
2 2001/05/15 14:49:48
stef 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>
...
@@ -81,3 +81,10 @@ void GtkModulesCancel( GtkButton * button, gpointer user_data )
...
@@ -81,3 +81,10 @@ void GtkModulesCancel( GtkButton * button, gpointer user_data )
gtk_widget_hide
(
p_intf
->
p_sys
->
p_modules
);
gtk_widget_hide
(
p_intf
->
p_sys
->
p_modules
);
}
}
/****************************************************************************
* Callbacks for menuitems
****************************************************************************/
void
GtkModulesActivate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
)
{
GtkModulesShow
(
GTK_WIDGET
(
menuitem
),
NULL
,
user_data
);
}
plugins/gtk/gtk_modules.h
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_modules.h: prototypes for modules functions
* gtk_modules.h: prototypes for modules functions
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_modules.h,v 1.
1 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_modules.h,v 1.
2 2001/05/15 14:49:48
stef Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
*****************************************************************************/
gboolean
GtkModulesShow
(
GtkWidget
*
widget
,
gboolean
GtkModulesShow
(
GtkWidget
*
,
GdkEventButton
*
,
gpointer
);
GdkEventButton
*
event
,
void
GtkModulesCancel
(
GtkButton
*
button
,
gpointer
);
gpointer
user_data
);
void
GtkModulesActivate
(
GtkMenuItem
*
menuitem
,
gpointer
);
void
GtkModulesCancel
(
GtkButton
*
button
,
gpointer
user_data
);
plugins/gtk/gtk_open.c
View file @
32ef13cf
...
@@ -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: gtk_open.c,v 1.
1 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_open.c,v 1.
2 2001/05/15 14:49:48
stef 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>
...
@@ -61,32 +61,9 @@
...
@@ -61,32 +61,9 @@
*****************************************************************************
*****************************************************************************
* The following callbacks are related to the file requester.
* The following callbacks are related to the file requester.
*****************************************************************************/
*****************************************************************************/
#if 0
gboolean
GtkFileOpenShow
(
GtkWidget
*
widget
,
void GtkFileOpenShow( GtkMenuItem * menuitem, gpointer user_data)
GdkEventButton
*
event
,
{
gpointer
user_data
)
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), (char*)user_data );
/* If we have never used the file selector, open it */
if( !GTK_IS_WIDGET( p_intf->p_sys->p_fileopen ) )
{
p_intf->p_sys->p_fileopen = create_intf_fileopen();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_fileopen ),
"p_intf", p_intf );
gtk_file_selection_set_filename( GTK_FILE_SELECTION(
p_intf->p_sys->p_fileopen ),
main_GetPszVariable( INTF_PATH_VAR, INTF_PATH_DEFAULT ) );
}
gtk_widget_show( p_intf->p_sys->p_fileopen );
gdk_window_raise( p_intf->p_sys->p_fileopen->window );
}
#else
gboolean
GtkFileOpenShow
(
GtkWidget
*
widget
,
GdkEventButton
*
event
,
gpointer
user_data
)
{
{
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
widget
),
(
char
*
)
user_data
);
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
widget
),
(
char
*
)
user_data
);
...
@@ -105,12 +82,11 @@ GtkFileOpenShow (GtkWidget *widget,
...
@@ -105,12 +82,11 @@ GtkFileOpenShow (GtkWidget *widget,
gtk_widget_show
(
p_intf
->
p_sys
->
p_fileopen
);
gtk_widget_show
(
p_intf
->
p_sys
->
p_fileopen
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_fileopen
->
window
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_fileopen
->
window
);
return
FALS
E
;
return
TRU
E
;
}
}
#endif
void
GtkFileOpenCancel
(
GtkButton
*
button
,
gpointer
user_data
)
void
GtkFileOpenCancel
(
GtkButton
*
button
,
gpointer
user_data
)
{
{
gtk_widget_hide
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
)
);
gtk_widget_hide
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
)
);
}
}
...
@@ -145,7 +121,6 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data )
...
@@ -145,7 +121,6 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data )
}
}
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
p_main
->
p_playlist
->
b_stopped
=
0
;
}
}
/*****************************************************************************
/*****************************************************************************
...
@@ -153,26 +128,9 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data )
...
@@ -153,26 +128,9 @@ void GtkFileOpenOk( GtkButton * button, gpointer user_data )
*****************************************************************************
*****************************************************************************
* The following callbacks are related to the disc manager.
* The following callbacks are related to the disc manager.
*****************************************************************************/
*****************************************************************************/
#if 0
gboolean
GtkDiscOpenShow
(
GtkWidget
*
widget
,
void GtkDiscOpenShow( GtkMenuItem * menuitem, gpointer user_data)
GdkEventButton
*
event
,
{
gpointer
user_data
)
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), (char*)user_data );
if( !GTK_IS_WIDGET( p_intf->p_sys->p_disc ) )
{
p_intf->p_sys->p_disc = create_intf_disc();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_disc ),
"p_intf", p_intf );
}
gtk_widget_show( p_intf->p_sys->p_disc );
gdk_window_raise( p_intf->p_sys->p_disc->window );
}
#else
gboolean
GtkDiscOpenShow
(
GtkWidget
*
widget
,
GdkEventButton
*
event
,
gpointer
user_data
)
{
{
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
widget
),
(
char
*
)
user_data
);
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
widget
),
(
char
*
)
user_data
);
...
@@ -186,10 +144,10 @@ GtkDiscOpenShow (GtkWidget *widget,
...
@@ -186,10 +144,10 @@ GtkDiscOpenShow (GtkWidget *widget,
gtk_widget_show
(
p_intf
->
p_sys
->
p_disc
);
gtk_widget_show
(
p_intf
->
p_sys
->
p_disc
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_disc
->
window
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_disc
->
window
);
return
FALS
E
;
return
TRU
E
;
}
}
#endif
void
GtkDiscOpenDvd
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
)
void
GtkDiscOpenDvd
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
)
{
{
if
(
togglebutton
->
active
)
if
(
togglebutton
->
active
)
...
@@ -201,7 +159,7 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
...
@@ -201,7 +159,7 @@ void GtkDiscOpenDvd( GtkToggleButton * togglebutton, gpointer user_data )
}
}
}
}
void
GtkDiscOpenVcd
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
)
void
GtkDiscOpenVcd
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
)
{
{
if
(
togglebutton
->
active
)
if
(
togglebutton
->
active
)
{
{
...
@@ -276,45 +234,24 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data )
...
@@ -276,45 +234,24 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data )
p_intf
->
p_input
->
b_eof
=
1
;
p_intf
->
p_input
->
b_eof
=
1
;
}
}
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
p_main
->
p_playlist
->
b_stopped
=
0
;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
void
GtkDiscOpenCancel
(
GtkButton
*
button
,
gpointer
user_data
)
void
GtkDiscOpenCancel
(
GtkButton
*
button
,
gpointer
user_data
)
{
{
gtk_widget_hide
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
)
);
gtk_widget_hide
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
)
);
}
}
/*****************************************************************************
/*****************************************************************************
* Network stream callbacks
* Network stream callbacks
*****************************************************************************
*****************************************************************************
* The following callbacks are related to the network stream manager.
* The following callbacks are related to the network stream manager.
*****************************************************************************/
*****************************************************************************/
#if 0
gboolean
GtkNetworkOpenShow
(
GtkWidget
*
widget
,
void GtkNetworkOpenShow( GtkMenuItem * menuitem, gpointer user_data)
GdkEventButton
*
event
,
{
gpointer
user_data
)
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), (char*)user_data );
if( !GTK_IS_WIDGET( p_intf->p_sys->p_network ) )
{
p_intf->p_sys->p_disc = create_intf_network();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_network ),
"p_intf", p_intf );
}
gtk_widget_show( p_intf->p_sys->p_network );
gdk_window_raise( p_intf->p_sys->p_network->window );
}
#else
gboolean
GtkNetworkOpenShow
(
GtkWidget
*
widget
,
GdkEventButton
*
event
,
gpointer
user_data
)
{
{
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
widget
),
(
char
*
)
user_data
);
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
widget
),
(
char
*
)
user_data
);
...
@@ -328,13 +265,10 @@ GtkNetworkOpenShow (GtkWidget *widget,
...
@@ -328,13 +265,10 @@ GtkNetworkOpenShow (GtkWidget *widget,
gtk_widget_show
(
p_intf
->
p_sys
->
p_network
);
gtk_widget_show
(
p_intf
->
p_sys
->
p_network
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_network
->
window
);
gdk_window_raise
(
p_intf
->
p_sys
->
p_network
->
window
);
return
FALS
E
;
return
TRU
E
;
}
}
#endif
void
GtkNetworkOpenOk
(
GtkButton
*
button
,
gpointer
user_data
)
void
GtkNetworkOpenOk
(
GtkButton
*
button
,
gpointer
user_data
)
{
{
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
button
),
"intf_network"
);
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
button
),
"intf_network"
);
...
@@ -428,12 +362,7 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
...
@@ -428,12 +362,7 @@ void GtkNetworkOpenOk( GtkButton *button, gpointer user_data )
p_intf
->
p_input
->
b_eof
=
1
;
p_intf
->
p_input
->
b_eof
=
1
;
}
}
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
p_main
->
p_playlist
->
b_stopped
=
0
;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
void
GtkNetworkOpenCancel
(
GtkButton
*
button
,
gpointer
user_data
)
void
GtkNetworkOpenCancel
(
GtkButton
*
button
,
gpointer
user_data
)
...
@@ -460,3 +389,24 @@ void GtkNetworkOpenBroadcast( GtkToggleButton * togglebutton,
...
@@ -460,3 +389,24 @@ void GtkNetworkOpenBroadcast( GtkToggleButton * togglebutton,
/****************************************************************************
* Callbacks for menuitem
****************************************************************************/
void
GtkFileOpenActivate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
)
{
GtkFileOpenShow
(
GTK_WIDGET
(
menuitem
),
NULL
,
user_data
);
}
void
GtkDiscOpenActivate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
)
{
GtkDiscOpenShow
(
GTK_WIDGET
(
menuitem
),
NULL
,
user_data
);
}
void
GtkNetworkOpenActivate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
)
{
GtkNetworkOpenShow
(
GTK_WIDGET
(
menuitem
),
NULL
,
user_data
);
}
plugins/gtk/gtk_open.h
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_open.h: prototypes for open functions
* gtk_open.h: prototypes for open functions
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_open.h,v 1.
1 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_open.h,v 1.
2 2001/05/15 14:49:48
stef 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>
...
@@ -22,35 +22,21 @@
...
@@ -22,35 +22,21 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
*****************************************************************************/
gboolean
gboolean
GtkFileOpenShow
(
GtkWidget
*
,
GdkEventButton
*
,
gpointer
);
GtkFileOpenShow
(
GtkWidget
*
widget
,
void
GtkFileOpenCancel
(
GtkButton
*
,
gpointer
);
GdkEventButton
*
event
,
void
GtkFileOpenOk
(
GtkButton
*
,
gpointer
);
gpointer
user_data
);
void
GtkFileOpenCancel
(
GtkButton
*
button
,
gpointer
user_data
);
gboolean
GtkDiscOpenShow
(
GtkWidget
*
,
GdkEventButton
*
,
gpointer
);
void
GtkDiscOpenDvd
(
GtkToggleButton
*
,
gpointer
);
void
GtkFileOpenOk
(
GtkButton
*
button
,
gpointer
user_data
);
void
GtkDiscOpenVcd
(
GtkToggleButton
*
,
gpointer
);
void
GtkDiscOpenOk
(
GtkButton
*
,
gpointer
);
void
GtkDiscOpenCancel
(
GtkButton
*
,
gpointer
);
gboolean
GtkDiscOpenShow
(
GtkWidget
*
widget
,
GdkEventButton
*
event
,
gpointer
user_data
);
void
GtkDiscOpenDvd
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
);
void
GtkDiscOpenVcd
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
);
void
GtkDiscOpenOk
(
GtkButton
*
button
,
gpointer
user_data
);
void
GtkDiscOpenCancel
(
GtkButton
*
button
,
gpointer
user_data
);
gboolean
GtkNetworkOpenShow
(
GtkWidget
*
widget
,
GdkEventButton
*
event
,
gpointer
user_data
);
void
GtkNetworkOpenOk
(
GtkButton
*
button
,
gpointer
user_data
);
void
GtkNetworkOpenCancel
(
GtkButton
*
button
,
gpointer
user_data
);
void
GtkNetworkOpenBroadcast
(
GtkToggleButton
*
togglebutton
,
gpointer
user_data
);
gboolean
GtkNetworkOpenShow
(
GtkWidget
*
,
GdkEventButton
*
,
gpointer
);
void
GtkNetworkOpenOk
(
GtkButton
*
,
gpointer
);
void
GtkNetworkOpenCancel
(
GtkButton
*
,
gpointer
);
void
GtkNetworkOpenBroadcast
(
GtkToggleButton
*
,
gpointer
);
void
GtkFileOpenActivate
(
GtkMenuItem
*
,
gpointer
);
void
GtkDiscOpenActivate
(
GtkMenuItem
*
,
gpointer
);
void
GtkNetworkOpenActivate
(
GtkMenuItem
*
,
gpointer
);
plugins/gtk/gtk_playlist.c
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_playlist.c : Interface for the playlist dialog
* gtk_playlist.c : Interface for the playlist dialog
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* Copyright (C) 2001 VideoLAN
* $Id: gtk_playlist.c,v 1.1
2 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_playlist.c,v 1.1
3 2001/05/15 14:49:48
stef Exp $
*
*
* Authors: Pierre Baillet <oct@zoy.org>
* Authors: Pierre Baillet <oct@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
...
@@ -74,9 +74,22 @@ gboolean GtkPlaylistShow( GtkWidget *widget,
...
@@ -74,9 +74,22 @@ gboolean GtkPlaylistShow( GtkWidget *widget,
if
(
!
GTK_IS_WIDGET
(
p_intf
->
p_sys
->
p_playlist
)
)
if
(
!
GTK_IS_WIDGET
(
p_intf
->
p_sys
->
p_playlist
)
)
{
{
/* The data types we are allowed to receive */
static
GtkTargetEntry
target_table
[]
=
{
{
"text/uri-list"
,
0
,
DROP_ACCEPT_TEXT_URI_LIST
},
{
"text/plain"
,
0
,
DROP_ACCEPT_TEXT_PLAIN
}
};
p_intf
->
p_sys
->
p_playlist
=
create_intf_playlist
();
p_intf
->
p_sys
->
p_playlist
=
create_intf_playlist
();
gtk_object_set_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_playlist
),
gtk_object_set_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_playlist
),
"p_intf"
,
p_intf
);
"p_intf"
,
p_intf
);
/* Accept file drops on the playlist window */
gtk_drag_dest_set
(
GTK_WIDGET
(
lookup_widget
(
p_intf
->
p_sys
->
p_playlist
,
"playlist_clist"
)
),
GTK_DEST_DEFAULT_ALL
,
target_table
,
1
,
GDK_ACTION_COPY
);
}
}
if
(
GTK_WIDGET_VISIBLE
(
p_intf
->
p_sys
->
p_playlist
)
)
if
(
GTK_WIDGET_VISIBLE
(
p_intf
->
p_sys
->
p_playlist
)
)
...
@@ -147,6 +160,12 @@ gboolean GtkPlaylistNext( GtkWidget *widget,
...
@@ -147,6 +160,12 @@ gboolean GtkPlaylistNext( GtkWidget *widget,
/****************************************************************************
/****************************************************************************
* Menu callbacks for playlist functions
* Menu callbacks for playlist functions
****************************************************************************/
****************************************************************************/
void
GtkPlaylistActivate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
)
{
GtkPlaylistShow
(
GTK_WIDGET
(
menuitem
),
NULL
,
user_data
);
}
void
GtkNextActivate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
)
void
GtkNextActivate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
)
{
{
GtkPlaylistNext
(
GTK_WIDGET
(
menuitem
),
NULL
,
user_data
);
GtkPlaylistNext
(
GTK_WIDGET
(
menuitem
),
NULL
,
user_data
);
...
@@ -294,12 +313,7 @@ gboolean GtkPlaylistEvent( GtkWidget * widget,
...
@@ -294,12 +313,7 @@ gboolean GtkPlaylistEvent( GtkWidget * widget,
p_intf
->
p_input
->
b_eof
=
1
;
p_intf
->
p_input
->
b_eof
=
1
;
}
}
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_row
-
1
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_row
-
1
);
p_main
->
p_playlist
->
b_stopped
=
0
;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -339,12 +353,7 @@ void GtkPlaylistDragData( GtkWidget *widget,
...
@@ -339,12 +353,7 @@ void GtkPlaylistDragData( GtkWidget *widget,
GtkDropDataReceived
(
p_intf
,
data
,
info
,
PLAYLIST_END
);
GtkDropDataReceived
(
p_intf
,
data
,
info
,
PLAYLIST_END
);
}
}
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
p_main
->
p_playlist
->
b_stopped
=
0
;
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
...
@@ -500,8 +509,6 @@ void GtkDropDataReceived( intf_thread_t * p_intf,
...
@@ -500,8 +509,6 @@ void GtkDropDataReceived( intf_thread_t * p_intf,
/* unlock the interface */
/* unlock the interface */
vlc_mutex_unlock
(
&
p_intf
->
change_lock
);
vlc_mutex_unlock
(
&
p_intf
->
change_lock
);
p_main
->
p_playlist
->
b_stopped
=
0
;
}
}
}
}
...
@@ -658,28 +665,35 @@ void GtkPlayListManage( intf_thread_t * p_intf )
...
@@ -658,28 +665,35 @@ void GtkPlayListManage( intf_thread_t * p_intf )
playlist_t
*
p_playlist
=
p_main
->
p_playlist
;
playlist_t
*
p_playlist
=
p_main
->
p_playlist
;
GtkCList
*
p_clist
;
GtkCList
*
p_clist
;
p_clist
=
GTK_CLIST
(
gtk_object_get_data
(
GTK_OBJECT
(
if
(
GTK_IS_WIDGET
(
p_intf
->
p_sys
->
p_playlist
)
)
p_intf
->
p_sys
->
p_playlist
),
"playlist_clist"
)
);
if
(
p_intf
->
p_sys
->
i_playing
!=
p_playlist
->
i_index
)
{
{
GdkColor
color
;
p_clist
=
GTK_CLIST
(
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_playlist
),
"playlist_clist"
)
);
color
.
red
=
0xffff
;
color
.
blue
=
0
;
vlc_mutex_lock
(
&
p_playlist
->
change_lock
);
color
.
green
=
0
;
if
(
p_intf
->
p_sys
->
i_playing
!=
p_playlist
->
i_index
)
gtk_clist_set_background
(
p_clist
,
p_playlist
->
i_index
,
&
color
);
if
(
p_intf
->
p_sys
->
i_playing
!=
-
1
)
{
{
GdkColor
color
;
color
.
red
=
0xffff
;
color
.
red
=
0xffff
;
color
.
blue
=
0xffff
;
color
.
blue
=
0
;
color
.
green
=
0xffff
;
color
.
green
=
0
;
gtk_clist_set_background
(
p_clist
,
p_intf
->
p_sys
->
i_playing
,
&
color
);
gtk_clist_set_background
(
p_clist
,
p_playlist
->
i_index
,
&
color
);
if
(
p_intf
->
p_sys
->
i_playing
!=
-
1
)
{
color
.
red
=
0xffff
;
color
.
blue
=
0xffff
;
color
.
green
=
0xffff
;
gtk_clist_set_background
(
p_clist
,
p_intf
->
p_sys
->
i_playing
,
&
color
);
}
p_intf
->
p_sys
->
i_playing
=
p_playlist
->
i_index
;
}
}
p_intf
->
p_sys
->
i_playing
=
p_playlist
->
i_index
;
vlc_mutex_unlock
(
&
p_playlist
->
change_lock
);
}
}
}
}
...
...
plugins/gtk/gtk_playlist.h
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_playlist.h : Playlist functions for the Gtk plugin.
* gtk_playlist.h : Playlist functions for the Gtk plugin.
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_playlist.h,v 1.
2 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_playlist.h,v 1.
3 2001/05/15 14:49:48
stef Exp $
*
*
* Authors: Pierre Baillet <oct@zoy.org>
* Authors: Pierre Baillet <oct@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
* Stphane Borel <stef@via.ecp.fr>
...
@@ -29,9 +29,10 @@ void GtkPlaylistInvert ( GtkMenuItem *, gpointer );
...
@@ -29,9 +29,10 @@ void GtkPlaylistInvert ( GtkMenuItem *, gpointer );
void
GtkPlaylistSelect
(
GtkMenuItem
*
,
gpointer
);
void
GtkPlaylistSelect
(
GtkMenuItem
*
,
gpointer
);
void
GtkPlaylistOk
(
GtkButton
*
,
gpointer
);
void
GtkPlaylistOk
(
GtkButton
*
,
gpointer
);
void
GtkPlaylistCancel
(
GtkButton
*
,
gpointer
);
void
GtkPlaylistCancel
(
GtkButton
*
,
gpointer
);
void
GtkPlaylistAddUrl
(
GtkMenuItem
*
,
gpointer
);
int
GtkHasValidExtension
(
gchar
*
);
gint
GtkCompareItems
(
gconstpointer
,
gconstpointer
);
gint
GtkCompareItems
(
gconstpointer
,
gconstpointer
);
int
GtkHasValidExtension
(
gchar
*
);
GList
*
GtkReadFiles
(
gchar
*
);
GList
*
GtkReadFiles
(
gchar
*
);
gboolean
GtkPlaylistShow
(
GtkWidget
*
,
GdkEventButton
*
,
gpointer
);
gboolean
GtkPlaylistShow
(
GtkWidget
*
,
GdkEventButton
*
,
gpointer
);
...
@@ -44,3 +45,8 @@ void GtkPlaylistDragData ( GtkWidget *, GdkDragContext *,
...
@@ -44,3 +45,8 @@ void GtkPlaylistDragData ( GtkWidget *, GdkDragContext *,
gint
,
gint
,
GtkSelectionData
*
,
gint
,
gint
,
GtkSelectionData
*
,
guint
,
guint
,
gpointer
);
guint
,
guint
,
gpointer
);
void
GtkDeleteGListItem
(
gpointer
,
gpointer
);
void
GtkDeleteGListItem
(
gpointer
,
gpointer
);
void
GtkPlaylistActivate
(
GtkMenuItem
*
,
gpointer
);
void
GtkNextActivate
(
GtkMenuItem
*
,
gpointer
);
void
GtkPrevActivate
(
GtkMenuItem
*
,
gpointer
);
plugins/gtk/gtk_preferences.c
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_control.c : functions to handle stream control buttons.
* gtk_control.c : functions to handle stream control buttons.
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_preferences.c,v 1.
1 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_preferences.c,v 1.
2 2001/05/15 14:49:48
stef 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>
...
@@ -318,3 +318,11 @@ void GtkPreferencesCancel( GtkButton * button, gpointer user_data )
...
@@ -318,3 +318,11 @@ void GtkPreferencesCancel( GtkButton * button, gpointer user_data )
{
{
gtk_widget_hide
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
)
);
gtk_widget_hide
(
gtk_widget_get_toplevel
(
GTK_WIDGET
(
button
)
)
);
}
}
/****************************************************************************
* Callbacks for menuitems
****************************************************************************/
void
GtkPreferencesActivate
(
GtkMenuItem
*
menuitem
,
gpointer
user_data
)
{
GtkPreferencesShow
(
GTK_WIDGET
(
menuitem
),
NULL
,
user_data
);
}
plugins/gtk/gtk_preferences.h
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* gtk_control.h: prototypes for control functions
* gtk_control.h: prototypes for control functions
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: gtk_preferences.h,v 1.
1 2001/05/15 01:01:44
stef Exp $
* $Id: gtk_preferences.h,v 1.
2 2001/05/15 14:49:48
stef 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>
...
@@ -22,7 +22,8 @@
...
@@ -22,7 +22,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
*****************************************************************************/
gboolean
GtkPreferencesShow
(
GtkWidget
*
,
GdkEventButton
*
,
gpointer
);
gboolean
GtkPreferencesShow
(
GtkWidget
*
,
GdkEventButton
*
,
gpointer
);
void
GtkPreferencesOk
(
GtkButton
*
,
gpointer
);
void
GtkPreferencesOk
(
GtkButton
*
,
gpointer
);
void
GtkPreferencesApply
(
GtkButton
*
,
gpointer
);
void
GtkPreferencesApply
(
GtkButton
*
,
gpointer
);
void
GtkPreferencesCancel
(
GtkButton
*
,
gpointer
);
void
GtkPreferencesCancel
(
GtkButton
*
,
gpointer
);
void
GtkPreferencesActivate
(
GtkMenuItem
*
,
gpointer
);
plugins/gtk/intf_gtk.c
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* intf_gtk.c: Gtk+ interface
* intf_gtk.c: Gtk+ interface
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gtk.c,v 1.1
8 2001/05/15 01:01:44
stef Exp $
* $Id: intf_gtk.c,v 1.1
9 2001/05/15 14:49:48
stef 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>
...
@@ -198,7 +198,7 @@ static void intf_Run( intf_thread_t *p_intf )
...
@@ -198,7 +198,7 @@ static void intf_Run( intf_thread_t *p_intf )
/* Create some useful widgets that will certainly be used */
/* Create some useful widgets that will certainly be used */
p_intf
->
p_sys
->
p_window
=
create_intf_window
(
);
p_intf
->
p_sys
->
p_window
=
create_intf_window
(
);
p_intf
->
p_sys
->
p_popup
=
create_intf_popup
(
);
p_intf
->
p_sys
->
p_popup
=
create_intf_popup
(
);
p_intf
->
p_sys
->
p_playlist
=
create_intf_playlist
(
);
p_intf
->
p_sys
->
p_playlist
=
create_intf_playlist
();
/* Set the title of the main window */
/* Set the title of the main window */
gtk_window_set_title
(
GTK_WINDOW
(
p_intf
->
p_sys
->
p_window
),
gtk_window_set_title
(
GTK_WINDOW
(
p_intf
->
p_sys
->
p_window
),
...
@@ -211,7 +211,7 @@ static void intf_Run( intf_thread_t *p_intf )
...
@@ -211,7 +211,7 @@ static void intf_Run( intf_thread_t *p_intf )
/* Accept file drops on the playlist window */
/* Accept file drops on the playlist window */
gtk_drag_dest_set
(
GTK_WIDGET
(
lookup_widget
(
p_intf
->
p_sys
->
p_playlist
,
gtk_drag_dest_set
(
GTK_WIDGET
(
lookup_widget
(
p_intf
->
p_sys
->
p_playlist
,
"playlist_clist"
)
),
"playlist_clist"
)
),
GTK_DEST_DEFAULT_ALL
,
target_table
,
GTK_DEST_DEFAULT_ALL
,
target_table
,
1
,
GDK_ACTION_COPY
);
1
,
GDK_ACTION_COPY
);
...
@@ -251,7 +251,7 @@ static void intf_Run( intf_thread_t *p_intf )
...
@@ -251,7 +251,7 @@ static void intf_Run( intf_thread_t *p_intf )
gtk_object_set_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_popup
),
gtk_object_set_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_popup
),
"p_intf"
,
p_intf
);
"p_intf"
,
p_intf
);
gtk_object_set_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_playlist
),
gtk_object_set_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_playlist
),
"p_intf"
,
p_intf
);
"p_intf"
,
p_intf
);
gtk_object_set_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_adj
),
gtk_object_set_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_adj
),
...
@@ -316,14 +316,14 @@ static gint GtkManage( gpointer p_data )
...
@@ -316,14 +316,14 @@ static gint GtkManage( gpointer p_data )
if
(
p_intf
->
p_input
!=
NULL
&&
!
p_intf
->
b_die
)
if
(
p_intf
->
p_input
!=
NULL
&&
!
p_intf
->
b_die
)
{
{
vlc_mutex_lock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
/* New input or stream map change */
/* New input or stream map change */
if
(
p_intf
->
p_input
->
stream
.
b_changed
)
if
(
p_intf
->
p_input
->
stream
.
b_changed
)
{
{
GtkModeManage
(
p_intf
);
GtkModeManage
(
p_intf
);
}
}
GtkSetupMenu
(
p_intf
);
/* Manage the slider */
/* Manage the slider */
if
(
p_intf
->
p_input
->
stream
.
b_seekable
)
if
(
p_intf
->
p_input
->
stream
.
b_seekable
)
{
{
...
@@ -346,14 +346,20 @@ static gint GtkManage( gpointer p_data )
...
@@ -346,14 +346,20 @@ static gint GtkManage( gpointer p_data )
else
if
(
p_intf
->
p_sys
->
b_slider_free
)
else
if
(
p_intf
->
p_sys
->
b_slider_free
)
{
{
off_t
i_seek
=
(
newvalue
*
p_area
->
i_size
)
/
100
;
off_t
i_seek
=
(
newvalue
*
p_area
->
i_size
)
/
100
;
/* release the lock to be able to seek */
vlc_mutex_unlock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
input_Seek
(
p_intf
->
p_input
,
i_seek
);
input_Seek
(
p_intf
->
p_input
,
i_seek
);
vlc_mutex_lock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
/* Update the old value */
/* Update the old value */
p_intf
->
p_sys
->
f_adj_oldvalue
=
newvalue
;
p_intf
->
p_sys
->
f_adj_oldvalue
=
newvalue
;
}
}
#undef p_area
#undef p_area
}
}
GtkSetupMenu
(
p_intf
);
vlc_mutex_unlock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
}
}
else
if
(
!
p_intf
->
b_die
)
else
if
(
!
p_intf
->
b_die
)
{
{
...
@@ -386,6 +392,7 @@ static gint GtkManage( gpointer p_data )
...
@@ -386,6 +392,7 @@ static gint GtkManage( gpointer p_data )
*****************************************************************************
*****************************************************************************
* This function displays the current date related to the position in
* This function displays the current date related to the position in
* the stream. It is called whenever the slider changes its value.
* the stream. It is called whenever the slider changes its value.
* The lock has to be taken before you call the function.
*****************************************************************************/
*****************************************************************************/
void
GtkDisplayDate
(
GtkAdjustment
*
p_adj
)
void
GtkDisplayDate
(
GtkAdjustment
*
p_adj
)
{
{
...
@@ -398,20 +405,19 @@ void GtkDisplayDate( GtkAdjustment *p_adj )
...
@@ -398,20 +405,19 @@ void GtkDisplayDate( GtkAdjustment *p_adj )
#define p_area p_intf->p_input->stream.p_selected_area
#define p_area p_intf->p_input->stream.p_selected_area
char
psz_time
[
OFFSETTOTIME_MAX_SIZE
];
char
psz_time
[
OFFSETTOTIME_MAX_SIZE
];
vlc_mutex_lock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
gtk_frame_set_label
(
GTK_FRAME
(
p_intf
->
p_sys
->
p_slider_frame
),
gtk_frame_set_label
(
GTK_FRAME
(
p_intf
->
p_sys
->
p_slider_frame
),
input_OffsetToTime
(
p_intf
->
p_input
,
psz_time
,
input_OffsetToTime
(
p_intf
->
p_input
,
psz_time
,
(
p_area
->
i_size
*
p_adj
->
value
)
/
100
)
);
(
p_area
->
i_size
*
p_adj
->
value
)
/
100
)
);
vlc_mutex_unlock
(
&
p_intf
->
p_input
->
stream
.
stream_lock
);
#undef p_area
#undef p_area
}
}
}
}
/*****************************************************************************
/*****************************************************************************
* GtkModeManage
* GtkModeManage: actualise the aspect of the interface whenever the input
* changes.
*****************************************************************************
* The lock has to be taken before you call the function.
*****************************************************************************/
*****************************************************************************/
static
gint
GtkModeManage
(
intf_thread_t
*
p_intf
)
static
gint
GtkModeManage
(
intf_thread_t
*
p_intf
)
{
{
...
@@ -497,10 +503,26 @@ static gint GtkModeManage( intf_thread_t * p_intf )
...
@@ -497,10 +503,26 @@ static gint GtkModeManage( intf_thread_t * p_intf )
}
}
else
else
{
{
/* default mode */
p_label
=
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_window
),
p_label
=
gtk_object_get_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_window
),
"label_status"
);
"label_status"
);
gtk_label_set_text
(
GTK_LABEL
(
p_label
),
""
);
gtk_label_set_text
(
GTK_LABEL
(
p_label
),
""
);
gtk_widget_show
(
GTK_WIDGET
(
p_file_box
)
);
gtk_widget_show
(
GTK_WIDGET
(
p_file_box
)
);
/* unsensitize menus */
gtk_widget_set_sensitive
(
GETWIDGET
(
p_window
,
"menubar_title"
),
FALSE
);
gtk_widget_set_sensitive
(
GETWIDGET
(
p_window
,
"menubar_chapter"
),
FALSE
);
gtk_widget_set_sensitive
(
GETWIDGET
(
p_window
,
"menubar_angle"
),
FALSE
);
gtk_widget_set_sensitive
(
GETWIDGET
(
p_window
,
"menubar_audio"
),
FALSE
);
gtk_widget_set_sensitive
(
GETWIDGET
(
p_window
,
"menubar_subpictures"
),
FALSE
);
gtk_widget_set_sensitive
(
GETWIDGET
(
p_popup
,
"popup_navigation"
),
FALSE
);
gtk_widget_set_sensitive
(
GETWIDGET
(
p_popup
,
"popup_angle"
),
FALSE
);
gtk_widget_set_sensitive
(
GETWIDGET
(
p_popup
,
"popup_audio"
),
FALSE
);
gtk_widget_set_sensitive
(
GETWIDGET
(
p_popup
,
"popup_subpictures"
),
FALSE
);
}
}
/* set control items */
/* set control items */
...
...
plugins/gtk/intf_gtk.glade
View file @
32ef13cf
...
@@ -942,7 +942,7 @@
...
@@ -942,7 +942,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkPlayActivate
</handler>
<handler>
GtkPlayActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:30:37
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:53:43
GMT
</last_modification_time>
</signal>
</signal>
<label>
_Play
</label>
<label>
_Play
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -956,7 +956,7 @@
...
@@ -956,7 +956,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkPauseActivate
</handler>
<handler>
GtkPauseActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:30:4
7 GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:53:3
7 GMT
</last_modification_time>
</signal>
</signal>
<label>
Pause
</label>
<label>
Pause
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -970,7 +970,7 @@
...
@@ -970,7 +970,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtKStopActivate
</handler>
<handler>
GtKStopActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:31:03
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:53:29
GMT
</last_modification_time>
</signal>
</signal>
<label>
Stop
</label>
<label>
Stop
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -984,7 +984,7 @@
...
@@ -984,7 +984,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkBackActivate
</handler>
<handler>
GtkBackActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:31:13
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:53:21
GMT
</last_modification_time>
</signal>
</signal>
<label>
Back
</label>
<label>
Back
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -998,7 +998,7 @@
...
@@ -998,7 +998,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkSlowActivate
</handler>
<handler>
GtkSlowActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:31:22
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:53:15
GMT
</last_modification_time>
</signal>
</signal>
<label>
Slow
</label>
<label>
Slow
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -1012,7 +1012,7 @@
...
@@ -1012,7 +1012,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkFastActivate
</handler>
<handler>
GtkFastActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:31:33
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:53:07
GMT
</last_modification_time>
</signal>
</signal>
<label>
Fast
</label>
<label>
Fast
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -1025,31 +1025,29 @@
...
@@ -1025,31 +1025,29 @@
</widget>
</widget>
<widget>
<widget>
<class>
Gtk
Check
MenuItem
</class>
<class>
GtkMenuItem
</class>
<name>
popup_interface_toggle
</name>
<name>
popup_interface_toggle
</name>
<signal>
<signal>
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkWindowToggleActivate
</handler>
<handler>
GtkWindowToggleActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:32:18
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:53:00
GMT
</last_modification_time>
</signal>
</signal>
<label>
Toggle _Interface
</label>
<label>
Toggle _Interface
</label>
<active>
True
</active>
<right_justify>
False
</right_justify>
<always_show_toggle>
True
</always_show_toggle>
</widget>
</widget>
<widget>
<widget>
<class>
Gtk
Check
MenuItem
</class>
<class>
GtkMenuItem
</class>
<name>
popup_fullscreen
</name>
<name>
popup_fullscreen
</name>
<signal>
<signal>
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkFullscreenActivate
</handler>
<handler>
GtkFullscreenActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:32:30
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:52:38
GMT
</last_modification_time>
</signal>
</signal>
<label>
_Fullscreen
</label>
<label>
_Fullscreen
</label>
<active>
False
</active>
<right_justify>
False
</right_justify>
<always_show_toggle>
True
</always_show_toggle>
</widget>
</widget>
<widget>
<widget>
...
@@ -1065,7 +1063,7 @@
...
@@ -1065,7 +1063,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkNextActivate
</handler>
<handler>
GtkNextActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:33:12
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:52:31
GMT
</last_modification_time>
</signal>
</signal>
<label>
Next
</label>
<label>
Next
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -1078,7 +1076,7 @@
...
@@ -1078,7 +1076,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkPrevActivate
</handler>
<handler>
GtkPrevActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:33:25
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:52:23
GMT
</last_modification_time>
</signal>
</signal>
<label>
Prev
</label>
<label>
Prev
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -1091,7 +1089,7 @@
...
@@ -1091,7 +1089,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkJumpActivate
</handler>
<handler>
GtkJumpActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:33:37
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:52:13
GMT
</last_modification_time>
</signal>
</signal>
<label>
_Jump...
</label>
<label>
_Jump...
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -1209,7 +1207,7 @@
...
@@ -1209,7 +1207,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkPlaylistActivate
</handler>
<handler>
GtkPlaylistActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:35:07
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:51:55
GMT
</last_modification_time>
</signal>
</signal>
<label>
Playlist...
</label>
<label>
Playlist...
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -1222,7 +1220,7 @@
...
@@ -1222,7 +1220,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkPreferencesActivate
</handler>
<handler>
GtkPreferencesActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:35:18
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:51:46
GMT
</last_modification_time>
</signal>
</signal>
<label>
_Preferences...
</label>
<label>
_Preferences...
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -1241,7 +1239,7 @@
...
@@ -1241,7 +1239,7 @@
<name>
activate
</name>
<name>
activate
</name>
<handler>
GtkExitActivate
</handler>
<handler>
GtkExitActivate
</handler>
<data>
"
intf_popup
"
</data>
<data>
"
intf_popup
"
</data>
<last_modification_time>
Mon, 14 May 2001 21:35:31
GMT
</last_modification_time>
<last_modification_time>
Tue, 15 May 2001 13:52:03
GMT
</last_modification_time>
</signal>
</signal>
<label>
E_xit
</label>
<label>
E_xit
</label>
<right_justify>
False
</right_justify>
<right_justify>
False
</right_justify>
...
@@ -2298,7 +2296,7 @@ Henri Fallon <henri@via.ecp.fr></label>
...
@@ -2298,7 +2296,7 @@ Henri Fallon <henri@via.ecp.fr></label>
<widget>
<widget>
<class>
GtkLabel
</class>
<class>
GtkLabel
</class>
<name>
jump_second
e
_label
</name>
<name>
jump_second_label
</name>
<label>
s.
</label>
<label>
s.
</label>
<justify>
GTK_JUSTIFY_CENTER
</justify>
<justify>
GTK_JUSTIFY_CENTER
</justify>
<wrap>
False
</wrap>
<wrap>
False
</wrap>
...
@@ -2316,7 +2314,7 @@ Henri Fallon <henri@via.ecp.fr></label>
...
@@ -2316,7 +2314,7 @@ Henri Fallon <henri@via.ecp.fr></label>
<widget>
<widget>
<class>
GtkSpinButton
</class>
<class>
GtkSpinButton
</class>
<name>
jump_second
e
_spinbutton
</name>
<name>
jump_second_spinbutton
</name>
<can_focus>
True
</can_focus>
<can_focus>
True
</can_focus>
<climb_rate>
1
</climb_rate>
<climb_rate>
1
</climb_rate>
<digits>
0
</digits>
<digits>
0
</digits>
...
@@ -2429,6 +2427,16 @@ Henri Fallon <henri@via.ecp.fr></label>
...
@@ -2429,6 +2427,16 @@ Henri Fallon <henri@via.ecp.fr></label>
<widget>
<widget>
<class>
GtkDialog
</class>
<class>
GtkDialog
</class>
<name>
intf_playlist
</name>
<name>
intf_playlist
</name>
<signal>
<name>
destroy
</name>
<handler>
gtk_widget_hide
</handler>
<last_modification_time>
Tue, 15 May 2001 14:20:39 GMT
</last_modification_time>
</signal>
<signal>
<name>
delete_event
</name>
<handler>
gtk_widget_hide
</handler>
<last_modification_time>
Tue, 15 May 2001 14:20:22 GMT
</last_modification_time>
</signal>
<title>
Playlist
</title>
<title>
Playlist
</title>
<type>
GTK_WINDOW_TOPLEVEL
</type>
<type>
GTK_WINDOW_TOPLEVEL
</type>
<position>
GTK_WIN_POS_NONE
</position>
<position>
GTK_WIN_POS_NONE
</position>
...
...
src/interface/interface.c
View file @
32ef13cf
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* interface, such as command line.
* interface, such as command line.
*****************************************************************************
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: interface.c,v 1.7
8 2001/05/15 01:01:44
stef Exp $
* $Id: interface.c,v 1.7
9 2001/05/15 14:49:48
stef Exp $
*
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
*
...
@@ -154,6 +154,8 @@ static void intf_Manage( intf_thread_t *p_intf )
...
@@ -154,6 +154,8 @@ static void intf_Manage( intf_thread_t *p_intf )
/* If no stream is being played, try to find one */
/* If no stream is being played, try to find one */
if
(
p_intf
->
p_input
==
NULL
&&
!
p_intf
->
b_die
)
if
(
p_intf
->
p_input
==
NULL
&&
!
p_intf
->
b_die
)
{
{
// vlc_mutex_lock( &p_main->p_playlist->change_lock );
if
(
!
p_main
->
p_playlist
->
b_stopped
)
if
(
!
p_main
->
p_playlist
->
b_stopped
)
{
{
/* Select the next playlist item */
/* Select the next playlist item */
...
@@ -167,6 +169,9 @@ static void intf_Manage( intf_thread_t *p_intf )
...
@@ -167,6 +169,9 @@ static void intf_Manage( intf_thread_t *p_intf )
else
else
{
{
p_main
->
p_playlist
->
b_stopped
=
0
;
p_main
->
p_playlist
->
b_stopped
=
0
;
p_main
->
p_playlist
->
i_mode
=
PLAYLIST_FORWARD
+
main_GetIntVariable
(
PLAYLIST_LOOP_VAR
,
PLAYLIST_LOOP_DEFAULT
);
p_intf
->
p_input
=
p_intf
->
p_input
=
input_CreateThread
(
&
p_main
->
p_playlist
->
current
,
NULL
);
input_CreateThread
(
&
p_main
->
p_playlist
->
current
,
NULL
);
}
}
...
@@ -186,6 +191,8 @@ static void intf_Manage( intf_thread_t *p_intf )
...
@@ -186,6 +191,8 @@ static void intf_Manage( intf_thread_t *p_intf )
p_vout_bank
->
i_count
--
;
p_vout_bank
->
i_count
--
;
}
}
}
}
// vlc_mutex_unlock( &p_main->p_playlist->change_lock );
}
}
}
}
...
...
src/interface/intf_playlist.c
View file @
32ef13cf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* intf_playlist.c : Playlist management functions
* intf_playlist.c : Playlist management functions
*****************************************************************************
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_playlist.c,v 1.
5 2001/05/15 01:01:44
stef Exp $
* $Id: intf_playlist.c,v 1.
6 2001/05/15 14:49:48
stef Exp $
*
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Authors: Samuel Hocevar <sam@zoy.org>
*
*
...
@@ -248,8 +248,6 @@ void intf_PlaylistDestroy( playlist_t * p_playlist )
...
@@ -248,8 +248,6 @@ void intf_PlaylistDestroy( playlist_t * p_playlist )
/*****************************************************************************
/*****************************************************************************
* intf_PlaylistJumpto: go to a specified position in playlist.
* intf_PlaylistJumpto: go to a specified position in playlist.
*****************************************************************************
* Note that this function does NOT take the lock
*****************************************************************************/
*****************************************************************************/
void
intf_PlaylistJumpto
(
playlist_t
*
p_playlist
,
int
i_pos
)
void
intf_PlaylistJumpto
(
playlist_t
*
p_playlist
,
int
i_pos
)
{
{
...
@@ -269,6 +267,7 @@ void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos)
...
@@ -269,6 +267,7 @@ void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos)
=
strdup
(
p_playlist
->
current
.
psz_name
);
=
strdup
(
p_playlist
->
current
.
psz_name
);
}
}
p_main
->
p_playlist
->
b_stopped
=
0
;
vlc_mutex_unlock
(
&
p_playlist
->
change_lock
);
vlc_mutex_unlock
(
&
p_playlist
->
change_lock
);
}
}
...
...
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