Commit db2e2f4f authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson
Browse files

Don't crash if file removed during start of drag. (#158196) Patch from

2005-10-03  Alexander Larsson  <alexl@redhat.com>

	* libnautilus-private/nautilus-icon-container.c:
	* libnautilus-private/nautilus-icon-private.h:
	Don't crash if file removed during start of drag. (#158196)
	Patch from Christian Neumair.

	Remove remove_context_menu_timeout, which is not needed anymore.
parent ca9eb1c4
2005-10-03 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-icon-container.c:
* libnautilus-private/nautilus-icon-private.h:
Don't crash if file removed during start of drag. (#158196)
Patch from Christian Neumair.
Remove remove_context_menu_timeout, which is not needed anymore.
2005-10-03 Alexander Larsson <alexl@redhat.com>
* src/file-manager/nautilus-directory-view-ui.xml:
......
......@@ -3353,21 +3353,11 @@ nautilus_icon_container_did_not_drag (NautilusIconContainer *container,
}
}
static void
remove_context_menu_timeout (NautilusIconContainer *container)
{
if (container->details->context_menu_timeout_id != 0) {
g_source_remove (container->details->context_menu_timeout_id);
container->details->context_menu_timeout_id = 0;
}
}
static void
clear_drag_state (NautilusIconContainer *container)
{
container->details->drag_icon = NULL;
container->details->drag_state = DRAG_STATE_INITIAL;
remove_context_menu_timeout (container);
}
static gboolean
......@@ -3586,8 +3576,6 @@ motion_notify_event (GtkWidget *widget,
container = NAUTILUS_ICON_CONTAINER (widget);
details = container->details;
remove_context_menu_timeout (container);
if (details->drag_button != 0) {
switch (details->drag_state) {
case DRAG_STATE_MOVE_OR_COPY:
......@@ -4790,6 +4778,9 @@ icon_destroy (NautilusIconContainer *container,
if (details->keyboard_icon_to_reveal == icon) {
unschedule_keyboard_icon_reveal (container);
}
if (details->drag_icon == icon) {
clear_drag_state (container);
}
if (details->drop_target == icon) {
details->drop_target = NULL;
}
......
......@@ -160,7 +160,6 @@ struct NautilusIconContainerDetails {
DragState drag_state;
gboolean drag_started;
StretchState stretch_start;
int context_menu_timeout_id;
gboolean icon_selected_on_button_down;
NautilusIcon *double_click_icon[2]; /* Both clicks in a double click need to be on the same icon */
......
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