Exemplo n.º 1
0
JBoolean
JXChooseFileDialog::GetFullNames
	(
	JPtrArray<JString>* fullNameList
	)
	const
{
	fullNameList->CleanOut();

	JPtrArray<JDirEntry> entryList(JPtrArrayT::kDeleteAll);
	if ((GetFileBrowser())->GetSelection(&entryList))
		{
		const JSize count = entryList.GetElementCount();
		for (JIndex i=1; i<=count; i++)
			{
			JString* s = new JString((entryList.NthElement(i))->GetFullName());
			assert( s != NULL );
			fullNameList->Append(s);
			}
		return kJTrue;
		}
	else
		{
		return kJFalse;
		}
}
Exemplo n.º 2
0
QStringList FileDir::GetFileList()
{
	QStringList list;
	list << "*.py";
	fileList = entryList(list,QDir::Files);
	return fileList;
}
Exemplo n.º 3
0
void ThemeSelector::refresh()
{
    // Build list of themes
    auto themesDir = Utils::getThemesDir();
    auto themeDirs = themesDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
    auto themes = std::unique_ptr<ThemeList>(new ThemeList);
    for (auto it = themeDirs.begin(); it != themeDirs.end(); ++it)
    {
        try
        {
            QDir curThemeDir = themesDir.absolutePath() + "/" + *it;
            themes->emplace_back(std::make_pair(
                curThemeDir, std::move(std::unique_ptr<ThemeManifest>(
                new ThemeManifest(curThemeDir.absolutePath() + "/manifest.xml")))));
        }
        catch (const ThemeManifest::XInvalidManifest &e) 
        {
            msg("[" PLUGIN_NAME "] %s: %s\n", it->toUtf8().data(), e.what());
        }
    }

    // Publish theme list
    m_widgets.lwSkinSelection->clear();
    for (auto it = themes->begin(); it != themes->end(); ++it)
    {
        m_widgets.lwSkinSelection->addItem(it->second->themeName());
    }

    m_widgets.lwSkinSelection->setCurrentIndex(m_widgets.lwSkinSelection->rootIndex());
    m_curThemeList = std::move(themes);
}
Exemplo n.º 4
0
	void Plugin::checkSavedReports ()
	{
		const auto& dolozheeDir = Util::CreateIfNotExists ("dolozhee");

		auto news = dolozheeDir;
		if (!news.cd ("crashreports"))
			return;

		news.mkdir ("old");

		QStringList names;
		for (const auto& name : news.entryList (QDir::Files | QDir::NoDotAndDotDot))
		{
			const auto& newName = news.absoluteFilePath ("old/" + name);
			if (!QFile::rename (news.absoluteFilePath (name), newName))
				continue;

			names << newName;
		}

		if (names.isEmpty ())
			return;

		auto wizard = initiateReporting ();
		wizard->GetReportTypePage ()->ForceReportType (ReportTypePage::Type::Bug);

		auto attachPage = wizard->GetFilePage ();
		for (const auto& name : names)
			attachPage->AddFile (name);
	}
// ---------------------------------------------------------------------------
// Cplaylistenginetest::CMPXPlaylistEngineInternalizePlaylistLRFile
// ?implementation_description
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//
TInt Cplaylistenginetest::CMPXPlaylistEngineInternalizePlaylistLRFile( CStifItemParser& aItem )
    {
    TInt err=KErrNone;
    iLog->Log(_L("Cplaylistenginetest::CMPXPlaylistEngineInternalizePlaylistLRFile"));
    TPtrC string;
    while ( aItem.GetNextString( string ) == KErrNone )
          {
			TBuf<120> KPlaylistDir;
			KPlaylistDir.Append(Kplaylistenginetest_testPath);
			KPlaylistDir.Append(string);
		    
		    RFs fs;
	        User::LeaveIfError(fs.Connect());
	        CDir* entryList(NULL);
	      //  User::LeaveIfError(
	      //  fs.GetDir(KPlaylistDir, KEntryAttNormal, KEntryAttNormal, entryList));
	        User::LeaveIfError(
    		fs.GetDir(KPlaylistDir, KEntryAttMaskSupported, ESortByName|EDirsFirst, entryList));
	        CleanupStack::PushL(entryList);
	        RFile playlistFile;				
	        User::LeaveIfError(playlistFile.Open(fs, KPlaylistDir, EFileRead ));	
	        iPlaylistEngine->PlaylistPluginHandler().SelectPlaylistPluginL(playlistFile);
		    TRAP(err, iPlaylistEngine->InternalizePlaylistL(playlistFile));	
		    CleanupStack::PopAndDestroy(entryList);
		    playlistFile.Close();
		    fs.Close();
		   
          }
	iLog->Log(_L("Cplaylistenginetest::InternalizePlaylistL returned: %d"), err);
       
    return err;
    }
