GNOME Bugzilla – Bug 530105
"Save current status" for uploading later
Last modified: 2009-11-10 03:26:25 UTC
I would like to be able to add photos, and create their titles, tags and descriptions, then SAVE all of that, ready to do the uploading later, when I next go online, or overnight, or whatever. Effectively I am saving an upload to-do list for later. When I am online and ready to do the uploading, I run postr and load the saved status, before pressing "Upload". jUploadr (a nice, but buggy piece of software) sort of implements this but doesn't give me as much control as I'd like. I want to be able to choose whether I load the saved status, and maybe even have more than one. This would mean that, when saving, I give the status a filename, and when loading it I am able to choose the filename.
i've got a set of commits that will add this. just need to clean it up a bit. one thing i noticed: importing an upload set doesn't make sense unless you are also logged in as the same user, otherwise the exported photosets and groups won't translate. there are two options for this: a) save the username as a part of the upload set and bail if they don't match b) ignore photoset/group options if they aren't available (some might be unset, which could be fine, or the export could have been done while offline or not signed in) and maybe show a dialog after import also, by default the groups and privacy dialogs are collapsed. if they have non-default values, do you think they should be expanded on import? i'm also adding an export/save option in the quit dialog. what do you think about only showing the dialog if the upload set hasn't been saved, or has been changed since last saved (the model is dirty) autosave?
Hi, this is awesome news - thanks for working on this request! You spotted an important issue. I imagine solving your question like this: - If the export is done while not logged in, there will be no photoset etc options set - fine. - If the export is done while logged in, save the username and all the photoset info with the export. - If the import is done while logged in, check that usernames match: == if they do match, fine == if there was no username saved, fine == if there was a username saved, offer two options: (a) continue but forget photoset choices (b) cancel import - If the import is done while not logged in, use any photoset info saved with the export. BUT watch out for attempt to login to flickr. == If logging in to same account, or no username was exported, fine. == If logging in to a different user account, offer two options: (a) continue but forget photoset choices (b) cancel login to different user account On your other questions: - expanding dialogs that are set to non-default values sounds like a good idea. - only showing the save/export dialog box on quitting if there have been changes is a good idea, and would be consistent with many other applications. - autosave is not a bad idea but I imagine it has a number of issues and would bring in even more complexity! Thanks again for all your work on this.
deignacio: Do you have a patch (o set of paches) to review?
i do. i need to clean them up just a little bit. sorry for the delay, i have been occupied with a release and launch at work so it has been pushed back. i'll get them out as soon as i can.
(In reply to comment #4) > i do. i need to clean them up just a little bit. sorry for the delay, i have > been occupied with a release and launch at work so it has been pushed back. > i'll get them out as soon as i can. No worries. I just was interested in to know if you were working on it :-) Please note the repository was migrated to git. Now it is under http://git.gnome.org/cgit/postr Your patch should work just fine. There is no big changes, yet.
Created attachment 146973 [details] [review] disables the 'remove photos' menu and button when no photos specified not necessary for the bug, but added consistency w/my menu items.
Created attachment 146974 [details] [review] removes some excessive indentation once again, not truly crucial to the bug, but kept my editor looking sane.
Created attachment 146975 [details] [review] adds the export and import upload set functionality
Hmm.. I did not realize that you could not attach multiple files along with a comment at the same time. My apologies for the multiple emails. Here are my patches as I have them, one of the reasons I was putting off fixing them up was also my infamiliarity with bzr. But migrating to git smoothed a lot of that out.
(In reply to comment #9) > Hmm.. I did not realize that you could not attach multiple files along with a > comment at the same time. My apologies for the multiple emails. Here are my > patches as I have them, one of the reasons I was putting off fixing them up was > also my infamiliarity with bzr. But migrating to git smoothed a lot of that > out. It is fine. It is easier to review separate patches. I will take a look them later. Thanks for working on this.
Review of attachment 146973 [details] [review]: It looks ok. I jusrt committed.
Review of attachment 146974 [details] [review]: I committed with some changes. There was two syntax errors.
Review of attachment 146975 [details] [review]: David, There are some things that could be different. 1. The names used in the menu. When I looked the menu, it was not quite clear what was "Import/Export". I think it should be better to rename them to something like "Load session". "Save session". 2. It would nice to control the state when the last session was saved. For instance, I saved the session and then I tried to quit. It asked me If really wanted to quit, and it offered me to save (which I just already did). May you work on it? If there is no change since it was saved, it should not ask neither for conformantion neither to save the session again. 3. There is a syntax error (may be because I am using Python 2.6). This is easy to fix, but I think you should be aware of: $ ./postr Traceback (most recent call last):
+ Trace 218824
from src import postr
(filename, title, desc, tags, set_it, groups, privacy_it, safety_it, visible) =
It should be: (a, b, c, d) = foo(e, f, g, h)
Created attachment 147074 [details] [review] adds save/load session options, in response to patch review
Created attachment 147075 [details] [review] only show save/quit confirmation if the model is dirty
Thanks David. I will review the new patches later. I just wanted to point out another issue I saw today, and I do know if you have seen it yet. Today, while I was traveling, I decided to give another review to the last patch, but it happened the following: 1. I have a session saved (data exported), with groups and sets. 2. I opened postr without Internet connection. 3. I loaded the session saved. It asked to confirm if I wanted to lost the track of those groups and set. why? It has all the data, I was unable to upload any data because I was disconnected from Internet. May be the data could not be shown, but do not overwrite it with empty data. (probably the solution could get more complicated). Also, the dialog show me the user id (i.e. N09@21340303). I do think it should be better to show the screen name instead. 4. I closed postr. It did not asked me to confirm. So, I think it relies on the network. 5. When I finally got an Internet connection, I ran postr again and it asked me to log in again. ¿Is this related to the patch?
It is a minor change to show the pretty username instead of the raw nsid, and I can do that as a separate patch or as another revision. As for your question about if the decision to confirm/not confirm on quit is related to my patches, the answer is no. My patch adds a second clause checking if the model is dirty, after the existing logic has made the decision to confirm the exit. I'd recommend another bug for that.
Review of attachment 147074 [details] [review]: I just commited it. Thanks you.
Review of attachment 147075 [details] [review]: I just committed. However, there is a situation where is does not work as it should. 1. Run postr. 2. Load a session previously saved 3. Quit postr. It ask confirmation, however there is no new data. When a session is loaded in a empty treeview, it should not change its state tu dirty. It is not dirty yet.
David, May you send a patch to: - Use username instead nid - Do not ask for confirmation as the example given at comment #19 ?
Created attachment 147216 [details] [review] display the flickr usrname instead of nsid if present in dialogs
Created attachment 147217 [details] [review] preserve the model's dirty state through session loads
Review of attachment 147217 [details] [review]: This patch looks fine. I just committed it. Thanks.
Review of attachment 147216 [details] [review]: In general, it looks good. However, I did not realize in the previous patch, there strings are not marked as translatable (they are not using the function _(...)). May you update the patch in order to get it fixed?
Created attachment 147348 [details] [review] display flickr usernames, internationalize load confirmation strings here you go!
Review of attachment 147348 [details] [review]: Thanks David.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.