pidgin: 5e877772: There's no reason to ask for acceptance ...
maiku at pidgin.im
maiku at pidgin.im
Thu Aug 27 02:08:03 EDT 2009
-----------------------------------------------------------------
Revision: 5e877772051b0cfb57b3eda07a70bb59562d0111
Ancestor: d00066cd4a288d711bb0d302fc36272c915aab26
Author: maiku at pidgin.im
Date: 2009-08-27T05:57:49
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5e877772051b0cfb57b3eda07a70bb59562d0111
Modified files:
pidgin/gtkmedia.c
ChangeLog:
There's no reason to ask for acceptance if the stream has been accepted. Also,
there's no reason to keep the media request open if the stream has already
been accepted. This helps for auto-accepting media sessions.
-------------- next part --------------
============================================================
--- pidgin/gtkmedia.c 8c9b10466f4972767709d7b21911943d6267eb8c
+++ pidgin/gtkmedia.c e245177507947370d9a41702ddaa09bc9fa48915
@@ -499,13 +499,14 @@ pidgin_request_timeout_cb(PidginMedia *g
}
gtkmedia->priv->request_type = PURPLE_MEDIA_NONE;
-
- purple_request_accept_cancel(gtkmedia, _("Incoming Call"),
- message, NULL, PURPLE_DEFAULT_ACTION_NONE,
- (void*)account, gtkmedia->priv->screenname, NULL,
- gtkmedia->priv->media,
- pidgin_media_accept_cb,
- pidgin_media_reject_cb);
+ if (!purple_media_accepted(gtkmedia->priv->media, NULL, NULL)) {
+ purple_request_accept_cancel(gtkmedia, _("Incoming Call"),
+ message, NULL, PURPLE_DEFAULT_ACTION_NONE,
+ (void*)account, gtkmedia->priv->screenname,
+ NULL, gtkmedia->priv->media,
+ pidgin_media_accept_cb,
+ pidgin_media_reject_cb);
+ }
pidgin_media_emit_message(gtkmedia, message);
g_free(message);
return FALSE;
@@ -772,6 +773,8 @@ pidgin_media_stream_info_cb(PurpleMedia
pidgin_media_emit_message(gtkmedia,
_("You have rejected the call."));
} else if (type == PURPLE_MEDIA_INFO_ACCEPT) {
+ if (local == TRUE)
+ purple_request_close_with_handle(gtkmedia);
pidgin_media_set_state(gtkmedia, PIDGIN_MEDIA_ACCEPTED);
pidgin_media_emit_message(gtkmedia, _("Call in progress."));
gtk_statusbar_push(GTK_STATUSBAR(gtkmedia->priv->statusbar),
More information about the Commits
mailing list