diff --git a/prompt_window.py b/prompt_window.py index cd7a13c..3cb3ac6 100644 --- a/prompt_window.py +++ b/prompt_window.py @@ -12,25 +12,25 @@ class PromptWindow(Gtk.Window): task = "" Gtk.Window.__init__(self, title="Pomodoro Prompt") - self.set_size_request(400, 100) - - self.timeout_id = None + self.set_size_request(500, 100) + self.set_border_width(10) self.entry = Gtk.Entry() self.entry.set_text(task) - vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6) - self.add(vbox) + self.entry.connect("activate", self.save) - vbox.pack_start(self.entry, True, True, 0) + self.add(self.entry) - self.set_border_width(5) # self.set_title("Entry") self.connect("destroy", Gtk.main_quit) - def on_key_release(self, widget, event): - self.label.set_text(widget.get_text()) + def save(self, entry): + task = entry.get_text() + print(task) + # A little concerned this might be sort of the nuclear option here. + Gtk.main_quit() win = PromptWindow(task="Making money")