Exemple #1
0
bool VLMDialog::importVLMConf()
{
    QString openVLMConfFileName = toNativeSeparators(
            QFileDialog::getOpenFileName(
            this, qtr( "Open VLM configuration..." ),
            QVLCUserDir( VLC_DOCUMENTS_DIR ),
            qtr( "VLM conf (*.vlm);;All (*)" ) ) );

    if( !openVLMConfFileName.isEmpty() )
    {
        vlm_message_t *message;
        int status;
        QString command = "load \"" + openVLMConfFileName + "\"";
        status = vlm_ExecuteCommand( p_vlm, qtu( command ) , &message );
        vlm_MessageDelete( message );
        if( status == 0 )
        {
            mediasPopulator();
        }
        else
        {
            msg_Warn( p_intf, "Failed to import vlm configuration file : %s", qtu( command ) );
            return false;
        }
        return true;
    }
    return false;
}
Exemple #2
0
void VLMDialog::toggleVisible()
{
    qDeleteAll( vlmItems );
    vlmItems.clear();

    ui.vlmListItem->clear();
    mediasPopulator();
    QVLCDialog::toggleVisible();
}
void VLMDialog::toggleVisible()
{
    QList<VLMAWidget *>::iterator it;
    for( it = vlmItems.begin(); it != vlmItems.end(); ++it )
    {
        VLMAWidget *item =  *it;
        delete item;
        item = NULL;
    }
    vlmItems.clear();
    ui.vlmListItem->clear();
    mediasPopulator();
    QVLCDialog::toggleVisible();
}