bobb@agora.rain.com (Bob Beauchemin) (04/29/91)
Patricia Rodriguez-Tome asks: >Is there a way to change the text of the notice we get when choosing >Exit from the Workspace Menu? > >(the text is : Please confirm exit from the window system ) > AND >I need to know when a user choose the Exit... option from the Workspace menu, wh ile running some programs written with Xview. > >I tried to get the signal id using the C function signal, and also >using notify_set_signal_func. In both cases, I have no problem trapping >signals like ^C or ^Z, but I don't get anything when I use Exit... > >Thus my questions are : > what signal does Exit... (EXIT) sends? > is there a way to trap it ? There is no way to change the message that you refer to through command line parameters or changing .Xdefaults. In order to modify the things you are talking about, you will have to change and recompile the OLWM window manager. Its in .../lib/olwm/ (and .../lib/olgx/) in the XView distribution. The "Please confirm..." message is hard-coded in module services.c. When a user chooses Exit through the menu the routine ExitFunc in services.c is called. You can change the "exit" behavior here. When a user answers "exit" to the message, control is currently passed to a routine called Exit() in module olwm.c. This kills all the clients and terminates OLWM. You can change the behavior of ExitFunc() or Exit() to do what you would like and/or change the "Please confirm..." message. There is no need to code your own signal-catcher. In the module olwm.c OLWM sets up a signal catcher for SIGHUP, SIGTERM and SIGINT to go to a routine (in olwm.c) called ExitOLWM. This exits the window manager without killing all the clients. You can modify this routine if you wish. For internationalization purposes in might be nice to be able to change all the OLWM system messages in the .Xdefaults file. Maybe in the next release? Bob Beauchemin S&B Software, Inc 6503 SW 46th Place Portland OR, 97221 (503)-244-5029 bobb@agora.rain.com -or- bobb@agora.uucp
haydens@natasha.juliet.ll.mit.edu (Hayden Schultz) (05/02/91)
In article <1991Apr29.070633.6567@agora.rain.com> bobb@agora.rain.com (Bob Beauchemin) writes:1z Path: xn.ll.mit.edu!mit-eddie!rutgers!uwm.edu!ogicse!intelhf!agora!bobb From: bobb@agora.rain.com (Bob Beauchemin) Newsgroups: comp.windows.open-look Date: 29 Apr 91 07:06:33 GMT Sender: bobb@agora.rain.com (Bob Beauchemin) Organization: Open Communications Forum Lines: 48 Patricia Rodriguez-Tome asks: >Is there a way to change the text of the notice we get when choosing >Exit from the Workspace Menu? > >(the text is : Please confirm exit from the window system ) > The "Please confirm..." message is hard-coded in module services.c. When a user chooses Exit through the menu the routine ExitFunc in services.c is called. You can change the "exit" behavior here. When a user answers "exit" to the message, control is currently passed to a routine called Exit() in module olwm.c. This kills all the clients and terminates OLWM. You can change the behavior of ExitFunc() or Exit() to do what you would like and/or change the "Please confirm..." message. There is no need to code your own signal-catcher. In the module olwm.c OLWM sets up a signal catcher for SIGHUP, SIGTERM and SIGINT to go to a routine (in olwm.c) called ExitOLWM. This exits the window manager without killing all the clients. You can modify this routine if you wish. Using Bob Beauchemin`s info, you could write your own program which puts up a window with a panel with text and buttons. When the user presses the "Kill the window system, not the application" button, the program sends a SIGTERM (or SIGUP or SIGINIT) to the server. Then, put the invocation to your program in the user's menu (in .openwin-menu) in place of EXIT. This won't work with all OpenWindows messages, but it should solve the original problem. Hayden Schultz (haydens@juliet.ll.mit.edu) MIT Lincoln Lab