SF.net SVN: geany: [1137] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Thu Dec 21 16:41:36 UTC 2006


Revision: 1137
          http://svn.sourceforge.net/geany/?rev=1137&view=rev
Author:   eht16
Date:     2006-12-21 08:41:36 -0800 (Thu, 21 Dec 2006)

Log Message:
-----------
Fixed wrong paste behaviour under Windows with some applications.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/callbacks.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-12-21 14:03:18 UTC (rev 1136)
+++ trunk/ChangeLog	2006-12-21 16:41:36 UTC (rev 1137)
@@ -5,6 +5,8 @@
    Fixed encoding of generated PDF file.
    Deleted all jpg images and replaced them by png images.
    Updated date in documentation and manpage.
+ * src/callbacks.c: Fixed wrong paste behaviour under Windows with some
+                    applications.
 
 
 2006-12-20  Enrico Tröger  <enrico.troeger at uvena.de>

Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c	2006-12-21 14:03:18 UTC (rev 1136)
+++ trunk/src/callbacks.c	2006-12-21 16:41:36 UTC (rev 1137)
@@ -373,7 +373,24 @@
 		gtk_editable_paste_clipboard(GTK_EDITABLE(focusw));
 	else
 	if (IS_SCINTILLA(focusw) && idx >= 0)
+	{
+#ifdef G_OS_WIN32
+		// insert the text manually for now, because the auto conversion of EOL characters by
+		// by Scintilla seems to make problems
+		if (gtk_clipboard_wait_is_text_available(gtk_clipboard_get(GDK_NONE)))
+		{
+			gchar *content = gtk_clipboard_wait_for_text(gtk_clipboard_get(GDK_NONE));
+			if (content != NULL)
+			{
+				sci_insert_text(doc_list[idx].sci,
+										sci_get_current_position(doc_list[idx].sci), content);
+				g_free(content);
+			}
+		}
+#else
 		sci_paste(doc_list[idx].sci);
+#endif
+	}
 	else
 	if (GTK_IS_TEXT_VIEW(focusw))
 	{


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list