[fxruby-users] FXFileList & default icons

Juraj Sujan sofy at sofy.sk
Wed Sep 1 11:03:46 EDT 2004


jeroen <jeroen at fox-toolkit.org> wrote:

> 
> They're just fallback icons, used in case no bindings
> have
> been found in the registry.
> 
> 
> In principle, you can (1) load your file associations
> under the [FILETYPES] section.  For example:
> 
> 	[FILETYPES]
> 	bmp = "/usr/local/bin/xv %s &;Bitmap
> Image;image.xpm;mini/image.xpm;image/x-bmp"
> 
> Or (2) replace the bindings programmatically using
> FXFileDict::replace().
> A subsequent lookup of the binding will then use the new
> binding, and
> moreover, when the application quits the binding will be
> logged into
> the registry.
> 
> FXFileList will ONLY use the hard-wired icons if no
> bindings have been
> found.  We want to make sure programs still work when no
> bindings 
> are available.
> 
> 

yes, I know about the associations and of course, I want to
use my own icons for certain filetypes. But consider this
example situation:

There is one directory and two files displayed in list (one
png and one jpg image). I will define the association for
png filetype. Then it will display my own icon for png file
but hard-wired icon for directory and for jpg file (as it is
unassociated). But I would like to override ALSO these two
icons with my own. In other words, I would like to display
my own fallback icons EVEN for files without associations. 

So, here is my question again: How to do it ? Could it be
done with associations ? I don't think so.

I imagine something like this (in FXRuby):

filelist = FXFileList.new(....)
filelist.miniFolderIcon = FXPNGIcon.new(@app,
                File.open("my_folder_icon.png", "rb").read)

...and so on

Standard hard-wired icons are nice, but I would like to use
my own, COMPLETELY customized iconset (KDE and GNOME
iconsets are really cool, wouldn't it be nice to use them ?). 

Juraj Sujan




More information about the fxruby-users mailing list