<commit_before>#include <QTranslator>
#ifdef __FreeBSD__
  #include <qtsingleapplication.h>
#endif
#include <QtGui/QApplication>
#include <QDebug>
#include <QFile>
#include <QTextCodec>

#include "MainUI.h"
#include <LuminaOS.h>
#include <LuminaThemes.h>

int main(int argc, char ** argv)
{
    QStringList in;
    for(int i=1; i<argc; i++){ //skip the first arg (app binary)
      in << QString(argv[i]);
    }
    if(in.isEmpty()){ in << QDir::homePath(); }
    #ifdef __FreeBSD__
    QtSingleApplication a(argc, argv);
    if( a.isRunning() ){
      return !(a.sendMessage(in.join("\n")));
    }
    #else
    QApplication a(argc, argv);
    #endif
    a.setApplicationName("Insight File Manager");
    LuminaThemeEngine themes(&a);
    //qDebug() << "StyleSheet:\n" << a.styleSheet();
    //Load current Locale
    QTranslator translator;
    QLocale mylocale;
    QString langCode = mylocale.name();

    if ( ! QFile::exists(LOS::LuminaShare()+"i18n/lumina-fm_" + langCode + ".qm" ) )  langCode.truncate(langCode.indexOf("_"));
    translator.load( QString("lumina-fm_") + langCode, LOS::LuminaShare()+"i18n/" );
    a.installTranslator( &translator );
    qDebug() << "Locale:" << langCode;

    //Load current encoding for this locale
    QTextCodec::setCodecForTr( QTextCodec::codecForLocale() ); //make sure to use the same codec
    qDebug() << "Locale Encoding:" << QTextCodec::codecForLocale()->name();

    MainUI w;
    QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance(const QString&)) );
    w.OpenDirs(in);
    w.show();

    int retCode = a.exec();
    return retCode;
}<commit_msg>Disable the usage of the theme engine within lumina-fm for the moment. Still trying to work out some of the functionality and don't want to enable it by default until it is fully ready.<commit_after>#include <QTranslator>
#ifdef __FreeBSD__
  #include <qtsingleapplication.h>
#endif
#include <QtGui/QApplication>
#include <QDebug>
#include <QFile>
#include <QTextCodec>

#include "MainUI.h"
#include <LuminaOS.h>
//#include <LuminaThemes.h>

int main(int argc, char ** argv)
{
    QStringList in;
    for(int i=1; i<argc; i++){ //skip the first arg (app binary)
      in << QString(argv[i]);
    }
    if(in.isEmpty()){ in << QDir::homePath(); }
    #ifdef __FreeBSD__
    QtSingleApplication a(argc, argv);
    if( a.isRunning() ){
      return !(a.sendMessage(in.join("\n")));
    }
    #else
    QApplication a(argc, argv);
    #endif
    a.setApplicationName("Insight File Manager");
    //LuminaThemeEngine themes(&a);
    //qDebug() << "StyleSheet:\n" << a.styleSheet();
    //Load current Locale
    QTranslator translator;
    QLocale mylocale;
    QString langCode = mylocale.name();

    if ( ! QFile::exists(LOS::LuminaShare()+"i18n/lumina-fm_" + langCode + ".qm" ) )  langCode.truncate(langCode.indexOf("_"));
    translator.load( QString("lumina-fm_") + langCode, LOS::LuminaShare()+"i18n/" );
    a.installTranslator( &translator );
    qDebug() << "Locale:" << langCode;

    //Load current encoding for this locale
    QTextCodec::setCodecForTr( QTextCodec::codecForLocale() ); //make sure to use the same codec
    qDebug() << "Locale Encoding:" << QTextCodec::codecForLocale()->name();

    MainUI w;
    QObject::connect(&a, SIGNAL(messageReceived(const QString&)), &w, SLOT(slotSingleInstance(const QString&)) );
    w.OpenDirs(in);
    w.show();

    int retCode = a.exec();
    return retCode;
}
{'fraction_non_alphanumeric': 0.16194331983805668, 'fraction_numerical': 0.002891844997108155, 'mean_word_length': 3.9063829787234043, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '187960', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1179, 'n_words': 279}