Did I find the right examples for you? yes no

All Samples(36)  |  Call(36)  |  Derive(0)  |  Import(0)

src/d/e/deepin-music-player-HEAD/src/widget/song_editor.py   deepin-music-player(Download)
        # Update simpler.
        self.cover_image.set_from_pixbuf(CoverManager.get_pixbuf_from_song(song, 92, 92, False, False))
        self.title_label.set_text(utils.xmlescape(song.get_str("title")))
        self.artist_label.set_text(utils.xmlescape(song.get_str("artist")))
        self.album_label.set_text(utils.xmlescape(song.get_str("album")))

src/d/e/deepin-music-player-HEAD/plugins/musicfm/radio_item.py   deepin-music-player(Download)
        total_rect = gtk.gdk.Rectangle(title_rect.x, title_rect.y + 16, title_rect.width, 9)
 
        render_text(cr, utils.xmlescape(self.title), title_rect, 
                    # app_theme.get_color("labelText").get_color(),
                    "#444444",
                    10)
        render_text(cr, utils.xmlescape(self.description), total_rect,
    def update_size(self):    
        self.channel_name = utils.xmlescape(self.channel_info.get("name", ""))
        __, self.name_h = get_content_size(self.channel_name, text_size=9)
 
        self.detail_info = "%s首歌曲 %s制作" % (self.channel_info.get("song_num"),
                                       utils.xmlescape(self.channel_info.get("creator", {}).get("name", "")))
        __, self.detail_h = get_content_size(self.detail_info, text_size=8)
 
        intro = utils.xmlescape(self.channel_info.get("intro", "").strip())

src/d/e/deepin-music-player-HEAD/src/widget/song_notify.py   deepin-music-player(Download)
        rect.width -= (self.cover_width + self.text_padding_x)
 
        title = utils.xmlescape(self.song.get_str("title"))
        artist = utils.xmlescape(self.song.get_str("artist"))        
        album = utils.xmlescape(self.song.get_str("album"))
        # draw size and format    
        other_y = dash_y + self.other_up_offset
        song_size = "%s: %s" % (_("Size"), utils.xmlescape(self.song.get_str("#size")))
        song_format = "%s: %s" % (_("Type"), utils.get_song_attr(self.song))
        _width, _height = get_content_size(song_size, text_size=self.other_text_size)

src/d/e/deepin-music-player-HEAD/src/widget/ui.py   deepin-music-player(Download)
 
        # Draw label.
        draw_text(cr, utils.xmlescape(self.content), rect.x + self.left_padding + self.label_padding + icon_pixbuf.get_width(),
                  rect.y, rect.width - self.left_padding - self.label_padding - icon_pixbuf.get_width(), rect.height,
                  self.font_size, text_color="#FFFFFF")
    def init_size(self):    
        tw = self.default_width - self.padding_x * 2
        intro = self.channel_info.get("intro", "").strip()
        intro = utils.xmlescape(intro)
        intro_text = "<b>%s:</b> %s" % ("简介", intro)
 
        hotsongs =  " / ".join(self.channel_info.get("hot_songs", [])).strip()
        hotsongs = utils.xmlescape(hotsongs)
        hotsongs_text = "<b>%s:</b> %s" % ("热门歌曲", hotsongs)
        hotsongs_tw, hotsongs_th = get_content_size(hotsongs_text, wrap_width=tw,text_size=9)
        tw = rect.width - self.padding_x * 2
        intro = self.channel_info.get("intro", "").strip()
        intro = utils.xmlescape(intro)
        if intro:
            intro_text = "<b>%s:</b> %s" % ("简介", intro)
 
        hotsongs =  " / ".join(self.channel_info.get("hot_songs", [])).strip()
        hotsongs = utils.xmlescape(hotsongs)
        hotsongs_text = "<b>%s:</b> %s" % ("热门歌曲", hotsongs)
        if intro:

src/d/e/deepin-music-player-HEAD/src/widget/slide_switcher.py   deepin-music-player(Download)
    def get_channel_contents(self, channel_info):    
        name = utils.xmlescape(channel_info.get("name", ""))
        intro = utils.xmlescape(channel_info.get("intro", ""))
        hot_songs = "%s: %s" % ("热门歌曲", utils.xmlescape(" / ".join(channel_info.get("hot_songs", []))))
        songs = "%s%s" % (str(channel_info.get("song_num", "0")), "首歌曲")

src/d/e/deepin-music-player-HEAD/src/widget/ui_utils.py   deepin-music-player(Download)
        color = "#ff0000"        
 
    content = utils.xmlescape(content)    
    draw_text(cr, content, rect.x, rect.y, rect.width, rect.height, font_size, color, alignment=align)    
 
        color = "#ff0000"        
 
    content = utils.xmlescape(content)    
    draw_text(cr, content, rect.x, rect.y, rect.width, rect.height, font_size, color, alignment=align)    
 

src/d/e/deepin-music-player-HEAD/src/widget/discard_browser.py   deepin-music-player(Download)
        self.side_padding = 5
        self.item_height = 37
        self.title = utils.xmlescape(title)
        self.item_width = 121
        self.webcast_key = webcast_key
        self.side_padding = 5
        self.item_height = 37
        self.title = utils.xmlescape(title)
        self.item_width = 121
        self.hover_bg = app_theme.get_pixbuf("webcast/categroy_bg.png").get_pixbuf()
        self.allocation_widget = allocation_widget
        self.highlight_flag = False
        self.owner_key = self.title = utils.xmlescape(title)
        self.parent_key = parent
        self.has_underline = True

src/d/e/deepin-music-player-HEAD/src/widget/webcast_item.py   deepin-music-player(Download)
        #     color = "#ff0000"        
 
        content = utils.xmlescape(self.title)    
        draw_text(cr, content, rect.x, rect.y, rect.width, rect.height, 
                  text_size=9, text_color=color, alignment=pango.ALIGN_LEFT)    

src/d/e/deepin-music-player-HEAD/src/widget/lyrics_search.py   deepin-music-player(Download)
    def update(self, lrc_list):    
        self.__url = lrc_list[2]
        self.title  = utils.xmlescape(lrc_list[1])
        self.artist = utils.xmlescape(lrc_list[0])
 

src/d/e/deepin-music-player-HEAD/src/parse/_pattern.py   deepin-music-player(Download)
class XMLFromPattern(Pattern):
    _formatters = [lambda k, s: utils.xmlescape(s)]
 

  1 | 2  Next