return token
+def start_session(credentialsDialog):
+ # @todo Figure out storage of credentials
+ username, password = credentialsDialog.request_credentials()
+ token = get_token(username, rtmilk.RtMilkManager.API_KEY, rtmilk.RtMilkManager.SECRET)
+ return rtmilk.RtMilkManager(username, password, token)
+
+
class GtkRtMilk(object):
ID_IDX = 0
def name():
return "Remember The Milk"
- def start_session(self):
- username, password = self._credentials.request_credentials()
- token = get_token(username, rtmilk.RtMilkManager.API_KEY, rtmilk.RtMilkManager.SECRET)
- return rtmilk.RtMilkManager(username, password, token)
-
def enable(self):
"""
@note UI Thread
"""
- self._manager = self.start_session()
+ self._manager = start_session(self._credentials)
self._projectsList.clear()
self._populate_projects()