def proceed(self): account = AccountsManager.getCurrentAccount() self._d(account) if (account is None): #self.d("Forced reg"); return self.regFallback() #gui.forceRegistration(); #self.app.exit(); imsi = Utilities.getImsi() store = DataStore(imsi) if store.status == False: #or exit store.reset() store.prepareGroupConversations() store.prepareMedia() store.updateDatabase() store.initModels() gui = WAUI(account.jid) gui.setAccountPushName(account.pushName) #url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml') #gui.setSource(url) gui.initConnections(store) self.app.focusChanged.connect(gui.focusChanged) gui.quit.connect(self.quit) #gui.populatePhoneContacts(); print "SHOW FULL SCREEN" gui.showFullScreen() gui.onProcessEventsRequested() self.createDirs() self.processVersionTriggers() gui.populateContacts("ALL") gui.populateConversations() gui.populatePhoneContacts() gui.initializationDone = True gui.initialized.emit() print "INIT CONNECTION" gui.initConnection() #splash.finish(gui); gui.setMyAccount(account.jid) self.gui = gui self.gui.whatsapp.eventHandler.setMyAccount(account.jid)
def createOrUpdateAccount(self, data): if self.accountInstance is None: self.accountInstance = AccountsManager.manager.createAccount( "waxmpp") self.accountInstance.sync() self.setAccountData(self.accountInstance.id(), data, True) else: self.setAccountData(self.accountInstance.id(), data, False) if not self.account: self.account = AccountsManager.getCurrentAccount()
def proceed(self): account = AccountsManager.getCurrentAccount(); self._d(account) if(account is None): self.d("Forced reg"); return self.regFallback() #gui.forceRegistration(); #self.app.exit(); imsi = Utilities.getImsi(); store = DataStore(imsi); if store.status == False: #or exit store.reset(); store.prepareGroupConversations(); store.prepareMedia() store.updateDatabase() store.initModels() gui = WAUI(); #url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml') #gui.setSource(url) gui.initConnections(store); self.app.focusChanged.connect(gui.focusChanged) gui.quit.connect(self.quit); gui.populateContacts(); gui.populateConversations(); gui.showFullScreen(); gui.initConnection(); #splash.finish(gui); self.gui = gui; self.gui.whatsapp.eventHandler.initialConnCheck()
def proceed(self): #url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/WASplash.qml') #gui.setSource(url) #check db_state #gui.initConnection(); #pixmap = QPixmap("/opt/waxmppplugin/bin/wazapp/UI/pics/wasplash.png"); #splash = QSplashScreen(pixmap); #splash.show(); account = AccountsManager.getCurrentAccount() print account if (account is None): Utilities.debug("Forced reg") return self.regFallback() #gui.forceRegistration(); #self.app.exit(); imsi = Utilities.getImsi() store = DataStore(imsi) if store.status == False: #or exit store.reset() gui = WAUI() #url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml') #gui.setSource(url) gui.initConnections(store) self.app.focusChanged.connect(gui.focusChanged) gui.quit.connect(self.quit) gui.populateContacts() gui.showFullScreen() gui.initConnection() #splash.finish(gui); self.gui = gui self.gui.whatsapp.eventHandler.initialConnCheck()
def proceed(self): # url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/WASplash.qml') # gui.setSource(url) # check db_state # gui.initConnection(); # pixmap = QPixmap("/opt/waxmppplugin/bin/wazapp/UI/pics/wasplash.png"); # splash = QSplashScreen(pixmap); # splash.show(); account = AccountsManager.getCurrentAccount() print account if account is None: Utilities.debug("Forced reg") return self.regFallback() # gui.forceRegistration(); # self.app.exit(); imsi = Utilities.getImsi() store = DataStore(imsi) if store.status == False: # or exit store.reset() gui = WAUI() # url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml') # gui.setSource(url) gui.initConnections(store) self.app.focusChanged.connect(gui.focusChanged) gui.quit.connect(self.quit) gui.populateContacts() gui.showFullScreen() gui.initConnection() # splash.finish(gui); self.gui = gui self.gui.whatsapp.eventHandler.initialConnCheck()
def __init__(self,store, contactsManager, mode,userid = None): WADebug.attach(self); self.store = store; self.mode = mode self.uid = userid; super(ContactsSyncer,self).__init__(); acc = AccountsManager.getCurrentAccount(); if not acc: self.contactsRefreshFail.emit() username = str(acc.username) password = acc.password self.contactsManager = contactsManager self.syncer = WAContactsSyncRequest(username, password, [])
def proceed(self): account = AccountsManager.getCurrentAccount(); self._d(account) if(account is None): #self.d("Forced reg"); return self.regFallback() #gui.forceRegistration(); #self.app.exit(); imsi = Utilities.getImsi(); store = DataStore(imsi); if store.status == False: #or exit store.reset(); store.prepareGroupConversations(); store.prepareMedia() store.updateDatabase() store.initModels() gui = WAUI(account.jid); gui.setAccountPushName(account.pushName) #url = QUrl('/opt/waxmppplugin/bin/wazapp/UI/main.qml') #gui.setSource(url) gui.initConnections(store); self.app.focusChanged.connect(gui.focusChanged) gui.quit.connect(self.quit); #gui.populatePhoneContacts(); print "SHOW FULL SCREEN" gui.showFullScreen(); gui.onProcessEventsRequested() self.createDirs() self.processVersionTriggers() gui.populateContacts("ALL"); gui.populateConversations(); gui.populatePhoneContacts() gui.initializationDone = True gui.initialized.emit() print "INIT CONNECTION" gui.initConnection(); #splash.finish(gui); gui.setMyAccount(account.jid); self.gui = gui; self.gui.whatsapp.eventHandler.setMyAccount(account.jid)
def __init__(self, current_id): self.user_id = current_id self.account = AccountsManager.getCurrentAccount()
def __init__(self,current_id): self.user_id = current_id; self.account = AccountsManager.getCurrentAccount();