Commit 88d90c73 authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Add function for receiving netscape URLs, clear colliding clipboard

2008-07-13  Christian Neumair  <cneumair@gnome.org>

	* libnautilus-private/nautilus-view.c
	(nautilus_view_drop_proxy_received_netscape_url):
	* libnautilus-private/nautilus-view.h:
	* src/file-manager/fm-directory-view.c
	(fm_directory_view_init_view_iface),
	(fm_directory_view_drop_proxy_received_uris),
	(fm_directory_view_drop_proxy_received_netscape_url):
	Add function for receiving netscape URLs, clear colliding clipboard
	contents when receiving dropped URIs.

svn path=/trunk/; revision=14355
parent 2126560b
2008-07-13 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-view.c
(nautilus_view_drop_proxy_received_netscape_url):
* libnautilus-private/nautilus-view.h:
* src/file-manager/fm-directory-view.c
(fm_directory_view_init_view_iface),
(fm_directory_view_drop_proxy_received_uris),
(fm_directory_view_drop_proxy_received_netscape_url):
Add function for receiving netscape URLs, clear colliding clipboard
contents when receiving dropped URIs.
2008-07-13 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-window-slot-info.c
......
......@@ -292,3 +292,17 @@ nautilus_view_drop_proxy_received_uris (NautilusView *view,
}
}
void
nautilus_view_drop_proxy_received_netscape_url (NautilusView *view,
const char *source_url,
const char *target_location,
GdkDragAction action)
{
g_return_if_fail (NAUTILUS_IS_VIEW (view));
if (NAUTILUS_VIEW_GET_IFACE (view)->drop_proxy_received_netscape_url != NULL) {
(* NAUTILUS_VIEW_GET_IFACE (view)->drop_proxy_received_netscape_url) (view, source_url, target_location, action);
}
}
......@@ -127,6 +127,10 @@ struct _NautilusViewIface
GList *uris,
const char *target_location,
GdkDragAction action);
void (* drop_proxy_received_netscape_url) (NautilusView *view,
const char *source_url,
const char *target_location,
GdkDragAction action);
/* Padding for future expansion */
void (*_reserved1) (void);
......@@ -171,6 +175,10 @@ void nautilus_view_drop_proxy_received_uris (NautilusView
GList *uris,
const char *target_location,
GdkDragAction action);
void nautilus_view_drop_proxy_received_netscape_url (NautilusView *view,
const char *source_url,
const char *target_location,
GdkDragAction action);
G_END_DECLS
......
......@@ -290,9 +290,13 @@ static void fm_directory_view_load_location (NautilusView
const char *location);
static void fm_directory_view_stop_loading (NautilusView *nautilus_view);
static void fm_directory_view_drop_proxy_received_uris (FMDirectoryView *view,
GList *uris,
const GList *source_uri_list,
const char *target_uri,
GdkDragAction action);
static void fm_directory_view_drop_proxy_received_netscape_url (FMDirectoryView *view,
const char *netscape_url,
const char *target_uri,
GdkDragAction action);
static void clipboard_changed_callback (NautilusClipboardMonitor *monitor,
FMDirectoryView *view);
static void open_one_in_new_window (gpointer data,
......@@ -1815,6 +1819,7 @@ fm_directory_view_init_view_iface (NautilusViewIface *iface)
iface->pop_up_location_context_menu = (gpointer)fm_directory_view_pop_up_location_context_menu;
iface->drop_proxy_received_uris = (gpointer)fm_directory_view_drop_proxy_received_uris;
iface->drop_proxy_received_netscape_url = (gpointer)fm_directory_view_drop_proxy_received_netscape_url;
}
static void
......@@ -7789,7 +7794,7 @@ fm_directory_view_pop_up_location_context_menu (FMDirectoryView *view,
static void
fm_directory_view_drop_proxy_received_uris (FMDirectoryView *view,
GList *uris,
const GList *source_uri_list,
const char *target_uri,
GdkDragAction action)
{
......@@ -7810,13 +7815,29 @@ fm_directory_view_drop_proxy_received_uris (FMDirectoryView *view,
}
}
fm_directory_view_move_copy_items (uris, NULL,
nautilus_clipboard_clear_if_colliding_uris (GTK_WIDGET (view),
source_uri_list,
fm_directory_view_get_copied_files_atom (view));
fm_directory_view_move_copy_items (source_uri_list, NULL,
target_uri != NULL ? target_uri : container_uri,
action, 0, 0, view);
g_free (container_uri);
}
static void
fm_directory_view_drop_proxy_received_netscape_url (FMDirectoryView *view,
const char *netscape_url,
const char *target_uri,
GdkDragAction action)
{
fm_directory_view_handle_netscape_url_drop (view,
netscape_url,
target_uri,
action, 0, 0);
}
static void
schedule_update_menus (FMDirectoryView *view)
{
......
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