[blam] ItemView: Only show the author when there is at least one
- From: Carlos Martín Nieto <cmartin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [blam] ItemView: Only show the author when there is at least one
- Date: Sat, 18 Sep 2010 21:14:28 +0000 (UTC)
commit 0d4016282e3a1ed87b92d3478446496d9bc86784
Author: Carlos MartÃn Nieto <carlos cmartin tk>
Date: Sat Sep 18 22:14:15 2010 +0100
ItemView: Only show the author when there is at least one
src/ItemView.cs | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/ItemView.cs b/src/ItemView.cs
index b288556..3acc248 100644
--- a/src/ItemView.cs
+++ b/src/ItemView.cs
@@ -96,9 +96,13 @@ namespace Imendio.Blam {
private void Load()
{
Theme theme = Application.TheApp.ThemeManager.CurrentTheme;
-
- string author = (!currentItem.Authors[0].Name.Equals(string.Empty)) ?
+ string author;
+ if(currentItem.Authors.Count == 0){
+ author = string.Empty;
+ } else {
+ author = (!currentItem.Authors[0].Name.Equals(string.Empty)) ?
String.Format(Catalog.GetString("by {0}"), currentItem.Authors[0].Name) : " ";
+ }
string link = Catalog.GetString("Show in browser");
string pubdate = (!currentItem.PublishDate.Equals(DateTime.MinValue)) ?
currentItem.PublishDate.ToString("D", System.Globalization.CultureInfo.CurrentUICulture) : " ";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]