Ticket #1162 (closed defect: fixed)
toResponse crashes the program if the response ID is 0 or less than -11.
|Reported by:||guest||Owned by:||somebody|
|Component:||general (Gtk+, Glib)||Version:||0.10.2|
The code for toResponse reads as follows:
toResponse :: Integral a => a -> ResponseId? toResponse (-1) = ResponseNone? toResponse (-2) = ResponseReject? toResponse (-3) = ResponseAccept? toResponse (-4) = ResponseDeleteEvent? toResponse (-5) = ResponseOk? toResponse (-6) = ResponseCancel? toResponse (-7) = ResponseClose? toResponse (-8) = ResponseYes? toResponse (-9) = ResponseNo? toResponse (-10) = ResponseApply? toResponse (-11) = ResponseHelp? toResponse i | i > 0 = ResponseUser? $ fromIntegral i
If the repsonse ID is equal to zero or less than -11, this causes a
match failure and aborts the program. This happens, for instance, if you try to catch a response signal using afterResponse on a dialog that contains a button created with Glade whose response ID hasn't been set (the default is 0).
This bug was reported in the Debian Bug Tracking System: http://bugs.debian.org/522481 .