summaryrefslogtreecommitdiff
path: root/obrender/imagecache.c
AgeCommit message (Collapse)Author
2011-01-24Big rework of image.c and the image cache system.Dana Jansens
Added a lot of comments, simplified call graphs. Added full (not second-class) support for images coming from named sources (files, icon themes). RrImage holds an RrImageSet. RrImageSet holds a bunch of RrImagePic, which are different sizes of a logical image. RrImageSet objects can be merged if it is discovered they (will) share an RrImagePic. The RrImage objects are updated to use the new merged RrImageSet.
2010-02-12use g_slice_new() instead of g_new() part 4Dana Jansens
2010-01-08Rework the code provided by Kadlcik Libor for loading/showing icons in ↵Dana Jansens
Openbox menus. This changes how the imagecache works, you can load an image into it directly, or you can load it by name (then it will load it from a file on disk). NOTE: The name part is incomplete, as it needs to use the freedesktop.org icon spec to search for the right file. Also to resize it should look for another icon on disk with the same name but different size (icon themes).
2010-01-08This patch implements support for icons in user-defined menus into OpenboxKadlcik Libor
Image loading is done using the Imlib2 library. I chose Imlib2 because it's pretty fast, it's easy to use, supports many file formats (tested xpm, gif, jpeg, png) and doesn't introduce too much bloat (it depends :)). I ported the patch to 3.4.7-pre3 and added some enhancements. Caching is much better now, and icons can be disabled at compile time using --disable-imlib2 option. What's new? Syntax of configuration files (namely rc.xml and menu.xml) has been changed slightly to allow users to associate icons to menu entries. This is done by specifying path to icon file in the new "icon" attribute in "<item>" element, e.g: <item label="Vim" icon="/usr/share/pixmaps/vim-32.xpm"> <action name="Execute"><execute>x-terminal-emulator -T Vim -e vim</execute></action> </item> If user doesn't want to display any icons in his user-defined menus, he/she can disable icons in rc.xml, inside "<menu>" section: <menu> ... <showIcons>no</showIcons> ... </menu> Default value is "yes". (New boolean variable "config_menu_user_show_icons" has been added to source code.) An icon is loaded (using menu_item_attach_icon()) when a new entry of menu is created. Fortunately, I haven't notice any performance problems because of this :).
2009-12-21Set up work for making a 3.5 prerelease.Dana Jansens
Set version stuff to 3.5.0-rc1. Copy the CHANGELOG from 3.4-working. Rename the obt-4.0 and obrender-4.0 pkgconfig stuff to obt-3.5 and obrender-3.5 Rename the "render" directory to "obrender" so that the public headers can be installed in <obrender/*>