Exemplo n.º 6
0
QStringList ConfigurationPathProvider::possibleConfigurationFilePaths() const
{
	auto profilePath = m_pathsProvider->profilePath();
	auto backups_4 = QDir{profilePath, "kadu-4.conf.xml.backup.*", QDir::Name, QDir::Files};
	auto backups_0_12 = QDir{profilePath, "kadu-0.12.conf.xml.backup.*", QDir::Name, QDir::Files};
	auto backups_0_6_6 = QDir{profilePath, "kadu-0.6.6.conf.xml.backup.*", QDir::Name, QDir::Files};

	auto files = QStringList{};

	files += "kadu-4.conf.xml";
	files += backups_4.entryList();
	files += "kadu-0.12.conf.xml";
	files += backups_0_12.entryList();
	files += "kadu-0.6.6.conf.xml";
	files += backups_0_6_6.entryList();

	return files;
}
JBoolean
JXChooseFileDialog::OKToDeactivate()
{
    if (!JXCSFDialogBase::OKToDeactivate())
    {
        return kJFalse;
    }
    else if (Cancelled())
    {
        return kJTrue;
    }

    JXPathInput* pathInput = GetPathInput();
    if (pathInput->HasFocus())
    {
        GoToItsPath();
        return kJFalse;
    }

    JXInputField* filterInput = GetFilterInput();
    if (filterInput->HasFocus())
    {
        AdjustFilter();
        return kJFalse;
    }

    JXDirTable* fileBrowser = GetFileBrowser();
    if (fileBrowser->GoToSelectedDirectory())
    {
        return kJFalse;
    }

    JPtrArray<JDirEntry> entryList(JPtrArrayT::kDeleteAll);
    if (fileBrowser->GetSelection(&entryList))
    {
        const JSize count = entryList.GetElementCount();
        for (JIndex i=1; i<=count; i++)
        {
            JDirEntry* entry = entryList.NthElement(i);
            entry->ForceUpdate();	// check that link hasn't been broken behind our back
            if (!entry->IsFile())
            {
                (GetDirInfo())->ForceUpdate();
                return kJFalse;
            }
        }
        return kJTrue;
    }
    else
    {
        return kJFalse;
    }
}
Exemplo n.º 8
0
static QByteArray blurayHash(const QString &device) {
	static constexpr int block = 2048;
	QStringList files = QStringList() << _L("/BDMV/index.bdmv")
		<< _L("/BDMV/MovieObject.bdmv");
	QByteArray data;
	if (QFileInfo(device).isDir()) {
		auto dir = [&] (const QString &path) {
			QDir dir(device % path);
			auto list = dir.entryList(QDir::Files | QDir::NoDotAndDotDot);
			const int count = qMin(5, list.size());
			for (int i=0; i<count; ++i)
				files.append(path % _L('/') % list[i]);
		};
		dir("/BDMV/PLAYLIST");
		dir("/BDMV/CLIPINF");
		dir("/BDMV/STREAM");
		qSort(files);
		for (auto &fileName : files) {
			QFile file(device % fileName);
			if (file.open(QFile::ReadOnly))
				data += file.read(block);
		}
	} else {
		udf::udf25 fs;
		if (!fs.Open(device.toLocal8Bit()))
			return QByteArray();
		auto dir = [&] (const QString &path) {
			::udf::Dir dir(&fs, path);
			const auto list = dir.files();
			const int count = qMin(5, list.size());
			for (int i=0; i<count; ++i)
				files.append(list[i]);
		};
		dir("/BDMV/PLAYLIST");
		dir("/BDMV/CLIPINF");
		dir("/BDMV/STREAM");
		qSort(files);
		for (auto &fileName : files) {
			::udf::File file(&fs, fileName);
			if (file.isOpen())
				data += file.read(block);
		}
	}
	return QCryptographicHash::hash(data, QCryptographicHash::Md5).toHex();
}
Exemplo n.º 9
0
QStringList listDir(const QString &path) {
    QStringList result;
    QStringList dirList = {path};
    while (!dirList.isEmpty()) {
        QDir dir(dirList.takeFirst());
        if (!dir.exists())
            continue;
        foreach (auto d, dir.entryList(QDir::AllDirs | QDir::NoDotAndDotDot)) {
            dirList.append(dir.absoluteFilePath(d));
        }
        auto files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot);
        if (files.isEmpty()) {
            result.append(dir.absoluteFilePath(".sxnewdir"));
            continue;
        }
        foreach (auto file, files) {
            result.append(dir.absoluteFilePath(file));
        }
    }
