diff -r 72afe12da1c8 -r 23dba6527a7d mainwindow.cpp --- a/mainwindow.cpp Tue Apr 10 13:22:52 2007 +0000 +++ b/mainwindow.cpp Wed Apr 11 09:21:15 2007 +0000 @@ -1375,6 +1375,11 @@ connect( a, SIGNAL( triggered() ), this, SLOT( settingsURL() ) ); settingsMenu->addAction (a); + a = new QAction( tr( "Set path for macros","Settings action"), this); + a->setStatusTip( tr( "Set path for macros")); + connect( a, SIGNAL( triggered() ), this, SLOT( settingsMacroDir() ) ); + settingsMenu->addAction (a); + settingsMenu->addSeparator(); a = new QAction( tr( "Edit branch after adding it","Settings action" ), this ); a->setStatusTip( tr( "Edit branch after adding it" )); @@ -2287,7 +2292,6 @@ if (fd->exec()) { fl=fd->selectedFiles(); - qWarning ("Selected "+fl.first()+" filter: "+fd->selectedFilter()); me->exportImage (fl.first(), imageIO.getType (fd->selectedFilter() ) ); } } @@ -3194,6 +3198,21 @@ return ok; } +void Main::settingsMacroDir() +{ + QDir defdir=vymBaseDir; + defdir.cd("macros"); + if (!defdir.exists()) + defdir=vymBaseDir; + QDir dir=QFileDialog::getExistingDirectory ( + this, + tr ("Directory with vym macros:"), + settings.value ("/macros/macroDir",defdir.path()).toString() + ); + if (dir.exists()) + settings.setValue ("/macros/macroDir",dir.path()); +} + void Main::settingsToggleDelKey() { if (actionSettingsUseDelKey->isOn())