def __init__(self, lastWindow, message, value=""):
Gtk.Dialog.__init__(self, title="Prompt")
self.set_modal(True)
self.set_transient_for(lastWindow)
self.label = Gtk.Label(message)
self.entry = Gtk.Entry()
self.entry.set_text(value)
self.get_content_area().pack_start(self.label, True, True, 0)
self.get_content_area().pack_start(self.entry, True, True, 0)
self.add_button("OK", Gtk.ResponseType.OK)
self.add_button("Cancel", Gtk.ResponseType.CANCEL)
self.connect("key-press-event", self.keyPressed)
评论列表
文章目录