add Notepad2/Notepad2-mod in the application's list

This commit is contained in:
XhmikosR 2012-09-04 20:49:08 +03:00 committed by Daniel Marjamäki
parent d69293a929
commit 2794d3dfd2
1 changed files with 10 additions and 0 deletions

View File

@ -196,6 +196,16 @@ bool ApplicationList::FindDefaultWindowsEditor()
return true; return true;
} }
const QString notepadTwoPath = appPath + "\\Notepad2\\Notepad2.exe";
if (QFileInfo(notepadTwoPath).isExecutable()) {
Application app;
app.setName("Notepad2");
app.setPath("\"" + notepadTwoPath + "\"");
app.setParameters("/g (line) (file)");
AddApplication(app);
return true;
}
const QString windowsPath(getenv("windir")); const QString windowsPath(getenv("windir"));
const QString notepadPath = windowsPath + "\\system32\\notepad.exe"; const QString notepadPath = windowsPath + "\\system32\\notepad.exe";
if (QFileInfo(notepadPath).isExecutable()) { if (QFileInfo(notepadPath).isExecutable()) {