mainwindow.cpp
changeset 453 23dba6527a7d
parent 447 72afe12da1c8
child 473 8b9cfc26638c
     1.1 --- a/mainwindow.cpp	Tue Apr 10 13:22:52 2007 +0000
     1.2 +++ b/mainwindow.cpp	Wed Apr 11 09:21:15 2007 +0000
     1.3 @@ -1375,6 +1375,11 @@
     1.4      connect( a, SIGNAL( triggered() ), this, SLOT( settingsURL() ) );
     1.5  	settingsMenu->addAction (a);
     1.6  
     1.7 +    a = new QAction( tr( "Set path for macros","Settings action"), this);
     1.8 +    a->setStatusTip( tr( "Set path for macros"));
     1.9 +    connect( a, SIGNAL( triggered() ), this, SLOT( settingsMacroDir() ) );
    1.10 +	settingsMenu->addAction (a);
    1.11 +
    1.12  	settingsMenu->addSeparator();
    1.13      a = new QAction( tr( "Edit branch after adding it","Settings action" ), this );
    1.14      a->setStatusTip( tr( "Edit branch after adding it" ));
    1.15 @@ -2287,7 +2292,6 @@
    1.16  		if (fd->exec())
    1.17  		{
    1.18  			fl=fd->selectedFiles();
    1.19 -			qWarning ("Selected "+fl.first()+"  filter: "+fd->selectedFilter());
    1.20  			me->exportImage (fl.first(), imageIO.getType (fd->selectedFilter() ) );
    1.21  		} 
    1.22  	}
    1.23 @@ -3194,6 +3198,21 @@
    1.24  	return ok;
    1.25  }
    1.26  
    1.27 +void Main::settingsMacroDir()
    1.28 +{
    1.29 +	QDir defdir=vymBaseDir;
    1.30 +	defdir.cd("macros");
    1.31 +	if (!defdir.exists())
    1.32 +		defdir=vymBaseDir;
    1.33 +	QDir dir=QFileDialog::getExistingDirectory (
    1.34 +		this,
    1.35 +		tr ("Directory with vym macros:"), 
    1.36 +		settings.value ("/macros/macroDir",defdir.path()).toString()
    1.37 +	);
    1.38 +	if (dir.exists())
    1.39 +		settings.setValue ("/macros/macroDir",dir.path());
    1.40 +}
    1.41 +
    1.42  void Main::settingsToggleDelKey()
    1.43  {
    1.44  	if (actionSettingsUseDelKey->isOn())