Revision: 1533 http://svn.sourceforge.net/geany/?rev=1533&view=rev Author: eht16 Date: 2007-05-15 05:35:21 -0700 (Tue, 15 May 2007)
Log Message: ----------- Fixed wrong clipboard target (closes #1711483).
Modified Paths: -------------- trunk/ChangeLog trunk/scintilla/ScintillaGTK.cxx
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-05-14 15:53:23 UTC (rev 1532) +++ trunk/ChangeLog 2007-05-15 12:35:21 UTC (rev 1533) @@ -1,3 +1,9 @@ +2007-05-15 Enrico Tröger enrico.troeger@uvena.de + + * scintilla/ScintillaGTK.cxx: + Fixed wrong clipboard target (closes #1711483). + + 2007-05-14 Nick Treleaven nick.treleaven@btinternet.com
* src/filetypes.c, src/filetypes.h:
Modified: trunk/scintilla/ScintillaGTK.cxx =================================================================== --- trunk/scintilla/ScintillaGTK.cxx 2007-05-14 15:53:23 UTC (rev 1532) +++ trunk/scintilla/ScintillaGTK.cxx 2007-05-15 12:35:21 UTC (rev 1533) @@ -307,12 +307,18 @@ GdkAtom ScintillaGTK::atomUriList = 0; GdkAtom ScintillaGTK::atomDROPFILES_DND = 0;
-static const GtkTargetEntry clipboardTargets[] = { +static const GtkTargetEntry clipboardCopyTargets[] = { + { "UTF8_STRING", 0, TARGET_UTF8_STRING }, + { "STRING", 0, TARGET_STRING }, +}; +static const gint nClipboardCopyTargets = sizeof(clipboardCopyTargets) / sizeof(clipboardCopyTargets[0]); + +static const GtkTargetEntry clipboardPasteTargets[] = { { "text/uri-list", 0, TARGET_URI }, { "UTF8_STRING", 0, TARGET_UTF8_STRING }, { "STRING", 0, TARGET_STRING }, }; -static const gint nClipboardTargets = sizeof(clipboardTargets) / sizeof(clipboardTargets[0]); +static const gint nClipboardPasteTargets = sizeof(clipboardPasteTargets) / sizeof(clipboardPasteTargets[0]);
static GtkWidget *PWidget(Window &w) { return reinterpret_cast<GtkWidget *>(w.GetID()); @@ -760,15 +766,15 @@ gtk_widget_grab_focus(PWidget(wMain));
gtk_selection_add_targets(GTK_WIDGET(PWidget(wMain)), GDK_SELECTION_PRIMARY, - clipboardTargets, nClipboardTargets); + clipboardPasteTargets, nClipboardPasteTargets);
#ifndef USE_GTK_CLIPBOARD gtk_selection_add_targets(GTK_WIDGET(PWidget(wMain)), atomClipboard, - clipboardTargets, nClipboardTargets); + clipboardPasteTargets, nClipboardPasteTargets); #endif
gtk_drag_dest_set(GTK_WIDGET(PWidget(wMain)), - GTK_DEST_DEFAULT_ALL, clipboardTargets, nClipboardTargets, + GTK_DEST_DEFAULT_ALL, clipboardPasteTargets, nClipboardPasteTargets, static_cast<GdkDragAction>(GDK_ACTION_COPY | GDK_ACTION_MOVE));
SetTicking(true); @@ -788,12 +794,7 @@
void ScintillaGTK::StartDrag() { dragWasDropped = false; - static const GtkTargetEntry targets[] = { - { "UTF8_STRING", 0, TARGET_UTF8_STRING }, - { "STRING", 0, TARGET_STRING }, - }; - static const gint n_targets = sizeof(targets) / sizeof(targets[0]); - GtkTargetList *tl = gtk_target_list_new(targets, n_targets); + GtkTargetList *tl = gtk_target_list_new(clipboardCopyTargets, nClipboardCopyTargets); gtk_drag_begin(GTK_WIDGET(PWidget(wMain)), tl, static_cast<GdkDragAction>(GDK_ACTION_COPY | GDK_ACTION_MOVE), @@ -1268,7 +1269,7 @@ SelectionText *clipText = new SelectionText(); clipText->Copy(selectedText);
- gtk_clipboard_set_with_data(clipBoard, clipboardTargets, nClipboardTargets, + gtk_clipboard_set_with_data(clipBoard, clipboardCopyTargets, nClipboardCopyTargets, ClipboardGetSelection, ClipboardClearSelection, clipText);
#endif @@ -1290,7 +1291,7 @@ SelectionText *clipText = new SelectionText(); CopySelectionRange(clipText);
- gtk_clipboard_set_with_data(clipBoard, clipboardTargets, nClipboardTargets, + gtk_clipboard_set_with_data(clipBoard, clipboardCopyTargets, nClipboardCopyTargets, ClipboardGetSelection, ClipboardClearSelection, clipText);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.