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

def fts::Indexer::_get_desktop_entry (   self,
  app_id 
) [private]
Return a xdg.DesktopEntry.DesktopEntry `app_id` or None in case
no file is found for the given desktop id

Definition at line 538 of file fts.py.

                                           :
            """
            Return a xdg.DesktopEntry.DesktopEntry `app_id` or None in case
            no file is found for the given desktop id
            """
            if app_id in self._desktops:
                  return self._desktops[app_id]
            
            for datadir in xdg_data_dirs:
                  path = os.path.join(datadir, "applications", app_id)
                  if os.path.exists(path):
                        try:
                              desktop = DesktopEntry(path)
                              self._desktops[app_id] = desktop
                              return desktop
                        except Exception, e:
                              log.warning("Unable to load %s: %s" % (path, e))
                              return None
            
            return None
      

Generated by  Doxygen 1.6.0   Back to index