Commit Graph

12 Commits

Author SHA1 Message Date
Uli Schlachter f2cf4a6385 Fix luacheck warnings in beautiful and menubar
Signed-off-by: Uli Schlachter <psychon@znc.in>
2016-02-11 21:55:32 +01:00
Uli Schlachter 234100ebdf Fix/silence various ldoc warnings in menubar
Closes https://github.com/awesomeWM/awesome/pull/559.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2015-11-19 22:22:23 +01:00
Daniel Hahler a648b27af6 menubar.icon_theme: cache index_theme instances
Ref: https://github.com/awesomeWM/awesome/pull/523#commitcomment-13716821
2015-10-13 22:28:34 +02:00
Daniel Hahler 7d9b78c13c menubar.icon_theme.lookup_icon: check for dist in outer loop 2015-10-13 22:28:30 +02:00
Daniel Hahler 7fa3dc97c8 Optimize menubar.icon_theme.lookup_icon: do not look twice 2015-10-13 22:27:11 +02:00
Kazunobu Kuriyama fbfa6b8995 menubar/icon_theme.lua: Handle scalable icons correctly
This bug was caused by typos.

Closes https://github.com/awesomeWM/awesome/pull/525.
2015-10-13 22:20:43 +02:00
Daniel Hahler 1bd7aa103b Fix signature for recursive find_icon_path_helper
Ref: 81072c0420 (commitcomment-13705007).

This reverts a part of 81072c0.

Closes https://github.com/awesomeWM/awesome/pull/518.
2015-10-13 22:16:01 +02:00
Daniel Hahler 2723399785 Move is_readable_directory to awful.util.dir_readable 2015-10-11 13:17:57 +02:00
Daniel Hahler 765a5f5790 menubar.icon_theme: use GLib.build_filenamev to join paths
This eliminates double slashes from the resulting paths.
`GLib.get_system_data_dirs` might return paths with and without trailing
slashes.
2015-10-11 13:09:33 +02:00
Daniel Hahler e93ce7c2a8 menubar.icon_theme: minor code style fixes
- fix/streamline usage if metatable.__call
2015-10-11 13:09:15 +02:00
Daniel Hahler a140d80d76 icon_theme.find_icon_path: fix typo: s/filaname/filename 2015-10-11 11:53:31 +02:00
Kazunobu Kuriyama 9ae945c931 Enhance menubar icon path lookup
The way of icon path lookup for `menubar` is enhanced so that it is
based on a theme-oriented way as described in the specification:

  Icon Theme Specification, Ver. 0.12
  http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

To accomplish this:

 * Add the two new files `icon_theme.lua` and `index_theme.lua`.

   The former implements an icon lookup algorithm suggested in the URL
   above.  The latter implements a helper object to parse the cache file
   `index.theme` of which data is used by the former.

 * Modify `menu_gen.lua` to use the new algorithm.

   - The implementation of `lookup_category_icons` is changed
     accordingly.
   - The values of the field `all_categories.icon_name` are changed file
     names to icon names, i.e., file extensions which are used to
     indicate image file formats are removed.

 * Add the new file `icon_theme_spec.lua` for a unit test for checking
   if `icon_theme.lua` together with `index_theme.lua` works as
   expected.
2015-09-26 11:45:38 +09:00