当前位置: 首页>>代码示例>>Python>>正文


Python AccountView.email方法代码示例

本文整理汇总了Python中amsn2.core.views.AccountView.email方法的典型用法代码示例。如果您正苦于以下问题:Python AccountView.email方法的具体用法?Python AccountView.email怎么用?Python AccountView.email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在amsn2.core.views.AccountView的用法示例。


在下文中一共展示了AccountView.email方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: signin

# 需要导入模块: from amsn2.core.views import AccountView [as 别名]
# 或者: from amsn2.core.views.AccountView import email [as 别名]
    def signin(self):

        if self.user.get_active_text() == "":
            self.user.grab_focus()
            return
        elif self.password.get_text() == "":
            self.password.grab_focus()
            return

        email = self.user.get_active_text()
        accv = self.getAccountViewFromEmail(email)

        if accv is None:
            accv = AccountView()
            accv.email = email

        accv.password = self.password.get_text()
        status = self.statusCombo.get_active()
        for key in self.status_values:
            if self.status_values[key] == status:
                break
        accv.presence = key

        self._amsn_core.signinToAccount(self, accv)
        self.timer = gobject.timeout_add(40, self.__animation)
开发者ID:fcox,项目名称:amsn2,代码行数:27,代码来源:login.py

示例2: loadAccount

# 需要导入模块: from amsn2.core.views import AccountView [as 别名]
# 或者: from amsn2.core.views.AccountView import email [as 别名]
    def loadAccount(self, email):
        accview = None
        accdir = self.getAccountDir(email)
        accpath = os.path.join(accdir, "account.xml")
        accfile = file(accpath, "r")
        root_tree = ElementTree(file=accfile)
        accfile.close()
        account = root_tree.getroot()
        if account.tag == "aMSNAccount":
            accview = AccountView()
            #email
            emailElmt = account.find("email")
            if emailElmt is None:
                return None
            accview.email = emailElmt.text
            #nick
            nickElmt = account.find("nick")
            if nickElmt is None:
                return None
            if nickElmt.text:
                accview.nick.appendText(nickElmt.text)
            #TODO: parse...
            #psm
            psmElmt = account.find("psm")
            if psmElmt is None:
                return None
            if psmElmt.text:
                accview.psm.appendText(psmElmt.text)
            #presence
            presenceElmt = account.find("presence")
            if presenceElmt is None:
                return None
            accview.presence = presenceElmt.text
            #password
            passwordElmt = account.find("password")
            if passwordElmt is None:
                accview.password = None
            else:
                accview.password = passwordElmt.text
            #save_password
            savePassElmt = account.find("save_password")
            if savePassElmt.text == "False":
                accview.save_password = False
            else:
                accview.save_password = True
            #autoconnect
            saveAutoConnect = account.find("autoconnect")
            if saveAutoConnect.text == "False":
                accview.autologin = False
            else:
                accview.autologin = True
            #TODO: use backend & all
            #dp
            dpElmt = account.find("dp")
            #TODO

            #TODO: preferred_ui ?

            accview.save = True
        return accview
开发者ID:BigSisma,项目名称:amsn2,代码行数:62,代码来源:defaultaccountbackend.py

示例3: __switch_to_account

# 需要导入模块: from amsn2.core.views import AccountView [as 别名]
# 或者: from amsn2.core.views.AccountView import email [as 别名]
    def __switch_to_account(self, email):

        accv = self.getAccountViewFromEmail(email)

        if accv is None:
            accv = AccountView()
            accv.email = email

        self.ui.comboAccount.setItemText(0, accv.email)

        if accv.password:
            self.ui.linePassword.clear()
            self.ui.linePassword.insert(accv.password)
开发者ID:fcox,项目名称:amsn2,代码行数:15,代码来源:login.py

示例4: signin

# 需要导入模块: from amsn2.core.views import AccountView [as 别名]
# 或者: from amsn2.core.views.AccountView import email [as 别名]
    def signin(self):
        self.loginThrobber = LoginThrobber(self)
        self._parent.fadeIn(self.loginThrobber)

        email = self.ui.comboAccount.currentText()
        accv = self.getAccountViewFromEmail(str(email))

        if accv is None:
            accv = AccountView()
            accv.email = str(email)

        accv.password = self.ui.linePassword.text().toLatin1().data()
        accv.presence = self.status_dict[str(self.ui.comboStatus.currentText())]

        self._amsn_core.signinToAccount(self, accv)
