jmarshall Wrote:With python, it's already in a separate thread, so the app loop is already running. Thus, the user can execute actions before the dialog pops on screen. The delay could be due to the startup animation for the progress dialog being run (though a few seconds seems too long) combined with small slice time for the script perhaps.
Ah, gotcha. I really do mean a few seconds though; as in, probably closer to 10 or so. When it finally appeared, in this one case, the progress bar had already moved about 1/4 of the way across. I suspect the delay is long because I am updating it once per photo imported. In this particular case, my father had right around 3000 photos to import.
I didn't see the need to update any less frequently simply because it seemed to perform OK and I honestly thought the progress dialog was in fact modal.
jmarshall Wrote:How are you reacting to the directory item when the user clicks on it? Is it a folder item or a file item?
It's a file item.
The user can get at this option one of three ways:
1) It fires off automatically if the iPhoto library is newer than what we've got cached,
2) They select the ListItem from the root listing,
3) They select the ListItem from the context menu.
The directory items call the plugin with the paramater "action" set to "rescan" which ultimately calls a function called import_library that sets up the progress dialog and does the import.
I'm not sure what kind of details you want me to post here, so maybe it'd be best if I just pointed you at the plugin code
. In addon.py, the import_library function is what you'd want to look at. If anything is non-obvious please let me know.
I basically need some way of knowing whether or not the progress dialog is actually on the screen before I do work, I think.