account_row.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Gnome-Authenticator 作者: bil-elmoussaoui 项目源码 文件源码
def copy_code(self, *args):
        """
            Copy code shows the code box for a while (10s by default)
        """
        self.timer = 0
        code = self.account.get_code()
        try:
            clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
            self.window.notification.set_message(
                _('Code "{0}" copied to clipboard'.format(str(code))))
            self.window.notification.show()
            clipboard.clear()
            clipboard.set_text(code, len(code))
            logging.debug("Secret code copied to clipboard")
        except Exception as e:
            logging.error(str(e))
        self.revealer.set_reveal_child(True)
        GLib.timeout_add_seconds(1, self.update_timer)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号