Pois é, eu sei que tenho que dar um connect no close button. o problema é como?! já tentei de várias e várias maneiras, e sempre da algum problema diferente, e estou achando realmente estranho a falta de material sobre o assunto, exemplos, tutoriais, listas, etc.... muito estranho....
O melhor que achei foi este site http://www.daniweb.com/forums/thread77173.html /* When the window is given the "delete_event" signal (this is given * by the window manager, usually by the "close" option, or on the * titlebar), we ask it to call the delete_event () function * as defined above. The data passed to the callback * function is NULL and is ignored in the callback function. */ g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (delete_event), NULL) Mas se eu faço algo assim no meu código, quebra tudo =/ 2008/3/20 Arthur Furlan <[EMAIL PROTECTED]>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > 2008/3/20 Fernando Bunn : > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: http://firegpg.tuxfamily.org > > iD8DBQFH4sroHiIxAB175NwRAkSkAJ4hQzOc43JqhHmSGswcF9QYFs5CcwCgsnUd > ETVjLDAuKLHq3Q9e+2CkYmc= > =wolU > -----END PGP SIGNATURE----- > > > eu já vi em python, fica bem diferente... > > tentei usar um hide, mas a janela simplesmente some, e a aplicação > > continua > > rodando =/ > > > Você deve associar o sinal 'destroy' da janela com a função gtk.main_quit. > Esse é o nome da função em python, em C++ pode ser que seja diferente, mas > a > idéia eu acredito que seja a mesma. > > Em python ficaria: > mainWindow.connect('destroy', gtk.main_quit) > > -- > Atenciosamente, > > Arthur Furlan > [EMAIL PROTECTED] > > > > > > > > 2008/3/20 Xisberto <[EMAIL PROTECTED]>: > > > > > Cara, eu uso o python com GTK e há um manual de referência: > > > http://www.pygtk.org/pygtk2reference/ > > > > > > Ele lista as funções (python, claro) e os eventos. Você pode procurar > os > > > eventos e usá-los. Acho que este que você procura é o "hide". > > > > > > 2008/3/20 Fernando Bunn <[EMAIL PROTECTED]>: > > > > > > > Olá, alguém poderia me dizer se existe alguma lista de discurssão > > sobre > > > > C++ > > > > com GTK? > > > > Estou tendo problemas relativamente simples, mas não consigo achar > > > solução > > > > no google, de maneira nenhuma... > > > > E uma lista seria bem útil para aprender algumas coisas, já que não > > acho > > > > tutoriais e exemplos decentes. > > > > Para ter uma idéia, não consigo achar exemplo de como fechar uma > > > aplicação > > > > gtk, clicando no X da borda superior direita =/ apenas em um botão > > > > qualquer > > > > Obrigado e desculpe pelo OFF > > > > > > > > > Cara, olhe > > > > > > > > > > > > > > > > > > -- > > > > Fernando C. Bunn > > > > -- > > > > Interessado em aprender mais sobre o Ubuntu em português? > > > > http://wiki.ubuntu-br.org/ComeceAqui - > > > > ubuntu-br mailing list > > > > ubuntu-br@lists.ubuntu.com > > > > https://lists.ubuntu.com/mailman/listinfo/ubuntu-br > > > > > > > > > > > > > > > > -- > > > Humberto Xis > > > [EMAIL PROTECTED] > > > [EMAIL PROTECTED] > > > http://xisberto.blogspot.com > > > http://ostelematicos.blogspot.com > > > > > > "Sur la tuta tero estis unu lingvo kaj unu parlomaniero." - Gn 11,1 > > > -- > > > Interessado em aprender mais sobre o Ubuntu em português? > > > http://wiki.ubuntu-br.org/ComeceAqui - > > > ubuntu-br mailing list > > > ubuntu-br@lists.ubuntu.com > > > https://lists.ubuntu.com/mailman/listinfo/ubuntu-br > > > > > > > > > > > -- > > Fernando C. Bunn > > -- > > Interessado em aprender mais sobre o Ubuntu em português? > > http://wiki.ubuntu-br.org/ComeceAqui - > > ubuntu-br mailing list > > ubuntu-br@lists.ubuntu.com > > https://lists.ubuntu.com/mailman/listinfo/ubuntu-br > > > -- > Interessado em aprender mais sobre o Ubuntu em português? > http://wiki.ubuntu-br.org/ComeceAqui - > ubuntu-br mailing list > ubuntu-br@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/ubuntu-br > -- Fernando C. Bunn -- Interessado em aprender mais sobre o Ubuntu em português? http://wiki.ubuntu-br.org/ComeceAqui - ubuntu-br mailing list ubuntu-br@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-br