Commit graph

13 commits

Author SHA1 Message Date
Dana Jansens
4e6c0086a6 Add support for loading SVG icons using librsvg.
This adds a configure option --disable-librsvg, but defaults to
using the library if it is present during configure.

When enabled, Openbox will attempt to load svg image files using
the library, similar to how Imlib2 is used for other image
formats.

Since librsvg uses the libXml2 library, their errors end up in
the same global namespace as Openbox config file parsing. To
avoid this, we reset the libXml current error whenever we start
loading a file, and save the last error that occurred when we
are finished, by storing the error in the ObtXmlInst.
2013-08-10 21:59:12 -04:00
Mikael Magnusson
d09fd3183e Merge branch 'm4/master' 2011-08-02 22:18:14 +02:00
Dana Jansens
001f174cf5 Big rework of image.c and the image cache system.
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.
2011-01-24 14:19:22 -05:00
Dave Foster
8058df3f7c Buttons seem to work! 2010-10-14 15:54:47 +02:00
Dave Foster
0ae3388b6a Button proper freeing/newing. 2010-10-14 15:54:47 +02:00
Dave Foster
6d30d66efb Adding RrButton to libobrender, ref counted appearances. 2010-10-14 15:54:44 +02:00
Dave Foster
918efe8e49 READ_COLOR macros done, RrColorCopy added, indentation fixed. 2010-10-14 15:43:57 +02:00
Dana Jansens
925e4c5979 fix typo in enum 2010-05-17 19:31:21 -04:00
Derek Foreman
48ad5f6ccd add _NUM_TYPES to obrender enums, to allow enumeration of the enum values 2010-05-13 15:10:02 -04:00
Dana Jansens
e61fd8874a use g_slice_new() instead of g_new() part 4 2010-02-12 14:13:32 -05:00
Dana Jansens
8c9fb63baa Rework the code provided by Kadlcik Libor for loading/showing icons in 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-08 17:55:19 -05:00
Kadlcik Libor
0352abfa88 This patch implements support for icons in user-defined menus into Openbox
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
:).
2010-01-08 17:55:19 -05:00
Dana Jansens
7aae8cc526 Set up work for making a 3.5 prerelease.
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/*>
2009-12-21 14:08:34 -05:00
Renamed from render/render.h (Browse further)