Exemplo n.º 10
0
STDMETHODIMP VFSExplorerWrap::EntryList(ComSafeArrayOut(BSTR, aNames),
                                        ComSafeArrayOut(ULONG, aTypes),
                                        ComSafeArrayOut(LONG64, aSizes),
                                        ComSafeArrayOut(ULONG, aModes))
{
    LogRelFlow(("{%p} %s:enter aNames=%p aTypes=%p aSizes=%p aModes=%p\n", this, "VFSExplorer::entryList", aNames, aTypes, aSizes, aModes));

    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {
        CheckComArgOutPointerValidThrow(aNames);
        CheckComArgOutPointerValidThrow(aTypes);
        CheckComArgOutPointerValidThrow(aSizes);
        CheckComArgOutPointerValidThrow(aModes);

        AutoCaller autoCaller(this);
        if (FAILED(autoCaller.rc()))
            throw autoCaller.rc();

        hrc = entryList(ArrayBSTROutConverter(ComSafeArrayOutArg(aNames)).array(),
                        ArrayOutConverter<ULONG>(ComSafeArrayOutArg(aTypes)).array(),
                        ArrayOutConverter<LONG64>(ComSafeArrayOutArg(aSizes)).array(),
                        ArrayOutConverter<ULONG>(ComSafeArrayOutArg(aModes)).array());
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
    }

    LogRelFlow(("{%p} %s: leave *aNames=%zu *aTypes=%zu *aSizes=%zu *aModes=%zu hrc=%Rhrc\n", this, "VFSExplorer::entryList", ComSafeArraySize(*aNames), ComSafeArraySize(*aTypes), ComSafeArraySize(*aSizes), ComSafeArraySize(*aModes), hrc));
    return hrc;
}
Exemplo n.º 11
0
void XmlParserTest::parseCourses()
{
	QDir coursepath(QStringLiteral(":/courses"), "*.xml", QDir::Name | QDir::IgnoreCase, QDir::Files);

	QStringList coursefiles;
	foreach(QString const & s, coursepath.entryList())
	{
		coursefiles.append(coursepath.filePath(s));
	}

	qDebug() << coursefiles;

	QList<std::shared_ptr<Course>> courseList;

	QStringListIterator it(coursefiles);
	while (it.hasNext())
	{
		ParseResult result;
		QString message;

		try
		{
			auto course = parseCourse(it.next(), *validator, &result, &message);

			if (result != Ok)
			{
				qWarning() << "Result:" << result << " " << message;
			}

			courseList.append(course);
		}
		catch (Exception& e)
		{
			QFAIL(qUtf8Printable(e.message()));
		}
	}

	QCOMPARE(coursepath.entryList().size(), courseList.length());
}
Exemplo n.º 12
0
void AdobeDRM::connectedToPc( bool connected )
{
    qDebug() << Q_FUNC_INFO << "Connected:" << connected;

    if(!connected)
    {
        sync();

        system("cat /mnt/public/.adobe-digital-editions/activation.xml");

        QDir publicDir(qgetenv("ADEPT_ACTIVATION_DIR"));
        QStringList entryList(publicDir.entryList());
        qDebug() << Q_FUNC_INFO << entryList.size() << entryList;

        qDebug() << Q_FUNC_INFO << QFile::exists(qgetenv("ADEPT_ACTIVATION_FILE"));

        system("ls /mnt/public/.adobe-digital-editions/");

        init();

        if(!isLinked() || !entryList.contains("activation.xml"))
        {
            qDebug() << Q_FUNC_INFO << "Now it's NOT linked.";
            // Now it's not linked
            clearCredentials();
            eraseActivationFile();// Just in case
            emit unlinkOK();
        }
        else
        {
            // Now it's linked
            qDebug() << Q_FUNC_INFO << "Now it's linked.";
            emit linkOK();
        }
    }
}
Exemplo n.º 13
0
	QDir dir(mCore->filePath(CHARSET));
	QStringList entry = dir.entryList(QDir::NoDotAndDotDot | QDir::Files);

	foreach (QString file, entry)
	{

		QFileInfo info(QString("%1/%2").arg(dir.path()).arg(file));

		if (info.isSymLink())
			continue;
		if (QString("png").contains(info.suffix(), Qt::CaseInsensitive))
			ui->listRes->addItem(info.baseName());
	}

	dir = QDir(mCore->rtpPath(CHARSET));
	entry = dir.entryList(QDir::NoDotAndDotDot | QDir::Files);

	foreach (QString file, entry)
	{

		QFileInfo info(QString("%1/%2").arg(dir.path()).arg(file));

		if (info.isSymLink())
			continue;
		if (QString("png").contains(info.suffix(), Qt::CaseInsensitive))
			ui->listRes->addItem(info.baseName());
	}

	m_chara = new QGraphicsCharaItem();
	m_chara->setWalk(!tile_pick);
	m_chara->setScale(2.0);
