Take prompt and set title if prompt provided

This commit is contained in:
mlncn 2021-05-02 12:58:52 -04:00
parent e1ac2ef49b
commit 494b454c45

View file

@ -6,7 +6,7 @@ from gi.repository import Gtk, GLib
class PromptWindow(Gtk.Window): class PromptWindow(Gtk.Window):
def __init__(self, task=None): def __init__(self, prompt=None, task=None):
if task is None: if task is None:
task = "" task = ""
@ -41,7 +41,8 @@ class PromptWindow(Gtk.Window):
vbox.pack_start(hbox, True, True, 0) vbox.pack_start(hbox, True, True, 0)
# self.set_title("Entry") if prompt:
self.set_title(prompt)
self.show_all() self.show_all()
Gtk.main() Gtk.main()