From 2783bb69d4ca766c4564fa87a0e2cbddff1bbda0 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 23 Mar 2011 14:28:00 +0000 Subject: [PATCH] [intro] Actually trim commas from the user's full name TrimEnd does not modify the string it's called on; it returns a new string. --- SparkleShare/Mac/SparkleIntro.cs | 3 +-- SparkleShare/SparkleIntro.cs | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/SparkleShare/Mac/SparkleIntro.cs b/SparkleShare/Mac/SparkleIntro.cs index 64b61368..d069c04b 100644 --- a/SparkleShare/Mac/SparkleIntro.cs +++ b/SparkleShare/Mac/SparkleIntro.cs @@ -76,8 +76,7 @@ namespace SparkleShare { UserInfoForm.IntercellSpacing = new SizeF (4, 4); string full_name = new UnixUserInfo (UnixEnvironment.UserName).RealName; - full_name.TrimEnd (",".ToCharArray()); - UserInfoForm.Cells [0].StringValue = full_name; + UserInfoForm.Cells [0].StringValue = full_name.TrimEnd (",".ToCharArray());; UserInfoForm.Cells [1].StringValue = SparkleShare.Controller.UserEmail; diff --git a/SparkleShare/SparkleIntro.cs b/SparkleShare/SparkleIntro.cs index 838e2804..3d9c0488 100644 --- a/SparkleShare/SparkleIntro.cs +++ b/SparkleShare/SparkleIntro.cs @@ -81,14 +81,12 @@ namespace SparkleShare { }; string full_name = new UnixUserInfo (UnixEnvironment.UserName).RealName; - full_name.TrimEnd (",".ToCharArray()); - Label name_label = new Label ("" + _("Full Name:") + "") { UseMarkup = true, Xalign = 0 }; - NameEntry = new Entry (full_name); + NameEntry = new Entry (full_name.TrimEnd (",".ToCharArray())); NameEntry.Changed += delegate { CheckAccountForm (); };