self.accounts = AccountsTreeView(gtk.HILDON_UI_MODE_NORMAL, self.controller)
vbox.pack_start(self.accounts, False, False, 1)
+
+ clear_button = hildon.GtkButton(gtk.HILDON_SIZE_FINGER_HEIGHT | gtk.HILDON_SIZE_HALFSCREEN_WIDTH)
+ clear_button.set_label("Clear Cache")
+ clear_button.connect("clicked", self.on_clear_cache_clicked)
+ vbox.pack_start(clear_button, False, False, 1)
# add butttons
# all stock responses are negative, so we can use any positive value
self.destroy()
+ def on_clear_cache_clicked(self, button):
+ self.controller.clear_cache()
+
def on_new_account_clicked(self):
NewAccountDialog(self.win, self.controller)
self.accounts.refresh()
def on_delete_account_clicked(self):
uid = self._get_selected_item(0)
- self.controller.remove_account(uid)
+ self.controller.settings.remove_account(uid)
self.accounts.refresh()
def _get_selected_item(self, column):
result = self.run()
else:
valid_credentials = True
- self.controller.add_account(uid, api_key)
+ self.controller.settings.add_account(uid, api_key)
else:
break