[gnome-commander] Use guint64 instead of GnomeVFSFileSize
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Use guint64 instead of GnomeVFSFileSize
- Date: Fri, 27 Aug 2021 18:14:07 +0000 (UTC)
commit f9aaaffd3efaab884b82b4de00ff0c6f9074e89e
Author: Uwe Scholz <u scholz83 gmx de>
Date: Mon Aug 23 16:03:02 2021 +0200
Use guint64 instead of GnomeVFSFileSize
src/gnome-cmd-xfer-progress-win.cc | 8 ++++----
src/gnome-cmd-xfer-progress-win.h | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/gnome-cmd-xfer-progress-win.cc b/src/gnome-cmd-xfer-progress-win.cc
index 75e6d6bb..32f6bc0a 100644
--- a/src/gnome-cmd-xfer-progress-win.cc
+++ b/src/gnome-cmd-xfer-progress-win.cc
@@ -157,17 +157,17 @@ GtkType gnome_cmd_xfer_progress_win_get_type ()
void gnome_cmd_xfer_progress_win_set_total_progress (GnomeCmdXferProgressWin *win,
- GnomeVFSFileSize file_bytes_copied,
- GnomeVFSFileSize file_size,
+ guint64 file_bytes_copied,
+ guint64 file_size,
guint64 bytes_copied,
guint64 bytes_total)
{
gfloat total_prog = bytes_total>0 ? (gdouble) bytes_copied/(gdouble) bytes_total : -1.0f;
gtk_progress_set_percentage (GTK_PROGRESS (win->totalprog), total_prog);
- if (win->fileprog)
+ if (win->fileprog && file_size > 0)
{
- gfloat file_prog = file_size>0 ? (gdouble) file_bytes_copied/(gdouble) file_size : -1.0f;
+ gfloat file_prog = (gdouble) file_bytes_copied/(gdouble) file_size;
gtk_progress_set_percentage (GTK_PROGRESS (win->fileprog), file_prog);
}
diff --git a/src/gnome-cmd-xfer-progress-win.h b/src/gnome-cmd-xfer-progress-win.h
index d01ff87a..99e31834 100644
--- a/src/gnome-cmd-xfer-progress-win.h
+++ b/src/gnome-cmd-xfer-progress-win.h
@@ -53,10 +53,10 @@ GtkWidget *gnome_cmd_xfer_progress_win_new (guint no_of_files=0);
GtkType gnome_cmd_xfer_progress_win_get_type ();
void gnome_cmd_xfer_progress_win_set_total_progress (GnomeCmdXferProgressWin *win,
- GnomeVFSFileSize file_bytes_copied,
- GnomeVFSFileSize file_size,
- GnomeVFSFileSize bytes_copied,
- GnomeVFSFileSize bytes_total);
+ guint64 file_bytes_copied,
+ guint64 file_size,
+ guint64 bytes_copied,
+ guint64 bytes_total);
void gnome_cmd_xfer_progress_win_set_msg (GnomeCmdXferProgressWin *win, const gchar *string);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]