Ticket #716: mythgallery.10213.diff

File mythgallery.10213.diff, 4.0 KB (added by mythtv@…, 14 years ago)
  • mythgallery/i18n/mythgallery_es.ts

     
    116116        <translation>Este directorio tiene que existir y se necesita permiso de lectura.</translation>
    117117    </message>
    118118    <message>
     119        <source>Filename Filter</source>
     120        <translation>Filtro por nombre</translation>
     121    </message>
     122    <message>
     123        <source>Exclude images not matching filter. Search is case sensitive. Example: HI_* LOW_* [0-9]* *.tiff</source>
     124        <translation>Excluye ficheros que no complen el patron. Es sensible a mayusculas. Ejemplo: HI_* LOW_* [0-9]* *.tiff</translation>
     125    </message>
     126    <message>
    119127        <source>Paths to import images from</source>
    120128        <translation>Ruta desde donde se importan las imágenes</translation>
    121129    </message>
  • mythgallery/mythgallery/gallerysettings.cpp

     
    88#include <qimage.h>
    99
    1010#include "config.h"
    11 
     11#include "constants.h"
    1212// General Settings
    1313
    1414static HostLineEdit *MythGalleryDir()
     
    2121    return gc;
    2222};
    2323
     24static HostLineEdit *MythGalleryFileFilter()
     25{
     26    HostLineEdit *gc = new HostLineEdit("GalleryFileFilter");
     27    gc->setLabel(QObject::tr("Filename Filter"));
     28    gc->setValue(MEDIA_FILENAMES);
     29    gc->setHelpText(QObject::tr("Exclude images not matching filter. Search is case sensitive. Example: HI_* LOW_* [0-9]* *.tiff"));
     30    return gc;
     31};
     32
    2433static HostCheckBox *MythGalleryThumbnailLocation()
    2534{
    2635    HostCheckBox *gc = new HostCheckBox("GalleryThumbnailLocation");
     
    160169        setUseLabel(false);
    161170
    162171        addChild(MythGalleryDir());
     172        addChild(MythGalleryFileFilter());
    163173        addChild(MythGalleryThumbnailLocation());
    164174        addChild(MythGalleryImportDirs());
    165175        addChild(MythGalleryMoviePlayerCmd());
  • mythgallery/mythgallery/iconview.cpp

     
    118118    m_isGallery   = false;
    119119    m_showDevices = false;
    120120    m_currDevice  = initialDevice;
     121   
     122    //JC 170606: restore MEDIA_FILENAMES
     123    if (!gContext->GetSetting("GalleryFileFilter") || gContext->GetSetting("GalleryFileFilter")=="")
     124      gContext->SaveSetting("GalleryFileFilter", MEDIA_FILENAMES);
     125   
     126    std::cerr << "FileFilter is " << gContext->GetSetting("GalleryFileFilter") << std::endl;
    121127
    122128    srand(time(NULL));
    123129
  • mythgallery/mythgallery/thumbgenerator.cpp

     
    200200{
    201201    QDir dir(fi.absFilePath());
    202202    dir.setFilter(QDir::Files);
     203
     204//  JC 170606: Skip filenames not in GalleryFileFilter
     205    dir.setNameFilter(gContext->GetSetting("GalleryFileFilter"));
     206   
    203207    const QFileInfoList *list = dir.entryInfoList();
    204208    if (!list)
    205209        return;
  • mythgallery/mythgallery/galleryutil.cpp

     
    1 /* ============================================================
     1  /* ============================================================
    22 * File  : exifutil.cpp
    33 * Description :
    44 *
     
    156156    if (thumbGen)
    157157        thumbGen->getThumbcacheDir(currDir);
    158158
    159     d.setNameFilter(MEDIA_FILENAMES);
     159//  JC 170606: Skip filenames not in GalleryFileFilter
     160    d.setNameFilter(gContext->GetSetting("GalleryFileFilter"));
     161
    160162    d.setSorting(QDir::Name | QDir::DirsFirst | QDir::IgnoreCase);
    161163
    162164    d.setMatchAllDirs(true);