You are not logged in.

#1 2006-08-29 19:25:09

no4
Member
From: Germany
Registered: 2005-09-10
Posts: 83

glade, pygtk - 'close' button in the 'about dialog'

Hi! 
I have a problem with the "about dialog" in glade and also in 'pure' wink pygtk. The dialog's close button doesn't close the window as it did in the past (about 1 month back). It does not even generate any error message etc. . I suppose there should be no need to create a signal handler for this button, and in fact it's impossible. The other buttons as 'Credits' , 'License' and their 'Close' buttons work well. Please, does anybody know what's going on here?

glade-3.0.1-1
libglade-2.6.0-1
pygtk-2.8.6-3
gtk-1.2.10-7


Thank you free software developers for sharing your work.

Offline

#2 2006-08-29 22:04:17

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: glade, pygtk - 'close' button in the 'about dialog'

Can you post some code? I don't believe I've experienced this


I am a gated community.

Offline

#3 2006-08-29 22:24:25

no4
Member
From: Germany
Registered: 2005-09-10
Posts: 83

Re: glade, pygtk - 'close' button in the 'about dialog'

here is an 'pure' pygtk example:

try:
    import sys
    import gtk
    import pygtk
    pygtk.require("2.0")
except:
    sys.exit(1)


class about:
    
    def __init__(self):

        x = gtk.AboutDialog()
        x.set_name("foo")
        x.set_authors("x")
        x.connect('destroy',self.close)
        x.show()


    def close(self,widget):
        sys.exit(0)

    
if __name__ == "__main__":
    app = about()
    gtk.main()

The main 'close' button doesn't work. The 'close' button in the 'credits' dialog works well. And the same in Glade.


Thank you free software developers for sharing your work.

Offline

#4 2006-08-29 22:30:14

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: glade, pygtk - 'close' button in the 'about dialog'

I think I read something about that in the release notes for GTK+ 2.10. They removed default action to close a dialog when clicking the "Close"-button.

http://www.gtk.org/gtk-2.10-notes.html wrote:

* Dialogs created by gtk_about_dialog_new() no longer hide automatically when the user clicks close. It is the applications responsibility to hide or destroy the dialog.

Offline

#5 2006-08-30 01:08:43

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: glade, pygtk - 'close' button in the 'about dialog'

You can add a callback for the response signal. Why do you say it's impossible, or am I misunderstanding you?


I am a gated community.

Offline

#6 2006-08-30 09:27:47

no4
Member
From: Germany
Registered: 2005-09-10
Posts: 83

Re: glade, pygtk - 'close' button in the 'about dialog'

stonecrest wrote:

You can add a callback for the response signal. Why do you say it's impossible, or am I misunderstanding you?


I'm sorry, I expected the close button's click signal isn't accesible since the other signals are handled by the 'about dialog' widget. I thought it's a bug when the other buttons work, this one doesn't and it did. Thank you.


Thank you free software developers for sharing your work.

Offline

#7 2006-08-30 10:03:06

lessthanjake
Member
From: Norway
Registered: 2005-11-09
Posts: 319
Website

Re: glade, pygtk - 'close' button in the 'about dialog'

This will work(from the pygtk-demos):

x.connect("response", lambda d, r: d.destroy())

Offline

#8 2006-08-30 11:00:56

no4
Member
From: Germany
Registered: 2005-09-10
Posts: 83

Re: glade, pygtk - 'close' button in the 'about dialog'

lessthanjake wrote:

This will work(from the pygtk-demos):

x.connect("response", lambda d, r: d.destroy())

Thank you. It works.  smile


Thank you free software developers for sharing your work.

Offline

Board footer

Powered by FluxBB