| 1207 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); |
1207 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); |
| 1208 PurpleAccount *account = purple_conversation_get_account(conv); |
1208 PurpleAccount *account = purple_conversation_get_account(conv); |
| 1209 |
1209 |
| 1210 purple_prpl_initiate_media(account, |
1210 purple_prpl_initiate_media(account, |
| 1211 purple_conversation_get_name(conv), |
1211 purple_conversation_get_name(conv), |
| 1212 action == win->audio_call ? PURPLE_MEDIA_AUDIO : |
1212 action == win->menu.audio_call ? PURPLE_MEDIA_AUDIO : |
| 1213 action == win->video_call ? PURPLE_MEDIA_VIDEO : |
1213 action == win->menu.video_call ? PURPLE_MEDIA_VIDEO : |
| 1214 action == win->audio_video_call ? PURPLE_MEDIA_AUDIO | |
1214 action == win->menu.audio_video_call ? PURPLE_MEDIA_AUDIO | |
| 1215 PURPLE_MEDIA_VIDEO : PURPLE_MEDIA_NONE); |
1215 PURPLE_MEDIA_VIDEO : PURPLE_MEDIA_NONE); |
| 1216 } |
1216 } |
| 1217 #endif |
1217 #endif |
| 1218 |
1218 |
| 1219 static void |
1219 static void |
| 3352 == PURPLE_CONV_TYPE_IM) { |
3352 == PURPLE_CONV_TYPE_IM) { |
| 3353 PurpleMediaCaps caps = |
3353 PurpleMediaCaps caps = |
| 3354 purple_prpl_get_media_caps(account, |
3354 purple_prpl_get_media_caps(account, |
| 3355 purple_conversation_get_name(conv)); |
3355 purple_conversation_get_name(conv)); |
| 3356 |
3356 |
| 3357 gtk_action_set_sensitive(win->audio_call, |
3357 gtk_action_set_sensitive(win->menu.audio_call, |
| 3358 caps & PURPLE_MEDIA_CAPS_AUDIO |
3358 caps & PURPLE_MEDIA_CAPS_AUDIO |
| 3359 ? TRUE : FALSE); |
3359 ? TRUE : FALSE); |
| 3360 gtk_action_set_sensitive(win->video_call, |
3360 gtk_action_set_sensitive(win->menu.video_call, |
| 3361 caps & PURPLE_MEDIA_CAPS_VIDEO |
3361 caps & PURPLE_MEDIA_CAPS_VIDEO |
| 3362 ? TRUE : FALSE); |
3362 ? TRUE : FALSE); |
| 3363 gtk_action_set_sensitive(win->audio_video_call, |
3363 gtk_action_set_sensitive(win->menu.audio_video_call, |
| 3364 caps & PURPLE_MEDIA_CAPS_AUDIO_VIDEO |
3364 caps & PURPLE_MEDIA_CAPS_AUDIO_VIDEO |
| 3365 ? TRUE : FALSE); |
3365 ? TRUE : FALSE); |
| 3366 } else if (purple_conversation_get_type(conv) |
3366 } else if (purple_conversation_get_type(conv) |
| 3367 == PURPLE_CONV_TYPE_CHAT) { |
3367 == PURPLE_CONV_TYPE_CHAT) { |
| 3368 /* for now, don't care about chats... */ |
3368 /* for now, don't care about chats... */ |
| 3369 gtk_action_set_sensitive(win->audio_call, FALSE); |
3369 gtk_action_set_sensitive(win->menu.audio_call, FALSE); |
| 3370 gtk_action_set_sensitive(win->video_call, FALSE); |
3370 gtk_action_set_sensitive(win->menu.video_call, FALSE); |
| 3371 gtk_action_set_sensitive(win->audio_video_call, FALSE); |
3371 gtk_action_set_sensitive(win->menu.audio_video_call, FALSE); |
| 3372 } else { |
3372 } else { |
| 3373 gtk_action_set_sensitive(win->audio_call, FALSE); |
3373 gtk_action_set_sensitive(win->menu.audio_call, FALSE); |
| 3374 gtk_action_set_sensitive(win->video_call, FALSE); |
3374 gtk_action_set_sensitive(win->menu.video_call, FALSE); |
| 3375 gtk_action_set_sensitive(win->audio_video_call, FALSE); |
3375 gtk_action_set_sensitive(win->menu.audio_video_call, FALSE); |
| 3376 } |
3376 } |
| 3377 #endif |
3377 #endif |
| 3378 } |
3378 } |
| 3379 |
3379 |
| 3380 static void |
3380 static void |
| 3598 win->menu.view_log = |
3598 win->menu.view_log = |
| 3599 gtk_ui_manager_get_action(win->menu.ui, |
3599 gtk_ui_manager_get_action(win->menu.ui, |
| 3600 "/Conversation/ConversationMenu/ViewLog"); |
3600 "/Conversation/ConversationMenu/ViewLog"); |
| 3601 |
3601 |
| 3602 #ifdef USE_VV |
3602 #ifdef USE_VV |
| 3603 win->audio_call = |
3603 win->menu.audio_call = |
| 3604 gtk_ui_manager_get_action(win->menu.ui, |
3604 gtk_ui_manager_get_action(win->menu.ui, |
| 3605 "/Conversation/ConversationMenu/MediaMenu/AudioCall"); |
3605 "/Conversation/ConversationMenu/MediaMenu/AudioCall"); |
| 3606 win->video_call = |
3606 win->menu.video_call = |
| 3607 gtk_ui_manager_get_action(win->menu.ui, |
3607 gtk_ui_manager_get_action(win->menu.ui, |
| 3608 "/Conversation/ConversationMenu/MediaMenu/VideoCall"); |
3608 "/Conversation/ConversationMenu/MediaMenu/VideoCall"); |
| 3609 win->audio_video_call = |
3609 win->menu.audio_video_call = |
| 3610 gtk_ui_manager_get_action(win->menu.ui, |
3610 gtk_ui_manager_get_action(win->menu.ui, |
| 3611 "/Conversation/ConversationMenu/MediaMenu/AudioVideoCall"); |
3611 "/Conversation/ConversationMenu/MediaMenu/AudioVideoCall"); |
| 3612 #endif |
3612 #endif |
| 3613 |
3613 |
| 3614 /* --- */ |
3614 /* --- */ |
| 8140 PurpleConversation *conv = list->data; |
8140 PurpleConversation *conv = list->data; |
| 8141 if (!purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv)) && |
8141 if (!purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv)) && |
| 8142 purple_conversation_get_account(conv) == account) { |
8142 purple_conversation_get_account(conv) == account) { |
| 8143 purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE)); |
8143 purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE)); |
| 8144 purple_conversation_write(conv, NULL, _("The account has disconnected and you are no " |
8144 purple_conversation_write(conv, NULL, _("The account has disconnected and you are no " |
| 8145 "longer in this chat. You will be automatically rejoined in the chat when " |
8145 "longer in this chat. You will automatically rejoin the chat when " |
| 8146 "the account reconnects."), |
8146 "the account reconnects."), |
| 8147 PURPLE_MESSAGE_SYSTEM, time(NULL)); |
8147 PURPLE_MESSAGE_SYSTEM, time(NULL)); |
| 8148 } |
8148 } |
| 8149 list = list->next; |
8149 list = list->next; |
| 8150 } |
8150 } |
| 9958 pidgin_conv_window_destroy(PidginWindow *win) |
9958 pidgin_conv_window_destroy(PidginWindow *win) |
| 9959 { |
9959 { |
| 9960 purple_prefs_disconnect_by_handle(win); |
9960 purple_prefs_disconnect_by_handle(win); |
| 9961 window_list = g_list_remove(window_list, win); |
9961 window_list = g_list_remove(window_list, win); |
| 9962 |
9962 |
| 9963 /* Close the "Find" dialog if it's open */ |
|
| 9964 if (win->dialogs.search) |
|
| 9965 gtk_widget_destroy(win->dialogs.search); |
|
| 9966 |
|
| 9967 if (win->gtkconvs) { |
9963 if (win->gtkconvs) { |
| 9968 while (win->gtkconvs) { |
9964 while (win->gtkconvs) { |
| 9969 gboolean last = (win->gtkconvs->next == NULL); |
9965 gboolean last = (win->gtkconvs->next == NULL); |
| 9970 close_conv_cb(NULL, win->gtkconvs->data); |
9966 close_conv_cb(NULL, win->gtkconvs->data); |
| 9971 if (last) |
9967 if (last) |