コード例 #1
0
ファイル: wamanager.py プロジェクト: davec555/wazapp
    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)
コード例 #2
0
    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()