Le Sun, 13 Apr 2014 20:13:45 +0200,
Thomas Funk <t.f...@web.de> a écrit :

> Am 13.04.2014 17:31, schrieb Dominique Michel:
> > Hi,
> > 
> > with fvwm-crystal, I get an issue with a localized xdg menu. If I
> > launch fvwm as a Xephyr session and use its default configuration
> > (no config file), I get a very simple menu where it is a Desktop
> > Menu. If I click on it, I get an applications menu with several
> > menus in it:
> > 
> > Fvwm Applications
> > Suse Applications
> > Xfce Applications
> > Xfce Settings Manager
> > 
> > which correspond to what I have in /etc/xdg/menus. The Fvwm
> > Applications menu is my localized menu. If I browse it, only parts
> > of it are localized, and other parts are not when the localization
> > exist in /usr/share/directories.
> > 
> > I made the following function:
> > 
> > DestroyMenu FvwmMenu
> > AddToMenu FvwmMenu
> > + DynamicPopupAction PipeRead 'fvwm-menu-desktop \
> >     --desktop fvwm-applications \
> >     --enable-mini-icons \
> >     --mini-icon-dir $[FVWM_USERDIR]/icons/fvwm-desktop'
> > 
> 
> Try this:
> DestroyMenu FvwmMenu
> AddToMenu FvwmMenu
> + DynamicPopupAction PipeRead 'fvwm-menu-desktop \
>     --desktop fvwm \
>     --type applications \
>     --enable-mini-icons \
>     --mini-icon-dir $[FVWM_USERDIR]/icons/fvwm-desktop'

I get: Warning: Arg --type is obsolete and ignored, but the menu work
fine. I only get the fvwm menu and the localization is coKey A A
$[Mod1] Menu FvwmMenurrect.

Do you know if it is possible to get ride of the "Regenerate the XDG
menu"? 
I find nothing in the doc, so I don't think it is possible without a
awk or sed function.

> 
> 
> because --desktop defines not the menu name. fvwm-menu-desktop
> assemble the menu name from the desktop type and the menu type.
> 
> > Key A A $[Mod1] Menu FvwmMenu
> > 
> > With it, I get only the fvwm-applications menu, and it is entirely
> > localized (the part which are already done, it's a work in
> > progress).
> > 
> > After that, I removed all the files in /etc/xdg/menus but
> > fvwm-applications.menu, and after launching fvwm, I get an error
> > instead of the menu:
> > 
> > # fvwm-menu-desktop
> > Traceback (most recent call last):
> >   File "/usr/bin/fvwm-menu-desktop", line 634, in <module>
> >     main()
> >   File "/usr/bin/fvwm-menu-desktop", line 232, in main
> >     menulist, desktop_temp = getmenulist(desktop, menu_type)
> >   File "/usr/bin/fvwm-menu-desktop", line 400, in getmenulist
> >     desktop_dict[de_highest].add(menu)
> > KeyError: 'xfce'
> > 
> > What is strange is I don't have any xfce key into the menu. I try
> > with
> 
> Would you please post the output of
> $> fvwm-menu-desktop --version

fvwm-menu-desktop version 2.3.1

> and
> $> fvwm-menu-desktop --get-menus all --verbose

That look OK to me. All is here:
Parameters for creating menu list:
 XDG_MENU_PREFIX:  ''
 --install-prefix: ''
 --desktop:        ''
 --menu-type:      ''

Start search ...
 found in /home/dom/.config/menus: []
 found in /etc/xdg/menus: ['fvwm-applications.menu',
'yast-settings.menu', 'lxde-applications.menu',
'xfce-applications.menu', 'ggz.menu', 'kde-4-applications.menu',
'gnome-applications.menu', 'suse-applications.menu',
'xfce-settings-manager.menu'] Menu list:
['/etc/xdg/menus/fvwm-applications.menu',
'/etc/xdg/menus/yast-settings.menu',
'/etc/xdg/menus/lxde-applications.menu',
'/etc/xdg/menus/xfce-applications.menu', '/etc/xdg/menus/ggz.menu',
'/etc/xdg/menus/kde-4-applications.menu',
'/etc/xdg/menus/gnome-applications.menu',
'/etc/xdg/menus/suse-applications.menu',
'/etc/xdg/menus/xfce-settings-manager.menu']

 Previous used theme: gnome
 Current used theme: gnome
Create submenu 'FvwmFvwm Applications' from
 '/etc/xdg/menus/fvwm-applications.menu' Create submenu 'FvwmYast
 Settings' from '/etc/xdg/menus/yast-settings.menu' Menu is empty -
 won't be used! Create submenu 'FvwmLxde Applications' from
 '/etc/xdg/menus/lxde-applications.menu' Create submenu 'FvwmXfce
 Applications' from '/etc/xdg/menus/xfce-applications.menu' Create
 submenu 'FvwmGgz' from '/etc/xdg/menus/ggz.menu' Menu is empty - won't
 be used! Create submenu 'FvwmKde 4 Applications' from
 '/etc/xdg/menus/kde-4-applications.menu' Create submenu 'FvwmGnome
 Applications' from '/etc/xdg/menus/gnome-applications.menu' Create
 submenu 'FvwmSuse Applications' from
 '/etc/xdg/menus/suse-applications.menu' Create submenu 'FvwmXfce
 Settings Manager' from
 '/etc/xdg/menus/xfce-settings-manager.menu' 
/etc/xdg/menus/fvwm-applications.menu /etc/xdg/menus/lxde-applications.menu 
/etc/xdg/menus/xfce-applications.menu /etc/xdg/menus/kde-4-applications.menu 
/etc/xdg/menus/gnome-applications.menu /etc/xdg/menus/suse-applications.menu 
/etc/xdg/menus/xfce-settings-manager.menu

Process took 36.1115701199 seconds

> 
> whether all menus on place?

Yes, that just that locale issue. It may come from the suse menu that
collide with my fvwm menu. The fvwm menu is using the localisation from
the files in /usr/share/desktop-directories, when the suse menu was
using files in /usr/share/locale. The suse menu with that localization
system just hang fvwm-menu-desktop, so I removed those files. That made
the suse menu to work with fvwm-menu-desktop, but without localization.

What is very strange is that, when I get all the desktop menus, only a
feww strings are still in English when they should be translated, and
most translated string are working fine. When I only get the fvwm
menu, all translated strings are working.

> 
> > 
> > # XDG_MENU_PREFIX=fvwm fvwm-menu-desktop
> > 
> > and it work fine. 
> 
> Yes, because fvwm-menu-desktop is ignored. Correct:
> XDG_MENU_PREFIX=fvwm
> 
> > It should be nice fvwm if fvwm-menu-desktop would be
> > able to use by default a fvwm-applications.menu if it exist and is
> > the only one in /etc/xdg/menus.
> > 
> > I made another try, to issue 'SetEnv XDG_MENU_PREFIX fvwm' into the
> > fvwm console in crystal, and with it, it work when I launch fvwm
> > with Xephyr, that even if I move back the other menu files.
> > 
> > So, to summarize, it should be nice fvwm if fvwm-menu-desktop would
> > be able to use by default a fvwm-applications.menu if it exist and
> > is the only one in /etc/xdg/menus. And without XDG_MENU_PREFIX
> > defined and its default fvwm configuration (no fvwm config file at
> > all), fvwm-menu-desktop localization seam to be confused when it is
> > several menus in /etc/xdg/menus with different localizations or non
> > localizations.
> 
> Hmm ... perhaps. what pyxdg version do you using?

0.25

Best,
Dominique

> 
> -- Thomas --
> 

Reply via email to