Beispiel #1
0
 def __init__(self, chl):
     '''
     Initialize ItemIcon class.
     
     @param pixbuf: Icon pixbuf.
     '''
     gobject.GObject.__init__(self)
     MissionThread.__init__(self)
     self.padding_x = 10
     self.padding_y = 10
     self.default_width = 110
     self.default_height = 95
     self.pixbuf_rect = None
     self.hover_flag = False
     self.mask_flag = False
     self.highlight_flag = False
     self.pixbuf = None
     self.mask_pixbuf = None
     self.chl = chl
     self.title = chl.get("name", "")
     self.description = "%s首歌曲" % chl.get("song_num")
     self.create_cover_pixbuf()
     self.notify = CoverPopupNotify(chl)
     self.notify_timeout_id = None
     self.notify_timeout = 600
 def __init__(self, chl):
     '''
     Initialize ItemIcon class.
     
     @param pixbuf: Icon pixbuf.
     '''
     gobject.GObject.__init__(self)
     MissionThread.__init__(self)
     self.padding_x = 10
     self.padding_y = 10
     self.default_width = 110
     self.default_height = 95
     self.pixbuf_rect = None
     self.hover_flag = False
     self.mask_flag = False
     self.highlight_flag = False
     self.pixbuf = None
     self.mask_pixbuf = None
     self.chl = chl
     self.title = chl.get("name", "")
     self.description = "%s首歌曲" % chl.get("song_num")
     self.create_cover_pixbuf()
     self.notify = CoverPopupNotify(chl)
     self.notify_timeout_id = None
     self.notify_timeout = 600
 def __init__(self, url, save_path, finish_callback):
     global current_background_url         
     
     MissionThread.__init__(self)
     
     self.url = url
     self.save_path = save_path
     self.finish_callback = finish_callback
     
     current_background_url = url
Beispiel #4
0
    def __init__(self, url, save_path, finish_callback):
        global current_background_url

        MissionThread.__init__(self)

        self.url = url
        self.save_path = save_path
        self.finish_callback = finish_callback

        current_background_url = url
 def __init__(self, pkg_cache, pkg_names, action_type, upgrade_id, purge_flag=False):
     '''
     init docs
     '''
     MissionThread.__init__(self)
     
     self.pkg_cache = pkg_cache
     self.pkg_names = pkg_names
     self.action_type = action_type
     self.purge_flag = purge_flag
     self.upgrade_id = upgrade_id
 def __init__(self, pkg_cache, pkg_name, action_type, simulate=False, deb_file="", purge_flag=False):
     '''
     init docs
     '''
     MissionThread.__init__(self)
     
     self.pkg_cache = pkg_cache
     self.pkg_name = pkg_name
     self.action_type = action_type
     self.simulate = simulate
     self.deb_file = deb_file
     self.purge_flag = purge_flag
Beispiel #7
0
    def __init__(self, image_object, download_dir=None):
        '''
        Initialize ItemIcon class.
        
        @param pixbuf: Icon pixbuf.
        '''
        gobject.GObject.__init__(self)
        MissionThread.__init__(self)

        self.image_path = None
        self.is_loaded = False
        self.is_downloaded = False
        self.hover_flag = False
        self.highlight_flag = False
        self.wallpaper_width = SMALL_SIZE["x"]
        self.wallpaper_height = SMALL_SIZE["y"]
        self.padding_x = 8
        self.width = self.wallpaper_width + self.padding_x * 2
        self.height = self.wallpaper_height + ITEM_PADDING_Y * 2
        self.image_object = image_object
        self.download_dir = download_dir
        self.pixbuf = None
        self.create_cache_pixbuf()

        self.is_hover = False
        self.hover_stroke_dcolor = app_theme.get_color("globalHoverStroke")
        self.hover_response_rect = gtk.gdk.Rectangle(self.padding_x,
                                                     ITEM_PADDING_Y,
                                                     self.wallpaper_width,
                                                     self.wallpaper_height)

        self.tick_normal_dpixbuf = app_theme.get_pixbuf(
            "individuation/tick_normal.png")
        self.tick_gray_dpixbuf = app_theme.get_pixbuf(
            "individuation/tick_gray.png")
        self.is_tick = False

        self.loop_dpixbuf = app_theme.get_pixbuf("individuation/loop.png")
        self.is_loop = False

        event_manager.add_callback("download-start", self.__on_download_start)
        event_manager.add_callback("download-finish",
                                   self.__on_download_finish)
        event_manager.add_callback("delete-downloaded-wallpaper",
                                   self.__on_delete_downloaded_wallpaper)
    def __init__(self, image_object, download_dir=None):
        '''
        Initialize ItemIcon class.
        
        @param pixbuf: Icon pixbuf.
        '''
        gobject.GObject.__init__(self)
        MissionThread.__init__(self)
      
        self.image_path = None
        self.is_loaded = False
        self.is_downloaded = False
        self.hover_flag = False
        self.highlight_flag = False
        self.wallpaper_width = SMALL_SIZE["x"]
        self.wallpaper_height = SMALL_SIZE["y"]
        self.padding_x = 8
        self.width = self.wallpaper_width + self.padding_x * 2
        self.height = self.wallpaper_height + ITEM_PADDING_Y * 2
        self.image_object = image_object
        self.download_dir = download_dir
        self.pixbuf = None
        self.create_cache_pixbuf()
        
        self.is_hover = False
        self.hover_stroke_dcolor = app_theme.get_color("globalHoverStroke")
        self.hover_response_rect = gtk.gdk.Rectangle(
            self.padding_x, ITEM_PADDING_Y ,
            self.wallpaper_width, self.wallpaper_height
            ) 
        
        self.tick_normal_dpixbuf = app_theme.get_pixbuf("individuation/tick_normal.png")
        self.tick_gray_dpixbuf = app_theme.get_pixbuf("individuation/tick_gray.png")
        self.is_tick = False

        self.loop_dpixbuf = app_theme.get_pixbuf("individuation/loop.png")
        self.is_loop = False

        event_manager.add_callback("download-start", self.__on_download_start)
        event_manager.add_callback("download-finish", self.__on_download_finish)
        event_manager.add_callback("delete-downloaded-wallpaper", self.__on_delete_downloaded_wallpaper)
 def __init__(self, infos):
     MissionThread.__init__(self)
     self.artist_name, self.album_name = infos
 def __init__(self, artist_name):
     MissionThread.__init__(self)
     self.artist_name = artist_name
Beispiel #11
0
 def __init__(self, pkg_cache, simulate=False):
     '''Init for UpdateList.'''
     MissionThread.__init__(self)
     self.pkg_cache = pkg_cache
Beispiel #12
0
 def __init__(self, pkg_cache, simulate=False):
     '''Init for UpdateList.'''
     MissionThread.__init__(self)
     self.pkg_cache = pkg_cache
Beispiel #13
0
 def __init__(self, name):
     MissionThread.__init__(self)
     self.app_name = name
 def __init__(self, infos):
     MissionThread.__init__(self)
     self.artist_name, self.album_name = infos
 def __init__(self, artist_name):
     MissionThread.__init__(self)
     self.artist_name = artist_name