def __init__(self,
                 tag,
                 limit=10,
                 has_add=True,
                 fetch_add_item=True,
                 padding_x=0,
                 padding_y=0):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        targets = [("text/deepin-radios", gtk.TARGET_SAME_APP, 1),
                   ("text/uri-list", 0, 2)]
        self.drag_source_set(gtk.gdk.BUTTON1_MASK, targets,
                             gtk.gdk.ACTION_COPY)
        self.connect("drag-data-get", self.__on_drag_data_get)

        self.tag = tag
        self.__start = 0
        self.__limit = limit
        self.__fetch_thread_id = 0
        self.__render_id = 0
        self.__genre_id = "335"
        self.__keyword = ""
        self.__total = None
        # self.more_item = MoreIconItem()
        self.fetch_add_item = fetch_add_item

        self.connect("single-click-item", self.on_iconview_single_click_item)
        self.connect("motion-item", self.on_motion_item)
        # if has_add:
        #     self.add_items([self.more_item])
        self.is_finish = False
    def __init__(self,
                 tag,
                 limit=10,
                 has_add=True,
                 fetch_add_item=True,
                 padding_x=0,
                 padding_y=0):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        targets = [("text/deepin-radios", gtk.TARGET_SAME_APP, 1),
                   ("text/uri-list", 0, 2)]
        self.drag_source_set(gtk.gdk.BUTTON1_MASK, targets,
                             gtk.gdk.ACTION_COPY)
        self.connect("drag-data-get", self.__on_drag_data_get)

        self.tag = tag
        self.__start = 0
        self.__limit = limit
        self.__fetch_thread_id = 0
        self.__render_id = 0
        self.__genre_id = "335"
        self.__keyword = ""
        self.__total = None
        # self.more_item = MoreIconItem()
        self.fetch_add_item = fetch_add_item

        self.connect("single-click-item", self.on_iconview_single_click_item)
        self.connect("motion-item", self.on_motion_item)
        # if has_add:
        #     self.add_items([self.more_item])
        self.is_finish = False
    def __init__(self, padding_x=14, padding_y=16):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        targets = [("text/deepin-webcasts", gtk.TARGET_SAME_APP, 1),
                   ("text/uri-list", 0, 2)]
        self.drag_source_set(gtk.gdk.BUTTON1_MASK, targets,
                             gtk.gdk.ACTION_COPY)
        self.connect("drag-data-get", self.__on_drag_data_get)
    def __init__(self, network_interface, padding_x=8, padding_y=10, download_dir=None):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        self.download_dir = download_dir

        self.connect("double-click-item", self.__on_double_click_item)
        self.connect("single-click-item", self.__on_single_click_item)
        self.__fetch_thread_id = 0
        self.network_interface = network_interface
 def __init__(self, padding_x=0, padding_y=0, status_box=None):
     IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)
     self.untitled_theme = theme_manager.get_untitled_theme()
     self.status_box = status_box
     
     self.__is_double_click = False
     self.__single_click_item = None
     self.connect("double-click-item", self.__on_double_click_item)
     self.connect("single-click-item", self.__on_single_click_item)
     self.connect("right-click-item", self.__on_right_click_item)
     event_manager.add_callback("clear-systemview-highlight", self.clear_highlight_status)
     gobject.timeout_add(500, lambda : self.__init_themes())
 def __init__(self, monitor_dir, padding_x=8, padding_y=10, filter_dir=None, add_system=False):
     IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)
     
     self.system_wallpapper_dir = get_system_wallpaper_dirs()[1]
     self.is_file_added = False
     self.monitor_dir = monitor_dir
     self.filter_dir = filter_dir
     self.library_monitor = LibraryMonitor(monitor_dir)
     self.library_monitor.set_property("monitored", True)
     self.library_monitor.connect("file-added", self.on_library_file_added)
     self.library_monitor.connect("folder-added", self.on_library_folder_added)
     self.library_monitor.connect("location-removed", self.on_library_location_removed)
     self.__image_index = 0
     self.__init_monitor_images(add_system)
    def __init__(self, padding_x=8, padding_y=10):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)
        
        self.add_item = AddItem()
        self.add_items([self.add_item])

        self.connect("right-click-item", self.__on_right_click_item)
        
        event_manager.add_callback("add-wallpapers", self.on_add_wallpapers)
        event_manager.add_callback("add-download-wallpapers", self.on_add_wallpapers)
        event_manager.add_callback("wallpapers-deleted", self.on_wallpapers_deleted)
        event_manager.add_callback("select-wallpaper", self.on_wallpaper_select)
        event_manager.add_callback("apply-wallpaper", self.on_wallpaper_apply)
        event_manager.add_callback("apply-download-wallpaper", self.on_download_wallpaper_apply)
        event_manager.add_callback("delete-wallpaper-link", self.__on_delete_wallpaper_link)
        self.theme = None
Example #8
0
    def __init__(self,
                 monitor_dir,
                 padding_x=8,
                 padding_y=10,
                 filter_dir=None,
                 add_system=False):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        self.system_wallpapper_dir = get_system_wallpaper_dirs()[1]
        self.is_file_added = False
        self.monitor_dir = monitor_dir
        self.filter_dir = filter_dir
        self.library_monitor = LibraryMonitor(monitor_dir)
        self.library_monitor.set_property("monitored", True)
        self.library_monitor.connect("file-added", self.on_library_file_added)
        self.library_monitor.connect("folder-added",
                                     self.on_library_folder_added)
        self.library_monitor.connect("location-removed",
                                     self.on_library_location_removed)
        self.__image_index = 0
        self.__init_monitor_images(add_system)
    def __init__(self, padding_x=8, padding_y=10):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        self.add_item = AddItem()
        self.add_items([self.add_item])

        self.connect("right-click-item", self.__on_right_click_item)

        event_manager.add_callback("add-wallpapers", self.on_add_wallpapers)
        event_manager.add_callback("add-download-wallpapers",
                                   self.on_add_wallpapers)
        event_manager.add_callback("wallpapers-deleted",
                                   self.on_wallpapers_deleted)
        event_manager.add_callback("select-wallpaper",
                                   self.on_wallpaper_select)
        event_manager.add_callback("apply-wallpaper", self.on_wallpaper_apply)
        event_manager.add_callback("apply-download-wallpaper",
                                   self.on_download_wallpaper_apply)
        event_manager.add_callback("delete-wallpaper-link",
                                   self.__on_delete_wallpaper_link)
        self.theme = None
    def __init__(self, padding_x=8, padding_y=10):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        event_manager.add_callback("wallpapers-deleted",
                                   self.on_wallpapers_deleted)
        self.theme = None
    def __init__(self, padding_x=18, padding_y=18):
        IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)

        targets = [("text/deepin-webcasts", gtk.TARGET_SAME_APP, 1), ("text/uri-list", 0, 2)]
        self.drag_source_set(gtk.gdk.BUTTON1_MASK, targets, gtk.gdk.ACTION_COPY)
        self.connect("drag-data-get", self.__on_drag_data_get)
 def __init__(self, padding_x=8, padding_y=10):
     IconView.__init__(self, padding_x=padding_x, padding_y=padding_y)
     
     event_manager.add_callback("wallpapers-deleted", self.on_wallpapers_deleted)
     self.theme = None