Support Python 2 and Python 3 at the same time.
* Make sure modules are loaded with the correct names for each version
* Use a compatibility layer for GTK
* Make sure strings are encoded/decoded properly
a more direct method of retrieving the desktop-directories relevant
to the source file when run in a portable manner. ../ is dependent
on the current working directory.
If for any reason the desktop entry won't be shown (for example if
NoDisplay is set), then don't process the desktop entry any further as
there is no need to. Should make processing a tiny bit faster.
Determine if an XDGMENUMAKER_TEST exists and equals "1". If it does,
read the .desktop files from the tests directory instead of reading the
standard systemwide and homedir .desktop files.
When installing with "make install" use the PREFIX variable to determine
the location of desktop-directories as well. It goes under
PREFIX/share/desktop-directories
If xdgmenumaker is run in-place, it looks for it in
../desktop-directories
as it should be in the source directory tree.
Add support for creating pekwm menus. The application menus can be
placed in a submenu or not, have icons or not and the XDG Path attribute
works.
The menus can be either static or dynamically generated.
The default terminal emulator can be specified by each user individually
in a ~/.config/xdgmenumaker.cfg file. In case the file is not there, or
one is not specified, default to the debian alternatives system on
debian and debian-likes and xterm in any other case.
On debian and debian-like distributions there is an x-terminal-emulator
symlink that points to the preferred terminal emulator to use. So, if
we're on debian, use this instead of defaulting to xterm.
This only works with fluxbox, as to the best of my knowledge windowmaker
and icewm don't allow switching to another directory with cd and then
executing the command.
Thanks to Gregor Bollerhey (gregor-b on github) for making the initial
pull request about this issue.
If a .desktop file is present in more than one locations, use only the
.desktop file that should take precedence (e.g. the one in
~/.local/share/applications/ over the one in /usr/share/applications/.