Fixed wrong paste behaviour under Windows with some applications.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1137 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-12-21 16:41:36 +00:00
parent 6e3a376935
commit 48bddfce46
2 changed files with 19 additions and 0 deletions

View File

@ -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@uvena.de>

View File

@ -373,7 +373,24 @@ on_paste1_activate (GtkMenuItem *menuitem,
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))
{