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
c15864db
Commit
c15864db
authored
Oct 04, 2001
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Added HTTP url drop (from a WWW browser) to the gtk/gnome interface.
parent
882422ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
44 deletions
+36
-44
plugins/gtk/gtk_playlist.c
plugins/gtk/gtk_playlist.c
+30
-41
plugins/gtk/intf_gnome.c
plugins/gtk/intf_gnome.c
+2
-1
plugins/gtk/intf_gtk.c
plugins/gtk/intf_gtk.c
+2
-1
plugins/gtk/intf_gtk.h
plugins/gtk/intf_gtk.h
+2
-1
No files found.
plugins/gtk/gtk_playlist.c
View file @
c15864db
...
...
@@ -2,7 +2,7 @@
* gtk_playlist.c : Interface for the playlist dialog
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: gtk_playlist.c,v 1.1
8 2001/07/25 03:12:33
sam Exp $
* $Id: gtk_playlist.c,v 1.1
9 2001/10/04 00:50:24
sam Exp $
*
* Authors: Pierre Baillet <oct@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -80,26 +80,6 @@ gboolean GtkPlaylistShow( GtkWidget *widget,
{
intf_thread_t
*
p_intf
=
GetIntf
(
GTK_WIDGET
(
widget
),
(
char
*
)
user_data
);
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
();
gtk_object_set_data
(
GTK_OBJECT
(
p_intf
->
p_sys
->
p_playlist
),
"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
)
)
{
gtk_widget_hide
(
p_intf
->
p_sys
->
p_playlist
);
...
...
@@ -425,6 +405,7 @@ void GtkDropDataReceived( intf_thread_t * p_intf,
/* first we'll have to split against all the '\n' we have */
gchar
*
p_protocol
;
gchar
*
p_temp
;
gchar
*
p_next
;
gchar
*
p_string
=
p_data
->
data
;
GList
*
p_files
=
NULL
;
GtkCList
*
p_clist
;
...
...
@@ -448,34 +429,36 @@ void GtkDropDataReceived( intf_thread_t * p_intf,
/* this code was borrowed from xmms, thx guys :) */
while
(
*
p_string
)
{
p_
temp
=
strchr
(
p_string
,
'\n'
);
if
(
p_
temp
)
p_
next
=
strchr
(
p_string
,
'\n'
);
if
(
p_
next
)
{
if
(
*
(
p_
temp
-
1
)
==
'\r'
)
if
(
*
(
p_
next
-
1
)
==
'\r'
)
{
*
(
p_
temp
-
1
)
=
'\0'
;
*
(
p_
next
-
1
)
=
'\0'
;
}
*
p_
temp
=
'\0'
;
*
p_
next
=
'\0'
;
}
/* do we have a protocol or something ? */
p_
protocol
=
strstr
(
p_string
,
":/
"
);
if
(
p_
protocol
!=
NULL
)
p_
temp
=
strstr
(
p_string
,
":
"
);
if
(
p_
temp
!=
NULL
&&
p_temp
[
0
]
!=
'\0'
)
{
p_protocol
=
calloc
(
p_protocol
-
p_string
+
2
,
sizeof
(
char
)
);
p_protocol
=
strncpy
(
p_protocol
,
p_string
,
strstr
(
p_string
,
":/"
)
+
1
-
p_string
);
intf_WarnMsg
(
4
,
"Protocol dropped is %s"
,
p_protocol
);
p_string
+=
strlen
(
p_protocol
);
char
i_save
;
i_save
=
p_temp
[
0
];
p_temp
[
0
]
=
'\0'
;
p_protocol
=
strdup
(
p_string
);
p_temp
[
0
]
=
i_save
;
p_temp
++
;
/* Allowed things are proto: or proto:// */
if
(
p_
string
[
0
]
==
'/'
&&
p_string
[
1
]
==
'/'
)
if
(
p_
temp
[
0
]
==
'/'
&&
p_temp
[
1
]
==
'/'
)
{
/* eat
one '/'
*/
p_
string
++
;
/* eat
two '/'s
*/
p_
temp
+=
2
;
}
intf_WarnMsg
(
4
,
" Dropped %s"
,
p_string
);
intf_WarnMsg
(
4
,
"playlist: protocol '%s', target '%s'"
,
p_protocol
,
p_temp
);
}
else
{
...
...
@@ -491,14 +474,20 @@ void GtkDropDataReceived( intf_thread_t * p_intf,
{
p_files
=
g_list_concat
(
p_files
,
GtkReadFiles
(
p_string
)
);
}
else
{
p_files
=
g_list_concat
(
p_files
,
g_list_append
(
NULL
,
g_strdup
(
p_string
)
)
);
}
/* free the malloc and go on... */
free
(
p_protocol
);
if
(
!
p_temp
)
if
(
p_next
==
NULL
)
{
break
;
}
p_string
=
p_
temp
+
1
;
p_string
=
p_
next
+
1
;
}
/* At this point, we have a nice big list maybe NULL */
...
...
plugins/gtk/intf_gnome.c
View file @
c15864db
...
...
@@ -2,7 +2,7 @@
* intf_gnome.c: Gnome interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gnome.c,v 1.
3 2001/05/30 23:02:04 stef
Exp $
* $Id: intf_gnome.c,v 1.
4 2001/10/04 00:50:24 sam
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -185,6 +185,7 @@ static void intf_Run( intf_thread_t *p_intf )
/* The data types we are allowed to receive */
static
GtkTargetEntry
target_table
[]
=
{
{
"STRING"
,
0
,
DROP_ACCEPT_STRING
},
{
"text/uri-list"
,
0
,
DROP_ACCEPT_TEXT_URI_LIST
},
{
"text/plain"
,
0
,
DROP_ACCEPT_TEXT_PLAIN
}
};
...
...
plugins/gtk/intf_gtk.c
View file @
c15864db
...
...
@@ -2,7 +2,7 @@
* intf_gtk.c: Gtk+ interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gtk.c,v 1.2
5 2001/05/31 12:45:39
sam Exp $
* $Id: intf_gtk.c,v 1.2
6 2001/10/04 00:50:24
sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
...
...
@@ -187,6 +187,7 @@ static void intf_Run( intf_thread_t *p_intf )
/* The data types we are allowed to receive */
static
GtkTargetEntry
target_table
[]
=
{
{
"STRING"
,
0
,
DROP_ACCEPT_STRING
},
{
"text/uri-list"
,
0
,
DROP_ACCEPT_TEXT_URI_LIST
},
{
"text/plain"
,
0
,
DROP_ACCEPT_TEXT_PLAIN
}
};
...
...
plugins/gtk/intf_gtk.h
View file @
c15864db
...
...
@@ -2,7 +2,7 @@
* intf_gtk.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gtk.h,v 1.
7 2001/06/14 01:49:4
4 sam Exp $
* $Id: intf_gtk.h,v 1.
8 2001/10/04 00:50:2
4 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -26,6 +26,7 @@
*****************************************************************************/
#define DROP_ACCEPT_TEXT_URI_LIST 0
#define DROP_ACCEPT_TEXT_PLAIN 1
#define DROP_ACCEPT_STRING 2
/*****************************************************************************
* Useful inline function
...
...
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