Fixed detection of multiple editors on non-Windows systems

Don't look for Windows editors on Linux and vice-versa
This commit is contained in:
PKEuS 2012-10-12 20:28:31 +02:00
parent a2548d1319
commit e1e154721a
1 changed files with 24 additions and 26 deletions

View File

@ -56,7 +56,7 @@ bool ApplicationList::LoadSettings()
}
if (names.empty() && paths.empty() && params.empty()) {
do {
#ifndef _WIN32
// use as default for gnome environments
if (QFileInfo("/usr/bin/gedit").isExecutable()) {
Application app;
@ -65,7 +65,6 @@ bool ApplicationList::LoadSettings()
app.setParameters("+(line) (file)");
AddApplication(app);
defapp = 0;
break;
}
// use as default for kde environments
if (QFileInfo("/usr/bin/kate").isExecutable()) {
@ -75,13 +74,12 @@ bool ApplicationList::LoadSettings()
app.setParameters("-l(line) (file)");
AddApplication(app);
defapp = 0;
break;
}
#else
if (FindDefaultWindowsEditor()) {
defapp = 0;
break;
}
} while (0);
#endif
}
if (names.size() > 0 && (names.size() == paths.size())) {