diff options
author | Alan F <ajf8@users.noreply.github.com> | 2016-05-13 14:44:24 +0100 |
---|---|---|
committer | Alan F <ajf8@users.noreply.github.com> | 2016-05-13 14:44:24 +0100 |
commit | 3689dda548af18b43c65892b2520a9943bd0dbd7 (patch) | |
tree | 9bb3c9499080a9452713f48cbc2616c1211e53c7 /src/trg-torrent-props-dialog.c | |
parent | 8fab1a38681901c3e38ca96d5b3f7ff1516e0c0e (diff) | |
parent | df494abb4f46db333808b39c2651fbfee5e78cbb (diff) |
Merge pull request #24 from DriverXX/master
GUI improvements
Diffstat (limited to 'src/trg-torrent-props-dialog.c')
-rw-r--r-- | src/trg-torrent-props-dialog.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/trg-torrent-props-dialog.c b/src/trg-torrent-props-dialog.c index 322db0e..ae75146 100644 --- a/src/trg-torrent-props-dialog.c +++ b/src/trg-torrent-props-dialog.c @@ -333,11 +333,15 @@ static void info_page_update(TrgTorrentPropsDialog * dialog, gint64 dateCreated = torrent_get_date_created(t); gchar *dateStr = epoch_to_string(dateCreated); - if (!creator || strlen(creator) <= 0) - g_snprintf(buf, sizeof(buf), _("Created on %1$s"), dateStr); - else - g_snprintf(buf, sizeof(buf), _("Created by %1$s on %2$s"), - creator, dateStr); + if (creator && strlen(creator) > 0 && dateCreated > 0) + g_snprintf(buf, sizeof(buf), _("Created by %1$s on %2$s"), + creator, dateStr); + else if (dateCreated > 0) + g_snprintf(buf, sizeof(buf), _("Created on %1$s"), dateStr); + else if (creator && strlen(creator) > 0) + g_snprintf(buf, sizeof(buf), _("Created by %1$s"), creator); + else + g_strlcpy(buf, _("N/A"), sizeof(buf)); g_free(dateStr); gtk_label_set_text(GTK_LABEL(priv->origin_lb), buf); |