Mercurial > pidgin
comparison src/gtkpounce.c @ 6660:48a31082bf5f
[gaim-migrate @ 7185]
Patch from Kevin Strange to make executable pounces workon windows.
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Sun, 31 Aug 2003 18:00:38 +0000 |
parents | b89d98f0bf79 |
children | 0c5637b5462e |
comparison
equal
deleted
inserted
replaced
6659:d5b6681b2155 | 6660:48a31082bf5f |
---|---|
864 | 864 |
865 serv_send_im(account->gc, (char *)pouncee, (char *)message, -1, 0); | 865 serv_send_im(account->gc, (char *)pouncee, (char *)message, -1, 0); |
866 } | 866 } |
867 } | 867 } |
868 | 868 |
869 #ifndef _WIN32 | |
870 if (gaim_pounce_action_is_enabled(pounce, "execute-command")) { | 869 if (gaim_pounce_action_is_enabled(pounce, "execute-command")) { |
871 const char *command; | 870 const char *command; |
872 | 871 |
873 command = gaim_pounce_action_get_attribute(pounce, "execute-command", | 872 command = gaim_pounce_action_get_attribute(pounce, "execute-command", |
874 "command"); | 873 "command"); |
875 | 874 |
876 if (command != NULL) { | 875 if (command != NULL) { |
876 #ifndef _WIN32 | |
877 int pid = fork(); | 877 int pid = fork(); |
878 | 878 |
879 if (pid == 0) { | 879 if (pid == 0) { |
880 char *args[4]; | 880 char *args[4]; |
881 | 881 |
886 | 886 |
887 execvp(args[0], args); | 887 execvp(args[0], args); |
888 | 888 |
889 _exit(0); | 889 _exit(0); |
890 } | 890 } |
891 #else | |
892 STARTUPINFO StartInfo; | |
893 PROCESS_INFORMATION ProcInfo; | |
894 | |
895 memset(&ProcInfo, 0, sizeof(ProcInfo)); | |
896 memset(&StartInfo, 0 , sizeof(StartInfo)); | |
897 StartInfo.cb = sizeof(StartInfo); | |
898 CreateProcess(NULL, (char *)command, NULL, NULL, 0, 0, NULL, NULL, &StartInfo, &ProcInfo); | |
899 gaim_debug(GAIM_DEBUG_INFO, "pounce", "Pounce execute command called for: %s\n", command); | |
900 | |
901 #endif | |
891 } | 902 } |
892 } | 903 } |
893 #endif /* _WIN32 */ | |
894 | 904 |
895 if (gaim_pounce_action_is_enabled(pounce, "play-sound")) { | 905 if (gaim_pounce_action_is_enabled(pounce, "play-sound")) { |
896 const char *sound; | 906 const char *sound; |
897 | 907 |
898 sound = gaim_pounce_action_get_attribute(pounce, "play-sound", | 908 sound = gaim_pounce_action_get_attribute(pounce, "play-sound", |