Mercurial > pidgin.yaz
comparison src/gtkpounce.c @ 5051:b3d9195777bb
[gaim-migrate @ 5400]
Empty sound and command fields no longer crash gaim.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 07 Apr 2003 00:59:59 +0000 |
parents | cb700c07ee07 |
children | 6a7759f63766 |
comparison
equal
deleted
inserted
replaced
5050:dfec167391a5 | 5051:b3d9195777bb |
---|---|
281 | 281 |
282 do_error_dialog(tmp, NULL, GAIM_INFO); | 282 do_error_dialog(tmp, NULL, GAIM_INFO); |
283 } | 283 } |
284 | 284 |
285 if (pounce_data->actions & GAIM_GTKPOUNCE_SEND_MSG && | 285 if (pounce_data->actions & GAIM_GTKPOUNCE_SEND_MSG && |
286 *pounce_data->message != '\0') { | 286 pounce_data->message != NULL) { |
287 | 287 |
288 conv = gaim_find_conversation(pouncee); | 288 conv = gaim_find_conversation(pouncee); |
289 | 289 |
290 if (conv == NULL) | 290 if (conv == NULL) |
291 conv = gaim_conversation_new(GAIM_CONV_IM, account, pouncee); | 291 conv = gaim_conversation_new(GAIM_CONV_IM, account, pouncee); |
295 | 295 |
296 serv_send_im(account->gc, (char *)pouncee, pounce_data->message, -1, 0); | 296 serv_send_im(account->gc, (char *)pouncee, pounce_data->message, -1, 0); |
297 } | 297 } |
298 | 298 |
299 if (pounce_data->actions & GAIM_GTKPOUNCE_EXEC_CMD && | 299 if (pounce_data->actions & GAIM_GTKPOUNCE_EXEC_CMD && |
300 *pounce_data->command != '\0') { | 300 pounce_data->command != NULL) { |
301 #ifndef _WIN32 | 301 #ifndef _WIN32 |
302 int pid = fork(); | 302 int pid = fork(); |
303 | 303 |
304 if (pid == 0) { | 304 if (pid == 0) { |
305 char *args[4]; | 305 char *args[4]; |
315 } | 315 } |
316 #endif /* _WIN32 */ | 316 #endif /* _WIN32 */ |
317 } | 317 } |
318 | 318 |
319 if (pounce_data->actions & GAIM_GTKPOUNCE_PLAY_SOUND) { | 319 if (pounce_data->actions & GAIM_GTKPOUNCE_PLAY_SOUND) { |
320 if (*pounce_data->sound != '\0') | 320 if (pounce_data->sound != NULL) |
321 gaim_sound_play_file(pounce_data->sound); | 321 gaim_sound_play_file(pounce_data->sound); |
322 else | 322 else |
323 gaim_sound_play_event(GAIM_SOUND_POUNCE_DEFAULT); | 323 gaim_sound_play_event(GAIM_SOUND_POUNCE_DEFAULT); |
324 } | 324 } |
325 | 325 |
537 | 537 |
538 dialog->open_win = gtk_check_button_new_with_label(_("Open an IM window")); | 538 dialog->open_win = gtk_check_button_new_with_label(_("Open an IM window")); |
539 dialog->popup = gtk_check_button_new_with_label(_("Popup notification")); | 539 dialog->popup = gtk_check_button_new_with_label(_("Popup notification")); |
540 dialog->send_msg = gtk_check_button_new_with_label(_("Send a message")); | 540 dialog->send_msg = gtk_check_button_new_with_label(_("Send a message")); |
541 dialog->exec_cmd = gtk_check_button_new_with_label(_("Execute a command")); | 541 dialog->exec_cmd = gtk_check_button_new_with_label(_("Execute a command")); |
542 dialog->play_sound = gtk_check_button_new_with_label(_("Play a Sound")); | 542 dialog->play_sound = gtk_check_button_new_with_label(_("Play a sound")); |
543 | 543 |
544 dialog->send_msg_entry = gtk_entry_new(); | 544 dialog->send_msg_entry = gtk_entry_new(); |
545 dialog->exec_cmd_entry = gtk_entry_new(); | 545 dialog->exec_cmd_entry = gtk_entry_new(); |
546 dialog->play_sound_entry = gtk_entry_new(); | 546 dialog->play_sound_entry = gtk_entry_new(); |
547 | 547 |