| 403 return; |
403 return; |
| 404 } |
404 } |
| 405 |
405 |
| 406 /* we should update the conversation window buttons and menu, if it exists. */ |
406 /* we should update the conversation window buttons and menu, if it exists. */ |
| 407 cnv = find_conversation(name); |
407 cnv = find_conversation(name); |
| 408 if (cnv) { |
408 if (cnv) |
| 409 cnv->gc = gc; |
409 set_convo_gc(cnv, gc); |
| 410 gtk_option_menu_set_history(GTK_OPTION_MENU(cnv->menu), g_slist_index(connections, gc)); |
|
| 411 update_buttons_by_protocol(cnv); |
|
| 412 } |
|
| 413 |
410 |
| 414 /* if you can't figure this out, stop reading right now. |
411 /* if you can't figure this out, stop reading right now. |
| 415 * "we're not worthy! we're not worthy!" */ |
412 * "we're not worthy! we're not worthy!" */ |
| 416 if (general_options & OPT_GEN_SEND_LINKS) |
413 if (general_options & OPT_GEN_SEND_LINKS) |
| 417 linkify_text(message); |
414 linkify_text(message); |
| 482 * will take care of not playing while away), and then write it to the |
479 * will take care of not playing while away), and then write it to the |
| 483 * convo window. */ |
480 * convo window. */ |
| 484 if (cnv == NULL) { |
481 if (cnv == NULL) { |
| 485 new_conv = 1; |
482 new_conv = 1; |
| 486 cnv = new_conversation(name); |
483 cnv = new_conversation(name); |
| 487 cnv->gc = gc; |
484 set_convo_gc(cnv, gc); |
| 488 gtk_option_menu_set_history(GTK_OPTION_MENU(cnv->menu), |
|
| 489 g_slist_index(connections, gc)); |
|
| 490 update_buttons_by_protocol(cnv); |
|
| 491 } |
485 } |
| 492 if (new_conv && (sound_options & OPT_SOUND_FIRST_RCV)) |
486 if (new_conv && (sound_options & OPT_SOUND_FIRST_RCV)) |
| 493 play_sound(FIRST_RECEIVE); |
487 play_sound(FIRST_RECEIVE); |
| 494 else if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) |
488 else if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) |
| 495 play_sound(RECEIVE); |
489 play_sound(RECEIVE); |
| 538 * it (if it does exist it was updated earlier), then play a sound indicating we've |
532 * it (if it does exist it was updated earlier), then play a sound indicating we've |
| 539 * received it and then display it. easy. */ |
533 * received it and then display it. easy. */ |
| 540 if (cnv == NULL) { |
534 if (cnv == NULL) { |
| 541 new_conv = 1; |
535 new_conv = 1; |
| 542 cnv = new_conversation(name); |
536 cnv = new_conversation(name); |
| 543 cnv->gc = gc; |
537 set_convo_gc(cnv, gc); |
| 544 gtk_option_menu_set_history(GTK_OPTION_MENU(cnv->menu), |
|
| 545 g_slist_index(connections, gc)); |
|
| 546 update_buttons_by_protocol(cnv); |
|
| 547 } |
538 } |
| 548 if (new_conv && (sound_options & OPT_SOUND_FIRST_RCV)) |
539 if (new_conv && (sound_options & OPT_SOUND_FIRST_RCV)) |
| 549 play_sound(FIRST_RECEIVE); |
540 play_sound(FIRST_RECEIVE); |
| 550 else if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) |
541 else if (cnv->makesound && (sound_options & OPT_SOUND_RECV)) |
| 551 play_sound(RECEIVE); |
542 play_sound(RECEIVE); |