[PATCH 2/2] Fixing up the code as Dirk suggested

Dirk Hohndel dirk at hohndel.org
Fri Sep 14 08:30:21 PDT 2012


Miika Turkia <miika.turkia at gmail.com> writes:

> On Fri, Sep 14, 2012 at 7:30 AM, Miika Turkia <miika.turkia at gmail.com> wrote:
>> On Tue, Sep 11, 2012 at 7:59 AM, Miika Turkia <miika.turkia at gmail.com> wrote:
>>> On Tue, Sep 11, 2012 at 7:31 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>>>> One thing I noticed is that the current code doesn't refresh the display
>>>> when the chosen units are changed in the preferences. That's clearly not
>>>> a show stopper (the user could simply close the statistics window and
>>>> reopen it) but it may be something to look into for the future.
>>>
>>> I'll take a look into it.
>>
>> This patch should take care of refreshing the statistics window.
>
> Well, it just occurred to me that if you close the window by any other
> means than the key press handler, the the yearly_tree variable is not
> set to NULL. So this patch will also require a window close event
> handler. I'll look into it later.

Would you like us to hold off on applying the patch, then?
Catching when a window is closed is fairly easy. You can connect a
callback function to the signal that usually indicates this:

	g_signal_connect(G_OBJECT(win), "delete-event", G_CALLBACK(on_delete), NULL);

/D



More information about the subsurface mailing list