开发者ID:javieradrianr,项目名称:amsn2,代码行数:17,代码来源:login.py

示例5: __switch_to_account

# 需要导入模块: from amsn2.core.views import AccountView [as 别名]
# 或者: from amsn2.core.views.AccountView import email [as 别名]
    def __switch_to_account(self, email):
        print "Switching to account", email

        accv = self.getAccountViewFromEmail(email)

        if accv is None:
            accv = AccountView(self._amsn_core)
            accv.email = email

        self.user.get_children()[0].set_text(accv.email)
        if accv.password:
            self.password.set_text(accv.password)

        self.rememberMe.set_active(accv.save)
        self.rememberPass.set_active(accv.save_password)
        self.autoLogin.set_active(accv.autologin)
开发者ID:jperezq,项目名称:amsn2,代码行数:18,代码来源:login.py

示例6: __on_toggled_cb

# 需要导入模块: from amsn2.core.views import AccountView [as 别名]
# 或者: from amsn2.core.views.AccountView import email [as 别名]
    def __on_toggled_cb(self, source):

        email = self.user.get_active_text()
        accv = self.getAccountViewFromEmail(email)

        if accv is None:
            accv = AccountView(self._amsn_core)
            accv.email = email

        if source is self.rememberMe:
            accv.save = source.get_active()
            self.rememberPass.set_sensitive(source.get_active())
            self.autoLogin.set_sensitive(source.get_active())
        elif source is self.rememberPass:
            accv.save_password = source.get_active()
            self.autoLogin.set_sensitive(source.get_active())
        elif source is self.autoLogin:
            accv.autologin = source.get_active()
开发者ID:jperezq,项目名称:amsn2,代码行数:20,代码来源:login.py

示例7: __switch_to_account

# 需要导入模块: from amsn2.core.views import AccountView [as 别名]
# 或者: from amsn2.core.views.AccountView import email [as 别名]
    def __switch_to_account(self, email):
        logger.info("Switching to account %s", email)

        accv = self.getAccountViewFromEmail(email)

        if accv is None:
            accv = AccountView(self._amsn_core)
            accv.email = email

        self.user.get_children()[0].set_text(accv.email)
        if accv.password:
            self.password.set_text(accv.password)

        self.statusCombo.set_active(self.status_values[accv.presence])

        self.rememberMe.set_active(accv.save)
        self.rememberPass.set_active(accv.save_password)
        self.autoLogin.set_active(accv.autologin)
开发者ID:pipator,项目名称:amsn2,代码行数:20,代码来源:login.py

示例8: signin

# 需要导入模块: from amsn2.core.views import AccountView [as 别名]
# 或者: from amsn2.core.views.AccountView import email [as 别名]
    def signin(self):

        if self.user.get_active_text() == "":
            self.user.grab_focus()
            return
        elif self.password.get_text() == "":
            self.password.grab_focus()
            return

        email = self.user.get_active_text()
        accv = self.getAccountViewFromEmail(email)

        if accv is None:
            accv = AccountView(self._amsn_core)
            accv.email = email

        accv.password = self.password.get_text()
        status = self.statusCombo.get_active()
        for key in self.status_values:
            if self.status_values[key] == status:
                break
        accv.presence = key

        accv.save = self.rememberMe.get_active()
        accv.save_password = self.rememberPass.get_active()
        accv.autologin = self.autoLogin.get_active()

        for box in self.input_boxes:
            self.remove(box)

        self.login = True
        self.status.show()
        pgAlign = self.pgbar.get_parent()
        pgAlign.show()
        self.pgbar.show()
        self.pack_start(pgAlign, False, False)
        self.pack_start(self.status, False, False)
        self.login_button.set_label(gtk.STOCK_DISCONNECT)
        self.reorder_child(self.fixed_boxes[1], -1)
        self.set_child_packing(self.fixed_boxes[1], True, False, 0, gtk.PACK_START)

        self._amsn_core.signinToAccount(self, accv)
        self.timer = gobject.timeout_add(40, self.__animation)
开发者ID:jperezq,项目名称:amsn2,代码行数:45,代码来源:login.py


注:本文中的amsn2.core.views.AccountView.email方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。