The Fileicons Package

Overview

The fileicons package provides a simple and convenient way to display file information with an icon in a Tk GUI. When loaded, the package will retrieve icons for specific file extensions and/or type (directories, executable files, etc.). The package is also easily extended if you want to ship a different icon theme than the base packages. The fileicons package allows developers to provide a richer GUI without taking the trouble to assemble their own icon/mimetype theme.

Commands

The fileicons package is called by the invocation package require fileicons, and defines two commands:

Uses

The most common use case for the fileicons package would likely be in file system displays, for instance with the BWidgets listbox or tree widgets, or the Tablelist display.

Defining Your Own Themes

Defining your own themes to use with the fileicons package is easy:

Testing

To see how the fileicons package works, download the package and install on your auto_path. Then run the "demo-tango.tcl" or "demo-kde.tcl" scripts. (The demos require BWidgets to be installed, but the fileicons package itself does not have any external dependencies.)

Licenses

The fileicons package is licensed under the same license as Tcl/Tk itself. See http://www.tcl.tk/software/tcltk/license.html for the current license.

The "kde" icon theme, derived from the KDE Classic (hicolor/locolor) theme, is freely reusable under these terms: "The images inside this directory are COMPLETELY FREE for commercial and non-commercial use." For more detail, see http://kde-artists.org/node/110. Some icons in this theme are also derived from the "BlueSphere" icon set (http://svgicons.sourceforge.net), which is available under a BSD-style license.

The "tango" icon theme, derived from the Tango Icon project (http://tango.freedesktop.org/Tango_Desktop_Project), are licensed under a Creative Commons Attribution-Sharealike license (http://creativecommons.org/licenses/by-sa/2.5/).

Download

Fileicons

SourceForge.net Logo

Copyright (C) 2006 Kevin Walzer. All rights reserved. All trademarks are the properties of their respective holders.