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


Python FilesProp.deleteFileProp方法代码示例

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


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

示例1: _remove_transfer

# 需要导入模块: from common.file_props import FilesProp [as 别名]
# 或者: from common.file_props.FilesProp import deleteFileProp [as 别名]
 def _remove_transfer(self, iter_, sid, file_props):
     self.model.remove(iter_)
     if not file_props:
         return
     if file_props.tt_account:
         # file transfer is set
         account = file_props.tt_account
         if account in gajim.connections:
             # there is a connection to the account
             gajim.connections[account].remove_transfer(file_props)
         if file_props.type_ == 'r': # we receive a file
             other = file_props.sender
         else: # we send a file
             other = file_props.receiver
         if isinstance(other, str):
             jid = gajim.get_jid_without_resource(other)
         else: # It's a Contact instance
             jid = other.jid
         for ev_type in ('file-error', 'file-completed', 'file-request-error',
         'file-send-error', 'file-stopped'):
             for event in gajim.events.get_events(account, jid, [ev_type]):
                 if event.parameters.sid == file_props.sid:
                     gajim.events.remove_events(account, jid, event)
                     gajim.interface.roster.draw_contact(jid, account)
                     gajim.interface.roster.show_title()
     FilesProp.deleteFileProp(file_props)
     del(file_props)
开发者ID:irl,项目名称:gajim,代码行数:29,代码来源:filetransfers_window.py

示例2: disconnect

# 需要导入模块: from common.file_props import FilesProp [as 别名]
# 或者: from common.file_props.FilesProp import deleteFileProp [as 别名]
 def disconnect(self, connection):
     if self.host_tester:
         self.host_tester.disconnect()
         FilesProp.deleteFileProp(self.host_tester.file_props)
         self.host_tester = None
     if self.receiver_tester:
         self.receiver_tester.disconnect()
         FilesProp.deleteFileProp(self.receiver_tester.file_props)
         self.receiver_tester = None
     try:
         self.connections.remove(connection)
     except ValueError:
         pass
     if connection == self.active_connection:
         self.active_connection = None
         if self.state != S_FINISHED:
             self.state = S_INITIAL
             self.try_next_connection()
开发者ID:gajim,项目名称:gajim,代码行数:20,代码来源:proxy65_manager.py


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