| 4390 gaim_conv_window_raise(gaim_conversation_get_window(conv)); |
4390 gaim_conv_window_raise(gaim_conversation_get_window(conv)); |
| 4391 } |
4391 } |
| 4392 |
4392 |
| 4393 /* Play a sound, if specified in prefs. */ |
4393 /* Play a sound, if specified in prefs. */ |
| 4394 if (gtkconv->make_sound && !((gaim_conv_window_get_active_conversation(gaimwin) == conv) && |
4394 if (gtkconv->make_sound && !((gaim_conv_window_get_active_conversation(gaimwin) == conv) && |
| 4395 gaim_prefs_get_bool("/gaim/gtk/sound/silent_focus") && has_focus)) { |
4395 !gaim_prefs_get_bool("/gaim/gtk/sound/conv_focus") && has_focus)) { |
| 4396 if (flags & GAIM_MESSAGE_RECV) { |
4396 if (flags & GAIM_MESSAGE_RECV) { |
| 4397 if (gtkconv->u.im->a_virgin && |
4397 if (gtkconv->u.im->a_virgin && |
| 4398 gaim_prefs_get_bool("/gaim/gtk/sound/enabled/first_im_recv")) { |
4398 gaim_prefs_get_bool("/gaim/gtk/sound/enabled/first_im_recv")) { |
| 4399 |
4399 |
| 4400 gaim_sound_play_event(GAIM_SOUND_FIRST_RECEIVE); |
4400 gaim_sound_play_event(GAIM_SOUND_FIRST_RECEIVE); |
| 4427 |
4427 |
| 4428 g_object_get(G_OBJECT(gtkwin->window), "has-toplevel-focus", &has_focus, NULL); |
4428 g_object_get(G_OBJECT(gtkwin->window), "has-toplevel-focus", &has_focus, NULL); |
| 4429 |
4429 |
| 4430 /* Play a sound, if specified in prefs. */ |
4430 /* Play a sound, if specified in prefs. */ |
| 4431 if (gtkconv->make_sound && !((gaim_conv_window_get_active_conversation(gaimwin) == conv) && |
4431 if (gtkconv->make_sound && !((gaim_conv_window_get_active_conversation(gaimwin) == conv) && |
| 4432 gaim_prefs_get_bool("/gaim/gtk/sound/silent_focus") && has_focus)) { |
4432 !gaim_prefs_get_bool("/gaim/gtk/sound/conv_focus") && has_focus)) { |
| 4433 if (!(flags & GAIM_MESSAGE_WHISPER) && (flags & GAIM_MESSAGE_SEND)) |
4433 if (!(flags & GAIM_MESSAGE_WHISPER) && (flags & GAIM_MESSAGE_SEND)) |
| 4434 gaim_sound_play_event(GAIM_SOUND_CHAT_YOU_SAY); |
4434 gaim_sound_play_event(GAIM_SOUND_CHAT_YOU_SAY); |
| 4435 else if (flags & GAIM_MESSAGE_RECV) { |
4435 else if (flags & GAIM_MESSAGE_RECV) { |
| 4436 if ((flags & GAIM_MESSAGE_NICK) && |
4436 if ((flags & GAIM_MESSAGE_NICK) && |
| 4437 gaim_prefs_get_bool("/gaim/gtk/sound/enabled/nick_said") && |
4437 gaim_prefs_get_bool("/gaim/gtk/sound/enabled/nick_said") && |