modules/gui/wxwidgets/dialogs/updatevlc.cpp : clean up
*/
struct user_widget_t
{
*/
struct user_widget_t
{
- int i_type; //< Type identifier;
- char *psz_text; //< Free text
+ int i_type; ///< Type identifier;
+ char *psz_text; ///< Free text
- WIDGET_TEXT, //< Text display
- WIDGET_PROGRESS, //< A progress bar
- WIDGET_INPUT_TEXT //< Input (backed up by a variable)
+ WIDGET_TEXT, ///< Text display
+ WIDGET_PROGRESS, ///< A progress bar
+ WIDGET_INPUT_TEXT ///< Input (backed up by a variable)
*/
struct interaction_dialog_t
{
*/
struct interaction_dialog_t
{
- int i_id; //< Unique ID
- int i_type; //< Type identifier
- char *psz_title; //< Title
- char *psz_description; //< Descriptor string
+ int i_id; ///< Unique ID
+ int i_type; ///< Type identifier
+ char *psz_title; ///< Title
+ char *psz_description; ///< Descriptor string
- int i_widgets; //< Number of dialog widgets
- user_widget_t **pp_widgets; //< Dialog widgets
+ int i_widgets; ///< Number of dialog widgets
+ user_widget_t **pp_widgets; ///< Dialog widgets
- void * p_private; //< Private interface data
+ void * p_private; ///< Private interface data
- int i_status; //< Dialog status;
- int i_action; //< Action to perform;
- int i_flags; //< Misc flags
- int i_return; //< Return status
+ int i_status; ///< Dialog status;
+ int i_action; ///< Action to perform;
+ int i_flags; ///< Misc flags
+ int i_return; ///< Return status
- interaction_t *p_interaction; //< Parent interaction object
- vlc_object_t *p_parent; //< The vlc object that asked
+ interaction_t *p_interaction; ///< Parent interaction object
+ vlc_object_t *p_parent; ///< The vlc object that asked
- NEW_DIALOG, //< Just created
- SENT_DIALOG, //< Sent to interface
- UPDATED_DIALOG, //< Update to send
- ANSWERED_DIALOG, //< Got "answer"
- HIDING_DIALOG, //< Hiding requested
- HIDDEN_DIALOG, //< Now hidden. Requesting destruction
- DESTROYED_DIALOG, //< Interface has destroyed it
+ NEW_DIALOG, ///< Just created
+ SENT_DIALOG, ///< Sent to interface
+ UPDATED_DIALOG, ///< Update to send
+ ANSWERED_DIALOG, ///< Got "answer"
+ HIDING_DIALOG, ///< Hiding requested
+ HIDDEN_DIALOG, ///< Now hidden. Requesting destruction
+ DESTROYED_DIALOG, ///< Interface has destroyed it
- INTERACT_PROGRESS, //< Progress bar (in the main interface ?)
- INTERACT_DIALOG_ONEWAY, //< Dialog box without feedback
- INTERACT_DIALOG_TWOWAY, //< Dialog box with feedback
+ INTERACT_PROGRESS, ///< Progress bar (in the main interface ?)
+ INTERACT_DIALOG_ONEWAY, ///< Dialog box without feedback
+ INTERACT_DIALOG_TWOWAY, ///< Dialog box with feedback
- int i_dialogs; //< Number of dialogs
- interaction_dialog_t **pp_dialogs; //< Dialogs
+ int i_dialogs; ///< Number of dialogs
+ interaction_dialog_t **pp_dialogs; ///< Dialogs
- intf_thread_t *p_intf; //< Interface to use
+ intf_thread_t *p_intf; ///< Interface to use
- int i_last_id; //< Last attributed ID
+ int i_last_id; ///< Last attributed ID
};
/**
* Possible actions
};
/**
* Possible actions
+/**
+ * \defgroup update Update
+ *
+ * @{
+ */
+
#define UPDATE_FILE_TYPE_ALL (~0)
#define UPDATE_FILE_TYPE_NONE 0
#define UPDATE_FILE_TYPE_ALL (~0)
#define UPDATE_FILE_TYPE_NONE 0
*/
struct update_file_t
{
*/
struct update_file_t
{
- int i_type; //< File type
- char* psz_md5; //< MD5 hash
- long int l_size; //< File size in bytes
- char* psz_url; //< Relative (to a mirror) or absolute url
- char* psz_description; //< Plain text description
+ int i_type; ///< File type
+ char* psz_md5; ///< MD5 hash
+ long int l_size; ///< File size in bytes
+ char* psz_url; ///< Relative (to a mirror) or absolute url
+ char* psz_description; ///< Plain text description
*/
struct update_release_t
{
*/
struct update_release_t
{
- char* psz_major; //< Version major string
- char* psz_minor; //< Version minor string
- char* psz_revision; //< Version revision string
- char* psz_extra; //< Version extra string
+ char* psz_major; ///< Version major string
+ char* psz_minor; ///< Version minor string
+ char* psz_revision; ///< Version revision string
+ char* psz_extra; ///< Version extra string
- char* psz_svn_revision; //< SVN revision
+ char* psz_svn_revision; ///< SVN revision
- int i_type; //< Release type
+ int i_type; ///< Release type
- int i_status; //< Release status compared to current VLC version
+ int i_status; ///< Release status compared to current VLC version
- struct update_file_t* p_files; //< Files list
- int i_files; //< Number of files in the files list
+ struct update_file_t* p_files; ///< Files list
+ int i_files; ///< Number of files in the files list
*/
struct update_mirror_t
{
*/
struct update_mirror_t
{
- char *psz_name; //< Mirror name
- char *psz_location; //< Mirror geographical location
- char *psz_type; //< Mirror type (FTP, HTTP, ...)
+ char *psz_name; ///< Mirror name
+ char *psz_location; ///< Mirror geographical location
+ char *psz_type; ///< Mirror type (FTP, HTTP, ...)
- char *psz_base_url; //< Mirror base url
+ char *psz_base_url; ///< Mirror base url
- struct update_release_t *p_releases; //< Releases (version) list
- int i_releases; //< Number of releases
- vlc_bool_t b_releases; //< True if we have a releases list
+ struct update_release_t *p_releases; ///< Releases (version) list
+ int i_releases; ///< Number of releases
+ vlc_bool_t b_releases; ///< True if we have a releases list
- struct update_mirror_t *p_mirrors; //< Mirrors list
- int i_mirrors; //< Number of mirrors
- vlc_bool_t b_mirrors; //< True if we have a mirrors list
+ struct update_mirror_t *p_mirrors; ///< Mirrors list
+ int i_mirrors; ///< Number of mirrors
+ vlc_bool_t b_mirrors; ///< True if we have a mirrors list
*/
struct update_iterator_t
{
*/
struct update_iterator_t
{
- update_t *p_u; //< Pointer to VLC update object
+ update_t *p_u; ///< Pointer to VLC update object
- int i_r; //< Position in the releases list
- int i_f; //< Position in the release's files list
- int i_m; //< Position in the mirrors list
+ int i_r; ///< Position in the releases list
+ int i_f; ///< Position in the release's files list
+ int i_m; ///< Position in the mirrors list
- int i_t; //< File type bitmask
- int i_rs; //< Release status bitmask
- int i_rt; //< Release type bitmask
+ int i_t; ///< File type bitmask
+ int i_rs; ///< Release status bitmask
+ int i_rt; ///< Release type bitmask
- int i_type; //< Type
- char* psz_md5; //< MD5 hash
- long int l_size; //< Size in bytes
- char* psz_url; //< Absolute URL
- char* psz_description; //< Description
- } file; //< Local 'copy' of the current file's information
+ int i_type; ///< Type
+ char* psz_md5; ///< MD5 hash
+ long int l_size; ///< Size in bytes
+ char* psz_url; ///< Absolute URL
+ char* psz_description; ///< Description
+ } file; ///< Local 'copy' of the current file's information
- char *psz_version; //< Version string
- char *psz_svn_revision; //< SVN revision
- int i_status; //< Status
- int i_type; //< Type
- } release; //< Local 'copy' of the current release's information
+ char *psz_version; ///< Version string
+ char *psz_svn_revision; ///< SVN revision
+ int i_status; ///< Status
+ int i_type; ///< Type
+ } release; ///< Local 'copy' of the current release's information
- char *psz_name; //< Name
- char *psz_location; //< Geographical location
- char *psz_type; //< Type (HTTP, FTP, ...)
- } mirror; //< Local 'copy' of the current mirror's information
+ char *psz_name; ///< Name
+ char *psz_location; ///< Geographical location
+ char *psz_type; ///< Type (HTTP, FTP, ...)
+ } mirror; ///< Local 'copy' of the current mirror's information
};
#define update_New( a ) __update_New( VLC_OBJECT( a ) )
};
#define update_New( a ) __update_New( VLC_OBJECT( a ) )
VLC_EXPORT( unsigned int, update_iterator_ChooseMirrorAndFile, ( update_iterator_t *, int, int, int ) );
VLC_EXPORT( void, update_download, ( update_iterator_t *, char * ) );
VLC_EXPORT( unsigned int, update_iterator_ChooseMirrorAndFile, ( update_iterator_t *, int, int, int ) );
VLC_EXPORT( void, update_download, ( update_iterator_t *, char * ) );
#include "bitmaps/update_info.xpm"
#include "bitmaps/update_source.xpm"
#include "bitmaps/update_info.xpm"
#include "bitmaps/update_source.xpm"
-#include "vlc_block.h"
-#include "vlc_stream.h"
-
-#define UPDATE_VLC_DOWNLOAD_BUFFER_SIZE 2048
-
/*****************************************************************************
* Event Table.
*****************************************************************************/
/*****************************************************************************
* Event Table.
*****************************************************************************/
list->AssignImageList( images, wxIMAGE_LIST_SMALL );
while( update_iterator_Action( p_uit, UPDATE_FILE ) != UPDATE_FAIL )
{
list->AssignImageList( images, wxIMAGE_LIST_SMALL );
while( update_iterator_Action( p_uit, UPDATE_FILE ) != UPDATE_FAIL )
{
- /*wxButton *update_button =
- new wxButton( this, Download_Event,
- wxU(p_uit->file.psz_description) );
- main_sizer->Add( update_button, 0, wxALIGN_CENTER );*/
int i_image;
switch( p_uit->file.i_type )
{
int i_image;
switch( p_uit->file.i_type )
{
}
main_sizer->Add( new wxStaticText( this, -1, wxU( _("\nAvailable updates and related downloads:\n(Double click on a file to download it)\n" ) ) ) );
}
main_sizer->Add( new wxStaticText( this, -1, wxU( _("\nAvailable updates and related downloads:\n(Double click on a file to download it)\n" ) ) ) );
- main_sizer->Add( list/*, 0, wxEXPAND */);
+ main_sizer->Add( list );
SetSizerAndFit( main_sizer );
Layout();
update_iterator_Delete( p_uit );
SetSizerAndFit( main_sizer );
Layout();
update_iterator_Delete( p_uit );
}
wxString url = wxU( p_uit->file.psz_url );
wxFileDialog *filedialog =
}
wxString url = wxU( p_uit->file.psz_url );
wxFileDialog *filedialog =
- new wxFileDialog( this, wxU(_("Save file ...")),
+ new wxFileDialog( this, wxU(_("Save file...")),
wxT(""), url.AfterLast( '/' ), wxT("*.*"),
wxSAVE | wxOVERWRITE_PROMPT );
if( filedialog->ShowModal() == wxID_OK )
wxT(""), url.AfterLast( '/' ), wxT("*.*"),
wxSAVE | wxOVERWRITE_PROMPT );
if( filedialog->ShowModal() == wxID_OK )