diff options
author | Ken Moore <ken@pcbsd.org> | 2014-12-30 11:20:57 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-12-30 11:20:57 -0500 |
commit | 3cee91a627ecced62f7eefdc38850ea5499f761c (patch) | |
tree | 93f59249f318a34ad5d9789bac1d155596eb7ff5 /libLumina/LuminaSingleApplication.cpp | |
parent | Commit some more XLib->XCB conversions (everything for the task manager), and... (diff) | |
download | lumina-3cee91a627ecced62f7eefdc38850ea5499f761c.tar.gz lumina-3cee91a627ecced62f7eefdc38850ea5499f761c.tar.bz2 lumina-3cee91a627ecced62f7eefdc38850ea5499f761c.zip |
Clean up how translations are loaded for all the Lumina utilities, and also apply the relative path fixes to all LSingleApplication's forwarded inputs.
Diffstat (limited to 'libLumina/LuminaSingleApplication.cpp')
-rw-r--r-- | libLumina/LuminaSingleApplication.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libLumina/LuminaSingleApplication.cpp b/libLumina/LuminaSingleApplication.cpp index ce983035..b8947be6 100644 --- a/libLumina/LuminaSingleApplication.cpp +++ b/libLumina/LuminaSingleApplication.cpp @@ -24,7 +24,18 @@ LSingleApplication::LSingleApplication(int &argc, char **argv) : QApplication(ar cfile = cfile.arg( username, appname ); lockfile = new QLockFile(cfile+"-lock"); lockfile->setStaleLockTime(0); //long-lived processes - for(int i=1; i<argc; i++){ inputlist << QString(argv[i]); } + for(int i=1; i<argc; i++){ + QString path = argv[i]; + //do few quick conversions for relative paths and such as necessary + // (Remember: this is only used for secondary processes, not the primary) + if(path=="."){ + //Insert the current working directory instead + path = QDir::currentPath(); + }else{ + if(!path.startsWith("/") && !path.startsWith("-") ){ path.prepend(QDir::currentPath()+"/"); } + } + inputlist << path; + } isActive = false; lserver = 0; PerformLockChecks(); |