[PATCH] Ticket #473: Add option of saving User ID in xml

Venkatesh Shukla venkatesh.shukla.eee11 at iitbhu.ac.in
Tue Apr 8 04:43:03 PDT 2014


On Fri, Apr 4, 2014 at 12:19 AM, Dirk Hohndel <dirk at hohndel.org> wrote:

> On Thu, 2014-04-03 at 23:26 +0530, Venkatesh Shukla IIT BHU wrote:
> >         I think Lubomir's question was about the preference order...
> >         we store
> >
> >         the userid in the settings AND we store it in the XML file. If
> >         both are
> >         present, which one is given preference?
> >
> >
> >
> > In the present implementation, the event which happens later decides.
> > If a new file is loaded, the userid 'a' of the file would take
> > preference. If in this new file, the user opens the download dialog
> > box and downloads dives with another userid 'b' and saves it, b will
> > be stored in the file. Also, as before, b is stored in the subsurface
> > settings.Maybe we should introduce this as a preference for the user?
> >
> >
> > I have few questions regarding this.
> > 1. If a new xml file with different userid is loaded, should
> > subsurface settings be changed to replace the old with the new?
>
> That's an interesting question. I would say no. That's a file specific
> setting that should not override the local setting.
>
> I think the right semantic is this:
>
> - if the user enters a user id in the dialog, that user id is saved in
> the local settings
> - if the user clicks the setting to save it to XML, it's saved to both
> - if the user has a local setting that populates the dialog. If the user
> opens a file that has a per file userid, that is used instead - but it
> doesn't change the local setting
>
> > 2. After the download of dives from subsurface webservice, if the
> > checkbox is ticked, should save-xml be called automatically?
>
> No
>
> >  Currently, the user has to save manually after download for the
> > effect of userid inclusion/exclusion to take place.
>
> A successful download should modify the file (as it adds GPS data and
> possibly dive site names). And because of that the user will be asked to
> save before she quits Subsurface
>
> > Okay Dirk, I'll study libgit2 and try to achieve what you have said.
> > It is indeed a good idea.
>
> Thanks
>
> /D
>
>
>
Added feature of saving subsurface userid in local files (xml as well as
the git repo) as per ticket #473

For git repo, userid is stored in the 00-Subsurface file present in the
repo. For xml files, it is stored under tag userid.

Modified preference and webservice dialog to add these options.
Import, open and save as dialog now show git repo pointer files as well.
For ex /home/subsurface/linus[dives]

Complete patch is attached.

-- 

*Venkatesh Shukla *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140408/5e43605d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Adds-option-of-saving-userid-in-local-files.patch
Type: text/x-patch
Size: 14541 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140408/5e43605d/attachment-0001.bin>


More information about the subsurface mailing list