On Thursday 14 June 2001 10:53, James ''Wez'' Weatherall wrote:
> > DEBIAN MENU SYSTEM SUPPORT
> >
> > We've mentioned before that Familiar is using the Debian menu system
> > for registering packages with the system menu. What needs to be done
> > by packages is is documented here:
> >
> > http://handhelds.org/~nelson/menu/
> >
> > This release of ipkg now includes an update-menus script to be called
> > by package installation scripts.
> >
> > The last thing needed for a complete menu system is that each program
> > foo that provides a menu, (ie. a window manager or program launcher),
> > should provide a script named /etc/menu-methods/foo that can read the
> > menu entries in /usr/lib/menu and create the appropriate menu files
> > for the program. (Note that these menu-method scripts will be slightly
> > different than Debian's as these will read /usr/lib/menu/* directly
> > rather than accepting menu entries on stdin. Also, ipkg does not
> > provide Debian's install-menu program which isn't worth its wait).
> >
> > I believe that the foal application launcher already has this support.
>
> Yes, it does, but it conforms to the Debian manu system, not the Familiar
> version of it, so version 0.6 requires the install-menu program to be
> present.
>
> I think not having any default support for menu parsing is a bad plan,
> since it means each menu-providing application has to provide code to parse
> the menu tree. When I originally started hacking support for Debian menus
> into Foal, I noticed the stuff about install-menu and specifically avoided
> reading the menus dynamically. At the very least, we should have a package
> which programs like Foal can use, which simply provides a Python module to
> parse the menu, to avoid this replication of effort.
>
> Another issue is when to rebuild application-specific menus. Using the
> Python scheme above, they can be read when the menu program runs. Using
> the update-menus scheme, it is not clear when user-specific menus should be
> rebuilt. Is this defined somewhere?
>
> Cheers,
>
> James "Wez" Weatherall
Using the python method a packager of the WM could write a little code that a
master program could call to register and de-register programs from the WMs
menus.
So you could have something like when a package is installed, the following
could be called from the postinst script of the package:
py-wm-menu add Apps/Media/Scream scream.py
Where "add" is what to do.
Where "Apps/Media/Scream" is where to put it.
Where "scream.py" is what to execute.
In /usr/lib/py-wm-menu/ would be modules for each WM installed on the system.
Each module would have an "add" and "remove" method in them. So for example
there would be a blackbox.py module with the following defs in them:
#blackbox.py
def add(location, exec):
..... Code here to add location to blackbox's menus .....
def remove(location):
.... Code here to remove location from blackbox's menus ....
The master py-wm-menu would load each modul in /usr/lib/py-wm-menu, and call
the add or remove method in each module with the arguments to add/remove the
menus from the WMs menu systems.
What does everyone think? Am I smoking something? Or should I be?
-- Edward Muller - edwardam_at_home.com - edwardam_at_handhelds.org 'It's because crappy programs offend me.' --Eric RaymondReceived on Thu Jun 14 2001 - 09:24:25 EDT
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:12:27 EDT