From: Thomas L. <ta...@le...> - 2000-07-19 19:28:54
|
On Tue, 18 Jul 2000, James Kermode wrote: > On Tue, 18 Jul 2000, Thomas Leonard wrote: > > Right, thanks. Should be fixed now! > > Yes, thanks - it works fine now. I have been very impressed > with rox so far, and I like all the new features, especially > the pinboard support. However, I have a couple of > suggestions. > > Firstly, I think it would look nicer if the text for > the pinboard icons was transparent (like with KDE's file > manager, for example). I realise this may be hard to > implement, and it's not really all that important, though. Implementation is easy! Reading it is the hard part ;-) I did actually try it without the background slab - as normal text, with a border and with a shadow - but none seemed easy enough to read. Of course, if you've got a plain background then it's a different story, so I'll add an option... > Secondly, whenever I open a Filer window I seem to end up > resizing it. I found the section in filer.c, in > filer_opendir() (line 1015 in the current CVS version) which > sets up the initial window height, and changed it from 3 > rows of icons to 5, which worked. Easily added as a config option :-) > However, a better > solution would take account of the number of files in the > directory and size the window accordingly (up to some > maximum height). I wasn't able to get this to work however; > is the number_of_items attribute of the collection structure > available when the window is being sized? No. It's rather complicated... ;-) The window is created empty and then attach() is called, which links the filer window to a particular entry in the directory cache, just after the window is shown. The attach() function will immediately callback to the filer window to deliver a list of all known entries in the directory (so, collection->number_of_items may be valid after the call to attach()). BUT, if the directory is not in the cache (because you haven't opened it before) then the dir cache will be empty and nothing gets added until a while later when some entries are actually available. Options are: - Do a 'best guess' based on number_of_items after the attach. Defer opening the window until then (you might need to realize it first, but not show it). This will always go wrong the first time you open a directory :-( - Resize the window after it is shown when you get too many icons. Could cause flicker. Could also be annoying if the user has already resized the window by then. - Don't show the window at all in filer_opendir(). Instead, show it when the dir cache reports that scanning has ended (which it does immediately if the directory is not being scanned) and size it then. You'll need a (short!) timeout, of course. I quite like this one... - Use a fixed size, settable from the options box. Possibly allow it to be set on a per-directory basis, if the filer ever supports that. What happens when you navigate around? Does the window keep changing size? Not sure I like that idea! Another possibility: - Have a key for 'resize this window now'. Thomas Leonard -- ta...@us... The ROX desktop (free/GPL) : http://rox.sourceforge.net |