summaryrefslogtreecommitdiff
path: root/openbox/menu.c
AgeCommit message (Collapse)Author
2010-01-15allow multiple escaped _'s in a menu label, and allow a real _ to come later ↵Dana Jansens
in the label (Fixes bug #4355).
2010-01-11NULL ic when we failed to load an imageMikael Magnusson
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-08Some style changes, less ifdefs.Mikael Magnusson
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 :).
2010-01-08use obt_xml_* to navigate the xml file (also XML tags are case sensitive)Dana Jansens
2009-12-21rename the obt_parse library to obt_xml (since it is very xml specific)Dana Jansens
2009-09-19Merge branch 'backport' into workMikael Magnusson
Conflicts: openbox/actions/desktop.c openbox/client.c openbox/event.c openbox/extensions.c openbox/popup.c openbox/screen.c parser/parse.c
2009-07-05Allow escaping _ in menu labels by putting __Mikael Magnusson
Currently you can't mark anything that comes after the __ with _ to make that a shortcut.
2008-03-08Merge branch 'backport' into workMikael Magnusson
Conflicts: obt/keyboard.c openbox/actions/cyclewindows.c openbox/actions/directionalwindows.c openbox/frame.c openbox/openbox.c
2008-03-08Remove double newlines.Mikael Magnusson
2008-02-21Merge branch 'backport' into workDana Jansens
Conflicts: openbox/openbox.c openbox/session.c
2008-02-21Change all single quotes to double quotes in strings.Mikael Magnusson
2008-02-14Introducing the icon cache.Dana Jansens
If an icon is the same as one in the cache, then it uses that one. icons of different sizes (from the same client) are linked together into one, and resizes of icons are cached and linked to all the various sizes. so you only need one icon in memory for all your terminals now. ya!
2008-02-14Introducing the icon cache.Dana Jansens
If an icon is the same as one in the cache, then it uses that one. icons of different sizes (from the same client) are linked together into one, and resizes of icons are cached and linked to all the various sizes. so you only need one icon in memory for all your terminals now. ya!
2008-01-20move the xdg path stuff into obt/paths.[ch], and make render and openbox use itDana Jansens
2008-01-20was using random memory for parsing pipe menus with the new parse apiDana Jansens
2008-01-20add obt_parse_tree_from_root and use it, cuz it's niceDana Jansens
2008-01-20update openbox to use the current parser interface in libobtDana Jansens
there is also some random bug fixes for other libobt stuff in here.
2008-01-20Move the main loop out into the libobtDana Jansens
2007-09-04ANSI function declarations, ie () -> (void)Mikael Magnusson
2007-08-07Only copy execute_func to the more_menu.Mikael Magnusson
Also don't bother copying NULL around in menu_new.
2007-08-07Fix another memleakMikael Magnusson
2007-07-17remove trailing whitespaceMikael Magnusson
2007-07-10let you specify shortcuts in your menus. change & to be _ for shortcut selectionDana Jansens
2007-06-23add shortcuts to add/remove desktops in the client list menus.Dana Jansens
also make it so &-specified shortcuts are always underlined
2007-06-22add the showmenu actionDana Jansens
2007-06-22well.. it compiles..Dana Jansens
2007-06-10cache pipe menus without crashing!Dana Jansens
2007-06-10cache pipe menus until the menus closeDana Jansens
2007-06-02do the menu_can_hide thing properly. was such a hack before? and the ↵Dana Jansens
variable was getting set from all kinds of events like motion notify. totally not reliable. now it works all nice.
2007-05-30add a big comment about more menusDana Jansens
2007-05-30dont need to recurseDana Jansens
2007-05-27only hilight the first entry when opening the menu with a keybindMikael Magnusson
2007-05-27hilight the first normal entry also if there is a menuheader/separator before itMikael Magnusson
2007-05-20set the functions recursively, so if you change it after the menu has been ↵Dana Jansens
opened it takes effect all the way down
2007-05-20set the functions in the more menu the same as the parent menuDana Jansens
2007-05-13use the right list in client_add_hide_notify, rename destructor to ↵Dana Jansens
destroy_notify which is really what it is, and is more consistant now that there are 2 notifies
2007-05-09mem leakDana Jansens
2007-05-07um... hide the client menu when the window changes desktops. its not visible ↵Dana Jansens
anymore (probably..) and no send to menu wont be wrong too.
2007-05-07add a notifier for clients changing desktops. use it to update the send-to ↵Dana Jansens
menu if it changes. it does this by closing/opening the menu.. thats about the best we can do tho with this menu code without huge changes
2007-05-07translate "More..."Dana Jansens
2007-05-07merge in r6153-6154 from the 3.4 branchDana Jansens
2007-05-05changes to the client menu, which entries are there, and reorganizing, and ↵Dana Jansens
renaming. let you highlight disabled menu entries, they just aren't runable of course, and add the activedisabled theme element for these entries. add the all desktops button picture to "All desktops" in the client menu update the themes for the new element, and some changes to make things more readable-better contrast. CLEARLOOKS-OLIVE is now DIFFERENT FROM THE 3.4 BRANCH SO DON'T RE-RUN THEMETOXML ON IT :( :( yeah.. i think that is everything?
2007-04-26place the client menu at the top left of the window when opening it with a ↵Dana Jansens
key binding. change how the first menus are placed. place them like other people place menus. maybe this is good, maybe it is bad, we will see..
2007-04-25cleanups for keyboard menu shotcuts. dont let & set a shortcut from stuff ↵Dana Jansens
like menu titles and what not, they are only for strigns oenbox provides.
2007-04-25add keyboard shortcuts to the menus. you can specify the shortcut key with & ↵Dana Jansens
even in root menu and stuff
2007-04-231) translate all of openbox's outputDana Jansens
2) update copyrights. 3) make release. ok that part not quite yet.
2007-04-221) get rid of menu titlesDana Jansens
2) let separators have labels, when they have a label, then they will appear like a menu title used to so if you want a menu title, you use a separator in the menu itself at the top more style work may be needed
2007-03-25don't menu menus jump around at all anymore. open them on screen in the ↵Dana Jansens
first place