From afd18158a48624de08ba300b52919147755d2395 Mon Sep 17 00:00:00 2001 From: Fabio Bas Date: Sun, 8 Apr 2012 17:55:30 +0000 Subject: system.runcmd: added gnome-terminal to the list of terminals, added proper handling for osx Terminal.app git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6130 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/system/libkvisystem.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/modules/system/libkvisystem.cpp') diff --git a/src/modules/system/libkvisystem.cpp b/src/modules/system/libkvisystem.cpp index dac0fda04..b11755554 100644 --- a/src/modules/system/libkvisystem.cpp +++ b/src/modules/system/libkvisystem.cpp @@ -757,6 +757,8 @@ static bool system_kvs_cmd_runcmd(KviKvsModuleCommandCall *c) #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) // Only »cmd.exe /k« in the list. args << "/k" << szCommand; +#elif defined(COMPILE_ON_MAC) + args << "-e" << QString("tell application \"Terminal\" to do script \"%1\"").arg(szCommand); #else args << "-e" << szCommand; #endif // endif COMPILE_ON_WINDOWS @@ -779,8 +781,12 @@ static bool system_kvs_cmd_runcmd(KviKvsModuleCommandCall *c) QStringList szTerminals; #if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW) // Only »cmd.exe /k« in the list. szTerminals.append("cmd.exe"); +#elif defined(COMPILE_ON_MAC) + szTerminals.append("osascript"); #else - // List: x-terminal-emulator, terminal, xterm + // Where the heck is xdg-terminal? + // List: gnome-terminal, x-terminal-emulator, terminal, xterm + szTerminals.append("gnome-terminal"); szTerminals.append("x-terminal-emulator"); szTerminals.append("terminal"); szTerminals.append("xterm"); -- cgit v1.3.1-10-gc9f91