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

Miika Turkia miika.turkia at gmail.com
Fri Sep 14 09:04:46 PDT 2012


On Fri, Sep 14, 2012 at 6:30 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> 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);

Here is a new version. I also added a check not to open multiple
statistics windows.

miika
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Update-yearly-statistics-dynamically.patch
Type: application/octet-stream
Size: 6272 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20120914/87b58e8d/attachment.obj>


More information about the subsurface mailing list