[pygtk] inhibate menu of window manager

John Finlay finlay at moeraki.com
Wed Nov 5 18:29:43 WST 2008


awalter1 wrote:
> Thanks for your help
>
> I take a look to the set_functions() method and I've found the constants as
> gtk.gdk.FUNC_CLOSE that allows the window to be closeable. In fact I don't
> know how to allow the window to be NOT closeable and it seems that all
> functions (minimize, close, move ...) are set by default.
>
> I have found also a function set_deletable that should be adapted to my
> needs, but I'm not using the right pygtk version.
>
>   
If you set the functions and don't include the gtk.gdk.FUNC_CLOSE that 
tells the WM that you don't want to display the close button in the 
window frame.
> John Finlay wrote:
>   
>> awalter1 wrote:
>>     
>>> Hello,
>>>
>>> In my application python/gtk, I want to inhibate the item "close" from
>>> the
>>> standard menu available in all windows (bottom up of the window) and that
>>> allows actions as : minimize, maximise, ... close.
>>> If it is not possible to do that, which signal may I connect to be wake
>>> up ?
>>>
>>> I've found the signal "delete-event" to catch the "close" action, but it
>>> is
>>> required to connect it for each windows that is a little bit heavy for my
>>> Application.
>>> Thanks for your help
>>>   
>>>       
>> Try the gtk.gdk.Window.set_functions() method to see if that works with 
>> your window manager. Not all window managers will honor the request.
>>
>> John.
>>
>> John
>> _______________________________________________
>> pygtk mailing list   pygtk at daa.com.au
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>
>>
>>     
>
>   



More information about the pygtk mailing list