aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2006-06-18 03:09:36 +0000
committernyamatongwe <unknown>2006-06-18 03:09:36 +0000
commit64ef3697f4ff2f7edf5e72056183882a0868ebd3 (patch)
tree51b547e4ae2c1947f3aec805f9acf23e1eba6f20
parent8478b4d48df976e9c7668c924e718f9c0428f5d6 (diff)
downloadscintilla-mirror-64ef3697f4ff2f7edf5e72056183882a0868ebd3.tar.gz
Patch from Robert Roessler to support DROPFILES_DND as equivalent format
to text/uri-list.
-rw-r--r--gtk/ScintillaGTK.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 733247cfd..8aaedca45 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -113,6 +113,7 @@ class ScintillaGTK : public ScintillaBase {
static GdkAtom atomUTF8;
static GdkAtom atomString;
static GdkAtom atomUriList;
+ static GdkAtom atomDROPFILES_DND;
GdkAtom atomSought;
#if PLAT_GTK_WIN32
@@ -302,6 +303,7 @@ GdkAtom ScintillaGTK::atomClipboard = 0;
GdkAtom ScintillaGTK::atomUTF8 = 0;
GdkAtom ScintillaGTK::atomString = 0;
GdkAtom ScintillaGTK::atomUriList = 0;
+GdkAtom ScintillaGTK::atomDROPFILES_DND = 0;
static const GtkTargetEntry clipboardTargets[] = {
{ "text/uri-list", 0, TARGET_URI },
@@ -1460,7 +1462,7 @@ void ScintillaGTK::ReceivedSelection(GtkSelectionData *selection_data) {
void ScintillaGTK::ReceivedDrop(GtkSelectionData *selection_data) {
dragWasDropped = true;
- if (selection_data->type == atomUriList) {
+ if (selection_data->type == atomUriList || selection_data->type == atomDROPFILES_DND) {
char *ptr = new char[selection_data->length + 1];
ptr[selection_data->length] = '\0';
memcpy(ptr, selection_data->data, selection_data->length);
@@ -2507,6 +2509,7 @@ void ScintillaGTK::ClassInit(OBJECT_CLASS* object_class, GtkWidgetClass *widget_
atomUTF8 = gdk_atom_intern("UTF8_STRING", FALSE);
atomString = GDK_SELECTION_TYPE_STRING;
atomUriList = gdk_atom_intern("text/uri-list", FALSE);
+ atomDROPFILES_DND = gdk_atom_intern("DROPFILES_DND", FALSE);
// Define default signal handlers for the class: Could move more
// of the signal handlers here (those that currently attached to wDraw