kde-patch
Sigmund Augdal
sigmunau at stud.ntnu.no
Mon Apr 15 23:39:20 CEST 2002
This patch fixes the earlier mentioned divition by zero error when starting
playback. It also makes the slider update itself 100 times more often (once a
second instead of once a minute, for a dvd).
The next problem I see, is that the kde interface tries to open the file
"plugins/kde/kde_ui.rc". This means that the kde-interface will not function
correctly when vlc is run from anywhere else than the vlc source directory.
I belive this file should be copied to som sane place during installation, and
that the kde interface should have a way to find out where this is. If anyone
can tell me a good way too do this, I'll try to fix that too.
Hope my help come in handy, even though my lack of experience
Sigmund Augdal
-------------- next part --------------
? kde-patch
Index: kde_interface.cpp
===================================================================
RCS file: /var/cvs/videolan/vlc/plugins/kde/kde_interface.cpp,v
retrieving revision 1.4
diff -r1.4 kde_interface.cpp
42a43
> fSlider->setMaxValue(10000);
233,234d233
< if( p_input_bank->pp_input[0] != NULL )
< {
236,237c235,237
< fSlider->setValue( ( 100 * p_area->i_tell ) / p_area->i_size );
< #undef p_area
---
> if( (p_input_bank->pp_input[0] != NULL) && (p_area->i_size != 0 ))
> {
> fSlider->setValue( ( 10000. * p_area->i_tell ) / p_area->i_size );
238a239
> #undef p_area
256c257
< off_t i_seek = ( position * p_input_bank->pp_input[0]->stream.p_selected_area->i_size ) / 100;
---
> off_t i_seek = ( position * p_input_bank->pp_input[0]->stream.p_selected_area->i_size ) / 10000;
271c272
< statusBar()->changeItem( input_OffsetToTime( p_input_bank->pp_input[0], psz_time, ( p_area->i_size * position ) / 100 ), ID_DATE );
---
> statusBar()->changeItem( input_OffsetToTime( p_input_bank->pp_input[0], psz_time, ( p_area->i_size * position ) / 10000 ), ID_DATE );
More information about the vlc-devel
mailing list