Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/FindGLIB2.cmake4
-rw-r--r--src/remmina_ftp_client.c12
2 files changed, 3 insertions, 13 deletions
diff --git a/cmake/FindGLIB2.cmake b/cmake/FindGLIB2.cmake
index 2e9c07b05..139e6ec9f 100644
--- a/cmake/FindGLIB2.cmake
+++ b/cmake/FindGLIB2.cmake
@@ -14,14 +14,14 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
set(_GLIB_found_all true)
# Glib
-pkg_check_modules(PC_GLIB2 glib-2.0>=2.28)
+pkg_check_modules(PC_GLIB2 glib-2.0>=2.30)
if(NOT PC_GLIB2_FOUND)
set(_GLIB_found_all false)
diff --git a/src/remmina_ftp_client.c b/src/remmina_ftp_client.c
index f1cfc0884..b89c5e73a 100644
--- a/src/remmina_ftp_client.c
+++ b/src/remmina_ftp_client.c
@@ -237,18 +237,8 @@ static gchar*
remmina_ftp_client_size_to_str(gfloat size)
{
TRACE_CALL(__func__);
- gchar *str;
- if (size < 1024.0) {
- str = g_strdup_printf("%i", (gint)size);
- }else if (size < 1024.0 * 1024.0) {
- str = g_strdup_printf("%iK", (gint)(size / 1024.0));
- }else if (size < 1024.0 * 1024.0 * 1024.0) {
- str = g_strdup_printf("%.1fM", size / 1024.0 / 1024.0);
- }else {
- str = g_strdup_printf("%.1fG", size / 1024.0 / 1024.0 / 1024.0);
- }
- return str;
+ return g_format_size_full((guint64)size, G_FORMAT_SIZE_IEC_UNITS);
}
static void remmina_ftp_client_cell_data_size(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model,