Commit 1be74338 authored by Sam Hocevar's avatar Sam Hocevar

* ./modules/gui/gtk/gtk.c, ./modules/gui/gtk/gnome.c: fixed drag'n'drop

    support in the Gtk+ and GNOME interfaces.
parent 7435437a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_common.h: private Gtk+ interface description * gtk_common.h: private Gtk+ interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: common.h,v 1.4 2002/12/06 16:34:07 sam Exp $ * $Id: common.h,v 1.5 2003/01/03 14:44:46 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define DROP_ACCEPT_TEXT_PLAIN 1 #define DROP_ACCEPT_TEXT_PLAIN 1
#define DROP_ACCEPT_STRING 2 #define DROP_ACCEPT_STRING 2
#define MAX_ATEXIT 10 #define DROP_ACCEPT_END 3
/***************************************************************************** /*****************************************************************************
* intf_sys_t: description and status of Gtk+ interface * intf_sys_t: description and status of Gtk+ interface
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc * gnome.c : Gnome plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * Copyright (C) 2000 VideoLAN
* $Id: gnome.c,v 1.4 2002/10/14 16:46:55 sam Exp $ * $Id: gnome.c,v 1.5 2003/01/03 14:44:46 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
...@@ -76,7 +76,7 @@ vlc_module_begin(); ...@@ -76,7 +76,7 @@ vlc_module_begin();
TOOLBAR_LONGTEXT ); TOOLBAR_LONGTEXT );
add_integer( "gnome-prefs-maxh", 480, NULL, add_integer( "gnome-prefs-maxh", 480, NULL,
PREFS_MAXH_TEXT, PREFS_MAXH_LONGTEXT ); PREFS_MAXH_TEXT, PREFS_MAXH_LONGTEXT );
set_description( _("GNOME interface module") ); set_description( _("GNOME interface module") );
set_capability( "interface", i ); set_capability( "interface", i );
set_callbacks( Open, Close ); set_callbacks( Open, Close );
...@@ -178,12 +178,12 @@ static void Run( intf_thread_t *p_intf ) ...@@ -178,12 +178,12 @@ static void Run( intf_thread_t *p_intf )
/* Accept file drops on the main window */ /* Accept file drops on the main window */
gtk_drag_dest_set( GTK_WIDGET( p_intf->p_sys->p_window ), gtk_drag_dest_set( GTK_WIDGET( p_intf->p_sys->p_window ),
GTK_DEST_DEFAULT_ALL, target_table, GTK_DEST_DEFAULT_ALL, target_table,
1, GDK_ACTION_COPY ); DROP_ACCEPT_END, GDK_ACTION_COPY );
/* Accept file drops on the playlist window */ /* Accept file drops on the playlist window */
gtk_drag_dest_set( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( gtk_drag_dest_set( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_playwin ), "playlist_clist") ), p_intf->p_sys->p_playwin ), "playlist_clist") ),
GTK_DEST_DEFAULT_ALL, target_table, GTK_DEST_DEFAULT_ALL, target_table,
1, GDK_ACTION_COPY ); DROP_ACCEPT_END, GDK_ACTION_COPY );
/* Get the slider object */ /* Get the slider object */
p_intf->p_sys->p_slider_frame = gtk_object_get_data( p_intf->p_sys->p_slider_frame = gtk_object_get_data(
...@@ -357,7 +357,7 @@ static void Manage( intf_thread_t *p_intf ) ...@@ -357,7 +357,7 @@ static void Manage( intf_thread_t *p_intf )
p_intf->p_sys->p_input = NULL; p_intf->p_sys->p_input = NULL;
} }
} }
if( p_intf->p_sys->p_input == NULL ) if( p_intf->p_sys->p_input == NULL )
{ {
p_intf->p_sys->p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT, p_intf->p_sys->p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk.c : Gtk+ plugin for vlc * gtk.c : Gtk+ plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: gtk.c,v 1.9 2002/12/06 16:34:07 sam Exp $ * $Id: gtk.c,v 1.10 2003/01/03 14:44:46 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -194,13 +194,13 @@ static void Run( intf_thread_t *p_intf ) ...@@ -194,13 +194,13 @@ static void Run( intf_thread_t *p_intf )
/* Accept file drops on the main window */ /* Accept file drops on the main window */
gtk_drag_dest_set( GTK_WIDGET( p_intf->p_sys->p_window ), gtk_drag_dest_set( GTK_WIDGET( p_intf->p_sys->p_window ),
GTK_DEST_DEFAULT_ALL, target_table, GTK_DEST_DEFAULT_ALL, target_table,
1, GDK_ACTION_COPY ); DROP_ACCEPT_END, GDK_ACTION_COPY );
/* 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_playwin, gtk_drag_dest_set( GTK_WIDGET( lookup_widget( p_intf->p_sys->p_playwin,
"playlist_clist") ), "playlist_clist") ),
GTK_DEST_DEFAULT_ALL, target_table, GTK_DEST_DEFAULT_ALL, target_table,
1, GDK_ACTION_COPY ); DROP_ACCEPT_END, GDK_ACTION_COPY );
/* Get the slider object */ /* Get the slider object */
p_intf->p_sys->p_slider_frame = GTK_FRAME( gtk_object_get_data( p_intf->p_sys->p_slider_frame = GTK_FRAME( gtk_object_get_data(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment