Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
06aa618a
Commit
06aa618a
authored
Dec 12, 2002
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./modules/gui/familiar/*: compilation fixes. Crashes on directory change.
parent
9b08202a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
27 deletions
+48
-27
modules/gui/familiar/callbacks.c
modules/gui/familiar/callbacks.c
+8
-8
modules/gui/familiar/familiar.c
modules/gui/familiar/familiar.c
+40
-19
No files found.
modules/gui/familiar/callbacks.c
View file @
06aa618a
...
...
@@ -2,7 +2,7 @@
* callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: callbacks.c,v 1.1
1 2002/12/09 21:37:41 jpsaman
Exp $
* $Id: callbacks.c,v 1.1
2 2002/12/12 12:24:23 sam
Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
...
...
@@ -103,12 +103,12 @@ static void MediaURLOpenChanged( GtkWidget *widget, gchar *psz_url )
if
(
p_playlist
)
{
if
(
p_intf
->
p_sys
->
b_autoplayfile
)
{
{
playlist_Add
(
p_playlist
,
(
char
*
)
psz_url
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
}
else
{
else
{
playlist_Add
(
p_playlist
,
(
char
*
)
psz_url
,
PLAYLIST_APPEND
,
PLAYLIST_END
);
}
...
...
@@ -125,11 +125,12 @@ void ReadDirectory( GtkCList *clist, char *psz_dir )
struct
dirent
**
namelist
;
int
n
,
status
;
msg_Err
(
p_intf
,
"changing to dir %s
\n
"
,
psz_dir
);
if
(
psz_dir
)
{
status
=
chdir
(
psz_dir
);
if
(
status
<
0
)
intf_ErrMsg
(
"File is not a directory."
);
msg_Err
(
p_intf
,
"file is not a directory"
);
}
n
=
scandir
(
"."
,
&
namelist
,
0
,
alphasort
);
...
...
@@ -138,7 +139,7 @@ void ReadDirectory( GtkCList *clist, char *psz_dir )
else
{
gchar
*
ppsz_text
[
2
];
int
i
;
int
i
;
gtk_clist_freeze
(
clist
);
gtk_clist_clear
(
clist
);
...
...
@@ -316,7 +317,6 @@ on_toolbar_play_clicked (GtkButton *button,
if
(
p_playlist
!=
NULL
)
{
input_SetStatus
(
p_playlist
,
INPUT_STATUS_PLAY
);
p_main
->
p_playlist
->
b_stopped
=
0
;
gdk_window_lower
(
p_intf
->
p_sys
->
p_window
->
window
);
}
else
...
...
@@ -453,7 +453,7 @@ on_clistmedia_select_row (GtkCList *clist,
GdkEvent
*
event
,
gpointer
user_data
)
{
intf_thread_t
*
p_intf
=
p_main
->
p_intf
;
intf_thread_t
*
p_intf
=
GtkGetIntf
(
clist
)
;
gchar
*
text
[
2
];
gint
ret
;
struct
stat
st
;
...
...
modules/gui/familiar/familiar.c
View file @
06aa618a
...
...
@@ -2,7 +2,7 @@
* familiar.c : familiar plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: familiar.c,v 1.1
1 2002/12/09 21:37:41 jpsaman
Exp $
* $Id: familiar.c,v 1.1
2 2002/12/12 12:24:23 sam
Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
...
...
@@ -47,11 +47,11 @@
* Local prototypes.
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Run
(
intf_thread_t
*
);
static
void
Run
(
intf_thread_t
*
);
void
GtkAutoPlayFile
(
v
oid
);
void
GtkAutoPlayFile
(
v
lc_object_t
*
);
/*****************************************************************************
* Module descriptor
...
...
@@ -64,8 +64,8 @@ void GtkAutoPlayFile( void );
* Module descriptor
*****************************************************************************/
vlc_module_begin
();
add_category_
Hint
(
N_
(
"Miscellaneous"
),
NULL
)
add_bool
(
"familiar-autoplayfile"
,
1
,
GtkAutoPlayFile
,
AUTOPLAYFILE_TEXT
,
AUTOPLAYFILE_LONGTEXT
)
add_category_
hint
(
N_
(
"Miscellaneous"
),
NULL
);
add_bool
(
"familiar-autoplayfile"
,
1
,
GtkAutoPlayFile
,
AUTOPLAYFILE_TEXT
,
AUTOPLAYFILE_LONGTEXT
);
set_description
(
_
(
"Familiar Linux Gtk+ interface module"
)
);
set_capability
(
"interface"
,
70
);
set_callbacks
(
Open
,
Close
);
...
...
@@ -75,7 +75,7 @@ vlc_module_end();
* Open: initialize and create window
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
p_this
)
{
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
/* Allocate instance and initialize some members */
...
...
@@ -107,7 +107,7 @@ static int Open( vlc_object_t *p_this )
* Close: destroy interface window
*****************************************************************************/
static
void
Close
(
vlc_object_t
*
p_this
)
{
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
if
(
p_intf
->
p_sys
->
p_input
)
...
...
@@ -132,7 +132,7 @@ static void Run( intf_thread_t *p_intf )
#ifdef HAVE_GPE_INIT_H
/* Initialize GPE interface */
if
(
gpe_application_init
(
&
i_args
,
&
pp_args
)
==
FALSE
)
exit
(
1
);
exit
(
1
);
#else
/* Initialize Gtk+ */
gtk_set_locale
();
...
...
@@ -194,19 +194,40 @@ static void Run( intf_thread_t *p_intf )
/*****************************************************************************
* GtkAutoplayFile: Autoplay file depending on configuration settings
*****************************************************************************
* FIXME: we should get the intf as parameter
*****************************************************************************/
void
GtkAutoPlayFile
(
v
oid
)
void
GtkAutoPlayFile
(
v
lc_object_t
*
p_this
)
{
GtkWidget
*
cbautoplay
;
intf_thread_t
**
pp_intf
;
vlc_list_t
*
p_list
=
vlc_list_find
(
p_this
,
VLC_OBJECT_INTF
,
FIND_ANYWHERE
);
cbautoplay
=
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
p_main
->
p_intf
->
p_sys
->
p_window
),
"cbautoplay"
)
);
if
(
!
config_GetIntVariable
(
"familiar-autoplayfile"
)
)
p_main
->
p_intf
->
p_sys
->
b_autoplayfile
=
0
;
else
p_main
->
p_intf
->
p_sys
->
b_autoplayfile
=
1
;
for
(
pp_intf
=
(
intf_thread_t
**
)
p_list
->
pp_objects
;
*
pp_intf
;
pp_intf
++
)
{
if
(
strcmp
(
MODULE_STRING
,
(
*
pp_intf
)
->
p_module
->
psz_object_name
)
)
{
continue
;
}
cbautoplay
=
GTK_WIDGET
(
gtk_object_get_data
(
GTK_OBJECT
(
(
*
pp_intf
)
->
p_sys
->
p_window
),
"cbautoplay"
)
);
if
(
!
config_GetInt
(
p_this
,
"familiar-autoplayfile"
)
)
{
(
*
pp_intf
)
->
p_sys
->
b_autoplayfile
=
VLC_FALSE
;
}
else
{
(
*
pp_intf
)
->
p_sys
->
b_autoplayfile
=
VLC_TRUE
;
}
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
cbautoplay
),
(
*
pp_intf
)
->
p_sys
->
b_autoplayfile
);
}
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
cbautoplay
),
p_main
->
p_intf
->
p_sys
->
b_autoplayfile
);
vlc_list_release
(
p_list
);
}
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