closeButton->setDefault( true );
clearUpdateButton = new QPushButton( qtr( "&Clear" ) );
saveLogButton = new QPushButton( qtr( "&Save as..." ) );
+ saveLogButton->setToolTip( qtr( "Save all the displayed logs to a file" ) );
verbosityBox = new QSpinBox();
verbosityBox->setRange( 0, 2 );
mainLayout->addWidget( mainTab, 0, 0, 1, 0 );
mainLayout->addWidget( verbosityLabel, 1, 0, 1, 1 );
mainLayout->addWidget( verbosityBox, 1, 1 );
+ mainLayout->setColumnStretch( 2, 10 );
mainLayout->addWidget( saveLogButton, 1, 3 );
mainLayout->addWidget( clearUpdateButton, 1, 4 );
mainLayout->addWidget( closeButton, 1, 5 );
void MessagesDialog::buildTree( QTreeWidgetItem *parentItem,
vlc_object_t *p_obj )
{
- vlc_object_yield( p_obj );
QTreeWidgetItem *item;
if( parentItem )
item->setExpanded( true );
- for( int i=0; i < p_obj->i_children; i++ )
- {
- buildTree( item, p_obj->pp_children[i]);
- }
-
- vlc_object_release( p_obj );
+ vlc_list_t *l = vlc_list_children( p_obj );
+ for( int i=0; i < l->i_count; i++ )
+ buildTree( item, l->p_values[i].p_object );
+ vlc_list_release( l );
}
void MessagesDialog::clearOrUpdate()
void MessagesDialog::updateTree()
{
modulesTree->clear();
-
buildTree( NULL, VLC_OBJECT( p_intf->p_libvlc ) );
}
bool MessagesDialog::save()
{
QString saveLogFileName = QFileDialog::getSaveFileName(
- this, qtr( "Choose a filename to save the logs under..." ),
- qfu( p_intf->p_libvlc->psz_homedir ),
+ this, qtr( "Select a name for the logs file" ),
+ qfu( config_GetHomeDir() ),
qtr( "Texts / Logs (*.log *.txt);; All (*.*) ") );
if( !saveLogFileName.isNull() )