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
# results to the same pipe. This means that self.path should be a a list of dirs
# to watch.
if data == "autostart":
if data == "autostart" or (widget == self.startButton and self.startButton.get_active()):
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?
# (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
# 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.doAutoImportBool = True
self.startButton.set_label(_(u' _Stop Auto Import '))

View File

@ -75,7 +75,7 @@ try:
pygtk.require('2.0')
import gtk
import pango
except:
except ImportError:
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."))
exit()
@ -86,18 +86,18 @@ import interlocks
try:
import matplotlib
matplotlib_version = matplotlib.__version__
except:
except ImportError:
matplotlib_version = 'not found'
try:
import numpy
numpy_version = numpy.__version__
except:
except ImportError:
numpy_version = 'not found'
try:
import sqlite3
sqlite3_version = sqlite3.version
sqlite_version = sqlite3.sqlite_version
except:
except ImportError:
sqlite3_version = 'not found'
sqlite_version = 'not found'
@ -203,7 +203,7 @@ class fpdb:
gtk.Button.set_relief(button, gtk.RELIEF_NONE)
settings = gtk.Widget.get_settings(button);
(w,h) = gtk.icon_size_lookup_for_settings(settings, gtk.ICON_SIZE_SMALL_TOOLBAR);
gtk.Widget.set_size_request (button, w + 4, h + 4);
gtk.Widget.set_size_request(button, w + 4, h + 4);
image.show()
iconBox.pack_start(image, True, False, 0)
button.add(iconBox)