changeset 316:2ebd0d9145cf

Define drag and drop target string in dnd.h. Make it use the current name of the application.
author zas_
date Fri, 11 Apr 2008 20:01:29 +0000
parents d5a3bcc6a694
children 46169c246c51
files src/collect-table.c src/dnd.c src/dnd.h src/dupe.c
diffstat 4 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/collect-table.c	Fri Apr 11 19:43:36 2008 +0000
+++ b/src/collect-table.c	Fri Apr 11 20:01:29 2008 +0000
@@ -1984,14 +1984,14 @@
  */
 
 static GtkTargetEntry collection_drag_types[] = {
-	{ "application/x-gqview-collection-member", 0, TARGET_APP_COLLECTION_MEMBER },
+	{ TARGET_APP_COLLECTION_MEMBER_STRING, 0, TARGET_APP_COLLECTION_MEMBER },
 	{ "text/uri-list", 0, TARGET_URI_LIST },
 	{ "text/plain", 0, TARGET_TEXT_PLAIN }
 };
 static gint n_collection_drag_types = 3;
 
 static GtkTargetEntry collection_drop_types[] = {
-	{ "application/x-gqview-collection-member", 0, TARGET_APP_COLLECTION_MEMBER },
+	{ TARGET_APP_COLLECTION_MEMBER_STRING, 0, TARGET_APP_COLLECTION_MEMBER },
 	{ "text/uri-list", 0, TARGET_URI_LIST }
 };
 static gint n_collection_drop_types = 2;
--- a/src/dnd.c	Fri Apr 11 19:43:36 2008 +0000
+++ b/src/dnd.c	Fri Apr 11 20:01:29 2008 +0000
@@ -26,7 +26,7 @@
 gint dnd_file_drag_types_count = 2;
 
 GtkTargetEntry dnd_file_drop_types[] = {
-	{ "application/x-gqview-collection-member", 0, TARGET_APP_COLLECTION_MEMBER },
+	{ TARGET_APP_COLLECTION_MEMBER_STRING, 0, TARGET_APP_COLLECTION_MEMBER },
 	{ "text/uri-list", 0, TARGET_URI_LIST }
 };
 gint dnd_file_drop_types_count = 2;
--- a/src/dnd.h	Fri Apr 11 19:43:36 2008 +0000
+++ b/src/dnd.h	Fri Apr 11 20:01:29 2008 +0000
@@ -13,6 +13,7 @@
 #ifndef DND_H
 #define DND_H
 
+#define TARGET_APP_COLLECTION_MEMBER_STRING "application/x-" GQ_APPNAME_LC "-collection-member"
 
 enum {
 	TARGET_APP_COLLECTION_MEMBER,
--- a/src/dupe.c	Fri Apr 11 19:43:36 2008 +0000
+++ b/src/dupe.c	Fri Apr 11 20:01:29 2008 +0000
@@ -3361,7 +3361,7 @@
 static gint n_dupe_drag_types = 2;
 
 static GtkTargetEntry dupe_drop_types[] = {
-        { "application/x-gqview-collection-member", 0, TARGET_APP_COLLECTION_MEMBER },
+        { TARGET_APP_COLLECTION_MEMBER_STRING, 0, TARGET_APP_COLLECTION_MEMBER },
         { "text/uri-list", 0, TARGET_URI_LIST }
 };
 static gint n_dupe_drop_types = 2;