[comp.windows.open-look] OpenWindow submenu

wang@math.ufl.edu (03/15/91)

Hi,

Can anyboy tell me the way of creating a submenu and a sub-submenu under
an item of WorkSpace menu? 

Thanks.
 

marc@sequoia.cray.com (Marc Bouron) (03/15/91)

In article <1991Mar14.160855.9573@math.ufl.edu>, wang@math.ufl.edu writes:
|> Hi,
|> 
|> Can anyboy tell me the way of creating a submenu and a sub-submenu under
|> an item of WorkSpace menu? 
|> 
|> Thanks.
|>  

Edit your .openwin-menu file (if you have one - if not, copy the one
in $OPENWIN/lib).  You could then add a chunk like this:

    "Custom Menu"    MENU
                     "Xfig"             exec /blah/bin/xfig
                     "Space Invaders"   exec $HOME/games/xinv
    "Custom Menu"    END

Your custom menus _can_ be nested, so you _can_ have sub(sub)menus.
One of the OpenWindows books says a bit more on the subject...

[M][a][r][c]


################################################################################
#                           #  marc@sequoia.cray.com           #     .   .     #
#  Marc CR Bouron           #  M.Bouron@cray.co.uk     (ARPA)  #    _|\ /|_    #
#  Cray Research (UK) Ltd.  #  M.Bouron@crayuk.uucp  (DOMAIN)  #   (_|_V_|_)   #
#  +44 344 485971 x2208     #  M.Bouron@uk.co.cray    (JANET)  #     |   |     #
#                           #  ...!ukc!crayuk!M.Bouron (UUCP)  #               #
################################################################################

marc@sequoia.cray.com (Marc Bouron) (03/15/91)

...oops!  Forgot to mention that you need to restart OpenWindows
for your new menu to take effect.  :-)

BTW, does anyone out there know of a way around this annoying
'feature'?

Thanks.


[M][a][r][c]


################################################################################
#                           #  marc@sequoia.cray.com           #     .   .     #
#  Marc CR Bouron           #  M.Bouron@cray.co.uk     (ARPA)  #    _|\ /|_    #
#  Cray Research (UK) Ltd.  #  M.Bouron@crayuk.uucp  (DOMAIN)  #   (_|_V_|_)   #
#  +44 344 485971 x2208     #  M.Bouron@uk.co.cray    (JANET)  #     |   |     #
#                           #  ...!ukc!crayuk!M.Bouron (UUCP)  #               #
################################################################################

rich@ukcsd.uk.sun.com (Richard Miles - SunUK Tech Support) (03/15/91)

In article <111459.19334@timbuk.cray.com>, marc@sequoia.cray.com (Marc Bouron) writes:
|> 
|> ...oops!  Forgot to mention that you need to restart OpenWindows
|> for your new menu to take effect.  :-)
|> 
|> BTW, does anyone out there know of a way around this annoying
|> 'feature'?
|> 

Try

 "Restart Wmgr"          RESTART

as a menu entry in your .openwin-menu .  This will restart the
window manager only, as opposed to the entire window system.

You will of course have to exit OpenWindows and go back in the
first time only, to get it to use this new menu option ;-)

Rich.

wagner@iti.org (Larry Wagner) (03/15/91)

marc@sequoia.cray.com (Marc Bouron) writes:


>...oops!  Forgot to mention that you need to restart OpenWindows
>for your new menu to take effect.  :-)

>BTW, does anyone out there know of a way around this annoying
>'feature'?

Yes.  I found it in one of the manuals.  I added the following line
to my Workspace menu:

"Restart"                 RESTART

This will restart the window manager, thus forcing it to reread
the Workspace menu file.  It does appear to do strange things to the screen
(ghost images of previously used open windows show up temporarily on my 386i)
and sometimes moves my icons around as if it loses track
of which one belongs where on the screen.
--
--------------------------------------------------------------------------------
Larry E. Wagner                     | wagner@chepil.weru.ksu.edu
USDA-ARS Wind Erosion Research Unit | wagner@matt.ksu.ksu.edu
105B East Waters Hall, KSU          | ...!{rutgers,texbell}!ksuvax1!weru!wagner
Manhattan, KS 66506                 |phone (913)532-6807
--------------------------------------------------------------------------------

