More on Menus



I've been thinking some more about John Sheets' idea of creating a global
menubar by having each app reparent its menus into a single, global window,
then, when the app gets focus, request (via a CORBA interface) that its
menus be shown. I've been trying to work out how to do this, but have hit
some snags. I've looked through all the docs I could find, but still have
some questions, which I hope somebody with more knowledge of gnome/CORBA/et
al. will help me to answer.

Here, in essence, is how I think it would work. My questions are in [
brackets ]:

1. At the beginning of a session, the menu server starts, if the user or
theme has selected a global menubar feel. [ The user should also be able to
switch menubar feel on the fly. Is that going to possible with this
parenting/reparenting setup? ]

2. Each app, on launch, determines whether the menu server is running. [
How does it do this? Is there a central repository of CORBA services that
it can query? ] If the menu server is available, the app reparents its
menubar (and toolbars?) to the menu server window. [ How? Can it send the
widgets/pointers to the widgets via CORBA? Otherwise, how can the app know
what window to give its menubar to? ]. The app sets its menu state to
'handled globally', adjusts its table geometry to suit, etc.

3. An app, when it gets focus, checks its menu state. If that is 'handled
globally', the app passes a message via CORBA to the menu server, with the
id of the menubar it wants displayed. [ Interface question: Possibly this
should be the id of menubar & toolbar container, so that menubars and
toolbars can be handled together? ] If the app can't find the menu server,
or if it doesn't get a proper response from the menu server, it will
re-reparent its menus into itself [ How? Does the app still 'own' the
menubar widget, once it has been reparented in the server? If the server
dies, will the menubar widgets be destroyed? What address space do they
live in? ] -- or recreate them, if necessary -- so that we never see a
beheaded app running around with no menus at all.

The last question is a 'meta': is this implementation better than what I'd
previously proposed, that is, a system wherein each app has a separate
menubar, but the appearance of a global menubar is maintained by floating
and 'docking' all menubars in the same location, hiding those that don't
belong to the currently focused window?

The 'multi-bar' method seems easier to implement -- it's not much more than
a tweak of the current system. But is the 'reparenting' method a better
overall solution? Is it more flexible? What do you think?

(Thanks to everyone who has given me feedback on this project so far, and
thanks to the list for putting up with these long posts full of dumb
questions.)

JP



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]