Пример #1
0
 def tool_widget_description(self):
     if self._group not in self._app.brushmanager.groups:
         return None
     nbrushes = len(self._app.brushmanager.groups[self._group])
     # TRANSLATORS: number of brushes in a brush group, for tooltips
     return ngettext("{count} brush", "{count} brushes",
                     nbrushes).format(count=nbrushes)
Пример #2
0
    def import_layers(self, filenames):
        """Load a file, replacing the current working document."""

        # TRANSLATORS: count/summary of files being imported as layers.
        nfiles = len(filenames)
        files_summary = ngettext(u"{n} file", u"{n} files",
                                 nfiles).format(n=nfiles, )
        if not self._call_doc_load_method(self.doc.model.import_layers,
                                          filenames, files_summary, True):
            return
        logger.info('Imported layers from %r', filenames)
Пример #3
0
    def import_layers(self, filenames):
        """Load a file, replacing the current working document."""

        # TRANSLATORS: count/summary of files being imported as layers.
        nfiles = len(filenames)
        files_summary = ngettext(u"{n} file", u"{n} files", nfiles).format(
            n=nfiles,
        )
        if not self._call_doc_load_method(self.doc.model.import_layers,
                                          filenames, files_summary,
                                          True):
            return
        logger.info('Imported layers from %r', filenames)
Пример #4
0
 def tool_widget_description(self):
     if self._group not in self._app.brushmanager.groups:
         return None
     nbrushes = len(self._app.brushmanager.groups[self._group])
     # TRANSLATORS: number of brushes in a brush group, for tooltips
     return ngettext("%d brush", "%d brushes", nbrushes) % (nbrushes,)