Exemplo n.º 14
0
    }
#ifdef LINUX
    qDebug() << "[MainWindow]" << "[setPrinterNames] LINUX is defined.";
    QStringList filters;
    filters << "ttyS*" << "ttyUSB*" << "lp*";
    QDir * devs = new QDir("/dev", "*", QDir::Name, QDir::System);
    (*devs).setNameFilters(filters);
    QStringList nodes;
    nodes = devs->entryList();
    foreach (QString node, nodes) {
        localPrinterNames << "/dev/" + node;
    }

    devs = new QDir("/dev/usb", "*", QDir::Name, QDir::System);
    (*devs).setNameFilters(filters);
    nodes = devs->entryList();
    foreach (QString node, nodes) {
        localPrinterNames << "/dev/usb/" + node;
    }

#endif
#ifdef WINDOWS
    qDebug() << "[MainWindow]" << "[setPrinterNames] WIN32 is defined.";
    QList<QPrinterInfo> printer_list = QPrinterInfo::availablePrinters();
    for (int i = 0; i < printer_list.length(); i++) {
        QPrinterInfo info = printer_list.at(i);
        localPrinterNames << info.printerName();
    }
    localPrinterNames << "COM1";
    localPrinterNames << "COM2";
    localPrinterNames << "COM3";
