[nautilus/remove-emblems-splitted: 12/23] Remove code for handling reset backgorund in DnD.



commit 3e1347c1100095b38deb2431a434ad56e543aafa
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sun Jul 25 11:53:54 2010 +0200

    Remove code for handling reset backgorund in DnD.

 libnautilus-private/nautilus-dnd.h      |    2 --
 libnautilus-private/nautilus-file-dnd.c |    1 -
 libnautilus-private/nautilus-icon-dnd.c |   11 -----------
 src/file-manager/fm-properties-window.c |    8 --------
 4 files changed, 0 insertions(+), 22 deletions(-)
---
diff --git a/libnautilus-private/nautilus-dnd.h b/libnautilus-private/nautilus-dnd.h
index 633054c..8060166 100644
--- a/libnautilus-private/nautilus-dnd.h
+++ b/libnautilus-private/nautilus-dnd.h
@@ -37,7 +37,6 @@
 #define NAUTILUS_ICON_DND_COLOR_TYPE		"application/x-color"
 #define NAUTILUS_ICON_DND_BGIMAGE_TYPE		"property/bgimage"
 #define NAUTILUS_ICON_DND_KEYWORD_TYPE		"property/keyword"
-#define NAUTILUS_ICON_DND_RESET_BACKGROUND_TYPE "x-special/gnome-reset-background"
 #define NAUTILUS_ICON_DND_ROOTWINDOW_DROP_TYPE	"application/x-rootwindow-drop"
 #define NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE	"XdndDirectSave0" /* XDS Protocol Type */
 #define NAUTILUS_ICON_DND_RAW_TYPE	"application/octet-stream"
@@ -59,7 +58,6 @@ typedef enum {
 	NAUTILUS_ICON_DND_BGIMAGE,
 	NAUTILUS_ICON_DND_KEYWORD,
 	NAUTILUS_ICON_DND_TEXT,
-	NAUTILUS_ICON_DND_RESET_BACKGROUND,
 	NAUTILUS_ICON_DND_XDNDDIRECTSAVE,
 	NAUTILUS_ICON_DND_RAW,
 	NAUTILUS_ICON_DND_ROOTWINDOW_DROP
diff --git a/libnautilus-private/nautilus-file-dnd.c b/libnautilus-private/nautilus-file-dnd.c
index 6901b83..7dd5ba2 100644
--- a/libnautilus-private/nautilus-file-dnd.c
+++ b/libnautilus-private/nautilus-file-dnd.c
@@ -134,7 +134,6 @@ nautilus_drag_can_accept_info (NautilusFile *drop_target_item,
 		/* TODO return TRUE for folders as soon as drop handling is implemented */
 		case NAUTILUS_ICON_DND_COLOR:
 		case NAUTILUS_ICON_DND_BGIMAGE:
-		case NAUTILUS_ICON_DND_RESET_BACKGROUND:
 			return FALSE;
 
 		default:
diff --git a/libnautilus-private/nautilus-icon-dnd.c b/libnautilus-private/nautilus-icon-dnd.c
index 9f7d077..4a672e9 100644
--- a/libnautilus-private/nautilus-icon-dnd.c
+++ b/libnautilus-private/nautilus-icon-dnd.c
@@ -73,7 +73,6 @@ static const GtkTargetEntry drop_types [] = {
 	{ NAUTILUS_ICON_DND_COLOR_TYPE, 0, NAUTILUS_ICON_DND_COLOR },
 	{ NAUTILUS_ICON_DND_BGIMAGE_TYPE, 0, NAUTILUS_ICON_DND_BGIMAGE },
 	{ NAUTILUS_ICON_DND_KEYWORD_TYPE, 0, NAUTILUS_ICON_DND_KEYWORD },
-	{ NAUTILUS_ICON_DND_RESET_BACKGROUND_TYPE,  0, NAUTILUS_ICON_DND_RESET_BACKGROUND },
 	{ NAUTILUS_ICON_DND_XDNDDIRECTSAVE_TYPE, 0, NAUTILUS_ICON_DND_XDNDDIRECTSAVE }, /* XDS Protocol Type */
 	{ NAUTILUS_ICON_DND_RAW_TYPE, 0, NAUTILUS_ICON_DND_RAW },
 	/* Must be last: */
@@ -1329,7 +1328,6 @@ nautilus_icon_container_get_drop_action (NautilusIconContainer *container,
 
 	case NAUTILUS_ICON_DND_COLOR:
 	case NAUTILUS_ICON_DND_BGIMAGE:
-	case NAUTILUS_ICON_DND_RESET_BACKGROUND:
 	case NAUTILUS_ICON_DND_ROOTWINDOW_DROP:
 		*action = gdk_drag_context_get_suggested_action (context);
 		break;
@@ -1732,7 +1730,6 @@ drag_data_received_callback (GtkWidget *widget,
 			     gpointer user_data)
 {
     	NautilusDragInfo *drag_info;
-	EelBackground *background;
 	char *tmp;
 	const char *tmp_raw;
 	int length;
@@ -1752,7 +1749,6 @@ drag_data_received_callback (GtkWidget *widget,
 	case NAUTILUS_ICON_DND_KEYWORD:
 	case NAUTILUS_ICON_DND_URI_LIST:
 	case NAUTILUS_ICON_DND_TEXT:
-	case NAUTILUS_ICON_DND_RESET_BACKGROUND:
 	case NAUTILUS_ICON_DND_XDNDDIRECTSAVE:
 	case NAUTILUS_ICON_DND_RAW:
 		/* Save the data so we can do the actual work on drop. */
@@ -1833,13 +1829,6 @@ drag_data_received_callback (GtkWidget *widget,
 				 context, x, y);
 			success = TRUE;
 			break;
-		case NAUTILUS_ICON_DND_RESET_BACKGROUND:
-			background = eel_get_widget_background (widget);
-			if (background != NULL) {
-				eel_background_reset (background);
-			}
-			gtk_drag_finish (context, FALSE, FALSE, time);			
-			break;
 		case NAUTILUS_ICON_DND_ROOTWINDOW_DROP:
 			/* Do nothing, everything is done by the sender */
 			break;
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index 6085e3e..48481b2 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -178,13 +178,11 @@ typedef struct {
 enum {
 	TARGET_URI_LIST,
 	TARGET_GNOME_URI_LIST,
-	TARGET_RESET_BACKGROUND
 };
 
 static const GtkTargetEntry target_table[] = {
 	{ "text/uri-list",  0, TARGET_URI_LIST },
 	{ "x-special/gnome-icon-list",  0, TARGET_GNOME_URI_LIST },
-	{ "x-special/gnome-reset-background", 0, TARGET_RESET_BACKGROUND }
 };
 
 #define DIRECTORY_CONTENTS_UPDATE_INTERVAL	200 /* milliseconds */
@@ -490,12 +488,6 @@ fm_properties_window_drag_data_received (GtkWidget *widget, GdkDragContext *cont
 	image = GTK_IMAGE (widget);
  	window = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (image)));
 
-	if (info == TARGET_RESET_BACKGROUND) {
-		reset_icon (FM_PROPERTIES_WINDOW (window));
-		
-		return;
-	}
-	
 	uris = g_strsplit (gtk_selection_data_get_data (selection_data), "\r\n", 0);
 	exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0');
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]