Commit 2f970025 authored by Dave Camp's avatar Dave Camp Committed by Dave Camp

Set the GdkScreen on the drag-and-drop context menu. Fixes #90920.

2003-02-08  Dave Camp  <dave@ximian.com>

	* libnautilus-private/nautilus-dnd.c:
	(nautilus_drag_drop_action_ask),
	(nautilus_drag_drop_background_ask):
	* libnautilus-private/nautilus-dnd.h:
	* libnautilus-private/nautilus-icon-dnd.c:
	(get_background_drag_action),
	(nautilus_icon_container_receive_dropped_icons):
	* libnautilus-private/nautilus-tree-view-drag-dest.c:
	(receive_uris):
	* src/file-manager/fm-icon-view.c: (icon_view_handle_uri_list):
	* src/nautilus-information-panel.c: (receive_dropped_uri_list),
	(receive_dropped_color): Set the GdkScreen on the drag-and-drop
	context menu.  Fixes #90920.
parent 911f045f
2003-02-08 Dave Camp <dave@ximian.com>
* libnautilus-private/nautilus-dnd.c:
(nautilus_drag_drop_action_ask),
(nautilus_drag_drop_background_ask):
* libnautilus-private/nautilus-dnd.h:
* libnautilus-private/nautilus-icon-dnd.c:
(get_background_drag_action),
(nautilus_icon_container_receive_dropped_icons):
* libnautilus-private/nautilus-tree-view-drag-dest.c:
(receive_uris):
* src/file-manager/fm-icon-view.c: (icon_view_handle_uri_list):
* src/nautilus-information-panel.c: (receive_dropped_uri_list),
(receive_dropped_color): Set the GdkScreen on the drag-and-drop
context menu. Fixes #90920.
2003-02-08 Dave Camp <dave@ximian.com>
* libnautilus-private/nautilus-icon-factory.c:
......
......@@ -551,7 +551,8 @@ append_drop_action_menu_item (GtkWidget *menu,
/* Pops up a menu of actions to perform on dropped files */
GdkDragAction
nautilus_drag_drop_action_ask (GdkDragAction actions)
nautilus_drag_drop_action_ask (GtkWidget *widget,
GdkDragAction actions)
{
GtkWidget *menu;
GtkWidget *menu_item;
......@@ -561,6 +562,7 @@ nautilus_drag_drop_action_ask (GdkDragAction actions)
* allowed actions.
*/
menu = gtk_menu_new ();
gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));
append_drop_action_menu_item (menu, _("_Move here"),
GDK_ACTION_MOVE,
......@@ -614,7 +616,8 @@ nautilus_drag_drop_action_ask (GdkDragAction actions)
}
GdkDragAction
nautilus_drag_drop_background_ask (GdkDragAction actions)
nautilus_drag_drop_background_ask (GtkWidget *widget,
GdkDragAction actions)
{
GtkWidget *menu;
GtkWidget *menu_item;
......@@ -624,6 +627,7 @@ nautilus_drag_drop_background_ask (GdkDragAction actions)
* allowed actions.
*/
menu = gtk_menu_new ();
gtk_menu_set_screen (GTK_MENU (menu), gtk_widget_get_screen (widget));
append_drop_action_menu_item (menu, _("Set as background for _all folders"),
NAUTILUS_DND_ACTION_SET_AS_GLOBAL_BACKGROUND,
......
......@@ -128,8 +128,10 @@ gboolean nautilus_drag_drag_data_get (GtkWidg
int nautilus_drag_modifier_based_action (int default_action,
int non_default_action);
GdkDragAction nautilus_drag_drop_action_ask (GdkDragAction possible_actions);
GdkDragAction nautilus_drag_drop_background_ask (GdkDragAction possible_actions);
GdkDragAction nautilus_drag_drop_action_ask (GtkWidget *widget,
GdkDragAction possible_actions);
GdkDragAction nautilus_drag_drop_background_ask (GtkWidget *widget,
GdkDragAction possible_actions);
gboolean nautilus_drag_autoscroll_in_scroll_region (GtkWidget *widget);
void nautilus_drag_autoscroll_calculate_delta (GtkWidget *widget,
......
......@@ -535,7 +535,8 @@ get_background_drag_action (NautilusIconContainer *container,
valid_actions |= NAUTILUS_DND_ACTION_SET_AS_GLOBAL_BACKGROUND;
}
action = nautilus_drag_drop_background_ask (valid_actions);
action = nautilus_drag_drop_background_ask
(GTK_WIDGET (container), valid_actions);
}
return action;
......@@ -979,7 +980,8 @@ nautilus_icon_container_receive_dropped_icons (NautilusIconContainer *container,
action |= NAUTILUS_DND_ACTION_SET_AS_BACKGROUND;
}
}
context->action = nautilus_drag_drop_action_ask (action);
context->action = nautilus_drag_drop_action_ask
(GTK_WIDGET (container), action);
}
if (context->action == NAUTILUS_DND_ACTION_SET_AS_BACKGROUND) {
......
......@@ -441,7 +441,8 @@ receive_uris (NautilusTreeViewDragDest *dest,
} else {
action = GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK;
}
context->action = nautilus_drag_drop_action_ask (action);
context->action = nautilus_drag_drop_action_ask
(GTK_WIDGET (dest->details->tree_view), action);
}
/* We only want to copy external uris */
......
......@@ -2309,7 +2309,8 @@ icon_view_handle_uri_list (NautilusIconContainer *container, const char *item_ur
if (action == GDK_ACTION_ASK) {
action = nautilus_drag_drop_action_ask
(GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK);
(GTK_WIDGET (container),
GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK);
}
/* We don't support GDK_ACTION_ASK or GDK_ACTION_PRIVATE
......
......@@ -483,7 +483,7 @@ receive_dropped_uri_list (NautilusInformationPanel *information_panel,
*/
if (exactly_one && uri_is_local_image (uris[0])) {
if (action == GDK_ACTION_ASK) {
action = nautilus_drag_drop_background_ask (NAUTILUS_DND_ACTION_SET_AS_BACKGROUND | NAUTILUS_DND_ACTION_SET_AS_GLOBAL_BACKGROUND);
action = nautilus_drag_drop_background_ask (GTK_WIDGET (information_panel), NAUTILUS_DND_ACTION_SET_AS_BACKGROUND | NAUTILUS_DND_ACTION_SET_AS_GLOBAL_BACKGROUND);
}
if (action > 0) {
......@@ -567,7 +567,7 @@ receive_dropped_color (NautilusInformationPanel *information_panel,
case ICON_PART:
case BACKGROUND_PART:
if (action == GDK_ACTION_ASK) {
action = nautilus_drag_drop_background_ask (NAUTILUS_DND_ACTION_SET_AS_BACKGROUND | NAUTILUS_DND_ACTION_SET_AS_GLOBAL_BACKGROUND);
action = nautilus_drag_drop_background_ask (GTK_WIDGET (information_panel), NAUTILUS_DND_ACTION_SET_AS_BACKGROUND | NAUTILUS_DND_ACTION_SET_AS_GLOBAL_BACKGROUND);
}
if (action > 0) {
......
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