diff --git a/.gitignore b/.gitignore index 4bd4a75..58d430f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ buyee.html yahoo.html exchange.json *.glade~ +venv/ diff --git a/buypeeb.py b/buypeeb.py index 203b97b..879ef7c 100755 --- a/buypeeb.py +++ b/buypeeb.py @@ -133,7 +133,7 @@ class BuypeebApp: response = entrybox.run() text = entry.get_text() entrybox.destroy() - if response: + if response == Gtk.ResponseType.OK: return text else: # user clicked cancel @@ -188,7 +188,7 @@ class BuypeebApp: self.updateItems() def btnClearEndedClicked(self, widget): - if self.msgBox("Clear ended?", "Are you sure you want to clear all ended items from the watchlist?", buttons = Gtk.ButtonsType.OK_CANCEL): + if self.msgBox("Clear ended?", "Are you sure you want to clear all ended items from the watchlist?", buttons = Gtk.ButtonsType.OK_CANCEL) == Gtk.ResponseType.OK: for id, item in self.settings.watchlist.items(): if not item.available: del self.settings.watchlist[key] @@ -196,7 +196,7 @@ class BuypeebApp: self.renderList() def btnClearAllClicked(self, widget): - if self.msgBox("Clear all?", "Are you sure you want to clear all watched items?", buttons = Gtk.ButtonsType.OK_CANCEL): + if self.msgBox("Clear all?", "Are you sure you want to clear all watched items?", buttons = Gtk.ButtonsType.OK_CANCEL) == Gtk.ResponseType.OK: self.settings.watchlist = {} self.items.clear()