#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_access.h>
-#include <vlc_interface.h>
+#include <vlc_dialog.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
void scan_Clean( scan_t *p_scan )
{
if( p_scan->p_dialog != NULL )
- intf_UserHide( p_scan->p_dialog );
+ dialog_ProgressDestroy( p_scan->p_dialog );
for( int i = 0; i < p_scan->i_service; i++ )
scan_service_Delete( p_scan->pp_service[i] );
msg_Info( p_scan->p_obj, "Scan ETA %s | %f", secstotimestr( psz_eta, i_eta/1000000 ), f_position * 100 );
if( p_scan->p_dialog == NULL )
- p_scan->p_dialog = intf_UserProgress( p_scan->p_obj, _("Scanning DVB-T"), psz_text, 100.0 * f_position, -1 );
- else
- intf_ProgressUpdate( p_scan->p_dialog, psz_text, 100 * f_position, -1 );
+ p_scan->p_dialog = dialog_ProgressCreate( p_scan->p_obj, _("Scanning DVB-T"), psz_text, _("Cancel") );
+ if( p_scan->p_dialog != NULL )
+ /* FIXME: update text, not just percentage */
+ dialog_ProgressSet( p_scan->p_dialog, /*psz_text, */100 * f_position );
free( psz_text );
}
bool scan_IsCancelled( scan_t *p_scan )
{
- return p_scan->p_dialog && intf_ProgressIsCancelled( p_scan->p_dialog );
+ return p_scan->p_dialog && dialog_ProgressCancelled( p_scan->p_dialog );
}
static scan_service_t *ScanFindService( scan_t *p_scan, int i_service_start, int i_program )
typedef struct
{
vlc_object_t *p_obj;
- interaction_dialog_t *p_dialog;
+ struct dialog_progress_bar_t *p_dialog;
int64_t i_index;
scan_parameter_t parameter;
int64_t i_time_start;
#include <vlc_plugin.h>
#include <vlc_demux.h>
-#include <vlc_interface.h>
#include <vlc_dialog.h>
#include <vlc_meta.h>
off_t i_movi_end;
mtime_t i_dialog_update;
- interaction_dialog_t *p_dialog = NULL;
+ dialog_progress_bar_t *p_dialog = NULL;
p_riff = AVI_ChunkFind( &p_sys->ck_root, AVIFOURCC_RIFF, 0);
p_movi = AVI_ChunkFind( p_riff, AVIFOURCC_movi, 0);
/* Only show dialog if AVI is > 10MB */
i_dialog_update = mdate();
if( stream_Size( p_demux->s ) > 10000000 )
- p_dialog = intf_IntfProgress( p_demux, _("Fixing AVI Index..."), 0.0 );
+ p_dialog = dialog_ProgressCreate( p_demux, NULL,
+ _("Fixing AVI Index..."), _("Cancel") );
for( ;; )
{
/* Don't update/check dialog too often */
if( p_dialog && mdate() - i_dialog_update > 100000 )
{
- if( intf_ProgressIsCancelled( p_dialog ) )
+ if( dialog_ProgressCancelled( p_dialog ) )
break;
double f_pos = 100.0 * stream_Tell( p_demux->s ) /
stream_Size( p_demux->s );
- intf_ProgressUpdate( p_dialog,
- _( "Fixing AVI Index..." ), f_pos, -1 );
+ dialog_ProgressSet( p_dialog, f_pos );
i_dialog_update = mdate();
}
print_stat:
if( p_dialog != NULL )
- intf_UserHide( p_dialog );
+ dialog_ProgressDestroy( p_dialog );
for( i_stream = 0; i_stream < p_sys->i_track; i_stream++ )
{
#include <vlc_stream.h>
#include <vlc_strings.h>
#include <vlc_charset.h>
-#include <vlc_interface.h>
#include <vlc_dialog.h>
#include <gcrypt.h>
static void* update_DownloadReal( vlc_object_t *p_this )
{
update_download_thread_t *p_udt = (update_download_thread_t *)p_this;
- interaction_dialog_t *p_progress = 0;
+ dialog_progress_bar_t *p_progress = NULL;
long int l_size;
long int l_downloaded = 0;
float f_progress;
if( asprintf( &psz_status, _("%s\nDownloading... %s/%s %.1f%% done"),
p_update->release.psz_url, "0.0", psz_size, 0.0 ) != -1 )
{
- p_progress = intf_UserProgress( p_udt, _( "Downloading ..."),
- psz_status, 0.0, 0 );
+ p_progress = dialog_ProgressCreate( p_udt, _( "Downloading ..."),
+ psz_status, _("Cancel") );
free( psz_status );
}
while( vlc_object_alive( p_udt ) &&
( i_read = stream_Read( p_stream, p_buffer, 1 << 10 ) ) &&
- !intf_ProgressIsCancelled( p_progress ) )
+ !dialog_ProgressCancelled( p_progress ) )
{
if( fwrite( p_buffer, i_read, 1, p_file ) < 1 )
{
p_update->release.psz_url, psz_downloaded, psz_size,
f_progress ) != -1 )
{
- intf_ProgressUpdate( p_progress, psz_status, f_progress, 0 );
+ dialog_ProgressSet( p_progress, /*FIXME psz_status,*/ f_progress );
free( psz_status );
}
free( psz_downloaded );
p_file = NULL;
if( vlc_object_alive( p_udt ) &&
- !intf_ProgressIsCancelled( p_progress ) )
+ !dialog_ProgressCancelled( p_progress ) )
{
if( asprintf( &psz_status, _("%s\nDone %s (100.0%%)"),
p_update->release.psz_url, psz_size ) != -1 )
{
- intf_ProgressUpdate( p_progress, psz_status, 100.0, 0 );
+ dialog_ProgressDestroy( p_progress );
p_progress = NULL;
free( psz_status );
}
end:
if( p_progress )
- {
- intf_ProgressUpdate( p_progress, _("Cancelled"), 100.0, 0 );
- }
+ dialog_ProgressDestroy( p_progress );
if( p_stream )
stream_Delete( p_stream );
if( p_file )