ide: automatic selection of console program when launching program (if predefined not available)

git-svn-id: svn://ultimatepp.org/upp/trunk@5315 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-09-03 19:19:54 +00:00
parent 847ce4b98d
commit a0aaed2f3e

View file

@ -212,7 +212,6 @@ void LocalHost::Launch(const char *_cmdline, bool console)
#endif
#ifdef PLATFORM_POSIX
String script = ConfigFile("console-script-" + AsString(getpid()) + ".tmp");
int c = LinuxHostConsole.FindFirstOf(" ");
String lc;
static const char *term[] = {
"/usr/bin/mate-terminal -x",
@ -222,6 +221,7 @@ void LocalHost::Launch(const char *_cmdline, bool console)
};
int ii = 0;
for(;;) { // If (pre)defined terminal emulator is not available, try to find one
int c = LinuxHostConsole.FindFirstOf(" ");
lc = c < 0 ? LinuxHostConsole : LinuxHostConsole.Left(c);
DDUMP(lc);
if(ii >= __countof(term) || FileExists(lc))