Merge lp:~d6g/do-plugins/GDocs into lp:~alexlauni/do-plugins/GDocs

Proposed by Peng Deng
Status: Merged
Merge reported by: Alex Launi
Merged at revision: 249
Proposed branch: lp:~d6g/do-plugins/GDocs
Merge into: lp:~alexlauni/do-plugins/GDocs
To merge this branch: bzr merge lp:~d6g/do-plugins/GDocs
Reviewer Review Type Date Requested Status
Alex Launi Approve
David Siegel Pending
Jason Smith Pending
Review via email: mp+990@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alex Launi (alexlauni) wrote :

Please lock your lists in your threads. In GDocs.cs you should lock the docs list whenever it's being accessed. Enumeration on List(T)s is NOT threadsafe, nor is modification of the list. for more info take a look at http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx. It's very close, just fix that locking issue.

review: Abstain
Revision history for this message
philadelphia5@hotmail.it (ciroalinei) wrote :

2008/9/11 Ciro Alinei

Gentile Alex,

per prima cosa ti ringrazio di questa mail. Quindi ti rispondo. La cosa
davvero importante, è isolare programmi
microsoft trialing carichi di semantica funzionante per le interfacciature.
E quindi articolare il .net come
macchina del nostro service pack. Per questi fini, la cosa migliore, è via
via costruire da utenze free
di vere utility formalismi e utenze forti.

Ciao e grazie.

2008/9/11 Alex Launi <email address hidden>

> Vote: Abstain
> Please lock your lists in your threads. In GDocs.cs you should lock the
> docs list whenever it's being accessed. Enumeration on List(T)s is NOT
> threadsafe, nor is modification of the list. for more info take a look at
> http://msdn.microsoft.com/en-us/library/6sh2ey19.aspx. It's very close,
> just fix that locking issue.
> --
> https://code.launchpad.net/~d6g/do-plugins/GDocs/+merge/990<https://code.launchpad.net/%7Ed6g/do-plugins/GDocs/+merge/990>
> You are subscribed to branch GDocuments Plugin.
>

--
CIRO ALINEI ROMA

Revision history for this message
Peng Deng (d6g) wrote :

Thanks for the suggestion and the link. Before I didn't figured out why it needs a lock. Code has been changed accordingly.

Revision history for this message
Peng Deng (d6g) wrote :

Hi Alex, I suppose the code is ready to be merged firstly into your GDocs branch, and maybe later into the community or official plugins branch.

Revision history for this message
Alex Launi (alexlauni) wrote :

GDocsUploadDocument.cs : 92
        public IItem[] Perform (IItem[] items, IItem[] modifierItems)
        {
   string fileName = (items[0] as IFileItem).Path;
   string documentName = (modifierItems.Length > 0) ? (modifierItems[0] as ITextItem).Text : null;

   IItem returnItem;
   returnItem = GDocs.UploadDocument (fileName, documentName);

Why null? Does the GDocs library handle this elegantly? Why not make documentName = fileName or something? If GDocs knows what to do with a null 2nd parameter, withouth crashing ever than this is ok, but are you sure that's totally legal?

Still has Mono guidelines issues, especially in GDocs.cs, mostly issues with spaces between methods and their parenthesis.

That's it from me, fix those couple of things (the one might not even need fixed if that's cool with google), and you're into main!

review: Abstain
Revision history for this message
Alex Launi (alexlauni) wrote :

Please change the name of the plugin in the xml manifest to Google Documents. I think it's a bit more professional.

review: Disapprove
Revision history for this message
Peng Deng (d6g) wrote :

According to Google's API documents:

Files may be uploaded using the UploadDocument method of the service
object. In the examples below, the complete file name with its path,
along with an optional name of the file to be used in Google Docs is
provided to the UploadDocument function. If null is passed as the file
name, then the original file name on the disk will be used in Google
Docs.

It seems ok to use 'null'.

Code has been cleaned to comply mono guidelines.

Cheers,
P.D.

