diff -r 519970fe6c84 -r e211e2fc9d54 main.cpp --- a/main.cpp Tue Feb 21 16:18:23 2006 +0000 +++ b/main.cpp Tue Feb 21 16:18:23 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