~igors/do-plugins/Thunderbird-fix-redux

« back to all changes in this revision

Viewing changes to Thunderbird/src/ThunderbirdContactItemSource.cs

  • Committer: Igor Slepchin
  • Date: 2011-02-08 03:39:40 UTC
  • mfrom: (674.3.13 do-plugins)
  • Revision ID: igor.gnomedo@gmail.com-20110208033940-qbu8qyoeyqsqci7i
Merge the change for stripping leading/trailing spaces and quotes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
                const string BeginProfileName    = "Path=";
127
127
                const string BeginDefaultProfile = "Name=default";
128
128
                const string THUNDERBIRD_EMAIL   = "email.thunderbird";
 
129
                static readonly char[] nameDelimiters      = { ' ', '\'', '"' };
129
130
 
130
131
                Dictionary<string, Item> contacts; // name => ContactItem
131
132
                
217
218
                        
218
219
                        // Name
219
220
                        name = row["DisplayName"] as string;
 
221
                        if (name != null) {
 
222
                                name = name.Trim (nameDelimiters);
 
223
                        }
220
224
                        if (name == null || name == string.Empty)
221
225
                                name = string.Format ("{0} {1}", row["FirstName"], row["LastName"]);
222
226