def __init__(self, parent):
Gtk.Dialog.__init__(self, "Enter API Key", parent, 0,
(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
Gtk.STOCK_OK, Gtk.ResponseType.OK))
self.set_default_size(150, 100)
api_key_field = Gtk.Entry()
api_key_field.set_placeholder_text("API Key")
self.api_key_field = api_key_field
box = self.get_content_area()
box.set_margin_top(10)
box.set_margin_bottom(10)
box.set_margin_left(10)
box.set_margin_right(10)
box.set_spacing(10)
box.add(api_key_field)
self.show_all()
评论列表
文章目录