added Controller and OauthImplementation windows

This commit is contained in:
jeena 2012-11-05 02:05:13 +01:00
parent 36f2e9add1
commit f189bfe754
2 changed files with 69 additions and 7 deletions

View file

@ -5,19 +5,41 @@ import TentiaWindows
class Tentia:
def __init__(self):
self.setup_preferences_window()
self.preferences_window.show()
self.controller = Controller()
self.setup_windows()
self.preferences.show()
gtk.main()
def quit(self, sender):
gtk.main_quit()
def setup_preferences_window(self):
self.preferences_window = TentiaWindows.Preferences(self)
def setup_windows(self):
self.preferences = TentiaWindows.Preferences(self)
self.timeline = TentiaWindows.Timeline(self)
self.mentions = TentiaWindows.Timeline(self, action="mentions", title="Mentions")
def resources_path(self):
return "../"
def login_with_entity(self, entity):
self.controller.setString_forKey_("entity", entity)
self.oauth_implementation = TentiaWindows.OauthImplementation(self)
def controller():
return self.controller;
class Controller:
def __init__(self, app):
self.app = app
def setString_forKey_(self, string, key):
self.user_defaults[string] = key
def getStringForKey_(self, key):
return self.user_defaults[key]
if __name__ == "__main__":
Tentia()