aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Fabio Bas2012-04-08 17:55:30 +0000
committerGravatar Fabio Bas2012-04-08 17:55:30 +0000
commitafd18158a48624de08ba300b52919147755d2395 (patch)
tree15382601bf72d983afe726ec0d88e623b6e13ee4 /src
parentsingle bugfix in webview object + a lot of make gcc happy (diff)
downloadKVIrc-afd18158a48624de08ba300b52919147755d2395.tar.gz
KVIrc-afd18158a48624de08ba300b52919147755d2395.tar.bz2
KVIrc-afd18158a48624de08ba300b52919147755d2395.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/system/libkvisystem.cpp8
1 files changed, 7 insertions, 1 deletions
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");