Exemplo n.º 15
0
void
dvbcut_settings::load_settings() {
  int version = value("/version", 0).toInt();
  if (version >= 1) {
    // config format version 1 or later
    beginGroup("/wheel");
      wheel_increments[WHEEL_INCR_NORMAL] = value("/incr_normal", 25*60).toInt();
      wheel_increments[WHEEL_INCR_SHIFT] = value("/incr_shift", 25).toInt();
      wheel_increments[WHEEL_INCR_CTRL] = value("/incr_ctrl", 1).toInt();
      wheel_increments[WHEEL_INCR_ALT] = value("/incr_alt", 15*25*60).toInt();
      wheel_threshold = value("/threshold", 24).toInt();
      // Note: delta is a multiple of 120 (see Qt documentation)
      wheel_delta = value("/delta", 120).toInt();
      if (wheel_delta == 0)
	    wheel_delta = 1;	// avoid devide by zero
    endGroup();	// wheel
    beginGroup("/slider");
      jog_maximum = value("/jog_maximum", 180000).toInt();
      jog_threshold = value("/jog_threshold", 50).toInt();
      // to increase the "zero frames"-region of the jog-slider
      jog_offset = value("/jog_offset", 0.4).toDouble();
      // sub-intervals of jog_maximum
      jog_interval = value("/jog_interval", 1).toInt();
      if (jog_interval < 0)
	    jog_interval = 0;
      lin_interval = value("/lin_interval", 3600).toInt();
      if (lin_interval < 0)
	    lin_interval = 0;
    endGroup();	// slider
    beginGroup("/lastdir");
      lastdir = value("/name", ".").toString();
      lastdir_update = value("/update", true).toBool();
    endGroup(); // lastdir
    beginGroup("/filter");
      idxfilter = value("/idxfilter", DVBCUT_DEFAULT_IDXFILTER).toString();
      prjfilter = value("/prjfilter", DVBCUT_DEFAULT_PRJFILTER).toString();
      loadfilter = value("/loadfilter", DVBCUT_DEFAULT_LOADFILTER).toString();
    endGroup();	// filter
  }
  else {
    // old (unnumbered) config format
    wheel_increments[WHEEL_INCR_NORMAL] = value("/wheel_incr_normal", 25*60).toInt();
    wheel_increments[WHEEL_INCR_SHIFT] = value("/wheel_incr_shift", 25).toInt();
    wheel_increments[WHEEL_INCR_CTRL] = value("/wheel_incr_ctrl", 1).toInt();
    wheel_increments[WHEEL_INCR_ALT] = value("/wheel_incr_alt", 15*25*60).toInt();
    wheel_threshold = value("/wheel_threshold", 24).toInt();
    // Note: delta is a multiple of 120 (see Qt documentation)
    wheel_delta = value("/wheel_delta", 120).toInt();
    if (wheel_delta == 0)
      wheel_delta = 1;	// avoid devide by zero
    jog_maximum = value("/jog_maximum", 180000).toInt();
    jog_threshold = value("/jog_threshold", 50).toInt();
    // to increase the "zero frames"-region of the jog-slider
    jog_offset = value("/jog_offset", 0.4).toDouble();
    // sub-intervals of jog_maximum
    jog_interval = value("/jog_interval", 1).toInt();
    if (jog_interval < 0)
      jog_interval = 0;
    lin_interval = value("/lin_interval", 3600).toInt();
    if (lin_interval < 0)
      lin_interval = 0;
    lastdir = value("/lastdir", ".").toString();
    lastdir_update = true;
    idxfilter = value("/idxfilter", DVBCUT_DEFAULT_IDXFILTER).toString();
    prjfilter = value("/prjfilter", DVBCUT_DEFAULT_PRJFILTER).toString();
    loadfilter = value("/loadfilter", DVBCUT_DEFAULT_LOADFILTER).toString();
    // remove old-style entries
    remove("/wheel_incr_normal");
    remove("/wheel_incr_shift");
    remove("/wheel_incr_ctrl");
    remove("/wheel_incr_alt");
    remove("/wheel_threshold");
    remove("/wheel_delta");
    remove("/jog_maximum");
    remove("/jog_threshold");
    remove("/jog_offset");
    remove("/jog_interval");
    remove("/lin_interval");
    remove("/lastdir");
    remove("/idxfilter");
    remove("/prjfilter");
    remove("/loadfilter");
  }
  if (version >= 2) {
    /* float view scale factor */
    beginGroup("/viewscalefactor");
      viewscalefactor = value("/current", 1.0).toDouble();
      viewscalefactor_custom = value("/custom", 3.0).toDouble();
    endGroup(); // viewscalefactor
  } 
  else {
    viewscalefactor = (double)value("/viewscalefactor", 1).toInt();
    viewscalefactor_custom = 3.0;
    remove("/viewscalefactor");
  }
  export_format = value("/export_format", 0).toInt();
  beginGroup("/recentfiles");
    recentfiles_max = value("/max", 5).toInt();
    recentfiles.clear();
    std::list<std::string> filenames;
    QStringList keys = entryList("/");
    for (unsigned int i = 0; i < recentfiles_max; ++i) {
      QString key = "/" + QString::number(i);
      if (version < 1 && keys.size()>1) {
		// OLD format (2 keys per input file, NO subkeys!)
        QString filename = readEntry(key);
        if (filename.isEmpty())
		  continue;
        filenames.clear();
        filenames.push_back(filename.toStdString());
        QString idxfilename = readEntry(key + "-idx", "");
        recentfiles.push_back(
        std::pair<std::list<std::string>,std::string>(filenames, idxfilename.toStdString()));
      }
      else {
	// NEW format with subkeys and multiple files!
	beginGroup(key);
	  QString filename = value("/0").toString();
	  if (!filename.isEmpty()) {
		// multiple input files?  
		int j=0;
		filenames.clear();
		while(!filename.isEmpty()) {
		  filenames.push_back(filename.toStdString());
		  filename = value("/" + QString::number(++j), "").toString();
		}  
		QString idxfilename = readEntry("/idx", "");
		recentfiles.push_back(
		  std::pair<std::list<std::string>,std::string>(filenames, idxfilename.toStdString()));
	  }
	endGroup();	// key
      }
    }
  endGroup();	// recentfiles
  beginGroup("/labels");
    start_label = value("/start", DVBCUT_DEFAULT_START_LABEL).toString();
    stop_label = value("/stop", DVBCUT_DEFAULT_STOP_LABEL).toString();
    chapter_label = value("/chapter", DVBCUT_DEFAULT_CHAPTER_LABEL).toString();
    bookmark_label = value("/bookmark", DVBCUT_DEFAULT_BOOKMARK_LABEL).toString();
  endGroup();	// labels
  start_bof = value("/start_bof", true).toBool();
  stop_eof = value("/stop_eof", true).toBool();
  beginGroup("/snapshots");
    snapshot_type = value("/type", "PNG").toString();
    snapshot_quality = value("/quality", -1).toInt();
    snapshot_prefix = value("/prefix", "").toString();
    snapshot_delimiter = value("/delimiter", "_").toString();
    snapshot_first = value("/first", 1).toInt();
    snapshot_width = value("/width", 3).toInt();
    snapshot_extension = value("/extension", "png").toString();
    snapshot_range = value("/range", 0).toInt();
    snapshot_samples = value("/samples", 1).toInt();
  endGroup();	// snapshots
  beginGroup("/pipe");
    pipe_command.clear();
    pipe_post.clear();
    pipe_label.clear();
    pipe_format.clear();
    beginGroup("/0");
      QString command = value("/command", DVBCUT_DEFAULT_PIPE_COMMAND).toString();
      QString post = value("/post", DVBCUT_DEFAULT_PIPE_POST).toString();
      QString label = value("/label", DVBCUT_DEFAULT_PIPE_LABEL).toString();
      int format = value("/format", DVBCUT_DEFAULT_PIPE_FORMAT).toInt();
    endGroup();	// 0
    unsigned int i = 0;
    while(!command.isEmpty() && !label.isEmpty()) {
      if(format<0 || format>3) format = 0;
      pipe_command.push_back(command);
      pipe_post.push_back(post);
      pipe_label.push_back(label);
      pipe_format.push_back(format);
      QString key = "/" + QString::number(++i);
      beginGroup(key);
	command = readEntry("/command","");
	post = readEntry("/post","");
	label = readEntry("/label","");
	format = readNumEntry("/format", 0);
      endGroup();	// key
    }
  endGroup();	// pipe
  beginGroup("/chapters");
    // length (>0) or number (<0) of chapter(s)
    chapter_interval = value("/interval", 600*25).toInt();
    // detection of scene changes is rather time comsuming... 
    //chapter_tolerance = readNumEntry("/tolerance", 10*25);
    //... better switch it off per default!
    chapter_tolerance = value("/tolerance", 0).toInt();
    // average color distance needed for a scene change
    chapter_threshold = value("/threshold", 50.).toDouble();
    // minimal length of a chapter
    chapter_minimum = value("/minimum", 200*25).toInt();
  endGroup();	// auto chapters
}
Exemplo n.º 16
0
void
dvbcut_settings::save_settings() {
  setValue("/version", 2);	// latest config version
  beginGroup("/wheel");
    setValue("/incr_normal", wheel_increments[WHEEL_INCR_NORMAL]);
    setValue("/incr_shift", wheel_increments[WHEEL_INCR_SHIFT]);
    setValue("/incr_ctrl", wheel_increments[WHEEL_INCR_CTRL]);
    setValue("/incr_alt", wheel_increments[WHEEL_INCR_ALT]);
    setValue("/threshold", wheel_threshold);
    setValue("/delta", wheel_delta);
  endGroup();	// wheel
  beginGroup("/slider");
    setValue("/jog_maximum", jog_maximum);
    setValue("/jog_threshold", jog_threshold);
    setValue("/jog_offset", jog_offset);
    setValue("/jog_interval", jog_interval);
    setValue("/lin_interval", lin_interval);
  endGroup();	// slider
  beginGroup("/lastdir");
    setValue("/name", lastdir);
    setValue("/update", lastdir_update);
  endGroup();	// lastdir
  beginGroup("/filter");
    setValue("/idxfilter", idxfilter);
    setValue("/prjfilter", prjfilter);
    setValue("/loadfilter", loadfilter);
  endGroup();	// filter
  beginGroup("/viewscalefactor");
    setValue("/current", viewscalefactor);
    setValue("/custom", viewscalefactor_custom);
  endGroup();	// viewscalefactor
  setValue("/export_format", export_format);
  beginGroup("/recentfiles");
    // first remove any OLD recentfiles entries to clean the settings file (<revision 108)!!!
    QStringList keys = entryList("/");
    for ( QStringList::Iterator it = keys.begin(); it != keys.end(); ++it ) 
      remove("/" + *it);
    // then remove ALL new recentfiles entries!!!
    // (otherwise it would be a mess with erased&inserted muliple file entries of different size)
    QStringList subkeys = subkeyList("/");
    for ( QStringList::Iterator its = subkeys.begin(); its != subkeys.end(); ++its ) {
      QStringList keys = entryList("/" + *its);
      for ( QStringList::Iterator itk = keys.begin(); itk != keys.end(); ++itk ) 
        remove("/"  + *its + "/" + *itk);
    }    
    setValue("/max", int(recentfiles_max));
    // and NOW write the updated list from scratch!!!
    for (unsigned int i = 0; i < recentfiles.size(); ++i) {
      QString key = "/" + QString::number(i);
      beginGroup(key);
        int j=0;
        for(std::list<std::string>::iterator it=settings().recentfiles[i].first.begin();
                                             it!=settings().recentfiles[i].first.end(); it++, j++) 
          setValue("/" + QString::number(j), QString::fromStdString(*it));
        setValue("/idx", QString::fromStdString(recentfiles[i].second));
      endGroup();	// key
    }
  endGroup();	// recentfiles
  beginGroup("/labels");
    setValue("/start", start_label);
    setValue("/stop", stop_label);
    setValue("/chapter", chapter_label);
    setValue("/bookmark", bookmark_label);
  endGroup();	// labels
  setValue("/start_bof", start_bof);
  setValue("/stop_eof", stop_eof);
  beginGroup("/snapshots");
    setValue("/type", snapshot_type);
    setValue("/quality", snapshot_quality);
    setValue("/prefix", snapshot_prefix);
    setValue("/delimiter", snapshot_delimiter);
    setValue("/first", snapshot_first);
    setValue("/width", snapshot_width);
    setValue("/extension", snapshot_extension);
    setValue("/range", snapshot_range);
    setValue("/samples", snapshot_samples);
  endGroup();	// snapshots
  beginGroup("/pipe");
    for (unsigned int i = 0; i < pipe_command.size(); ++i) {
      QString key = "/" + QString::number(i);
      beginGroup(key);
	setValue("/command", pipe_command[i]);
	setValue("/post", pipe_post[i]);
	setValue("/label", pipe_label[i]);
	setValue("/format", pipe_format[i]);
      endGroup();	// key
    }
  endGroup();	// pipe
  beginGroup("/chapters");
    setValue("/interval", chapter_interval);
    setValue("/tolerance", chapter_tolerance);
    setValue("/threshold", chapter_threshold);
    setValue("/minimum", chapter_minimum);
  endGroup();	// auto chapters
}