Re: [Nautilus-list] Simple optimization



On Monday, July 2, 2001, at 02:32  PM, Zbigniew Chyla wrote:

Currently every nautilus view implementation that runs as external program
quits immediately after destroying the last object it provides.

The Mozilla component doesn't do that. It has a timeout, much like the one you are adding here, but a lot longer.

There's no changelog entry yet, because the patch is not ready - timeout
value should be read from configuration or set individually for every
component (in this case we'd need to add an extra argument to
nautilus_view_standard_main_multi).

I don't think that's really necessary. Sounds like overkill to me to allow users to tune this value and a way to set it for each component. A single default seems OK to me -- components that need to tune the thing can always define their own.

I'd like to know your opinion before going further.

I think it's a great idea.

BTW, why doesn't image view use nautilus_view_standard_main? Does it need
anything special?

nautilus_view_standard_main was written long after the components were implemented. Maciej, Ramiro, and I converted the components piecemeal over time. The rule of thumb we used was "whenever you have to change all the main functions for some reason, convert at least one of them to use the standard main".

So there's no special reason the image view hasn't been converted yet, we just haven't gotten around to it.

The patch looks good to me, and I think it would be OK to commit it. I only have two thoughts (neither mandatory to fix before committing):

1) I'd prefer a name that made it clear what the timeout was for rather than timeout_id and timeout_callback. For example, delayed_quit_timeout_id.
    2) This line:

+	CallbackData *callback_data = data;

goes against Nautilus coding standards (even though it was probably copied from elsewhere in the same file). It should be split into two lines.
 We don't initialize when we declare (mentioned in doc/style-guide.html).

    -- Darin




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