On Sat, Sep 27, 2008 at 7:27 AM, Alex Launi <email address hidden> wrote:
> Vote: Abstain
> GDocsUploadDocument.cs : 92
> public IItem[] Perform (IItem[] items, IItem[] modifierItems)
> {
> string fileName = (items[0] as IFileItem).Path;
> string documentName = (modifierItems.Length > 0) ? (modifierItems[0] as ITextItem).Text : null;
>
> IItem returnItem;
> returnItem = GDocs.UploadDocument (fileName, documentName);
>
> Why null? Does the GDocs library handle this elegantly? Why not make documentName = fileName or something? If GDocs knows what to do with a null 2nd parameter, withouth crashing ever than this is ok, but are you sure that's totally legal?
>
> Still has Mono guidelines issues, especially in GDocs.cs, mostly issues with spaces between methods and their parenthesis.
>
> That's it from me, fix those couple of things (the one might not even need fixed if that's cool with google), and you're into main!
>
> --
> https://code.launchpad.net/~d6g/do-plugins/GDocs/+merge/990
> You are subscribed to branch Google Docs Plugin.
>

Revision history for this message
Peng Deng (d6g) wrote :

I can change it to Google Documents, but isn't the official name of the service from Google "Google Docs"?

Another concern: the copyright of the icon for Google Docs should belong to Google. But I found one on flickr with CC by-attribution, non-commercial, no-derivative-work license. <http://www.flickr.com/photos/autodafe/2312309947/sizes/o/> I changed the icons for Upload Document and Delete Document action back to use system icons, cause the old icons are modified by me based on the original one.

Revision history for this message
philadelphia5@hotmail.it (ciroalinei) wrote :

2008/09/27 Ciro Alinei

Egregio Alex Buongiorno a te,

intanto no en qui per ovvie ragioni, grazie. °Veniamo poi a questo
argomento. Fatto è
ke intendo abbonarmi a GDocs per avere dunque un server di archivi 'da
muovere'.
Io qui ti saluto. Che cosa attendo ?? Una lista di programmi trial
'per passare da Windows a Linux' onde vedere senza intervenire
sui valori del boot.

Cordiali e grazie

2008/9/27 Peng Deng <email address hidden>

> According to Google's API documents:
>
> Files may be uploaded using the UploadDocument method of the service
> object. In the examples below, the complete file name with its path,
> along with an optional name of the file to be used in Google Docs is
> provided to the UploadDocument function. If null is passed as the file
> name, then the original file name on the disk will be used in Google
> Docs.
>
> It seems ok to use 'null'.
>
> Code has been cleaned to comply mono guidelines.
>
> Cheers,
> P.D.
>
>
>
> On Sat, Sep 27, 2008 at 7:27 AM, Alex Launi <email address hidden> wrote:
> > Vote: Abstain
> > GDocsUploadDocument.cs : 92
> > public IItem[] Perform (IItem[] items, IItem[] modifierItems)
> > {
> > string fileName = (items[0] as IFileItem).Path;
> > string documentName = (modifierItems.Length > 0) ?
> (modifierItems[0] as ITextItem).Text : null;
> >
> > IItem returnItem;
> > returnItem = GDocs.UploadDocument (fileName,
> documentName);
> >
> > Why null? Does the GDocs library handle this elegantly? Why not make
> documentName = fileName or something? If GDocs knows what to do with a null
> 2nd parameter, withouth crashing ever than this is ok, but are you sure
> that's totally legal?
> >
> > Still has Mono guidelines issues, especially in GDocs.cs, mostly issues
> with spaces between methods and their parenthesis.
> >
> > That's it from me, fix those couple of things (the one might not even
> need fixed if that's cool with google), and you're into main!
> >
> > --
> > https://code.launchpad.net/~d6g/do-plugins/GDocs/+merge/990<https://code.launchpad.net/%7Ed6g/do-plugins/GDocs/+merge/990>
> > You are subscribed to branch Google Docs Plugin.
> >
> --
> https://code.launchpad.net/~d6g/do-plugins/GDocs/+merge/990<https://code.launchpad.net/%7Ed6g/do-plugins/GDocs/+merge/990>
> You are subscribed to branch GDocuments Plugin.
>

--
                  CIRO ALINEI ROMA

Revision history for this message
Alex Launi (alexlauni) wrote :

I speak English and French, if you want to tell me something, either one of those languages will be acceptable. English is preferred. I put what you said into an italian -> english translator, and it didn't really make sense.

Revision history for this message
Alex Launi (alexlauni) wrote :

All of my concerns have been addressed, voting for merge approval into main branch.

review: Approve (main do-plugins)

Subscribers

People subscribed via source and target branches