diff -r 30c4a6c7ff10 -r e03b393e4e51 main.cpp --- a/main.cpp Wed Feb 15 12:54:55 2006 +0000 +++ b/main.cpp Wed Mar 01 14:39:04 2006 +0000 @@ -24,6 +24,7 @@ Main *mainWindow; // used in BranchObj::select() QString tmpVymDir; // All temp files go there, created in mainwindow QString clipboardDir; // Clipboard used in all mapEditors +QDir vymBaseDir; // Containing all styles, scripts, images, ... bool clipboardEmpty; FlagRowObj *systemFlagsDefault; // used to copy from in LinkableMapObj FlagRowObj *standardFlagsDefault; @@ -131,17 +132,17 @@ factory->setPixmap("vym_128x128", QPixmap(vym_128x128_xpm)); qInitNetworkProtocols(); - // Use /usr/share/vym or /usr/local/share/vym or . - QDir shareDir; - shareDir.setPath ("/usr/share/vym"); - if (!shareDir.exists()) - shareDir.setPath ("/usr/local/share/vym"); - if (!shareDir.exists()) - shareDir.setPath("."); + // Use /usr/share/vym or /usr/local/share/vym or . ? + QDir vymBaseDir; + vymBaseDir.setPath ("/usr/share/vym"); + if (!vymBaseDir.exists()) + vymBaseDir.setPath ("/usr/local/share/vym"); + if (!vymBaseDir.exists()) + vymBaseDir.setPath(vymBaseDir.currentDirPath() ); // Initialize translations QTranslator translator (0); - translator.load( QString("vym_")+QTextCodec::locale(), shareDir.path() + "/lang"); + translator.load( QString("vym_")+QTextCodec::locale(), vymBaseDir.path() + "/lang"); app.installTranslator( &translator ); // Initializing the row of system flags