• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python utils.path_to_url函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中utils.path_to_url函数的典型用法代码示例。如果您正苦于以下问题:Python path_to_url函数的具体用法?Python path_to_url怎么用?Python path_to_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: _prepare_history

 def _prepare_history(self):
     '''clean up ouput'''
     self.nicebar.empty_queue()
     if self.contact:
         his_picture = self.contact.picture or utils.path_to_url(os.path.abspath(gui.theme.image_theme.user))
         my_picture = self.session.contacts.me.picture or utils.path_to_url(os.path.abspath(gui.theme.image_theme.user))
         self.text.clear(self.account, self.contact.nick, self.contact.display_name, my_picture, his_picture)
     else:
         self.text.clear()
开发者ID:karanclabs,项目名称:emesene,代码行数:9,代码来源:ContactInformation.py


示例2: refresh_history

 def refresh_history(self):
     '''refresh the history according to the values on the calendars
     '''
     if self.contact:
         his_picture = self.contact.picture or utils.path_to_url(os.path.abspath(gui.theme.user))
         my_picture = self.session.contacts.me.picture or utils.path_to_url(os.path.abspath(gui.theme.user))
         self.text.clear(self.account, self.contact.nick, self.contact.display_name, my_picture, his_picture)
     else:
         self.text.clear()
     self.request_chats_between(1000, self._on_chats_ready)
开发者ID:CelticHarp,项目名称:emesene,代码行数:10,代码来源:ContactInformation.py


示例3: clear

 def clear(self, source="", target="", target_display="", source_img="", target_img=""):
     """clear the content"""
     body = self.theme.get_body(source, target, target_display, source_img, target_img)
     self.load_string(body, "text/html", "utf-8", utils.path_to_url(self.theme.path))
     self.pending = []
     self.ready = False
     self.last_incoming = None
开发者ID:19MiRkO91,项目名称:emesene,代码行数:7,代码来源:AdiumTextBox.py


示例4: clear

 def clear(self, source="", target="", target_display="",
         source_img="", target_img=""):
     '''clear the content'''
     body = self.theme.get_body(source, target, target_display, source_img,
             target_img)
     self.delayed_call(self._load_string, body,
             "text/html", "utf-8", utils.path_to_url(self.theme.path))
开发者ID:AmiZya,项目名称:emesene,代码行数:7,代码来源:AdiumTextBox.py


示例5: __init__

    def __init__(self, config, add_emoticon_cb):
        """constructor"""
        gtk.ScrolledWindow.__init__(self)

        self.config = config

        self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
        self.set_shadow_type(gtk.SHADOW_IN)
        self.loaded = False
        picture = utils.path_to_url(os.path.abspath(gui.theme.image_theme.user))

        self.view = OutputView(gui.theme.conv_theme, "", "", "", picture, picture, add_emoticon_cb)
        self.clear()
        self.view.show()
        self.add(self.view)
开发者ID:hermanschmidt,项目名称:emesene,代码行数:15,代码来源:AdiumTextBox.py


示例6: __init__

    def __init__(self, config, add_emoticon_cb):
        '''constructor'''
        gtk.ScrolledWindow.__init__(self)

        self.config = config

        self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
        self.set_shadow_type(gtk.SHADOW_IN)
        self._texts = []
        self.loaded = False
        picture = utils.path_to_url(os.path.abspath(gui.theme.user))

        self.view = OutputView(gui.theme.conv_theme, "", "", "", picture,
                picture, add_emoticon_cb)
        self.view.connect('load-finished', self._loading_stop_cb)
        self.view.connect('console-message', self._error_cb)
        self.clear()
        self.view.show()
        self.add(self.view)
开发者ID:EchoUSB,项目名称:emesene,代码行数:19,代码来源:AdiumTextBox.py


