Define drag and drop target string in dnd.h.
authorLaurent Monin <geeqie@norz.org>
Fri, 11 Apr 2008 20:01:29 +0000 (20:01 +0000)
committerLaurent Monin <geeqie@norz.org>
Fri, 11 Apr 2008 20:01:29 +0000 (20:01 +0000)
Make it use the current name of the application.

src/collect-table.c
src/dnd.c
src/dnd.h
src/dupe.c

index 56b4827..bc395a3 100644 (file)
@@ -1984,14 +1984,14 @@ static GtkWidget *collection_table_drop_menu(CollectTable *ct)
  */
 
 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;
index 7ae79e5..b747445 100644 (file)
--- a/src/dnd.c
+++ b/src/dnd.c
@@ -26,7 +26,7 @@ GtkTargetEntry dnd_file_drag_types[] = {
 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;
index 8c7de1b..41948f7 100644 (file)
--- a/src/dnd.h
+++ b/src/dnd.h
@@ -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,
index f3bd9dc..b3a780d 100644 (file)
@@ -3361,7 +3361,7 @@ static GtkTargetEntry dupe_drag_types[] = {
 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;