From 085c37584ef60a28713cf0068b137d0611f9b281 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Fri, 1 Feb 2013 21:02:40 +0000 Subject: [PATCH] #4076 'free space indicator': in the Qt and GTK+ clients, add 'Free' to the freespace labels to give more context of what the number means --- gtk/tr-window.c | 13 ++++++++----- qt/mainwin.cc | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gtk/tr-window.c b/gtk/tr-window.c index 796779e2b..328ad73d3 100644 --- a/gtk/tr-window.c +++ b/gtk/tr-window.c @@ -841,15 +841,18 @@ updateFreeSpace (PrivateData * p) if (visible) { - char * tip; + char * str; char sizeStr[32]; tr_strlsize (sizeStr, n, sizeof(sizeStr)); - gtk_label_set_text (p->freespace_lb, sizeStr); - tip = tr_strdup_printf (_("Download folder \"%1$s\" has %2$s free"), downloadDir, sizeStr); - gtk_widget_set_tooltip_text (w, tip); - g_free (tip); + str = g_strdup_printf (_("%s Free"), sizeStr); + gtk_label_set_text (p->freespace_lb, str); + g_free (str); + + str = g_strdup_printf (_("Download folder \"%1$s\" has %2$s free"), downloadDir, sizeStr); + gtk_widget_set_tooltip_text (w, str); + g_free (str); } } diff --git a/qt/mainwin.cc b/qt/mainwin.cc index 7ea228a39..42ded2407 100644 --- a/qt/mainwin.cc +++ b/qt/mainwin.cc @@ -731,7 +731,7 @@ TrMainWindow :: refreshFreeSpace () .arg (myPrefs.getString (Prefs::DOWNLOAD_DIR)) .arg (sizeStr); - myFreeSpaceTextLabel->setText (sizeStr); + myFreeSpaceTextLabel->setText (tr("%1 Free").arg(sizeStr)); myFreeSpaceTextLabel->setToolTip (tip); myFreeSpaceIconLabel->setToolTip (tip); } -- 2.40.0