示例#1
0
    def __init__(self, *args, **kwargs):
        Stock.__init__(self, *args, **kwargs)
        google_stock.GoogleStock.__init__(self, 'files', **kwargs)

        # files in this list are either LocalFile or GoogleFile 
        self.__files = []
        self.__display_limit = 5
        self.__recentf_path = os.path.expanduser('~/.recently-used.xbel')
        
        self.__slideout = None 
        self.__slideout_target = None

        self.desktop_path = self._panel.get_desktop_path()

        self._box = hippo.CanvasBox(orientation=hippo.ORIENTATION_VERTICAL, spacing=4, padding_top=2)
        self._recentbox = hippo.CanvasBox(orientation=hippo.ORIENTATION_VERTICAL, spacing=4)
        self._box.append(self._recentbox)

        self.__file_browser = None
        self._add_more_button(self.__on_more_button)

        self.__monitor = VfsMonitor('file://' + self.__recentf_path, gnomevfs.MONITOR_FILE, self.__update_local_files)
        gobject.idle_add(self.__update_local_files)

        search.enable_search_provider('files', constructor=self.__construct_search_provider)
        #### FIXME need to figure out when to call search.disable_search_provider
        
        self.__drag_window = None
        self.__drag_start_pos = None
示例#2
0
    def __init__(self, *args, **kwargs):
        print "starting mail stock"
        Stock.__init__(self, *args, **kwargs)
        google_stock.GoogleStock.__init__(self, 'gmail', **kwargs)

        self._box = hippo.CanvasBox(orientation=hippo.ORIENTATION_VERTICAL, spacing=4, padding_top=2)
        
        self.__slideout = None
        
        self.__google_account = None
        self.__folder = 'inbox'
        
        self.__display_limit = 4
        
        button = self._create_login_button()
        self._box.append(button)
        
        self._add_more_button(self.__on_more_button)
    def __init__(self, *args, **kwargs):
        Stock.__init__(self, *args, **kwargs)

        self._pager = WorkspacePager();
        self._box = hippo.CanvasBox(orientation=hippo.ORIENTATION_VERTICAL, spacing=4, padding_top=2)
        self._box.append(self._pager)