Logo Search packages:      
Sourcecode: zeitgeist-extensions version File versions  Download package

def fts::Indexer::_index_actor (   self,
  actor 
) [private]

Takes an actor as a path to a .desktop file or app:// uri
and index the contents of the corresponding .desktop file
into the document currently set for self._tokenizer.

Definition at line 320 of file fts.py.

00320                                     :
            """
            Takes an actor as a path to a .desktop file or app:// uri
            and index the contents of the corresponding .desktop file
            into the document currently set for self._tokenizer.
            """
            # Get the path of the .desktop file and convert it to
            # an app id (eg. 'gedit.desktop')
            scheme, host, path = self._split_uri(actor)
            if not path:
                  path = host
            
            if not path :
                  log.debug("Unable to determine application id for %s" % actor)
                  return
            
            if path.startswith("/") :
                  path = os.path.basename(path)
            
            appinfo = self._get_appinfo(path)
            if appinfo:
                  self._tokenizer.index_text(appinfo.get_name(), 5)
                  self._tokenizer.index_text(appinfo.get_name(), 5, "A")
                  self._tokenizer.index_text(appinfo.get_description(), 2)
                  self._tokenizer.index_text(appinfo.get_description(), 2, "A")
            else:
                  log.debug("Unable to look up app info for %s" % actor)
            
      
      def _index_uri (self, uri):


Generated by  Doxygen 1.6.0   Back to index