psppire-button-editable: Fix infinite recursion in button-release-event.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 9 Nov 2012 06:10:58 +0000 (22:10 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 9 Nov 2012 06:10:58 +0000 (22:10 -0800)
"release" and "button-release-event" are different.  Before commit
8f843c3a5e905c (Avoid deprecated function: gtk_button_released),
psppire_button_editable_button_release() invoked the former.  That commit
changed it to invoke the latter, which is the same signal that the
function itself implements, hence causing infinite recursion.  This commit
changes it to invoke the former.

Without this commit, the following instructions reliably crash for me:

1. Load a data file, click over to variables tab.
2. Click on a ... button in the Type column.
3. Click on Cancel button in Type dialog.
4. Click on the same ... button as before.

With this commit, those instructions don't crash (the Type dialog pops
back up after step 4, as it should).

Reported by John Darrington.

src/ui/gui/psppire-button-editable.c

index 737c55bff919fe01e5a39a951cd45d19b421b5a5..530a9a4c4ed64de31d45a10b5c2dace06d33ba0d 100644 (file)
@@ -117,7 +117,7 @@ psppire_button_editable_button_release (GtkWidget      *widget,
 {
   if (event->button == 1)
     {
-      g_signal_emit_by_name (widget, "button-release-event", event, NULL);
+      g_signal_emit_by_name (widget, "released", event, NULL);
     }
 
   return TRUE;