示例7: __init__

    def __init__(self, session, cid, update_win, tab_label, members=None):
        '''constructor'''
        gtk.VBox.__init__(self)
        gui.Conversation.__init__(self, session, cid, update_win, members)
        self.set_border_width(2)

        self.typing_timeout = None
        self.tab_label = tab_label

        self._header_visible = session.config.b_show_header
        self._image_visible = session.config.b_show_info
        self._toolbar_visible = session.config.b_show_toolbar

        self.panel = gtk.VPaned()

        self.show_avatar_in_taskbar = self.session.config.get_or_set(
                                                    'b_show_avatar_in_taskbar',
                                                    True)

        Header = extension.get_default('conversation header')
        OutputText = extension.get_default('conversation output')
        InputText = extension.get_default('conversation input')
        ContactInfo = extension.get_default('conversation info')
        ConversationToolbar = extension.get_default(
            'conversation toolbar')
        TransfersBar = extension.get_default('filetransfer pool')
        CallWidget = extension.get_default('call widget')

        self.below_conversation = None
        BelowConversation = extension.get_default('below conversation')
        if BelowConversation is not None:
            self.below_conversation = BelowConversation(self, session)

        self.header = Header(session, members)
        toolbar_handler = gui.base.ConversationToolbarHandler(self.session,
            gui.theme, self)
        self.toolbar = ConversationToolbar(toolbar_handler, self.session)
        self.toolbar.set_property('can-focus', False)
        outputview_handler = gui.base.OutputViewHandler(self)
        self.output = OutputText(self.session.config, outputview_handler)
        if self.session.conversation_start_locked:
            self.output.lock()

        self.output.set_size_request(-1, 30)
        self.input = InputText(self.session, self._on_send_message,
                               self.cycle_history, self.on_drag_data_received,
                               self._send_typing_notification)
        self.output.set_size_request(-1, 25)
        self.input.set_size_request(-1, 25)
        self.info = ContactInfo(self.session, self.members)
        self.transfers_bar = TransfersBar(self.session)
        self.call_widget = CallWidget(self.session)

        frame_input = gtk.Frame()
        frame_input.set_shadow_type(gtk.SHADOW_IN)

        input_box = gtk.VBox()
        input_box.pack_start(self.toolbar, False)
        input_box.pack_start(self.input, True, True)

        frame_input.add(input_box)

        self.panel.pack1(self.output, True, False)
        self.panel.pack2(frame_input, False, False)

        if not check_gtk3():
            self.panel_signal_id = self.panel.connect_after('expose-event',
                    self.update_panel_position)
        else:
            self.panel_signal_id = self.panel.connect_after('draw',
                    self.update_panel_position)
        self.panel.connect('button-release-event', self.on_input_panel_resize)

        self.hbox = gtk.HBox()
        if self.session.config.get_or_set('b_avatar_on_left', False):
            self.hbox.pack_start(self.info, False)
            self.hbox.pack_start(self.panel, True, True)
        else:
            self.hbox.pack_start(self.panel, True, True)
            self.hbox.pack_start(self.info, False)

        self.pack_start(self.header, False)
        self.pack_start(self.hbox, True, True)
        self.pack_start(self.transfers_bar, False)
        if self.below_conversation is not None:
            self.pack_start(self.below_conversation, False)

        if len(self.members) == 0:
            self.header.information = ('connecting', 'creating conversation')
        else:
            #update adium theme header/footer
            account = self.members[0]
            contact = self.session.contacts.safe_get(account)
            his_picture = contact.picture or utils.path_to_url(os.path.abspath(gui.theme.image_theme.user))
            nick = contact.nick
            display_name = contact.display_name
            self.set_sensitive(not contact.blocked, True)
            my_picture = self.session.contacts.me.picture or utils.path_to_url(os.path.abspath(gui.theme.image_theme.user))
            self.output.clear(account, nick, display_name, 
                              my_picture, his_picture)
#.........这里部分代码省略.........
开发者ID:firemountain,项目名称:emesene,代码行数:101,代码来源:Conversation.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.pause函数代码示例发布时间:2022-05-26
下一篇:
Python utils.path_to_text_fixture函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap