now the cancel button actually cancels 0u0;
This commit is contained in:
parent
0b93c4e3f9
commit
42bed9b175
2 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@ buyee.html
|
|||
yahoo.html
|
||||
exchange.json
|
||||
*.glade~
|
||||
venv/
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue