diff options
Diffstat (limited to 'rapid/renamesubfolderprefs.py')
-rw-r--r-- | rapid/renamesubfolderprefs.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/rapid/renamesubfolderprefs.py b/rapid/renamesubfolderprefs.py index 71f9089..a449fd7 100644 --- a/rapid/renamesubfolderprefs.py +++ b/rapid/renamesubfolderprefs.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: latin1 -*- -### Copyright (C) 2007, 2008, 2009 Damon Lynch <damonlynch@gmail.com> +### Copyright (C) 2007, 2008, 2009, 2010 Damon Lynch <damonlynch@gmail.com> ### This program is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by @@ -147,6 +147,7 @@ SEQUENCE_NUMBER_3 = "Three digits" SEQUENCE_NUMBER_4 = "Four digits" SEQUENCE_NUMBER_5 = "Five digits" SEQUENCE_NUMBER_6 = "Six digits" +SEQUENCE_NUMBER_7 = "Seven digits" # Now, define dictionaries and lists of valid combinations of preferences. @@ -247,6 +248,7 @@ class i18TranslateMeThanks: _("Four digits") _("Five digits") _("Six digits") + _("Seven digits") # Translators: for an explanation of what this means, see http://damonlynch.net/rapid/documentation/index.html#renamedateandtime _('Subseconds') # Translators: for an explanation of what this means, see http://damonlynch.net/rapid/documentation/index.html#renamedateandtime @@ -322,6 +324,7 @@ LIST_SEQUENCE_NUMBERS_L2 = [ SEQUENCE_NUMBER_4, SEQUENCE_NUMBER_5, SEQUENCE_NUMBER_6, + SEQUENCE_NUMBER_7, ] @@ -757,7 +760,7 @@ class Comboi18n(gtk.ComboBox): return model[active][0] class ImageRenamePreferences: - def __init__(self, prefList, parent, fileSequenceLock=None, sequences=None): + def __init__(self, prefList, parent, fileSequenceLock=None, sequences=None): """ Exception raised if preferences are invalid. @@ -1126,7 +1129,8 @@ class ImageRenamePreferences: def generateNameUsingPreferences(self, photo, existingFilename=None, stripCharacters = False, subfolder=None, stripInitialPeriodFromExtension=False, - sequencesPreliminary = True): + sequencesPreliminary = True, + sequence_to_use = None): """ Generate a filename for the photo in string format based on user prefs. @@ -1136,7 +1140,9 @@ class ImageRenamePreferences: """ if self.sequences: - if sequencesPreliminary: + if sequence_to_use is not None: + sequence = sequence_to_use + elif sequencesPreliminary: sequence = self.sequences.getPrelimSequence() else: sequence = self.sequences.getFinalSequence() @@ -1470,10 +1476,11 @@ class Sequences: def imageCopySucceeded(self): self.increment() - def increment(self, subfolder=None): + def increment(self): assert(self.assignedSequenceCounter == self.pool[0]) self.assignedSequenceCounter += 1 self.pool = self.pool[1:] + #assert(len(self.pool) > 0) |