def __init__(self, files):
self.files = files
Gtk.Window.__init__(self, title="TMSU")
self.set_size_request(200, 100)
self.set_border_width(10)
self.set_type_hint(Gdk.WindowTypeHint.DIALOG)
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
self.add(vbox)
prompt_text = 'Add (space-separated) tags to %d file%s' % (len(files), '' if len(files)==1 else 's')
self.prompt_label = Gtk.Label(label=prompt_text)
vbox.pack_start(self.prompt_label, True, True, 0)
self.entry = Gtk.Entry()
self.entry.connect("activate", self.on_entry_activated)
vbox.pack_start(self.entry, True, True, 0)
self.button = Gtk.Button(label="Add")
self.button.connect("clicked", self.on_button_clicked)
vbox.pack_start(self.button, True, True, 0)
评论列表
文章目录