Re: [PATCH] Fix behavior when "Save modified files?" window is closed



On 10 March 2010 15:32, Peter Tyser <ptyser gmail com> wrote:
> <snip>
>
>> I think this fixes the wrong place. Really, melddoc.on_delete_event
>> (which is incorrectly named; it's not hooked to the delete signal at
>> all) shouldn't return anything other than yes/no. Since we're using
>> RESPONSE_OK and RESPONSE_CANCEL, a short-term fix might be to add
>> something like:
>>    elif response == gtk.RESPONSE_DELETE_EVENT:
>>        response = gtk.RESPONSE_CANCEL
>> near the end of filediff.on_delete_event.
>
> Thanks for the comments.  You say the above is a "short-term fix".
> What do you consider the proper fix?

I only said 'short-term fix' because one *could* simplify
on_delete_event, have it just return booleans, get rid of the unused
appquit argument, and fix all callers; the above fix would actually be
fine.

cheers,
Kai


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