summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKadlcik Libor <KadlSoft@seznam.cz>2008-03-25 21:58:12 +0100
committerDana Jansens <danakj@orodu.net>2010-01-08 17:55:19 -0500
commit0352abfa88892bc17bdff2022745e3c1b312edd0 (patch)
treeec8ec1c23f98e1bada7beb8b80acd22e2df2cebe /configure.ac
parent63f748aa3fac4d3ed004a2c5343a51c3a046e21d (diff)
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 :).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index aa575657..99b416a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -157,6 +157,33 @@ else
xcursor_found=no
fi
+AC_ARG_ENABLE(imlib2,
+ AC_HELP_STRING(
+ [--disable-imlib2],
+ [disable use of Imlib2 image library for loading icons. [[default=enabled]]]
+ ),
+ [enable_imlib2=$enableeval],
+ [enable_imlib2=yes]
+)
+
+if test "$enable_imlib2" = yes; then
+PKG_CHECK_MODULES(IMLIB2, [imlib2],
+ [
+ AC_DEFINE(USE_IMLIB2, [1], [Use Imlib2 image library])
+ AC_SUBST(IMLIB2_CFLAGS)
+ AC_SUBST(IMLIB2_LIBS)
+ imlib2_found=yes
+ ],
+ [
+ imlib2_found=no
+ ]
+)
+else
+ imlib2_found=no
+fi
+
+AM_CONDITIONAL(USE_IMLIB2, [test $imlib2_found = yes])
+
dnl Check for session management
X11_SM
@@ -193,5 +220,6 @@ AC_MSG_RESULT([Compiling with these options:
Startup Notification... $sn_found
X Cursor Library... $xcursor_found
Session Management... $SM
+ Imlib2 library... $imlib2_found
])
AC_MSG_RESULT([configure complete, now type "make"])