buggxmessage - Bugs: bug #34716, Feature: Allow to disable closing...

 
 

bug #34716: Feature: Allow to disable closing window with ESC key

Submitted by:  Moritz Barsnick <barsnick>
Submitted on:  Tue 01 Nov 2011 01:23:55 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Timothy Musson <timothym>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 25 Feb 2012 01:48:33 PM UTC, comment #2:

By the way, I had mixed feelings about this change - so I've tweaked it a little. For the -noescape option to work, a file named $prefix/share/gxmessage/allow_noescape now needs to exist. This is to discourage pranks with borderless buttonless windows that can't easily be closed ;^)

Timothy Musson <timothym>
Project AdministratorIn charge of this item.
Sat 25 Feb 2012 08:49:19 AM UTC, comment #1:

Patch applied, thanks :^)

Timothy Musson <timothym>
Project AdministratorIn charge of this item.
Tue 01 Nov 2011 01:23:55 PM UTC, original submission:

Long story: I first noticed gxmessage when I needed a more beautiful replacement for xmessage in FreeNX. That was at home.

Now, at work, we are a large organization, and I am in a sort of tool support team, bringing certain "compute" capabilities to internal customers. For various reasons, they often need to log onto a VNC session running under a shared faceless account. Yet, often being unexperienced with the tools' backgrounds, they can break things. So we need some sort of banner up indicating status or instructions or "dos and dont's". We have used xterms with "banner", gvim, and what have you not.

I started evaluating other tools, and from xmessage (you know it well), zenity (a bit too GNOME-centric and quite option-less) landed with gxmessage.

gxmessage can already disable buttons ("-buttons =''"), be borderless, but is still missing a few classic features for me:
- don't allow to close with ESC key
- stay on top
- be sticky (across desktops).

Thanks to easy to read code and GTK+, I have been able to add all three features. You may or may not think that these belong into gxmessage, but I vote for them. :-)

This bug item covers:
Allow to disable closing window with ESC key.

gxmessage already exits with a different exit code if the window is closed with ESC, signaling that something different happened than what would have happened with one of the buttons. I believe it to be a valid use case to disallow this to happen.

In my case explained above, I want to remove the ability to close the window easily. For others, the use case may be to force use of the buttons.

I am attaching a patch which works nicely for me.

(BTW, you might also want to cover the case of someone closing the window using the window manager, e.g. with something like the 'x' in the frame. At least it needs special handling, it's similar to ESC.)

Moritz Barsnick <barsnick>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #24266:  gxmessage-2.12.4-noescape.02.patch added by barsnick (2KiB - application/octet-stream - patch to add "-noescape" command line option to disable closing gxmessage with the ESC key)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by timothym (Posted a comment)
  • -unavailable- added by barsnick (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 25 Feb 2012 08:49:19 AM UTCtimothymStatusNone=>Fixed
      Assigned toNone=>timothym
      Open/ClosedOpen=>Closed
    Tue 01 Nov 2011 01:23:55 PM UTCbarsnickAttached File-=>Added gxmessage-2.12.4-noescape.02.patch, #24266

    Back to the top


    Powered by Savane 3.1-cleanup1