After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 530105 - "Save current status" for uploading later
"Save current status" for uploading later
Status: RESOLVED FIXED
Product: postr
Classification: Other
Component: General
0.12
Other Linux
: Normal enhancement
: ---
Assigned To: Postr Maintainers
Postr Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-26 19:04 UTC by Martin Quested
Modified: 2009-11-10 03:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
disables the 'remove photos' menu and button when no photos specified (3.84 KB, patch)
2009-11-05 04:57 UTC, deignacio
committed Details | Review
removes some excessive indentation (5.86 KB, patch)
2009-11-05 04:58 UTC, deignacio
committed Details | Review
adds the export and import upload set functionality (16.72 KB, patch)
2009-11-05 04:59 UTC, deignacio
needs-work Details | Review
adds save/load session options, in response to patch review (16.88 KB, patch)
2009-11-06 04:41 UTC, deignacio
committed Details | Review
only show save/quit confirmation if the model is dirty (2.40 KB, patch)
2009-11-06 04:42 UTC, deignacio
committed Details | Review
display the flickr usrname instead of nsid if present in dialogs (3.43 KB, patch)
2009-11-08 15:57 UTC, deignacio
needs-work Details | Review
preserve the model's dirty state through session loads (2.10 KB, patch)
2009-11-08 15:58 UTC, deignacio
committed Details | Review
display flickr usernames, internationalize load confirmation strings (4.61 KB, patch)
2009-11-10 02:39 UTC, deignacio
committed Details | Review

Description Martin Quested 2008-04-26 19:04:41 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.
Comment 1 deignacio 2009-10-22 05:17:22 UTC
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?
Comment 2 Martin Quested 2009-10-22 09:32:05 UTC
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.
Comment 3 Germán Poo-Caamaño 2009-11-04 23:58:53 UTC
deignacio: Do you have a patch (o set of paches) to review?
Comment 4 deignacio 2009-11-05 03:44:01 UTC
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.
Comment 5 Germán Poo-Caamaño 2009-11-05 03:59:46 UTC
(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.
Comment 6 deignacio 2009-11-05 04:57:30 UTC
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.
Comment 7 deignacio 2009-11-05 04:58:29 UTC
Created attachment 146974 [details] [review]
removes some excessive indentation

once again, not truly crucial to the bug, but kept my editor looking sane.
Comment 8 deignacio 2009-11-05 04:59:01 UTC
Created attachment 146975 [details] [review]
adds the export and import upload set functionality
Comment 9 deignacio 2009-11-05 05:01:04 UTC
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.
Comment 10 Germán Poo-Caamaño 2009-11-05 05:08:10 UTC
(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.
Comment 11 Germán Poo-Caamaño 2009-11-05 14:03:12 UTC
Review of attachment 146973 [details] [review]:

It looks ok.  I jusrt committed.
Comment 12 Germán Poo-Caamaño 2009-11-05 14:11:37 UTC
Review of attachment 146974 [details] [review]:

I committed with some changes.  There was two syntax errors.
Comment 13 Germán Poo-Caamaño 2009-11-05 14:47:30 UTC
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):
  • File "./postr", line 30 in <module>
    from src import postr
  • File "/home/gpoo/code/bzr/postr/src/postr.py", line 941
    (filename, title, desc, tags, set_it, groups, privacy_it, safety_it, visible) =
SyntaxError: invalid syntax


   It should be:
   (a, b, c, d) = foo(e,
                              f, g, h)
Comment 14 deignacio 2009-11-06 04:41:26 UTC
Created attachment 147074 [details] [review]
adds save/load session options, in response to patch review
Comment 15 deignacio 2009-11-06 04:42:13 UTC
Created attachment 147075 [details] [review]
only show save/quit confirmation if the model is dirty
Comment 16 Germán Poo-Caamaño 2009-11-06 05:19:31 UTC
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?
Comment 17 deignacio 2009-11-06 15:58:24 UTC
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.
Comment 18 Germán Poo-Caamaño 2009-11-08 06:04:31 UTC
Review of attachment 147074 [details] [review]:

I just commited it.  Thanks you.
Comment 19 Germán Poo-Caamaño 2009-11-08 06:07:02 UTC
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.
Comment 20 Germán Poo-Caamaño 2009-11-08 06:08:31 UTC
David,

May you send a patch to:
- Use username instead nid
- Do not ask for confirmation as the example given at comment #19
?
Comment 21 deignacio 2009-11-08 15:57:32 UTC
Created attachment 147216 [details] [review]
display the flickr usrname instead of nsid if present in dialogs
Comment 22 deignacio 2009-11-08 15:58:16 UTC
Created attachment 147217 [details] [review]
preserve the model's dirty state through session loads
Comment 23 Germán Poo-Caamaño 2009-11-09 00:06:16 UTC
Review of attachment 147217 [details] [review]:

This patch looks fine.  I just committed it. Thanks.
Comment 24 Germán Poo-Caamaño 2009-11-09 00:12:00 UTC
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?
Comment 25 deignacio 2009-11-10 02:39:45 UTC
Created attachment 147348 [details] [review]
display flickr usernames, internationalize load confirmation strings

here you go!
Comment 26 Germán Poo-Caamaño 2009-11-10 03:25:53 UTC
Review of attachment 147348 [details] [review]:

Thanks David.
Comment 27 Germán Poo-Caamaño 2009-11-10 03:26:25 UTC
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.