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
311544e3
Commit
311544e3
authored
Dec 20, 2002
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Defenitely fixed segmentation fault on directory change.
parent
71bd3efe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
modules/gui/familiar/callbacks.c
modules/gui/familiar/callbacks.c
+12
-5
modules/gui/familiar/familiar.c
modules/gui/familiar/familiar.c
+11
-1
No files found.
modules/gui/familiar/callbacks.c
View file @
311544e3
...
...
@@ -2,7 +2,7 @@
* callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: callbacks.c,v 1.1
7 2002/12/17 21:04:49
jpsaman Exp $
* $Id: callbacks.c,v 1.1
8 2002/12/20 21:33:40
jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
...
...
@@ -119,9 +119,9 @@ void ReadDirectory( GtkCList *clist, char *psz_dir )
{
intf_thread_t
*
p_intf
=
GtkGetIntf
(
GTK_WIDGET
(
clist
)
);
struct
dirent
**
namelist
;
int
n
,
status
;
int
n
=-
1
,
status
=-
1
;
msg_Dbg
(
p_intf
,
"changing to dir %s
\n
"
,
psz_dir
);
msg_Dbg
(
p_intf
,
"changing to dir %s"
,
psz_dir
);
if
(
psz_dir
)
{
status
=
chdir
(
psz_dir
);
...
...
@@ -134,18 +134,23 @@ void ReadDirectory( GtkCList *clist, char *psz_dir )
perror
(
"scandir"
);
else
{
gchar
*
ppsz_text
[
2
];
int
i
;
// msg_Dbg( p_intf, "updating interface" );
gtk_clist_freeze
(
clist
);
gtk_clist_clear
(
clist
);
for
(
i
=
0
;
i
<
n
;
i
++
)
{
gchar
*
ppsz_text
[
5
];
/* This is a list of strings. */
ppsz_text
[
0
]
=
namelist
[
i
]
->
d_name
;
ppsz_text
[
1
]
=
get_file_perm
(
namelist
[
i
]
->
d_name
);
ppsz_text
[
2
]
=
""
;
ppsz_text
[
3
]
=
""
;
ppsz_text
[
4
]
=
""
;
// msg_Dbg(p_intf, "(%d) file: %s permission: %s", i, ppsz_text[0], ppsz_text[1] );
gtk_clist_insert
(
clist
,
i
,
ppsz_text
);
gtk_clist_insert
(
GTK_CLIST
(
clist
)
,
i
,
ppsz_text
);
free
(
namelist
[
i
]);
}
gtk_clist_thaw
(
clist
);
...
...
@@ -467,6 +472,8 @@ on_clistmedia_select_row (GtkCList *clist,
gint
ret
;
struct
stat
st
;
if
(
!
p_intf
->
p_sys
->
p_clist
)
msg_Err
(
p_intf
,
"p_clist pointer is invalid."
);
ret
=
gtk_clist_get_text
(
p_intf
->
p_sys
->
p_clist
,
row
,
0
,
text
);
if
(
ret
)
{
...
...
modules/gui/familiar/familiar.c
View file @
311544e3
...
...
@@ -2,7 +2,7 @@
* familiar.c : familiar plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: familiar.c,v 1.1
7 2002/12/17 21:04:49
jpsaman Exp $
* $Id: familiar.c,v 1.1
8 2002/12/20 21:33:40
jpsaman Exp $
*
* Authors: Jean-Paul Saman <jpsaman@wxs.nl>
*
...
...
@@ -60,6 +60,10 @@ static int Manage ( intf_thread_t *p_intf );
#define AUTOPLAYFILE_LONGTEXT N_("automatically play a file when selected in the "\
"file selection list")
#ifndef NEED_GTK_MAIN
#define NEED_GTK_MAIN
#endif
/*****************************************************************************
* Module descriptor
*****************************************************************************/
...
...
@@ -87,6 +91,7 @@ static int Open( vlc_object_t *p_this )
}
#ifdef NEED_GTK_MAIN
msg_Dbg
(
p_intf
,
"Using gtk_main"
);
p_intf
->
p_sys
->
p_gtk_main
=
module_Need
(
p_this
,
"gtk_main"
,
"gtk"
);
if
(
p_intf
->
p_sys
->
p_gtk_main
==
NULL
)
{
...
...
@@ -117,6 +122,7 @@ static void Close( vlc_object_t *p_this )
}
#ifdef NEED_GTK_MAIN
msg_Dbg
(
p_intf
,
"Releasin gtk_main"
);
module_Unneed
(
p_intf
,
p_intf
->
p_sys
->
p_gtk_main
);
#endif
...
...
@@ -143,14 +149,17 @@ static void Run( intf_thread_t *p_intf )
#ifdef HAVE_GPE_INIT_H
/* Initialize GPE interface */
msg_Dbg
(
p_intf
,
"Starting familiar GPE interface"
);
if
(
gpe_application_init
(
&
i_args
,
&
pp_args
)
==
FALSE
)
exit
(
1
);
#else
gtk_set_locale
();
#ifndef NEED_GTK_MAIN
msg_Dbg
(
p_intf
,
"Starting familiar GTK+ interface"
);
gtk_init
(
&
i_args
,
&
pp_args
);
#else
/* Initialize Gtk+ */
msg_Dbg
(
p_intf
,
"Starting familiar GTK+ interface thread"
);
gdk_threads_enter
();
#endif
#endif
...
...
@@ -207,6 +216,7 @@ static void Run( intf_thread_t *p_intf )
* keyboard events, a 100ms delay is a good compromise */
i_dummy
=
gtk_timeout_add
(
INTF_IDLE_SLEEP
/
1000
,
(
GtkFunction
)
Manage
,
p_intf
);
/* Enter Gtk mode */
gtk_main
();
/* Remove the timeout */
...
...
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