RE: GtkDialog created from GtkBuilder (glade 3) isn't returning agtk.ResponseType
- From: "Ethan Baldridge" <ethan superiordocumentservices com>
- To: "Ethan Baldridge" <ethan superiordocumentservices com>, <gtk-app-devel-list gnome org>
- Subject: RE: GtkDialog created from GtkBuilder (glade 3) isn't returning agtk.ResponseType
- Date: Wed, 22 Apr 2009 16:39:08 -0400
Never mind - I spent two hours looking at this and then realized I
needed to set a Response ID on the button itself. I thought it defaulted
for the stock buttons.
-----Original Message-----
From: gtk-app-devel-list-bounces gnome org
[mailto:gtk-app-devel-list-bounces gnome org] On Behalf Of Ethan
Baldridge
Sent: Wednesday, April 22, 2009 4:30 PM
To: gtk-app-devel-list gnome org
Subject: GtkDialog created from GtkBuilder (glade 3) isn't returning
agtk.ResponseType
I can't figure out what I'm doing wrong. I'm trying to make a login
dialog - I created it in Glade-3 making sure to use a GtkDialog
template.
But the result is always 0, which isn't in the ResponseType enum at all.
def login(self):
self.builder.add_from_file("transmission.glade")
dialog =
self.builder.get_object("login")
#okButton =
self.builder.get_object("button1")
#closeButton =
self.builder.get_object("button2")
window.set_default_response(gtk.RESPONSE_OK)
self.builder.connect_signals(self)
result = dialog.run()
uname =
self.builder.get_object("username").get_text()
passwd =
self.builder.get_object("password").get_text()
dialog.destroy()
return result, uname, passwd;
Thanks in advance for any help!
-Ethan
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]