Mercurial > pidgin.yaz
comparison pidgin/gtkconv.c @ 25709:eb8c8a926589
Convert serv_* media functions to purple_prpl_* functions.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Sat, 19 Jul 2008 03:10:00 +0000 |
parents | 13936e4405b7 |
children | aaf11cffe2b2 |
comparison
equal
deleted
inserted
replaced
25708:23a156abcb2a | 25709:eb8c8a926589 |
---|---|
6378 buttons &= ~GTK_IMHTML_CUSTOM_SMILEY; | 6378 buttons &= ~GTK_IMHTML_CUSTOM_SMILEY; |
6379 | 6379 |
6380 #ifdef USE_VV | 6380 #ifdef USE_VV |
6381 /* check if account support voice calls, and if the current buddy | 6381 /* check if account support voice calls, and if the current buddy |
6382 supports it */ | 6382 supports it */ |
6383 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { | 6383 if (account != NULL && purple_conversation_get_type(conv) |
6384 gboolean audio = serv_can_do_media(gc, purple_conversation_get_name(conv), | 6384 == PURPLE_CONV_TYPE_IM) { |
6385 PURPLE_MEDIA_AUDIO); | 6385 gboolean audio = purple_prpl_can_do_media(account, |
6386 gboolean video = serv_can_do_media(gc, purple_conversation_get_name(conv), | 6386 purple_conversation_get_name(conv), |
6387 PURPLE_MEDIA_VIDEO); | 6387 PURPLE_MEDIA_AUDIO); |
6388 gboolean av = serv_can_do_media(gc, purple_conversation_get_name(conv), | 6388 gboolean video = purple_prpl_can_do_media(account, |
6389 PURPLE_MEDIA_AUDIO | PURPLE_MEDIA_VIDEO); | 6389 purple_conversation_get_name(conv), |
6390 PURPLE_MEDIA_VIDEO); | |
6391 gboolean av = purple_prpl_can_do_media(account, | |
6392 purple_conversation_get_name(conv), | |
6393 PURPLE_MEDIA_AUDIO | PURPLE_MEDIA_VIDEO); | |
6390 | 6394 |
6391 gtk_widget_set_sensitive(win->menu.audio_call, audio ? TRUE : FALSE); | 6395 gtk_widget_set_sensitive(win->menu.audio_call, audio ? TRUE : FALSE); |
6392 gtk_widget_set_sensitive(win->menu.video_call, video ? TRUE : FALSE); | 6396 gtk_widget_set_sensitive(win->menu.video_call, video ? TRUE : FALSE); |
6393 gtk_widget_set_sensitive(win->menu.audio_video_call, av ? TRUE : FALSE); | 6397 gtk_widget_set_sensitive(win->menu.audio_video_call, av ? TRUE : FALSE); |
6394 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { | 6398 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { |
7682 static void | 7686 static void |
7683 menu_initiate_audio_call_cb(gpointer data, guint action, GtkWidget *widget) | 7687 menu_initiate_audio_call_cb(gpointer data, guint action, GtkWidget *widget) |
7684 { | 7688 { |
7685 PidginWindow *win = (PidginWindow *)data; | 7689 PidginWindow *win = (PidginWindow *)data; |
7686 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); | 7690 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); |
7687 PurpleConnection *gc = purple_conversation_get_gc(conv); | 7691 PurpleAccount *account = purple_conversation_get_account(conv); |
7688 | 7692 |
7689 PurpleMedia *media = | 7693 PurpleMedia *media = |
7690 serv_initiate_media(gc, | 7694 purple_prpl_initiate_media(account, |
7691 purple_conversation_get_name(conv), | 7695 purple_conversation_get_name(conv), |
7692 PURPLE_MEDIA_AUDIO); | 7696 PURPLE_MEDIA_AUDIO); |
7693 | 7697 |
7694 if (media) | 7698 if (media) |
7695 purple_media_wait(media); | 7699 purple_media_wait(media); |
7696 } | 7700 } |
7697 | 7701 |
7698 static void | 7702 static void |
7699 menu_initiate_video_call_cb(gpointer data, guint action, GtkWidget *widget) | 7703 menu_initiate_video_call_cb(gpointer data, guint action, GtkWidget *widget) |
7700 { | 7704 { |
7701 PidginWindow *win = (PidginWindow *)data; | 7705 PidginWindow *win = (PidginWindow *)data; |
7702 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); | 7706 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); |
7703 PurpleConnection *gc = purple_conversation_get_gc(conv); | 7707 PurpleAccount *account = purple_conversation_get_account(conv); |
7704 | 7708 |
7705 PurpleMedia *media = | 7709 PurpleMedia *media = |
7706 serv_initiate_media(gc, | 7710 purple_prpl_initiate_media(account, |
7707 purple_conversation_get_name(conv), | 7711 purple_conversation_get_name(conv), |
7708 PURPLE_MEDIA_VIDEO); | 7712 PURPLE_MEDIA_VIDEO); |
7709 | 7713 |
7710 if (media) | 7714 if (media) |
7711 purple_media_wait(media); | 7715 purple_media_wait(media); |
7712 } | 7716 } |
7713 | 7717 |
7714 static void | 7718 static void |
7715 menu_initiate_audio_video_call_cb(gpointer data, guint action, GtkWidget *widget) | 7719 menu_initiate_audio_video_call_cb(gpointer data, guint action, GtkWidget *widget) |
7716 { | 7720 { |
7717 PidginWindow *win = (PidginWindow *)data; | 7721 PidginWindow *win = (PidginWindow *)data; |
7718 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); | 7722 PurpleConversation *conv = pidgin_conv_window_get_active_conversation(win); |
7719 PurpleConnection *gc = purple_conversation_get_gc(conv); | 7723 PurpleAccount *account = purple_conversation_get_account(conv); |
7720 | 7724 |
7721 PurpleMedia *media = | 7725 PurpleMedia *media = |
7722 serv_initiate_media(gc, | 7726 purple_prpl_initiate_media(account, |
7723 purple_conversation_get_name(conv), | 7727 purple_conversation_get_name(conv), |
7724 PURPLE_MEDIA_AUDIO | PURPLE_MEDIA_VIDEO); | 7728 PURPLE_MEDIA_AUDIO | PURPLE_MEDIA_VIDEO); |
7725 | 7729 |
7726 if (media) | 7730 if (media) |
7727 purple_media_wait(media); | 7731 purple_media_wait(media); |
7728 } | 7732 } |
7729 | 7733 |