desai@progress.COM (Jatin Desai) (03/15/91)

marc@sequoia.cray.com (Marc Bouron) writes:

>BTW, does anyone out there know of a way around this annoying
>'feature'?

To get around this 'feature', add a menu like:
    "Restart"                   RESTART

(Then you have to reboot - once!.) After this, you can make changes to 
the file .openwin-menu and just pick Restart.

Jatin

jc@raven.bu.edu (James Cameron) (03/15/91)

>>>>> On 14 Mar 91 19:50:24 GMT, wagner@iti.org (Larry Wagner) said:

Larry> "Restart"                 RESTART

Larry> This will restart the window manager, thus forcing it to reread
Larry> the Workspace menu file.  It does appear to do strange things to the screen
Larry> (ghost images of previously used open windows show up temporarily on my 386i)
Larry> and sometimes moves my icons around as if it loses track
Larry> of which one belongs where on the screen.


From my understanding, the OLWM shuts down for a short time to re-read 
the necessary info.  With no window manager to support the icons, they
show up like they should.  The reason the icons move around is that they
don't have a specific place except that which you sent as a default ie..

OpenWindows.IconLocation:	bottom-lr

Which means to place the icons on the bottom from left to right.  It doesn't
work perfectly (the placement from left to right) but it is acceptable.  *8-)


Hope this helps!

JC


--
James Cameron  -  jc@raven.bu.edu        |  "But to risk we must, for the 
Signal Processing and Interpretation Lab |  greatest hazard in life is to risk
ECS Engineering Dept.                    |  nothing.  For the man or woman who
	Boston University, Boston MA     |  risks nothing, has nothing, does
	Work: 617 353-2879               |  nothing, is nothing."
Information Technology                   |
	Boston University, Boston MA     |  (Quote from the eulogy for the late
	work: 617 353-2780 ext. 338      |   Christa McAuliffe.)  

jeff@Unify.Com (Jeff Mischkinsky) (03/15/91)

In article <111459.19334@timbuk.cray.com> marc@sequoia.cray.com (Marc Bouron) writes:
>
>...oops!  Forgot to mention that you need to restart OpenWindows
>for your new menu to take effect.  :-)
>
>BTW, does anyone out there know of a way around this annoying
>'feature'?
>
>Thanks.

You don't need to restart OpenWindows, just the window manager.
You can do this by adding a workspace menu entry with the command RESTART.
to your .openwin-menu file. The line from mine is:

"Restart olwm"     RESTART
-- 
Jeff Mischkinsky		internet: jeff@unify.com
Unify Corporation		          ...!{pyramid,csusac}!unify!jeff
3901 Lennane Drive		voice: (916) 928-6262 fax: (916) 928-6401
Sacramento, CA 95834		ICBMS: 38 38 40 N / 120 28 10 W

macq@miguel.llnl.gov (Don MacQueen) (03/19/91)

|> > 
|> > >From my understanding, the OLWM shuts down for a short time to re-read 
|> > the necessary info.  With no window manager to support the icons, they
|> > show up like they should.  The reason the icons move around is that they
|> > don't have a specific place except that which you sent as a default ie..
|> 
|> FYI...From the olwm man page...
|> 
|>      RESTART
|> 	Restart the window manager by  issuing  an  exec(2)  on
|> 	argv.  This  shouldn't affect any running applications,
|> 	nor should it cause the  server  to  shut  down.   This
|> 	option   is   useful  for  re-initializing  the  window
|> 	manager, for instance, to cause it to re-read its  menu
|> 	specification file.
|> 

By the way, the sample openwin-menu file that comes with Sun's OW 2.0 release includes this under the Utilities submenu of the Workspace menu.  Which is to say that after reading a posting early in this thread I found it there and hadn't put it there myself.

-- 
--------------------
Don MacQueen
macq@miguel.llnl.gov
--------------------