pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Re: Windows PSPPIRE/PSPP is pretty wonky


From: Harry Thijssen
Subject: Re: Re: Re: Windows PSPPIRE/PSPP is pretty wonky
Date: Tue, 6 Jan 2015 22:55:51 +0100

----------------------------------------------------

On Thu, Jan 01, 2015 at 08:43:38PM +0100, Harry Thijssen wrote:
     >
     > On Tue, Dec 30, 2014 at 04:58:48PM -0600, Alan Mead wrote:
     >      John and Harry,
     >
     >      PSPPIRE.exe 0.8.4-g5ce6b1 (and the associated PSPP) is pretty wonky.
     >      Paste doesn't work correctly (I believe that's a know issue?). To
     > paste
     >      syntax into the syntax window, I had to right-click and choose paste;
     >      neither Control-v or Edit > Paste would paste the text.
     >

     I could reproduce this and it is indeed realy strange. It is not limited to
     the syntax window, but the same happens in the dataview. If you copy some
     data from outside PSPPIRE (for example from notepad to psppire)  you can
     only paste it in PSPPIRE when you right-click. Data copied from inside
     PSPPIRE (for instance from dataview to syntax editor) can be copied pasted
     the usual way!
     A reason for this.......I have no idea...


Looking at the code near line 385 in psppire-syntax-window.c  I am guessing that this is due
to the encoding type declared by the clipboard contents.

Perhaps you could do some experiements to see if the functions
on_edit_paste and/or contents_received_callback are actually called?
And if the latter does get called, what is the value of the type field
in the GtkSelectionData ?

Always fun with MSWindows address@hidden&*

If I copy a text, start the syntaxeditor and paste the text. The text get pasted and I get no printf that on_edit_paste and/or contents_received_callback is entered. But I get the error message:
<psppire.exe:968>:Gdk-CRITICAL **: gdk_property_delete: assertion 'window != NULL' failed

If I start the syntaxeditor and then copy a text and try to paste it, Prinf reports that on_edit_paste and contents_received_callback are entered. The text is NOT pasted and I get the error
<psppire.exe:968>:Gdk-CRITICAL **: gtk_text_buffer_emit_insertion: assertion 'g_utf8_validate <text, len, NULL>'  failed

My other 2 printf's are not triggered.

I don't know how to printf  GtkSelectionData . So if it is needed, I need the printf statemet for that.

I used the attached patch.

Anything more I could do?

Have fun
iff -r -u b/src/ui/gui/psppire-syntax-window.c a/src/ui/gui/psppire-syntax-window.c
--- b/src/ui/gui/psppire-syntax-window.c    2014-12-14 01:52:34.000000000 +0100
+++ a/src/ui/gui/psppire-syntax-window.c    2015-01-06 21:23:14.449820019 +0100
@@ -376,13 +376,20 @@
                 GtkSelectionData *sd,
                 gpointer data)
 {
+      printf ("%s:%d contents_received_callback\n", __FILE__, __LINE__);
   PsppireSyntaxWindow *syntax_window = data;
 
   if ( sd->length < 0 )
+  {
+          printf ("%s:%d contents_received_callback sd->length < 0 \n", __FILE__, __LINE__);
     return;
+  }
 
   if ( sd->type != gdk_atom_intern ("UTF8_STRING", FALSE))
+  { 
+              printf ("%s:%d contents_received_callback sd->type != gdk_atom_intern ('UTF8_STRING', FALSE)) \n", __FILE__, __LINE__);
     return;
+  }
 
   gtk_text_buffer_insert_at_cursor (GTK_TEXT_BUFFER (syntax_window->buffer),
                     (gchar *) sd->data,
@@ -393,6 +400,7 @@
 static void
 on_edit_paste (PsppireSyntaxWindow *sw)
 {
+    printf ("%s:%d on_edit_paste\n", __FILE__, __LINE__);
   GdkDisplay *display = gtk_widget_get_display (GTK_WIDGET (sw));
   GtkClipboard *clipboard =
     gtk_clipboard_get_for_display (display, GDK_SELECTION_CLIPBOARD);



 






 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]