This commit is contained in:
Eric Blade 2010-11-28 20:15:09 -05:00
parent 7b1143a6ff
commit 99535cddbb
2 changed files with 7 additions and 10 deletions

View File

@ -204,16 +204,13 @@ class GuiAutoImport (threading.Thread):
# That is not correct. It should open another dir for importing while piping the # That is not correct. It should open another dir for importing while piping the
# results to the same pipe. This means that self.path should be a a list of dirs # results to the same pipe. This means that self.path should be a a list of dirs
# to watch. # to watch.
if data == "autostart": if data == "autostart" or (widget == self.startButton and self.startButton.get_active()):
self.startButton.set_active(True) self.startButton.set_active(True)
return
if widget == self.startButton and self.startButton.get_active():
# - Does the lock acquisition need to be more sophisticated for multiple dirs? # - Does the lock acquisition need to be more sophisticated for multiple dirs?
# (see comment above about what to do if pipe already open) # (see comment above about what to do if pipe already open)
# - Ideally we want to release the lock if the auto-import is killed by some # - Ideally we want to release the lock if the auto-import is killed by some
# kind of exception - is this possible? # kind of exception - is this possible?
if self.settings['global_lock'].acquire(False, source="AutoImport"): # returns false immediately if lock not acquired if self.settings['global_lock'].acquire(wait=False, source="AutoImport"): # returns false immediately if lock not acquired
self.addText(_("\nGlobal lock taken ... Auto Import Started.\n")) self.addText(_("\nGlobal lock taken ... Auto Import Started.\n"))
self.doAutoImportBool = True self.doAutoImportBool = True
self.startButton.set_label(_(u' _Stop Auto Import ')) self.startButton.set_label(_(u' _Stop Auto Import '))

View File

@ -75,7 +75,7 @@ try:
pygtk.require('2.0') pygtk.require('2.0')
import gtk import gtk
import pango import pango
except: except ImportError:
print _("Unable to load PyGTK modules required for GUI. Please install PyCairo, PyGObject, and PyGTK from www.pygtk.org.") print _("Unable to load PyGTK modules required for GUI. Please install PyCairo, PyGObject, and PyGTK from www.pygtk.org.")
raw_input(_("Press ENTER to continue.")) raw_input(_("Press ENTER to continue."))
exit() exit()
@ -86,18 +86,18 @@ import interlocks
try: try:
import matplotlib import matplotlib
matplotlib_version = matplotlib.__version__ matplotlib_version = matplotlib.__version__
except: except ImportError:
matplotlib_version = 'not found' matplotlib_version = 'not found'
try: try:
import numpy import numpy
numpy_version = numpy.__version__ numpy_version = numpy.__version__
except: except ImportError:
numpy_version = 'not found' numpy_version = 'not found'
try: try:
import sqlite3 import sqlite3
sqlite3_version = sqlite3.version sqlite3_version = sqlite3.version
sqlite_version = sqlite3.sqlite_version sqlite_version = sqlite3.sqlite_version
except: except ImportError:
sqlite3_version = 'not found' sqlite3_version = 'not found'
sqlite_version = 'not found' sqlite_version = 'not found'