pidgin.vv: ec871c67: Say which media type is being requested ...
maiku at soc.pidgin.im
maiku at soc.pidgin.im
Wed Apr 1 00:31:17 EDT 2009
-----------------------------------------------------------------
Revision: ec871c67e9e695cb5d2028a4ad94fcfd8893d5ea
Ancestor: 9a0cc005dc2a89f217230784a7ec9065e2b2111f
Author: maiku at soc.pidgin.im
Date: 2009-04-01T03:23:21
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/ec871c67e9e695cb5d2028a4ad94fcfd8893d5ea
Modified files:
finch/gntmedia.c
ChangeLog:
Say which media type is being requested in Finch.
-------------- next part --------------
============================================================
--- finch/gntmedia.c a9cf2574bcd4a832a37fcf77f408b12111374cff
+++ finch/gntmedia.c 99c3eb27c513b6677b240fc1dd0bf5678584b325
@@ -251,6 +251,32 @@ finch_media_state_changed_cb(PurpleMedia
}
} else if (state == PURPLE_MEDIA_STATE_CONNECTED) {
finch_media_connected_cb(media, gntmedia);
+ } else if (state == PURPLE_MEDIA_STATE_NEW &&
+ sid != NULL && name != NULL &&
+ purple_media_is_initiator(media, sid, name) == FALSE) {
+ PurpleConnection *pc;
+ PurpleBuddy *buddy;
+ const gchar *alias;
+ PurpleMediaSessionType type =
+ purple_media_get_session_type(media, sid);
+ gchar *message = NULL;
+
+ pc = purple_media_get_connection(gntmedia->priv->media);
+ buddy = purple_find_buddy(
+ purple_connection_get_account(pc), name);
+ alias = buddy ? purple_buddy_get_contact_alias(buddy) : name;
+
+ if (type & PURPLE_MEDIA_AUDIO) {
+ message = g_strdup_printf(
+ _("%s wishes to start an audio session with you."),
+ alias);
+ } else {
+ message = g_strdup_printf(
+ _("%s is trying to start an unsuppoted media session type with you."),
+ alias);
+ }
+ finch_media_emit_message(gntmedia, message);
+ g_free(message);
}
}
More information about the Commits
mailing list