[vlc-devel] commit: Fix progress dialog scale ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Mar 10 19:06:08 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 10 20:05:59 2009 +0200| [47512c0df0fc413799059b3a4e13d955e4533474] | committer: Rémi Denis-Courmont
Fix progress dialog scale
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=47512c0df0fc413799059b3a4e13d955e4533474
---
modules/access/dvb/scan.c | 2 +-
modules/demux/avi/avi.c | 4 ++--
src/misc/update.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/access/dvb/scan.c b/modules/access/dvb/scan.c
index ef23056..23316ab 100644
--- a/modules/access/dvb/scan.c
+++ b/modules/access/dvb/scan.c
@@ -320,7 +320,7 @@ int scan_Next( scan_t *p_scan, scan_configuration_t *p_cfg )
if( p_scan->p_dialog == NULL )
p_scan->p_dialog = dialog_ProgressCreate( p_scan->p_obj, _("Scanning DVB-T"), psz_text, _("Cancel") );
if( p_scan->p_dialog != NULL )
- dialog_ProgressSet( p_scan->p_dialog, psz_text, 100 * f_position );
+ dialog_ProgressSet( p_scan->p_dialog, psz_text, f_position );
free( psz_text );
}
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 1eabbf7..ec31313 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -2415,8 +2415,8 @@ static void AVI_IndexCreate( demux_t *p_demux )
if( dialog_ProgressCancelled( p_dialog ) )
break;
- double f_pos = 100.0 * stream_Tell( p_demux->s ) /
- stream_Size( p_demux->s );
+ float f_pos = (float)stream_Tell( p_demux->s ) /
+ (float)stream_Size( p_demux->s );
dialog_ProgressSet( p_dialog, NULL, f_pos );
i_dialog_update = mdate();
diff --git a/src/misc/update.c b/src/misc/update.c
index 56038ef..2afbf1e 100644
--- a/src/misc/update.c
+++ b/src/misc/update.c
@@ -1606,7 +1606,7 @@ static void* update_DownloadReal( vlc_object_t *p_this )
l_downloaded += i_read;
psz_downloaded = size_str( l_downloaded );
- f_progress = 100.0*(float)l_downloaded/(float)l_size;
+ f_progress = (float)l_downloaded/(float)l_size;
if( asprintf( &psz_status, _( "%s\nDownloading... %s/%s %.1f%% done" ),
p_update->release.psz_url, psz_downloaded, psz_size,
More information about the vlc-devel
mailing list