[referencer] Cosmetic fix for file dialogue hiding

Kai Willadsen kai.willadsen at gmail.com
Tue Mar 20 18:19:19 EDT 2007


On 3/21/07, John Spray <jcspray at icculus.org> wrote:
> I think this can be accomplished more neatly by just putting the
> chooser.hide() inside the if block at the start.  Generally I prefer an
> if (foo) {bar} to a if(!foo) {return} in terms of readability.

Fair enough. The attached patch puts the chooser.hide() call directly
after the last use of the chooser in that code block. It's not
necessary (afaik) to wait until then, but I think it improves the code
readability by marking the point where the chooser is no longer used.

Updated patch attached.

> I don't really understand what the problem is with having the dialog
> visible in the background, but hey, if it makes you happy it makes me
> happy :-)

It's just the aesthetic. While importing a large-ish directory of
PDFs, I have *four* windows open most of the time: the main referencer
window, the file chooser, the progress dialogue for the directory, and
the temporary progress dialogue for retrieving doi details and such.
It just seemed excessive.

In fact, I'd quite like to find a way to absorb (or kill) the bouncing
progress dialogue for the lookup, just to avoid having windows that I
shouldn't have to care about pop up continually.

Kai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hide-filechooser-early-take-2.patch
Type: text/x-patch
Size: 2444 bytes
Desc: not available
URL: <http://icculus.org/pipermail/referencer/attachments/20070321/f111c182/attachment.bin>


More information about the referencer mailing list