Exemple #1
0
 def refresh(self):
     '''
     Populates the combo box with the available backends
     '''
     self.liststore.clear()
     backend_types = BackendFactory().get_all_backends()
     for name, module in backend_types.items():
         # FIXME: Disable adding another localfile backend.
         # It just produce many warnings, provides no use case
         # See LP bug #940917 (Izidor)
         if name == "backend_localfile":
             continue
         pixbuf = self.dialog.get_pixbuf_from_icon_name(name, 16)
         self.liststore.append((name,
                                module.Backend.get_human_default_name(),
                                pixbuf))
     if backend_types:
         # triggers a "changed" signal, which is used in the AddPanel to
         # refresh the backend description and icon
         self.set_active(0)