Changes in src/sas/qtgui/Utilities/GuiUtils.py [3b3b40b:63319b0] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GuiUtils.py
r3b3b40b r63319b0 213 213 plotRequestedSignal = QtCore.pyqtSignal(list) 214 214 215 # Plot from file names216 plotFromFilenameSignal = QtCore.pyqtSignal(str)217 218 215 # Plot update requested from a perspective 219 216 plotUpdateSignal = QtCore.pyqtSignal(list) … … 239 236 # Send result of Data Operation Utility panel to Data Explorer 240 237 updateModelFromDataOperationPanelSignal = QtCore.pyqtSignal(QtGui.QStandardItem, dict) 241 242 # Notify about a new custom plugin being written/deleted/modified243 customModelDirectoryChanged = QtCore.pyqtSignal()244 238 245 239 def updateModelItemWithPlot(item, update_data, name=""): … … 878 872 raise TypeError 879 873 880 def findNextFilename(filename, directory):881 """882 Finds the next available (non-existing) name for 'filename' in 'directory'.883 plugin.py -> plugin (n).py - for first 'n' for which the file doesn't exist884 """885 basename, ext = os.path.splitext(filename)886 # limit the number of copies887 MAX_FILENAMES = 1000888 # Start with (1)889 number_ext = 1890 proposed_filename = ""891 found_filename = False892 # Find the next available filename or exit if too many copies893 while not found_filename or number_ext > MAX_FILENAMES:894 proposed_filename = basename + " ("+str(number_ext)+")" + ext895 if os.path.exists(os.path.join(directory, proposed_filename)):896 number_ext += 1897 else:898 found_filename = True899 900 return proposed_filename901 902 903 874 class DoubleValidator(QtGui.QDoubleValidator): 904 875 """
Note: See TracChangeset
for help on using the changeset viewer.