diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2012-08-28 01:52:14 +0100 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2012-08-28 01:52:14 +0100 |
commit | 3804f7f2832517cc309f061501f734f68c908c00 (patch) | |
tree | 7142dcad722b296d9ed0f2054c1690907c75b60a | |
parent | 5083d076bda7c644e71318305a75d5dcc0105f5e (diff) |
also use strlen to check whether to display creator app in new details tab. empty string instead of unknown for no ETA.
-rw-r--r-- | src/trg-torrent-props-dialog.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/trg-torrent-props-dialog.c b/src/trg-torrent-props-dialog.c index ba82da6..4fe4720 100644 --- a/src/trg-torrent-props-dialog.c +++ b/src/trg-torrent-props-dialog.c @@ -170,8 +170,7 @@ static void trg_torrent_props_response_cb(GtkDialog * dialog, gint res_id, trg_json_widgets_save(priv->widgets, args); trg_json_widget_desc_list_free(priv->widgets); - dispatch_async(priv->client, request, on_generic_interactive_action, - priv->parent); + dispatch_async(priv->client, request, on_generic_interactive_action, priv->parent); gtk_widget_destroy(GTK_WIDGET(dialog) ); } @@ -326,7 +325,7 @@ static void info_page_update(TrgTorrentPropsDialog * dialog, gint64 dateCreated = torrent_get_date_created(t); gchar *dateStr = epoch_to_string(dateCreated); - if (!creator) + 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"), @@ -356,7 +355,7 @@ static void info_page_update(TrgTorrentPropsDialog * dialog, tr_strltime_long(buf, eta, sizeof(buf)); gtk_label_set_text(GTK_LABEL(priv->eta_lb), buf); } else { - gtk_label_set_text(GTK_LABEL(priv->eta_lb), _("Unknown")); + gtk_label_set_text(GTK_LABEL(priv->eta_lb), ""); } gtk_label_set_text(GTK_LABEL(priv->hash_lb), torrent_get_hash(t)); |