# HG changeset patch # User Ka-Hing Cheung # Date 1251063732 0 # Node ID 9d620811c67cf0d1e87650a0a7125b26b2277c9a # Parent b168718d1072ecc5f678905ccecd4444f881bdaf# Parent ea6e571ebe4d3edff29c4034c90efd2a854541fa merge of '03bd656c160ca6bc98b9cc43670b534d7d2c3c88' and '14cd2c46309b8cfa9e732fa8df5ed2f096684c27' diff -r b168718d1072 -r 9d620811c67c COPYRIGHT --- a/COPYRIGHT Sun Aug 23 21:40:34 2009 +0000 +++ b/COPYRIGHT Sun Aug 23 21:42:12 2009 +0000 @@ -88,6 +88,7 @@ Matěj Cepl Cerulean Studios, LLC Jonathan Champ +Matthew Chapman Christophe Chapuis Patrick Cheung Ka-Hing Cheung diff -r b168718d1072 -r 9d620811c67c ChangeLog --- a/ChangeLog Sun Aug 23 21:40:34 2009 +0000 +++ b/ChangeLog Sun Aug 23 21:42:12 2009 +0000 @@ -1,11 +1,20 @@ Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul version 2.6.2 (??/??/2009): + libpurple: + * Fix --disable-avahi to actually disable it in configure, as opposed + to just making the warning non-fatal. + * Sending custom smileys in MSN chats is now supported. + XMPP: * Prompt the user before cancelling a presence subscription. * Escape status messages that have HTML entities in the Get Info dialog. * Fix connecting to XMPP domains with no SRV records from Pidgin on Windows. + * Fix typing notifications with Pidgin 2.5.9 or earlier. + + Finch: + * Properly detect libpanel on OpenBSD. (Brad Smith) version 2.6.1 (08/18/2009): * Fix a crash when some users send you a link in a Yahoo IM diff -r b168718d1072 -r 9d620811c67c PLUGIN_HOWTO --- a/PLUGIN_HOWTO Sun Aug 23 21:40:34 2009 +0000 +++ b/PLUGIN_HOWTO Sun Aug 23 21:42:12 2009 +0000 @@ -1,6 +1,6 @@ For information on writing a plugin for Purple, Pidgin or Finch, go -http://developer.pidgin.im and click on API. From there, see the HOWTOs in the -"Related Pages" section. +http://developer.pidgin.im and click on API. From there, see the +HOWTOs in the "Related Pages" section. You can also generate this documentation locally by installing doxygen and graphviz dot, then running "make docs" in the diff -r b168718d1072 -r 9d620811c67c configure.ac --- a/configure.ac Sun Aug 23 21:40:34 2009 +0000 +++ b/configure.ac Sun Aug 23 21:42:12 2009 +0000 @@ -632,7 +632,8 @@ [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""]) if test "x$enable_consoleui" = "xyes"; then AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_consoleui=no]) - AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_consoleui=no]) + AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], + [enable_consoleui=no], [$GNT_LIBS]) if test "x$enable_consoleui" = "xyes"; then dnl # Some distros put the headers in ncursesw/, some don't @@ -675,7 +676,8 @@ # ncursesw was not found. Look for plain old ncurses enable_consoleui=yes AC_CHECK_LIB(ncurses, initscr, [GNT_LIBS="-lncurses"], [enable_consoleui=no]) - AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"], [enable_consoleui=no]) + AC_CHECK_LIB(panel, update_panels, [GNT_LIBS="$GNT_LIBS -lpanel"], + [enable_consoleui=no], [$GNT_LIBS]) AC_DEFINE(NO_WIDECHAR, 1, [Define to 1 if you don't have wide-character support.]) if test x"$ac_ncurses_includes" != "x"; then GNT_CFLAGS="-I$ac_ncurses_includes" @@ -793,13 +795,13 @@ dnl ####################################################################### AC_ARG_ENABLE(vv, [AC_HELP_STRING([--disable-vv], [compile without voice and video support])], - [enable_vv="$enableval" force_vv=$enableval], [enable_vv="yes" force_vv=no]) + enable_vv="$enableval", enable_vv="yes") if test "x$enable_vv" != "xno"; then if test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno"; then AC_DEFINE(USE_VV, 1, [Use voice and video]) else enable_vv="no" - if test "x$force_vv" = "xyes"; then + if test "x$force_deps" = "xyes"; then AC_MSG_ERROR([ Dependencies for voice/video were not met. Install the necessary gstreamer and farsight packages first. @@ -808,6 +810,7 @@ fi fi fi +AM_CONDITIONAL(USE_VV, test "x$enable_gstreamer" != "xno" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farsight" != "xno") AC_ARG_ENABLE(idn, [AC_HELP_STRING([--disable-idn], [compile without IDN support])], @@ -857,36 +860,39 @@ [AC_HELP_STRING([--disable-avahi], [compile without avahi (required for Bonjour support)])], enable_avahi="$enableval", enable_avahi="yes") -AC_ARG_WITH(avahi-client-includes, [AC_HELP_STRING([--with-avahi-client-includes=DIR], [compile the Bonjour plugin against the Avahi Client includes in DIR])], [ac_avahi_client_includes="$withval"], [ac_avahi_client_includes="no"]) -AC_ARG_WITH(avahi-client-libs, [AC_HELP_STRING([--with-avahi-client-libs=DIR], [compile the Bonjour plugin against the Avahi Client libs in DIR])], [ac_avahi_client_libs="$withval"], [ac_avahi_client_libs="no"]) -AVAHI_CFLAGS="" -AVAHI_LIBS="" + +if test "x$enable_avahi" = "xyes"; then + AC_ARG_WITH(avahi-client-includes, [AC_HELP_STRING([--with-avahi-client-includes=DIR], [compile the Bonjour plugin against the Avahi Client includes in DIR])], [ac_avahi_client_includes="$withval"], [ac_avahi_client_includes="no"]) + AC_ARG_WITH(avahi-client-libs, [AC_HELP_STRING([--with-avahi-client-libs=DIR], [compile the Bonjour plugin against the Avahi Client libs in DIR])], [ac_avahi_client_libs="$withval"], [ac_avahi_client_libs="no"]) + AVAHI_CFLAGS="" + AVAHI_LIBS="" -dnl Attempt to autodetect Avahi -PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib], [ - avahiincludes="yes" - avahilibs="yes" -], [ - avahiincludes="no" - avahilibs="no" -]) + dnl Attempt to autodetect Avahi + PKG_CHECK_MODULES(AVAHI, [avahi-client avahi-glib], [ + avahiincludes="yes" + avahilibs="yes" + ], [ + avahiincludes="no" + avahilibs="no" + ]) -dnl Override AVAHI_CFLAGS if the user specified an include dir -if test "$ac_avahi_client_includes" != "no"; then - AVAHI_CFLAGS="-I$ac_avahi_client_includes" + dnl Override AVAHI_CFLAGS if the user specified an include dir + if test "$ac_avahi_client_includes" != "no"; then + AVAHI_CFLAGS="-I$ac_avahi_client_includes" + fi + CPPFLAGS_save="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS" + AC_CHECK_HEADER(avahi-client/client.h, [avahiincludes=yes], [avahiincludes=no]) + CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS $GLIB_CFLAGS" + AC_CHECK_HEADER(avahi-glib/glib-malloc.h, [avahiincludes=yes], [avahiincludes=no]) + CPPFLAGS="$CPPFLAGS_save" + + dnl Override AVAHI_LIBS if the user specified a libs dir + if test "$ac_avahi_client_libs" != "no"; then + AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib " + fi + AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS) fi -CPPFLAGS_save="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS" -AC_CHECK_HEADER(avahi-client/client.h, [avahiincludes=yes], [avahiincludes=no]) -CPPFLAGS="$CPPFLAGS $AVAHI_CFLAGS $GLIB_CFLAGS" -AC_CHECK_HEADER(avahi-glib/glib-malloc.h, [avahiincludes=yes], [avahiincludes=no]) -CPPFLAGS="$CPPFLAGS_save" - -dnl Override AVAHI_LIBS if the user specified a libs dir -if test "$ac_avahi_client_libs" != "no"; then - AVAHI_LIBS="-L$ac_avahi_client_libs -lavahi-common -lavahi-client -lavahi-glib " -fi -AC_CHECK_LIB(avahi-client, avahi_client_new, [avahilibs=yes], [avahilibs=no], $AVAHI_LIBS) if test "x$enable_avahi" = "xyes" -a "x$force_deps" = "xyes" -a \( "x$avahiincludes" = "xno" -o "x$avahilibs" = "xno" \); then AC_MSG_ERROR([ diff -r b168718d1072 -r 9d620811c67c finch/plugins/grouping.c --- a/finch/plugins/grouping.c Sun Aug 23 21:40:34 2009 +0000 +++ b/finch/plugins/grouping.c Sun Aug 23 21:42:12 2009 +0000 @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #define PURPLE_PLUGIN diff -r b168718d1072 -r 9d620811c67c libpurple/certificate.c --- a/libpurple/certificate.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/certificate.c Sun Aug 23 21:42:12 2009 +0000 @@ -43,6 +43,91 @@ /** List of registered Pools */ static GList *cert_pools = NULL; +/* + * TODO: Merge this with PurpleCertificateVerificationStatus for 3.0.0 */ +typedef enum { + PURPLE_CERTIFICATE_UNKNOWN_ERROR = -1, + + /* Not an error */ + PURPLE_CERTIFICATE_NO_PROBLEMS = 0, + + /* Non-fatal */ + PURPLE_CERTIFICATE_NON_FATALS_MASK = 0x0000FFFF, + + /* The certificate is self-signed. */ + PURPLE_CERTIFICATE_SELF_SIGNED = 0x01, + + /* The CA is not in libpurple's pool of certificates. */ + PURPLE_CERTIFICATE_CA_UNKNOWN = 0x02, + + /* The current time is before the certificate's specified + * activation time. + */ + PURPLE_CERTIFICATE_NOT_ACTIVATED = 0x04, + + /* The current time is after the certificate's specified expiration time */ + PURPLE_CERTIFICATE_EXPIRED = 0x08, + + /* The certificate's subject name doesn't match the expected */ + PURPLE_CERTIFICATE_NAME_MISMATCH = 0x10, + + /* No CA pool was found. This shouldn't happen... */ + PURPLE_CERTIFICATE_NO_CA_POOL = 0x20, + + /* Fatal */ + PURPLE_CERTIFICATE_FATALS_MASK = 0xFFFF0000, + + /* The signature chain could not be validated. Due to limitations in the + * the current API, this also indicates one of the CA certificates in the + * chain is expired (or not yet activated). FIXME 3.0.0 */ + PURPLE_CERTIFICATE_INVALID_CHAIN = 0x10000, + + /* The signature has been revoked. */ + PURPLE_CERTIFICATE_REVOKED = 0x20000, + + PURPLE_CERTIFICATE_LAST = 0x40000, +} PurpleCertificateInvalidityFlags; + +static const gchar * +invalidity_reason_to_string(PurpleCertificateInvalidityFlags flag) +{ + switch (flag) { + case PURPLE_CERTIFICATE_SELF_SIGNED: + return _("The certificate is self-signed and cannot be " + "automatically checked."); + break; + case PURPLE_CERTIFICATE_CA_UNKNOWN: + return _("The root certificate this one claims to be issued by is " + "unknown to Pidgin."); + break; + case PURPLE_CERTIFICATE_NOT_ACTIVATED: + return _("The certificate is not valid yet."); + break; + case PURPLE_CERTIFICATE_EXPIRED: + return _("The certificate has expired and should not be " + "considered valid."); + break; + case PURPLE_CERTIFICATE_NAME_MISMATCH: + /* Translators: "domain" refers to a DNS domain (e.g. talk.google.com) */ + return _("The certificate presented is not issued to this domain."); + break; + case PURPLE_CERTIFICATE_NO_CA_POOL: + return _("You have no database of root certificates, so " + "this certificate cannot be validated."); + break; + case PURPLE_CERTIFICATE_INVALID_CHAIN: + return _("The certificate chain presented is invalid."); + break; + case PURPLE_CERTIFICATE_REVOKED: + return _("The certificate has been revoked."); + break; + case PURPLE_CERTIFICATE_UNKNOWN_ERROR: + default: + return _("An unknown certificate error occurred."); + break; + } +} + void purple_certificate_verify (PurpleCertificateVerifier *verifier, const gchar *subject_name, GList *cert_chain, @@ -1265,10 +1350,104 @@ } static void -x509_tls_cached_unknown_peer(PurpleCertificateVerificationRequest *vrq); +x509_tls_cached_unknown_peer(PurpleCertificateVerificationRequest *vrq, + PurpleCertificateInvalidityFlags flags); static void -x509_tls_cached_cert_in_cache(PurpleCertificateVerificationRequest *vrq) +x509_tls_cached_complete(PurpleCertificateVerificationRequest *vrq, + PurpleCertificateInvalidityFlags flags) +{ + PurpleCertificatePool *tls_peers; + PurpleCertificate *peer_crt = vrq->cert_chain->data; + + if (flags & PURPLE_CERTIFICATE_FATALS_MASK) { + /* TODO: Also print any other warnings? */ + const gchar *error; + gchar *tmp, *secondary; + + if (flags & PURPLE_CERTIFICATE_INVALID_CHAIN) + error = invalidity_reason_to_string(PURPLE_CERTIFICATE_INVALID_CHAIN); + else if (flags & PURPLE_CERTIFICATE_REVOKED) + error = invalidity_reason_to_string(PURPLE_CERTIFICATE_REVOKED); + else + error = invalidity_reason_to_string(PURPLE_CERTIFICATE_UNKNOWN_ERROR); + + tmp = g_strdup_printf(_("The certificate for %s could not be validated."), + vrq->subject_name); + secondary = g_strconcat(tmp, " ", error, NULL); + g_free(tmp); + + purple_notify_error(NULL, /* TODO: Probably wrong. */ + _("SSL Certificate Error"), + _("Unable to validate certificate"), + secondary); + g_free(secondary); + + purple_certificate_verify_complete(vrq, PURPLE_CERTIFICATE_INVALID); + return; + } else if (flags & PURPLE_CERTIFICATE_NON_FATALS_MASK) { + /* Non-fatal error. Prompt the user. */ + gchar *tmp; + GString *errors; + guint32 i = 1; + + tmp = g_strdup_printf(_("The certificate for %s could not be validated."), + vrq->subject_name); + errors = g_string_new(tmp); + g_free(tmp); + + errors = g_string_append_c(errors, '\n'); + + /* Special case a name mismatch because we want to display the two names... */ + if (flags & PURPLE_CERTIFICATE_NAME_MISMATCH) { + gchar *sn = purple_certificate_get_subject_name(peer_crt); + + g_string_append_printf(errors, _("The certificate claims to be " + "from \"%s\" instead. This could mean that you are " + "not connecting to the service you believe you are."), + sn); + g_free(sn); + + flags &= ~PURPLE_CERTIFICATE_NAME_MISMATCH; + } + + while (i != PURPLE_CERTIFICATE_LAST) { + if (flags & i) { + errors = g_string_append_c(errors, '\n'); + g_string_append(errors, invalidity_reason_to_string(i)); + } + + i <<= 1; + } + + x509_tls_cached_user_auth(vrq, errors->str); + g_string_free(errors, TRUE); + return; + } + + /* If we reach this point, the certificate is good. */ + + /* Look up the local cache and store it there for future use */ + tls_peers = purple_certificate_find_pool(x509_tls_cached.scheme_name, + "tls_peers"); + if (tls_peers) { + if (!purple_certificate_pool_contains(tls_peers, vrq->subject_name) && + !purple_certificate_pool_store(tls_peers,vrq->subject_name, + peer_crt)) { + purple_debug_error("certificate/x509/tls_cached", + "FAILED to cache peer certificate\n"); + } + } else { + purple_debug_error("certificate/x509/tls_cached", + "Unable to locate tls_peers certificate cache.\n"); + } + + purple_certificate_verify_complete(vrq, PURPLE_CERTIFICATE_VALID); +} + +static void +x509_tls_cached_cert_in_cache(PurpleCertificateVerificationRequest *vrq, + PurpleCertificateInvalidityFlags flags) { /* TODO: Looking this up by name over and over is expensive. Fix, please! */ @@ -1291,7 +1470,7 @@ "Lookup failed on cached certificate!\n" "Falling back to full verification.\n"); /* vrq now becomes the problem of unknown_peer */ - x509_tls_cached_unknown_peer(vrq); + x509_tls_cached_unknown_peer(vrq, flags); return; } @@ -1302,14 +1481,12 @@ if (!memcmp(peer_fpr->data, cached_fpr->data, peer_fpr->len)) { purple_debug_info("certificate/x509/tls_cached", "Peer cert matched cached\n"); - /* vrq is now finished */ - purple_certificate_verify_complete(vrq, - PURPLE_CERTIFICATE_VALID); + x509_tls_cached_complete(vrq, flags); } else { purple_debug_error("certificate/x509/tls_cached", "Peer cert did NOT match cached\n"); /* vrq now becomes the problem of the user */ - x509_tls_cached_unknown_peer(vrq); + x509_tls_cached_unknown_peer(vrq, flags); } purple_certificate_destroy(cached_crt); @@ -1324,9 +1501,8 @@ */ static void x509_tls_cached_check_subject_name(PurpleCertificateVerificationRequest *vrq, - gboolean had_ca_pool) + PurpleCertificateInvalidityFlags flags) { - PurpleCertificatePool *tls_peers; PurpleCertificate *peer_crt; GList *chain = vrq->cert_chain; @@ -1337,77 +1513,14 @@ vrq->subject_name) ) { gchar *sn = purple_certificate_get_subject_name(peer_crt); + flags |= PURPLE_CERTIFICATE_NAME_MISMATCH; purple_debug_error("certificate/x509/tls_cached", "Name mismatch: Certificate given for %s " "has a name of %s\n", vrq->subject_name, sn); - - if (had_ca_pool) { - /* Prompt the user to authenticate the certificate */ - /* TODO: Provide the user with more guidance about why he is - being prompted */ - /* vrq will be completed by user_auth */ - gchar *msg; - msg = g_strdup_printf(_("The certificate presented by \"%s\" " - "claims to be from \"%s\" instead. " - "This could mean that you are not " - "connecting to the service you " - "believe you are."), - vrq->subject_name, sn); - - x509_tls_cached_user_auth(vrq, msg); - g_free(msg); - } else { - /* Had no CA pool, so couldn't verify the chain *and* - * the subject name isn't valid. - * I think this is bad enough to warrant a fatal error. It's - * not likely anyway... - */ - purple_notify_error(NULL, /* TODO: Probably wrong. */ - _("SSL Certificate Error"), - _("Invalid certificate chain"), - _("You have no database of root certificates, so " - "this certificate cannot be validated.")); - } - - g_free(sn); - return; - } /* if (name mismatch) */ - - if (!had_ca_pool) { - /* The subject name is correct, but we weren't able to verify the - * chain because there was no pool of root CAs found. Prompt the user - * to validate it. - */ - - /* vrq will be completed by user_auth */ - x509_tls_cached_user_auth(vrq,_("You have no database of root " - "certificates, so this " - "certificate cannot be " - "validated.")); - return; } - /* If we reach this point, the certificate is good. */ - /* Look up the local cache and store it there for future use */ - tls_peers = purple_certificate_find_pool(x509_tls_cached.scheme_name, - "tls_peers"); - - if (tls_peers) { - if (!purple_certificate_pool_store(tls_peers,vrq->subject_name, - peer_crt) ) { - purple_debug_error("certificate/x509/tls_cached", - "FAILED to cache peer certificate\n"); - } - } else { - purple_debug_error("certificate/x509/tls_cached", - "Unable to locate tls_peers certificate " - "cache.\n"); - } - - /* Whew! Done! */ - purple_certificate_verify_complete(vrq, PURPLE_CERTIFICATE_VALID); - + x509_tls_cached_complete(vrq, flags); } /* For when we've never communicated with this party before */ @@ -1415,7 +1528,8 @@ least reprioritize them. */ static void -x509_tls_cached_unknown_peer(PurpleCertificateVerificationRequest *vrq) +x509_tls_cached_unknown_peer(PurpleCertificateVerificationRequest *vrq, + PurpleCertificateInvalidityFlags flags) { PurpleCertificatePool *ca; PurpleCertificate *peer_crt; @@ -1430,22 +1544,13 @@ /* TODO: Figure out a way to check for a bad signature, as opposed to "not self-signed" */ if ( purple_certificate_signed_by(peer_crt, peer_crt) ) { - gchar *msg; + flags |= PURPLE_CERTIFICATE_SELF_SIGNED; purple_debug_info("certificate/x509/tls_cached", "Certificate for %s is self-signed.\n", vrq->subject_name); - /* Prompt the user to authenticate the certificate */ - /* vrq will be completed by user_auth */ - msg = g_strdup_printf(_("The certificate presented by \"%s\" " - "is self-signed. It cannot be " - "automatically checked."), - vrq->subject_name); - - x509_tls_cached_user_auth(vrq,msg); - - g_free(msg); + x509_tls_cached_check_subject_name(vrq, flags); return; } /* if (self signed) */ @@ -1491,32 +1596,11 @@ * If we get here, either the cert matched the stuff right above * or it didn't, in which case we give up and complain to the user. */ - if (chain_validated) { - x509_tls_cached_check_subject_name(vrq, TRUE); - } else { + if (!chain_validated) /* TODO: Tell the user where the chain broke? */ - /* TODO: This error will hopelessly confuse any - non-elite user. */ - gchar *secondary; - - secondary = g_strdup_printf(_("The certificate chain presented" - " for %s is not valid."), - vrq->subject_name); + flags |= PURPLE_CERTIFICATE_INVALID_CHAIN; - /* TODO: Make this error either block the ensuing SSL - connection error until the user dismisses this one, or - stifle it. */ - purple_notify_error(NULL, /* TODO: Probably wrong. */ - _("SSL Certificate Error"), - _("Invalid certificate chain"), - secondary ); - g_free(secondary); - - /* Okay, we're done here */ - purple_certificate_verify_complete(vrq, - PURPLE_CERTIFICATE_INVALID); - } - + x509_tls_cached_check_subject_name(vrq, flags); return; } /* if (signature chain not good) */ @@ -1527,7 +1611,9 @@ "No X.509 Certificate Authority pool " "could be found!\n"); - x509_tls_cached_check_subject_name(vrq, FALSE); + flags |= PURPLE_CERTIFICATE_NO_CA_POOL; + + x509_tls_cached_check_subject_name(vrq, flags); return; } @@ -1540,15 +1626,15 @@ ca_id); ca_crt = purple_certificate_pool_retrieve(ca, ca_id); if ( NULL == ca_crt ) { + flags |= PURPLE_CERTIFICATE_CA_UNKNOWN; + purple_debug_warning("certificate/x509/tls_cached", "Certificate Authority with DN='%s' not " "found. I'll prompt the user, I guess.\n", ca_id); g_free(ca_id); - /* vrq will be completed by user_auth */ - x509_tls_cached_user_auth(vrq,_("The root certificate this " - "one claims to be issued by " - "is unknown to Pidgin.")); + + x509_tls_cached_check_subject_name(vrq, flags); return; } @@ -1579,36 +1665,15 @@ /* TODO: Also mention the CA involved. While I could do this now, a full DN is a little much with which to assault the user's poor, leaky eyes. */ - /* TODO: This error message makes my eyes cross, and I wrote it */ - gchar * secondary = - g_strdup_printf(_("The certificate chain presented by " - "%s does not have a valid digital " - "signature from the Certificate " - "Authority from which it claims to " - "have a signature."), - vrq->subject_name); - - purple_notify_error(NULL, /* TODO: Probably wrong */ - _("SSL Certificate Error"), - _("Invalid certificate authority" - " signature"), - secondary); - g_free(secondary); - - /* Signal "bad cert" */ - purple_certificate_verify_complete(vrq, - PURPLE_CERTIFICATE_INVALID); - - purple_certificate_destroy(ca_crt); - g_byte_array_free(ca_fpr, TRUE); - g_byte_array_free(last_fpr, TRUE); - return; - } /* if (CA signature not good) */ + flags |= PURPLE_CERTIFICATE_INVALID_CHAIN; + } g_byte_array_free(ca_fpr, TRUE); g_byte_array_free(last_fpr, TRUE); - x509_tls_cached_check_subject_name(vrq, TRUE); + purple_certificate_destroy(ca_crt); + + x509_tls_cached_check_subject_name(vrq, flags); } static void @@ -1617,6 +1682,7 @@ const gchar *tls_peers_name = "tls_peers"; /* Name of local cache */ PurpleCertificatePool *tls_peers; time_t now, activation, expiration; + PurpleCertificateInvalidityFlags flags = PURPLE_CERTIFICATE_NO_PROBLEMS; gboolean ret; g_return_if_fail(vrq); @@ -1632,39 +1698,21 @@ now = time(NULL); ret = purple_certificate_get_times(vrq->cert_chain->data, &activation, &expiration); - if (!ret || now > expiration || now < activation) { - gchar *secondary; - - if (!ret) { - purple_debug_error("certificate/x509/tls_cached", - "Failed to get validity times for certificate %s\n", - vrq->subject_name); - secondary = g_strdup_printf(_("Failed to validate expiration time " - "for %s"), vrq->subject_name); - } else if (now > expiration) { - purple_debug_error("certificate/x509/tls_cached", - "Certificate %s expired at %s\n", - vrq->subject_name, ctime(&expiration)); - secondary = g_strdup_printf(_("The certificate for %s is expired."), - vrq->subject_name); - } else { - purple_debug_error("certificate/x509/tls_cached", - "Certificate %s is not yet valid, will be at %s\n", - vrq->subject_name, ctime(&activation)); - secondary = g_strdup_printf(_("The certificate for %s should not " - "yet be in use."), vrq->subject_name); - } - - purple_notify_error(NULL, /* TODO: Probably wrong. */ - _("SSL Certificate Error"), - _("Invalid certificate chain"), - secondary ); - g_free(secondary); - - /* Okay, we're done here */ - purple_certificate_verify_complete(vrq, - PURPLE_CERTIFICATE_INVALID); - return; + if (!ret) { + flags |= PURPLE_CERTIFICATE_EXPIRED | PURPLE_CERTIFICATE_NOT_ACTIVATED; + purple_debug_error("certificate/x509/tls_cached", + "Failed to get validity times for certificate %s\n", + vrq->subject_name); + } else if (now > expiration) { + flags |= PURPLE_CERTIFICATE_EXPIRED; + purple_debug_error("certificate/x509/tls_cached", + "Certificate %s expired at %s\n", + vrq->subject_name, ctime(&expiration)); + } else if (now < activation) { + flags |= PURPLE_CERTIFICATE_NOT_ACTIVATED; + purple_debug_error("certificate/x509/tls_cached", + "Certificate %s is not yet valid, will be at %s\n", + vrq->subject_name, ctime(&activation)); } tls_peers = purple_certificate_find_pool(x509_tls_cached.scheme_name,tls_peers_name); @@ -1674,9 +1722,8 @@ "Couldn't find local peers cache %s\n", tls_peers_name); - /* vrq now becomes the problem of unknown_peer */ - x509_tls_cached_unknown_peer(vrq); + x509_tls_cached_unknown_peer(vrq, flags); return; } @@ -1687,12 +1734,12 @@ purple_debug_info("certificate/x509/tls_cached", "...Found cached cert\n"); /* vrq is now the responsibility of cert_in_cache */ - x509_tls_cached_cert_in_cache(vrq); + x509_tls_cached_cert_in_cache(vrq, flags); } else { purple_debug_warning("certificate/x509/tls_cached", "...Not in cache\n"); /* vrq now becomes the problem of unknown_peer */ - x509_tls_cached_unknown_peer(vrq); + x509_tls_cached_unknown_peer(vrq, flags); } } diff -r b168718d1072 -r 9d620811c67c libpurple/media-gst.h --- a/libpurple/media-gst.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/media-gst.h Sun Aug 23 21:42:12 2009 +0000 @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #ifndef _PURPLE_MEDIA_GST_H_ diff -r b168718d1072 -r 9d620811c67c libpurple/media.c --- a/libpurple/media.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/media.c Sun Aug 23 21:42:12 2009 +0000 @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include @@ -2129,6 +2129,35 @@ } break; } + case GST_MESSAGE_ERROR: { + GstElement *element = GST_ELEMENT(GST_MESSAGE_SRC(msg)); + GstElement *lastElement = NULL; + while (!GST_IS_PIPELINE(element)) { + if (element == media->priv->confbin) { + purple_media_error("media", _("Conference error.")); + purple_media_end(media, NULL, NULL); + break; + } + lastElement = element; + element = GST_ELEMENT_PARENT(element); + } + if (GST_IS_PIPELINE(element)) { + GList *sessions = g_hash_table_get_values(media->priv->sessions); + for (; sessions; sessions = g_list_delete_link(sessions, sessions)) { + PurpleMediaSession *session = sessions->data; + + if (session->src == lastElement) { + if (session->type & PURPLE_MEDIA_AUDIO) + purple_media_error(media, _("Error with your microphone.")); + else + purple_media_error(media, _("Error with your webcam.")); + purple_media_end(media, NULL, NULL); + break; + } + } + g_list_free(sessions); + } + } default: break; } @@ -2730,10 +2759,13 @@ num_params, params, &err); } - if (err) { - purple_debug_error("media", "Error creating stream: %s\n", - err->message); - g_error_free(err); + if (fsstream == NULL) { + purple_debug_error("media", + "Error creating stream: %s\n", + err && err->message ? + err->message : "NULL"); + if (err) + g_error_free(err); g_object_unref(participant); g_hash_table_remove(media->priv->participants, who); purple_media_remove_session(media, session); diff -r b168718d1072 -r 9d620811c67c libpurple/media.h --- a/libpurple/media.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/media.h Sun Aug 23 21:42:12 2009 +0000 @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #ifndef _PURPLE_MEDIA_H_ diff -r b168718d1072 -r 9d620811c67c libpurple/mediamanager.c --- a/libpurple/mediamanager.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/mediamanager.c Sun Aug 23 21:42:12 2009 +0000 @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include "internal.h" diff -r b168718d1072 -r 9d620811c67c libpurple/mediamanager.h --- a/libpurple/mediamanager.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/mediamanager.h Sun Aug 23 21:42:12 2009 +0000 @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #ifndef _PURPLE_MEDIA_MANAGER_H_ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/bonjour/bonjour_ft.c --- a/libpurple/protocols/bonjour/bonjour_ft.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/bonjour/bonjour_ft.c Sun Aug 23 21:42:12 2009 +0000 @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include "internal.h" #include "util.h" diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/bonjour/bonjour_ft.h --- a/libpurple/protocols/bonjour/bonjour_ft.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/bonjour/bonjour_ft.h Sun Aug 23 21:42:12 2009 +0000 @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef _BONJOUR_FT_H_ #define _BONJOUR_FT_H_ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/adhoccommands.c --- a/libpurple/protocols/jabber/adhoccommands.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/adhoccommands.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/adhoccommands.h --- a/libpurple/protocols/jabber/adhoccommands.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/adhoccommands.h Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/auth.c --- a/libpurple/protocols/jabber/auth.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/auth.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/auth.h --- a/libpurple/protocols/jabber/auth.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/auth.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/bosh.c --- a/libpurple/protocols/jabber/bosh.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/bosh.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2008, Tobias Markmann + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/bosh.h --- a/libpurple/protocols/jabber/bosh.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/bosh.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2008, Tobias Markmann + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/buddy.c --- a/libpurple/protocols/jabber/buddy.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/buddy.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -910,12 +912,14 @@ (binval = xmlnode_get_child(photo, "BINVAL"))) { gsize size; char *bintext = xmlnode_get_data(binval); - guchar *data = purple_base64_decode(bintext, &size); - g_free(bintext); + if (bintext) { + guchar *data = purple_base64_decode(bintext, &size); + g_free(bintext); - if (data) { - vcard_hash = jabber_calculate_data_sha1sum(data, size); - g_free(data); + if (data) { + vcard_hash = jabber_calculate_data_sha1sum(data, size); + g_free(data); + } } } diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/buddy.h --- a/libpurple/protocols/jabber/buddy.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/buddy.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/caps.c --- a/libpurple/protocols/jabber/caps.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/caps.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ @@ -468,8 +470,10 @@ } if (!hash || strcmp(hash, userdata->ver)) { - purple_debug_warning("jabber", "Could not validate caps info from %s\n", - xmlnode_get_attrib(packet, "from")); + purple_debug_warning("jabber", "Could not validate caps info from " + "%s. Expected %s, got %s\n", + xmlnode_get_attrib(packet, "from"), + userdata->ver, hash ? hash : "(null)"); userdata->cb(NULL, NULL, userdata->cb_data); jabber_caps_client_info_destroy(info); diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/caps.h --- a/libpurple/protocols/jabber/caps.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/caps.h Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/chat.c --- a/libpurple/protocols/jabber/chat.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/chat.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/chat.h --- a/libpurple/protocols/jabber/chat.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/chat.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/data.c --- a/libpurple/protocols/jabber/data.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/data.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,4 +1,8 @@ /* + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -11,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/data.h --- a/libpurple/protocols/jabber/data.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/data.h Sun Aug 23 21:42:12 2009 +0000 @@ -1,4 +1,8 @@ /* + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -11,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #ifndef PURPLE_JABBER_DATA_H diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/disco.c --- a/libpurple/protocols/jabber/disco.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/disco.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Service Discovery * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/disco.h --- a/libpurple/protocols/jabber/disco.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/disco.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/google.c --- a/libpurple/protocols/jabber/google.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/google.c Sun Aug 23 21:42:12 2009 +0000 @@ -91,20 +91,6 @@ } static void -google_session_send_terminate(GoogleSession *session) -{ - xmlnode *sess; - JabberIq *iq = jabber_iq_new(session->js, JABBER_IQ_SET); - - xmlnode_set_attrib(iq->node, "to", session->remote_jid); - sess = google_session_create_xmlnode(session, "terminate"); - xmlnode_insert_child(iq->node, sess); - - jabber_iq_send(iq); - google_session_destroy(session); -} - -static void google_session_send_candidates(PurpleMedia *media, gchar *session_id, gchar *participant, GoogleSession *session) { @@ -398,6 +384,16 @@ purple_media_set_prpl_data(session->media, session); + g_signal_connect_swapped(G_OBJECT(session->media), + "candidates-prepared", + G_CALLBACK(google_session_ready), session); + g_signal_connect_swapped(G_OBJECT(session->media), "codecs-changed", + G_CALLBACK(google_session_ready), session); + g_signal_connect(G_OBJECT(session->media), "state-changed", + G_CALLBACK(google_session_state_changed_cb), session); + g_signal_connect(G_OBJECT(session->media), "stream-info", + G_CALLBACK(google_session_stream_info_cb), session); + params = jabber_google_session_get_params(js, &num_params); if (purple_media_add_stream(session->media, "google-voice", @@ -408,23 +404,11 @@ session->remote_jid, PURPLE_MEDIA_VIDEO, TRUE, "nice", num_params, params) == FALSE)) { purple_media_error(session->media, "Error adding stream."); - purple_media_stream_info(session->media, - PURPLE_MEDIA_INFO_HANGUP, NULL, NULL, TRUE); - google_session_destroy(session); + purple_media_end(session->media, NULL, NULL); g_free(params); return FALSE; } - g_signal_connect_swapped(G_OBJECT(session->media), - "candidates-prepared", - G_CALLBACK(google_session_ready), session); - g_signal_connect_swapped(G_OBJECT(session->media), "codecs-changed", - G_CALLBACK(google_session_ready), session); - g_signal_connect(G_OBJECT(session->media), "state-changed", - G_CALLBACK(google_session_state_changed_cb), session); - g_signal_connect(G_OBJECT(session->media), "stream-info", - G_CALLBACK(google_session_stream_info_cb), session); - g_free(params); return (session->media != NULL) ? TRUE : FALSE; @@ -466,6 +450,16 @@ purple_media_set_prpl_data(session->media, session); + g_signal_connect_swapped(G_OBJECT(session->media), + "candidates-prepared", + G_CALLBACK(google_session_ready), session); + g_signal_connect_swapped(G_OBJECT(session->media), "codecs-changed", + G_CALLBACK(google_session_ready), session); + g_signal_connect(G_OBJECT(session->media), "state-changed", + G_CALLBACK(google_session_state_changed_cb), session); + g_signal_connect(G_OBJECT(session->media), "stream-info", + G_CALLBACK(google_session_stream_info_cb), session); + params = jabber_google_session_get_params(js, &num_params); if (purple_media_add_stream(session->media, "google-voice", @@ -477,8 +471,7 @@ FALSE, "nice", num_params, params) == FALSE)) { purple_media_error(session->media, "Error adding stream."); purple_media_stream_info(session->media, - PURPLE_MEDIA_INFO_HANGUP, NULL, NULL, TRUE); - google_session_send_terminate(session); + PURPLE_MEDIA_INFO_REJECT, NULL, NULL, TRUE); g_free(params); return FALSE; } @@ -535,18 +528,6 @@ purple_media_codec_list_free(codecs); purple_media_codec_list_free(video_codecs); - g_signal_connect_swapped(G_OBJECT(session->media), "accepted", - G_CALLBACK(google_session_ready), session); - g_signal_connect_swapped(G_OBJECT(session->media), - "candidates-prepared", - G_CALLBACK(google_session_ready), session); - g_signal_connect_swapped(G_OBJECT(session->media), "codecs-changed", - G_CALLBACK(google_session_ready), session); - g_signal_connect(G_OBJECT(session->media), "state-changed", - G_CALLBACK(google_session_state_changed_cb), session); - g_signal_connect(G_OBJECT(session->media), "stream-info", - G_CALLBACK(google_session_stream_info_cb), session); - result = jabber_iq_new(js, JABBER_IQ_RESULT); jabber_iq_set_id(result, iq_id); xmlnode_set_attrib(result->node, "to", session->remote_jid); @@ -778,8 +759,7 @@ session->js = js; session->remote_jid = g_strdup(session->id.initiator); - if (!google_session_handle_initiate(js, session, session_node, iq_id)) - google_session_destroy(session); + google_session_handle_initiate(js, session, session_node, iq_id); } #endif /* USE_VV */ @@ -1316,6 +1296,7 @@ purple_debug_error("jabber", "Google STUN lookup failed: %s\n", error_message); g_slist_free(hosts); + js->stun_query = NULL; return; } @@ -1334,18 +1315,16 @@ port = ntohs(((struct sockaddr_in *) addr)->sin_port); } - if (js) { - if (js->stun_ip) { - g_free(js->stun_ip); - } - js->stun_ip = g_strdup(dst); - purple_debug_info("jabber", "set Google STUN IP address: %s\n", dst); - js->stun_port = port; - purple_debug_info("jabber", "set Google STUN port: %d\n", port); - purple_debug_info("jabber", "set Google STUN port: %d\n", port); - /* unmark ongoing query */ - js->stun_query = NULL; - } + if (js->stun_ip) + g_free(js->stun_ip); + js->stun_ip = g_strdup(dst); + js->stun_port = port; + + purple_debug_info("jabber", "set Google STUN IP/port address: " + "%s:%d\n", dst, port); + + /* unmark ongoing query */ + js->stun_query = NULL; } while (hosts != NULL) { diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/ibb.c --- a/libpurple/protocols/jabber/ibb.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/ibb.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,4 +1,8 @@ /* + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -11,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include "internal.h" diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/ibb.h --- a/libpurple/protocols/jabber/ibb.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/ibb.h Sun Aug 23 21:42:12 2009 +0000 @@ -1,4 +1,8 @@ /* + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -11,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #ifndef PURPLE_JABBER_IBB_H_ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/iq.c --- a/libpurple/protocols/jabber/iq.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/iq.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/iq.h --- a/libpurple/protocols/jabber/iq.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/iq.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jabber.h --- a/libpurple/protocols/jabber/jabber.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/content.c --- a/libpurple/protocols/jabber/jingle/content.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/content.c Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/content.h --- a/libpurple/protocols/jabber/jingle/content.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/content.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/iceudp.c --- a/libpurple/protocols/jabber/jingle/iceudp.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/iceudp.c Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/iceudp.h --- a/libpurple/protocols/jabber/jingle/iceudp.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/iceudp.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/jingle.c --- a/libpurple/protocols/jabber/jingle/jingle.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/jingle.c Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple - Jabber Protocol Plugin * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/jingle.h --- a/libpurple/protocols/jabber/jingle/jingle.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/jingle.h Sun Aug 23 21:42:12 2009 +0000 @@ -1,6 +1,10 @@ /* * @file jingle.h * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/rawudp.c --- a/libpurple/protocols/jabber/jingle/rawudp.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/rawudp.c Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/rawudp.h --- a/libpurple/protocols/jabber/jingle/rawudp.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/rawudp.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/rtp.c --- a/libpurple/protocols/jabber/jingle/rtp.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/rtp.c Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -607,8 +611,11 @@ is_creator = !jingle_session_is_initiator(session); g_free(creator); - purple_media_add_stream(media, name, remote_jid, - type, is_creator, transmitter, num_params, params); + if(!purple_media_add_stream(media, name, remote_jid, + type, is_creator, transmitter, num_params, params)) { + purple_media_end(media, NULL, NULL); + return FALSE; + } g_free(name); g_free(media_type); diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/rtp.h --- a/libpurple/protocols/jabber/jingle/rtp.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/rtp.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/session.c --- a/libpurple/protocols/jabber/jingle/session.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/session.c Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/session.h --- a/libpurple/protocols/jabber/jingle/session.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/session.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/transport.c --- a/libpurple/protocols/jabber/jingle/transport.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/transport.c Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jingle/transport.h --- a/libpurple/protocols/jabber/jingle/transport.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/transport.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,6 +3,10 @@ * * purple * + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jutil.c --- a/libpurple/protocols/jabber/jutil.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jutil.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -504,8 +506,23 @@ JabberStream *js = gc ? gc->proto_data : NULL; static char buf[3072]; /* maximum legal length of a jabber jid */ JabberID *jid; + char *tmp; + size_t len = strlen(in); - jid = jabber_id_new(in); + /* + * If the JID ends with a '/', jabber_id_new is going to throw it away as + * invalid. However, this is what the UI generates for a JID with no + * resource. Deal with that by dropping away the '/'... + */ + if (in[len - 1] == '/') + tmp = g_strndup(in, len - 1); + else + tmp = (gchar *)in; + + jid = jabber_id_new(tmp); + + if (tmp != in) + g_free(tmp); if(!jid) return NULL; diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/jutil.h --- a/libpurple/protocols/jabber/jutil.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/jutil.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/message.c --- a/libpurple/protocols/jabber/message.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/message.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -87,8 +89,12 @@ } if(!jm->xhtml && !jm->body) { - if (jbr) - jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; + if (jbr) { + if (jm->chat_state != JM_STATE_NONE) + jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; + else + jbr->chat_states = JABBER_CHAT_STATES_UNSUPPORTED; + } if(JM_STATE_COMPOSING == jm->chat_state) { serv_got_typing(jm->js->gc, from, 0, PURPLE_TYPING); diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/message.h --- a/libpurple/protocols/jabber/message.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/message.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/oob.c --- a/libpurple/protocols/jabber/oob.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/oob.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/oob.h --- a/libpurple/protocols/jabber/oob.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/oob.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/parser.c --- a/libpurple/protocols/jabber/parser.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/parser.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber XML parser stuff * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/parser.h --- a/libpurple/protocols/jabber/parser.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/parser.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/pep.c --- a/libpurple/protocols/jabber/pep.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/pep.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/pep.h --- a/libpurple/protocols/jabber/pep.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/pep.h Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/ping.c --- a/libpurple/protocols/jabber/ping.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/ping.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/ping.h --- a/libpurple/protocols/jabber/ping.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/ping.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +19,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #ifndef PURPLE_JABBER_PING_H_ #define PURPLE_JABBER_PING_H_ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/presence.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -469,10 +471,17 @@ jbr->commands_fetched = TRUE; } +#if 0 + /* + * Versions of libpurple before 2.6.0 didn't advertise this capability, so + * we can't yet use Entity Capabilities to determine whether or not the + * other client supports Entity Capabilities. + */ if (jabber_resource_has_capability(jbr, "http://jabber.org/protocol/chatstates")) jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED; else jbr->chat_states = JABBER_CHAT_STATES_UNSUPPORTED; +#endif out: g_free(userdata->from); diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/presence.h --- a/libpurple/protocols/jabber/presence.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/presence.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/roster.c --- a/libpurple/protocols/jabber/roster.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/roster.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/roster.h --- a/libpurple/protocols/jabber/roster.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/roster.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/si.c --- a/libpurple/protocols/jabber/si.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/si.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/si.h --- a/libpurple/protocols/jabber/si.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/si.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/useravatar.c --- a/libpurple/protocols/jabber/useravatar.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/useravatar.c Sun Aug 23 21:42:12 2009 +0000 @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/useravatar.h --- a/libpurple/protocols/jabber/useravatar.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/useravatar.h Sun Aug 23 21:42:12 2009 +0000 @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/usermood.c --- a/libpurple/protocols/jabber/usermood.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/usermood.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/usermood.h --- a/libpurple/protocols/jabber/usermood.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/usermood.h Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/usernick.c --- a/libpurple/protocols/jabber/usernick.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/usernick.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/usernick.h --- a/libpurple/protocols/jabber/usernick.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/usernick.h Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/usertune.c --- a/libpurple/protocols/jabber/usertune.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/usertune.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/usertune.h --- a/libpurple/protocols/jabber/usertune.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/usertune.h Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2007, Andreas Monitzer + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA * */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/xdata.c --- a/libpurple/protocols/jabber/xdata.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/xdata.c Sun Aug 23 21:42:12 2009 +0000 @@ -1,7 +1,9 @@ /* * purple - Jabber Protocol Plugin * - * Copyright (C) 2003, Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/jabber/xdata.h --- a/libpurple/protocols/jabber/xdata.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/jabber/xdata.h Sun Aug 23 21:42:12 2009 +0000 @@ -3,7 +3,9 @@ * * purple * - * Copyright (C) 2003 Nathan Walp + * Purple is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/cmdproc.h --- a/libpurple/protocols/msn/cmdproc.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/cmdproc.h Sun Aug 23 21:42:12 2009 +0000 @@ -71,6 +71,4 @@ void msn_cmdproc_process_payload(MsnCmdProc *cmdproc, char *payload, int payload_len); -void msn_cmdproc_disconnect(MsnCmdProc *cmdproc); - #endif /* _MSN_CMDPROC_H_ */ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/contact.c --- a/libpurple/protocols/msn/contact.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/contact.c Sun Aug 23 21:42:12 2009 +0000 @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include "msn.h" diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/contact.h --- a/libpurple/protocols/msn/contact.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/contact.h Sun Aug 23 21:42:12 2009 +0000 @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef _MSN_CONTACT_H_ #define _MSN_CONTACT_H_ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/msn.c --- a/libpurple/protocols/msn/msn.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/msn.c Sun Aug 23 21:42:12 2009 +0000 @@ -89,6 +89,7 @@ typedef struct { char *smile; + PurpleSmiley *ps; MsnObject *obj; } MsnEmoticon; @@ -265,6 +266,7 @@ MsnSession *session; MsnCmdProc *cmdproc; MsnPage *page; + MsnMessage *msg; MsnUser *user; char *payload = NULL; const char *mobile_number = NULL; @@ -295,6 +297,9 @@ msn_transaction_set_payload(trans, payload, payload_len); g_free(payload); + msg = msn_message_new_plain(entry); + msn_transaction_set_data(trans, msg); + msn_page_destroy(page); msn_cmdproc_send_trans(cmdproc, trans); @@ -1078,12 +1083,10 @@ strobj = msn_object_to_string(obj); if (current) - g_string_append_printf(current, "\t%s\t%s", - emoticon->smile, strobj); + g_string_append_printf(current, "\t%s\t%s", emoticon->smile, strobj); else { current = g_string_new(""); - g_string_printf(current,"%s\t%s", - emoticon->smile, strobj); + g_string_printf(current, "%s\t%s", emoticon->smile, strobj); } g_free(strobj); @@ -1141,6 +1144,7 @@ emoticon = g_new0(MsnEmoticon, 1); emoticon->smile = g_strdup(purple_smiley_get_shortcut(smiley)); + emoticon->ps = smiley; emoticon->obj = msn_object_new_from_image(img, purple_imgstore_get_filename(img), username, MSN_OBJECT_EMOTICON); @@ -1163,7 +1167,7 @@ smileys = msn_msg_grab_emoticons(msg->body, username); while (smileys) { - smile = (MsnEmoticon*)smileys->data; + smile = (MsnEmoticon *)smileys->data; emoticons = msn_msg_emoticon_add(emoticons, smile); msn_emoticon_destroy(smile); smileys = g_slist_delete_link(smileys, smileys); @@ -1714,13 +1718,19 @@ { PurpleAccount *account; MsnSession *session; + const char *username; MsnSwitchBoard *swboard; MsnMessage *msg; char *msgformat; char *msgtext; + size_t msglen; + MsnEmoticon *smile; + GSList *smileys; + GString *emoticons = NULL; account = purple_connection_get_account(gc); session = gc->proto_data; + username = purple_account_get_username(account); swboard = msn_session_find_swboard_with_id(session, id); if (swboard == NULL) @@ -1732,8 +1742,9 @@ swboard->flag |= MSN_SB_FLAG_IM; msn_import_html(message, &msgformat, &msgtext); - - if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564) + msglen = strlen(msgtext); + + if ((msglen == 0) || (msglen + strlen(msgformat) + strlen(VERSION) > 1564)) { g_free(msgformat); g_free(msgtext); @@ -1743,6 +1754,29 @@ msg = msn_message_new_plain(msgtext); msn_message_set_attr(msg, "X-MMS-IM-Format", msgformat); + + smileys = msn_msg_grab_emoticons(msg->body, username); + while (smileys) { + smile = (MsnEmoticon *)smileys->data; + emoticons = msn_msg_emoticon_add(emoticons, smile); + if (purple_conv_custom_smiley_add(swboard->conv, smile->smile, + "sha1", purple_smiley_get_checksum(smile->ps), + FALSE)) { + gconstpointer data; + size_t len; + data = purple_smiley_get_data(smile->ps, &len); + purple_conv_custom_smiley_write(swboard->conv, smile->smile, data, len); + purple_conv_custom_smiley_close(swboard->conv, smile->smile); + } + msn_emoticon_destroy(smile); + smileys = g_slist_delete_link(smileys, smileys); + } + + if (emoticons) { + msn_send_emoticons(swboard, emoticons); + g_string_free(emoticons, TRUE); + } + msn_switchboard_send_msg(swboard, msg, FALSE); msn_message_destroy(msg); diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/notification.c --- a/libpurple/protocols/msn/notification.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/notification.c Sun Aug 23 21:42:12 2009 +0000 @@ -599,6 +599,8 @@ /* Decrement the count for unknown results so that we'll continue login. Also, need to finish the login process here as well, because ADL OK will not be called. */ + if (purple_debug_is_verbose()) + purple_debug_info("msn", "ADL/FQY count is %d\n", session->adl_fqy); if (--session->adl_fqy == 0) msn_session_finish_login(session); return; @@ -680,6 +682,9 @@ /* ADL's are returned all-together */ session->adl_fqy++; + if (purple_debug_is_verbose()) + purple_debug_info("msn", "Posting ADL, count is %d\n", + session->adl_fqy); msn_notification_post_adl(session->notification->cmdproc, payload, payload_len); @@ -694,6 +699,9 @@ } else { /* FQY's are returned one-at-a-time */ session->adl_fqy++; + if (purple_debug_is_verbose()) + purple_debug_info("msn", "Adding FQY address, count is %d\n", + session->adl_fqy); msn_add_contact_xml(session, fqy_node, user->passport, 0, user->networkid); @@ -718,6 +726,9 @@ /* ADL's are returned all-together */ session->adl_fqy++; + if (purple_debug_is_verbose()) + purple_debug_info("msn", "Posting ADL, count is %d\n", + session->adl_fqy); msn_notification_post_adl(session->notification->cmdproc, payload, payload_len); @@ -809,6 +820,9 @@ if (!strcmp(cmd->params[1], "OK")) { /* ADL ack */ + if (purple_debug_is_verbose()) + purple_debug_info("msn", "ADL ACK, count is %d\n", + session->adl_fqy); if (--session->adl_fqy == 0) msn_session_finish_login(session); } else { @@ -1178,14 +1192,36 @@ id = xmlnode_get_attrib(msg, "id"); if (id && !strcmp(id, "407")) { - /* TODO: Use this to NAK the transaction, maybe print the text, too. - unsigned int trId; - id = xmlnode_get_attrib(payloadNode, "id"); - trId = atol(id); - */ - purple_conv_present_error(who, gc->account, - _("Mobile message was not sent because it was too long.")); + PurpleConversation *conv + = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, + who, gc->account); + if (conv != NULL) { + purple_conversation_write(conv, NULL, + _("Mobile message was not sent because it was too long."), + PURPLE_MESSAGE_ERROR, time(NULL)); + + if ((id = xmlnode_get_attrib(payloadNode, "id")) != NULL) { + unsigned int trId = atol(id); + MsnTransaction *trans; + MsnMessage *msg; + trans = msn_history_find(cmdproc->history, trId); + msg = (MsnMessage *)trans->data; + + if (msg) { + char *body_str = msn_message_to_string(msg); + char *body_enc = g_markup_escape_text(body_str, -1); + + purple_conversation_write(conv, NULL, body_enc, + PURPLE_MESSAGE_RAW, time(NULL)); + + g_free(body_str); + g_free(body_enc); + msn_message_destroy(msg); + trans->data = NULL; + } + } + } } else { serv_got_im(gc, who, text, 0, time(NULL)); } diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/oim.c --- a/libpurple/protocols/msn/oim.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/oim.c Sun Aug 23 21:42:12 2009 +0000 @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include "msn.h" #include "soap.h" diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/oim.h --- a/libpurple/protocols/msn/oim.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/oim.h Sun Aug 23 21:42:12 2009 +0000 @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef _MSN_OIM_H_ #define _MSN_OIM_H_ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/slp.c --- a/libpurple/protocols/msn/slp.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/slp.c Sun Aug 23 21:42:12 2009 +0000 @@ -403,9 +403,8 @@ if (conv) { char *buf; buf = g_strdup_printf( - _("%s has sent you a webcam " - "invite, which is not yet " - "supported."), from); + _("%s invited you to view his/her webcam, but " + "this is not yet supported."), from); purple_conversation_write(conv, NULL, buf, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NOTIFY, diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/soap.c --- a/libpurple/protocols/msn/soap.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/soap.c Sun Aug 23 21:42:12 2009 +0000 @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include "internal.h" diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/msn/soap.h --- a/libpurple/protocols/msn/soap.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/msn/soap.h Sun Aug 23 21:42:12 2009 +0000 @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef _MSN_SOAP_H diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/qq/qq_crypt.c --- a/libpurple/protocols/qq/qq_crypt.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/qq/qq_crypt.c Sun Aug 23 21:42:12 2009 +0000 @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * * * QQ encryption algorithm diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/qq/qq_crypt.h --- a/libpurple/protocols/qq/qq_crypt.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/qq/qq_crypt.h Sun Aug 23 21:42:12 2009 +0000 @@ -19,7 +19,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef _QQ_CRYPT_H_ diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/yahoo/libyahoo.c --- a/libpurple/protocols/yahoo/libyahoo.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/yahoo/libyahoo.c Sun Aug 23 21:42:12 2009 +0000 @@ -321,13 +321,15 @@ option = purple_account_option_string_new(_("Chat room locale"), "room_list_locale", YAHOO_ROOMLIST_LOCALE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = purple_account_option_bool_new(_("Ignore conference and chatroom invitations"), "ignore_invites", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); + option = purple_account_option_bool_new(_("Use account proxy for SSL connections"), "proxy_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - #if 0 option = purple_account_option_string_new(_("Chat room list URL"), "room_list", YAHOO_ROOMLIST_URL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/yahoo/libyahoojp.c --- a/libpurple/protocols/yahoo/libyahoojp.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/yahoo/libyahoojp.c Sun Aug 23 21:42:12 2009 +0000 @@ -217,13 +217,15 @@ option = purple_account_option_string_new(_("Chat room locale"), "room_list_locale", YAHOOJP_ROOMLIST_LOCALE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = purple_account_option_bool_new(_("Ignore conference and chatroom invitations"), "ignore_invites", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); + option = purple_account_option_bool_new(_("Use account proxy for SSL connections"), "proxy_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - #if 0 option = purple_account_option_string_new(_("Chat room list URL"), "room_list", YAHOO_ROOMLIST_URL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/yahoo/libymsg.c --- a/libpurple/protocols/yahoo/libymsg.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/yahoo/libymsg.c Sun Aug 23 21:42:12 2009 +0000 @@ -1839,11 +1839,12 @@ PurpleAccount *account = purple_connection_get_account(gc); char *url = NULL; gboolean yahoojp = yahoo_is_japan(account); + gboolean proxy_ssl = purple_account_get_bool(account, "proxy_ssl", FALSE); url = g_strdup_printf(yahoojp ? YAHOOJP_LOGIN_URL : YAHOO_LOGIN_URL, token); - url_data = purple_util_fetch_url_request_len_with_account(account, url, - TRUE, YAHOO_CLIENT_USERAGENT, TRUE, NULL, FALSE, -1, - yahoo_auth16_stage2, auth_data); + url_data = purple_util_fetch_url_request_len_with_account( + proxy_ssl ? account : NULL, url, TRUE, YAHOO_CLIENT_USERAGENT, + TRUE, NULL, FALSE, -1, yahoo_auth16_stage2, auth_data); g_free(url); g_free(token); } @@ -1852,12 +1853,14 @@ static void yahoo_auth16_stage1(PurpleConnection *gc, const char *seed) { + PurpleAccount *account = purple_connection_get_account(gc); PurpleUtilFetchUrlData *url_data = NULL; struct yahoo_auth_data *auth_data = NULL; char *url = NULL; char *encoded_username; char *encoded_password; - gboolean yahoojp; + gboolean yahoojp = yahoo_is_japan(account); + gboolean proxy_ssl = purple_account_get_bool(account, "proxy_ssl", FALSE); purple_debug_info("yahoo", "Authentication: In yahoo_auth16_stage1\n"); @@ -1866,7 +1869,6 @@ return; } - yahoojp = yahoo_is_japan(purple_connection_get_account(gc)); auth_data = g_new0(struct yahoo_auth_data, 1); auth_data->gc = gc; auth_data->seed = g_strdup(seed); @@ -1879,7 +1881,7 @@ g_free(encoded_username); url_data = purple_util_fetch_url_request_len_with_account( - purple_connection_get_account(gc), url, TRUE, + proxy_ssl ? account : NULL, url, TRUE, YAHOO_CLIENT_USERAGENT, TRUE, NULL, FALSE, -1, yahoo_auth16_stage1_cb, auth_data); @@ -4498,8 +4500,6 @@ if (purple_presence_is_idle(presence)) yahoo_packet_hash_str(pkt, 47, "2"); - else if (!purple_status_is_available(status)) - yahoo_packet_hash_str(pkt, 47, "1"); yahoo_packet_send_and_free(pkt, yd); @@ -4520,6 +4520,7 @@ struct yahoo_packet *pkt = NULL; char *msg = NULL, *msg2 = NULL; PurpleStatus *status = NULL; + gboolean invisible = FALSE; if (idle && yd->current_status != YAHOO_STATUS_CUSTOM) yd->current_status = YAHOO_STATUS_IDLE; @@ -4528,9 +4529,15 @@ yd->current_status = get_yahoo_status_from_purple_status(status); } + invisible = !( purple_presence_is_available(purple_account_get_presence(purple_connection_get_account(gc))) ); + pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_STATUS_UPDATE, YAHOO_STATUS_AVAILABLE, yd->session_id); - yahoo_packet_hash_int(pkt, 10, yd->current_status); + if (!idle && invisible) + yahoo_packet_hash_int(pkt, 10, YAHOO_STATUS_AVAILABLE); + else + yahoo_packet_hash_int(pkt, 10, yd->current_status); + if (yd->current_status == YAHOO_STATUS_CUSTOM) { const char *tmp; if (status == NULL) @@ -4553,8 +4560,6 @@ if (idle) yahoo_packet_hash_str(pkt, 47, "2"); - else if (!purple_presence_is_available(purple_account_get_presence(purple_connection_get_account(gc)))) - yahoo_packet_hash_str(pkt, 47, "1"); yahoo_packet_send_and_free(pkt, yd); diff -r b168718d1072 -r 9d620811c67c libpurple/protocols/yahoo/util.c --- a/libpurple/protocols/yahoo/util.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/protocols/yahoo/util.c Sun Aug 23 21:42:12 2009 +0000 @@ -513,7 +513,7 @@ int i, j; gboolean no_more_gt_brackets = FALSE; const char *match; - gchar *xmlstr1, *xmlstr2; + gchar *xmlstr1, *xmlstr2, *esc; x_len = strlen(x); html = xmlnode_new("html"); @@ -611,7 +611,6 @@ if (match == NULL) { /* Unknown tag. The user probably typed a less-than sign */ g_string_append_c(cdata, x[i]); - no_more_gt_brackets = TRUE; g_free(tag); g_free(tag_name); break; @@ -660,7 +659,10 @@ xmlstr2 = g_strndup(xmlstr1 + 6, strlen(xmlstr1) - 13); g_free(xmlstr1); - purple_debug_misc("yahoo", "yahoo_codes_to_html(%s)=%s\n", x, xmlstr2); + esc = g_strescape(x, NULL); + purple_debug_misc("yahoo", "yahoo_codes_to_html(%s)=%s\n", esc, xmlstr2); + g_free(esc); + return xmlstr2; } @@ -688,8 +690,8 @@ } } -static void parse_font_tag(const char *src, GString *dest, const char *tag_name, const char *tag, - int src_len, GSList **colors, GSList **tags) +static void parse_font_tag(GString *dest, const char *tag_name, const char *tag, + GSList **colors, GSList **tags) { const char *start; const char *end; @@ -709,6 +711,14 @@ g_string_append_printf(dest, "\033[%sm", attribute); *colors = g_slist_prepend(*colors, g_strdup_printf("\033[%sm", attribute)); + } else { + /* We need to add a value to the colors stack even if we're not + * setting a color because we ALWAYS pop exactly 1 element from + * this stack for every tag. If we don't add anything + * then we'll pop something that we shouldn't when we hit this + * corresponding . */ + *colors = g_slist_prepend(*colors, + *colors ? g_strdup((*colors)->data) : g_strdup("\033[#000000m")); } attribute = g_datalist_get_data(&attributes, "face"); @@ -761,7 +771,7 @@ gboolean is_closing_tag; CurrentMsgState current_state; - bzero(¤t_state, sizeof(current_state)); + memset(¤t_state, 0, sizeof(current_state)); src_len = strlen(src); dest = g_string_sized_new(src_len); @@ -831,7 +841,7 @@ j = end - src + 3; } else if (g_str_equal(tag_name, "font")) { - parse_font_tag(src, dest, tag_name, tag, src_len, &colors, &tags); + parse_font_tag(dest, tag_name, tag, &colors, &tags); } else if (g_str_equal(tag_name, "b")) { g_string_append(dest, "\033[1m"); current_state.bold = TRUE; @@ -865,11 +875,9 @@ char *etag = tags->data; tags = g_slist_delete_link(tags, tags); g_string_append(dest, etag); - if (g_str_equal(etag, "")) { - if (colors != NULL) { - g_free(colors->data); - colors = g_slist_delete_link(colors, colors); - } + if (colors != NULL) { + g_free(colors->data); + colors = g_slist_delete_link(colors, colors); } g_free(etag); } diff -r b168718d1072 -r 9d620811c67c libpurple/smiley.c --- a/libpurple/smiley.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/smiley.c Sun Aug 23 21:42:12 2009 +0000 @@ -80,7 +80,7 @@ * XML descriptor file layout * ****************************************************************************** * - * Althought we are creating the profile XML structure here, now we + * Although we are creating the profile XML structure here, now we * won't handle it. * So, we just add one profile named "default" that has no associated * account elements, and have only the smiley_set that will contain @@ -163,14 +163,14 @@ } static xmlnode * -smileys_to_xmlnode() +smileys_to_xmlnode(void) { xmlnode *root_node, *profile_node, *smileyset_node; root_node = xmlnode_new(XML_ROOT_TAG); xmlnode_set_attrib(root_node, "version", "1.0"); - /* See the top comment's above to understand why initial tag elements + /* See the top comments above to understand why initial tag elements * are not being considered by now. */ profile_node = xmlnode_new(XML_PROFILE_TAG); if (profile_node) { @@ -188,7 +188,7 @@ } static void -sync_smileys() +sync_smileys(void) { xmlnode *root_node; char *data; @@ -216,7 +216,7 @@ } static void -purple_smileys_save() +purple_smileys_save(void) { if (save_timer == 0) save_timer = purple_timeout_add_seconds(5, save_smileys_cb, NULL); @@ -248,7 +248,7 @@ } static void -purple_smileys_load() +purple_smileys_load(void) { xmlnode *root_node, *profile_node; xmlnode *smileyset_node = NULL; @@ -262,7 +262,7 @@ if (root_node == NULL) return; - /* See the top comment's above to understand why initial tag elements + /* See the top comments above to understand why initial tag elements * are not being considered by now. */ profile_node = xmlnode_get_child(root_node, XML_PROFILE_TAG); if (profile_node) @@ -456,7 +456,7 @@ } /********************************************************************* - * Other Stuff * + * Other Stuff * *********************************************************************/ static char *get_file_full_path(const char *filename) @@ -876,7 +876,7 @@ } void -purple_smileys_init() +purple_smileys_init(void) { smiley_shortcut_index = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); smiley_checksum_index = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); @@ -887,7 +887,7 @@ } void -purple_smileys_uninit() +purple_smileys_uninit(void) { if (save_timer != 0) { purple_timeout_remove(save_timer); diff -r b168718d1072 -r 9d620811c67c libpurple/smiley.h --- a/libpurple/smiley.h Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/smiley.h Sun Aug 23 21:42:12 2009 +0000 @@ -95,7 +95,7 @@ purple_smiley_new_from_file(const char *shortcut, const char *filepath); /** - * Destroys the custom smiley and release the associated resources. + * Destroys the custom smiley and releases the associated resources. * * @param smiley The custom smiley. */ @@ -183,7 +183,7 @@ * If the custom smiley has data and the file exists in the cache, this * will return a full path to the cached file. * - * In general, it is not appropriate to be poking in the file cached + * In general, it is not appropriate to be poking in the file cache * directly. If you find yourself wanting to use this function, think * very long and hard about it, and then don't. * diff -r b168718d1072 -r 9d620811c67c libpurple/tests/test_yahoo_util.c --- a/libpurple/tests/test_yahoo_util.c Sun Aug 23 21:40:34 2009 +0000 +++ b/libpurple/tests/test_yahoo_util.c Sun Aug 23 21:42:12 2009 +0000 @@ -100,6 +100,8 @@ yahoo_codes_to_html("test")); assert_string_equal_free("test", yahoo_codes_to_html("\x1B[35mtest")); + assert_string_equal_free(":<", + yahoo_codes_to_html(":<")); #endif /* !USE_CSS_FORMATTING */ } END_TEST @@ -149,7 +151,7 @@ assert_string_equal_free("mark@example.com", yahoo_html_to_codes("mark@example.com")); #if 0 - assert_string_equal_free("http://pidgin.im/", + assert_string_equal_free("Pidgin (http://pidgin.im/)", yahoo_html_to_codes("Pidgin")); #endif @@ -160,12 +162,24 @@ /* font color */ assert_string_equal_free("\x1B[#E71414mred\x1B[#000000m", yahoo_html_to_codes("red")); + assert_string_equal_free("\x1B[#FF0000mred\x1B[#000000m \x1B[#0000FFmblue\x1B[#000000m black", + yahoo_html_to_codes("red blue black")); /* font size */ assert_string_equal_free("test", yahoo_html_to_codes("test")); assert_string_equal_free("test", yahoo_html_to_codes("test")); + + /* combinations */ + assert_string_equal_free("\x1B[#FF0000mredsmall rednormal\x1B[#000000m", + yahoo_html_to_codes("redsmall rednormal")); + + assert_string_equal_free("\x1B[#FF0000mredsmall \x1B[#00FF00mgreennormal\x1B[#FF0000m rednormal\x1B[#000000m", + yahoo_html_to_codes("redsmall greennormal rednormal")); + + assert_string_equal_free("\x1B[1mbold \x1B[#FF0000mred larger \x1B[#000000mbacktoblack normalsize\x1B[#FF0000m\x1B[#000000m\x1B[x1m", + yahoo_html_to_codes("bold red larger backtoblack normalsize")); } END_TEST diff -r b168718d1072 -r 9d620811c67c pidgin/gtkblist-theme.c --- a/pidgin/gtkblist-theme.c Sun Aug 23 21:40:34 2009 +0000 +++ b/pidgin/gtkblist-theme.c Sun Aug 23 21:42:12 2009 +0000 @@ -379,64 +379,88 @@ g_object_class_install_property(obj_class, PROP_LAYOUT, pspec); /* Group */ + /* Note to translators: These two strings refer to the background color + of a buddy list group when in its expanded state */ pspec = g_param_spec_boxed("expanded-color", _("Expanded Background Color"), _("The background color of an expanded group"), GDK_TYPE_COLOR, G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_EXPANDED_COLOR, pspec); + /* Note to translators: These two strings refer to the font and color + of a buddy list group when in its expanded state */ pspec = g_param_spec_pointer("expanded-text", _("Expanded Text"), _("The text information for when a group is expanded"), G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_EXPANDED_TEXT, pspec); + /* Note to translators: These two strings refer to the background color + of a buddy list group when in its collapsed state */ pspec = g_param_spec_boxed("collapsed-color", _("Collapsed Background Color"), _("The background color of a collapsed group"), GDK_TYPE_COLOR, G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_COLLAPSED_COLOR, pspec); + /* Note to translators: These two strings refer to the font and color + of a buddy list group when in its collapsed state */ pspec = g_param_spec_pointer("collapsed-text", _("Collapsed Text"), _("The text information for when a group is collapsed"), G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_COLLAPSED_TEXT, pspec); /* Buddy */ + /* Note to translators: These two strings refer to the background color + of a buddy list contact or chat room */ pspec = g_param_spec_boxed("contact-color", _("Contact/Chat Background Color"), _("The background color of a contact or chat"), GDK_TYPE_COLOR, G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_CONTACT_COLOR, pspec); + /* Note to translators: These two strings refer to the font and color + of a buddy list contact when in its expanded state */ pspec = g_param_spec_pointer("contact", _("Contact Text"), _("The text information for when a contact is expanded"), G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_CONTACT, pspec); - pspec = g_param_spec_pointer("online", _("On-line Text"), + /* Note to translators: These two strings refer to the font and color + of a buddy list buddy when it is online */ + pspec = g_param_spec_pointer("online", _("Online Text"), _("The text information for when a buddy is online"), G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_ONLINE, pspec); + /* Note to translators: These two strings refer to the font and color + of a buddy list buddy when it is away */ pspec = g_param_spec_pointer("away", _("Away Text"), _("The text information for when a buddy is away"), G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_AWAY, pspec); - pspec = g_param_spec_pointer("offline", _("Off-line Text"), - _("The text information for when a buddy is off-line"), + /* Note to translators: These two strings refer to the font and color + of a buddy list buddy when it is offline */ + pspec = g_param_spec_pointer("offline", _("Offline Text"), + _("The text information for when a buddy is offline"), G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_OFFLINE, pspec); + /* Note to translators: These two strings refer to the font and color + of a buddy list buddy when it is idle */ pspec = g_param_spec_pointer("idle", _("Idle Text"), _("The text information for when a buddy is idle"), G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_IDLE, pspec); + /* Note to translators: These two strings refer to the font and color + of a buddy list buddy when they have sent you a new message */ pspec = g_param_spec_pointer("message", _("Message Text"), _("The text information for when a buddy has an unread message"), G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_MESSAGE, pspec); + /* Note to translators: These two strings refer to the font and color + of a buddy list buddy when they have sent you a new message */ pspec = g_param_spec_pointer("message_nick_said", _("Message (Nick Said) Text"), - _("The text information for when a chat has an unread message that mentions your nick"), + _("The text information for when a chat has an unread message that mentions your nickname"), G_PARAM_READWRITE); g_object_class_install_property(obj_class, PROP_MESSAGE_NICK_SAID, pspec); diff -r b168718d1072 -r 9d620811c67c pidgin/gtkblist.c --- a/pidgin/gtkblist.c Sun Aug 23 21:40:34 2009 +0000 +++ b/pidgin/gtkblist.c Sun Aug 23 21:42:12 2009 +0000 @@ -4148,6 +4148,7 @@ name_color = "dim grey"; } else if (!purple_presence_is_online(presence)) { namefont = pidgin_blist_theme_get_offline_text_info(theme); + name_color = "dim grey"; statusfont = pidgin_blist_theme_get_status_text_info(theme); } else if (purple_presence_is_available(presence)) { namefont = pidgin_blist_theme_get_online_text_info(theme); @@ -4156,6 +4157,13 @@ namefont = pidgin_blist_theme_get_away_text_info(theme); statusfont = pidgin_blist_theme_get_status_text_info(theme); } + } else { + if (!selected + && (purple_presence_is_idle(presence) + || !purple_presence_is_online(presence))) + { + name_color = "dim grey"; + } } name_color = theme_font_get_color_default(namefont, name_color); @@ -6405,10 +6413,13 @@ ihrs = (t - idle_secs) / 3600; imin = ((t - idle_secs) / 60) % 60; - if (!selected && theme != NULL && (pair = pidgin_blist_theme_get_idle_text_info(theme)) != NULL) + if (selected) + textcolor = NULL; + else if (theme != NULL && (pair = pidgin_blist_theme_get_idle_text_info(theme)) != NULL) textcolor = pidgin_theme_font_get_color_describe(pair); else - textcolor = NULL; + /* If no theme them default to making idle buddy names grey */ + textcolor = "dim grey"; if (textcolor) { idle = g_strdup_printf("%d:%02d", diff -r b168718d1072 -r 9d620811c67c pidgin/gtkmedia.c --- a/pidgin/gtkmedia.c Sun Aug 23 21:40:34 2009 +0000 +++ b/pidgin/gtkmedia.c Sun Aug 23 21:42:12 2009 +0000 @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ #include diff -r b168718d1072 -r 9d620811c67c pidgin/gtkmedia.h --- a/pidgin/gtkmedia.h Sun Aug 23 21:40:34 2009 +0000 +++ b/pidgin/gtkmedia.h Sun Aug 23 21:42:12 2009 +0000 @@ -21,7 +21,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef __GTKMEDIA_H_ diff -r b168718d1072 -r 9d620811c67c pidgin/gtknotify.c --- a/pidgin/gtknotify.c Sun Aug 23 21:40:34 2009 +0000 +++ b/pidgin/gtknotify.c Sun Aug 23 21:42:12 2009 +0000 @@ -60,6 +60,7 @@ { PurpleAccount *account; PurplePounce *pounce; + char *pouncee; } PidginNotifyPounceData; @@ -155,6 +156,7 @@ -1); gtk_tree_store_remove(dialog->treemodel, &iter); + g_free(pounce_data->pouncee); g_free(pounce_data); } @@ -173,8 +175,29 @@ PIDGIN_POUNCE_DATA, &pounce_data, -1); - if (pounce_data != NULL) + if (pounce_data != NULL) { + g_free(pounce_data->pouncee); g_free(pounce_data); + } +} + +static void +open_im_foreach(GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer data) +{ + PidginNotifyPounceData *pounce_data; + + gtk_tree_model_get(model, iter, + PIDGIN_POUNCE_DATA, &pounce_data, + -1); + + if (pounce_data != NULL) { + PurpleConversation *conv; + + conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, + pounce_data->account, pounce_data->pouncee); + purple_conversation_present(conv); + } } static void @@ -184,10 +207,12 @@ GList **list = data; *list = g_list_prepend(*list, gtk_tree_path_copy(path)); } + static void pounce_response_dismiss() { GtkTreeSelection *selection; + GtkTreeIter iter; GList *list = NULL; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pounce_dialog->treeview)); @@ -203,6 +228,20 @@ gtk_tree_path_free(list->data); list = g_list_delete_link(list, list); } + + if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(pounce_dialog->treemodel), &iter)) + pounce_response_close(pounce_dialog); +} + +static void +pounce_response_open_ims() +{ + GtkTreeSelection *selection; + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pounce_dialog->treeview)); + gtk_tree_selection_selected_foreach(selection, open_im_foreach, pounce_dialog); + + pounce_response_dismiss(); } static void @@ -241,6 +280,9 @@ case GTK_RESPONSE_DELETE_EVENT: pounce_response_close(dialog); break; + case GTK_RESPONSE_YES: + pounce_response_open_ims(); + break; case GTK_RESPONSE_NO: pounce_response_dismiss(); break; @@ -256,40 +298,47 @@ pounce_row_selected_cb(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data) { - GtkTreeIter iter; GtkTreeSelection *selection; - gboolean selected; - GList *list; + int count; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pounce_dialog->treeview)); - selected = gtk_tree_selection_get_selected(selection, - NULL, &iter); + count = gtk_tree_selection_count_selected_rows(selection); - if (selected) { - PurplePounce *pounce; + if (count == 0) { + gtk_widget_set_sensitive(pounce_dialog->open_button, FALSE); + gtk_widget_set_sensitive(pounce_dialog->edit_button, FALSE); + gtk_widget_set_sensitive(pounce_dialog->dismiss_button, FALSE); + } else if (count == 1) { + GList *pounces; + GList *list; PidginNotifyPounceData *pounce_data; + GtkTreeIter iter; - list = purple_pounces_get_all(); - + list = gtk_tree_selection_get_selected_rows(selection, NULL); + gtk_tree_model_get_iter(GTK_TREE_MODEL(pounce_dialog->treemodel), + &iter, list->data); gtk_tree_model_get(GTK_TREE_MODEL(pounce_dialog->treemodel), &iter, PIDGIN_POUNCE_DATA, &pounce_data, -1); - - gtk_widget_set_sensitive(pounce_dialog->edit_button, FALSE); + g_list_foreach(list, (GFunc)gtk_tree_path_free, NULL); + g_list_free(list); - for (; list != NULL; list = list->next) { - pounce = list->data; + pounces = purple_pounces_get_all(); + for (; pounces != NULL; pounces = pounces->next) { + PurplePounce *pounce = pounces->data; if (pounce == pounce_data->pounce) { gtk_widget_set_sensitive(pounce_dialog->edit_button, TRUE); break; } } + gtk_widget_set_sensitive(pounce_dialog->open_button, TRUE); gtk_widget_set_sensitive(pounce_dialog->dismiss_button, TRUE); } else { + gtk_widget_set_sensitive(pounce_dialog->open_button, TRUE); gtk_widget_set_sensitive(pounce_dialog->edit_button, FALSE); - gtk_widget_set_sensitive(pounce_dialog->dismiss_button, FALSE); + gtk_widget_set_sensitive(pounce_dialog->dismiss_button, TRUE); } @@ -1361,6 +1410,7 @@ pounce_data->account = account; pounce_data->pounce = pounce; + pounce_data->pouncee = g_strdup(purple_pounce_get_pouncee(pounce)); gtk_tree_store_append(pounce_dialog->treemodel, &iter, NULL); @@ -1484,6 +1534,11 @@ gtk_window_set_title(GTK_WINDOW(dialog), _("New Pounces")); button = gtk_dialog_add_button(GTK_DIALOG(dialog), + _("IM"), GTK_RESPONSE_YES); + gtk_widget_set_sensitive(button, FALSE); + spec_dialog->open_button = button; + + button = gtk_dialog_add_button(GTK_DIALOG(dialog), _("Dismiss"), GTK_RESPONSE_NO); gtk_widget_set_sensitive(button, FALSE); spec_dialog->dismiss_button = button; @@ -1536,9 +1591,11 @@ gtk_label_set_markup(GTK_LABEL(label), _("You have pounced!")); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(spec_dialog->treeview)); - gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); + gtk_tree_selection_set_mode(sel, GTK_SELECTION_MULTIPLE); g_signal_connect(G_OBJECT(sel), "changed", G_CALLBACK(pounce_row_selected_cb), NULL); + g_signal_connect(G_OBJECT(spec_dialog->treeview), "row-activated", + G_CALLBACK(pounce_response_open_ims), NULL); } gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/Makefile.am --- a/pidgin/pixmaps/Makefile.am Sun Aug 23 21:40:34 2009 +0000 +++ b/pidgin/pixmaps/Makefile.am Sun Aug 23 21:42:12 2009 +0000 @@ -448,28 +448,28 @@ TOOLBAR_22_SCALABLE = \ toolbar/22/scalable/select-avatar.svg \ toolbar/22/scalable/video-call.svg \ - toolbar/22/scalable/voice-call.svg + toolbar/22/scalable/audio-call.svg TOOLBAR_22 = \ toolbar/22/select-avatar.png \ toolbar/22/video-call.png \ - toolbar/22/voice-call.png + toolbar/22/audio-call.png TOOLBAR_32_SCALABLE = \ toolbar/32/scalable/video-call.svg \ - toolbar/32/scalable/voice-call.svg + toolbar/32/scalable/audio-call.svg TOOLBAR_32 = \ toolbar/32/video-call.png \ - toolbar/32/voice-call.png + toolbar/32/audio-call.png TOOLBAR_48_SCALABLE = \ toolbar/48/scalable/video-call.svg \ - toolbar/48/scalable/voice-call.svg + toolbar/48/scalable/audio-call.svg TOOLBAR_48 = \ toolbar/48/video-call.png \ - toolbar/48/voice-call.png + toolbar/48/audio-call.png TRAY_16_ICO = \ tray/16/available_4bit.ico \ diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/status/11/invisible.png Binary file pidgin/pixmaps/status/11/invisible.png has changed diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/22/audio-call.png Binary file pidgin/pixmaps/toolbar/22/audio-call.png has changed diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/22/scalable/audio-call.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/toolbar/22/scalable/audio-call.svg Sun Aug 23 21:42:12 2009 +0000 @@ -0,0 +1,795 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/22/scalable/voice-call.svg --- a/pidgin/pixmaps/toolbar/22/scalable/voice-call.svg Sun Aug 23 21:40:34 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,795 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/22/voice-call.png Binary file pidgin/pixmaps/toolbar/22/voice-call.png has changed diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/32/audio-call.png Binary file pidgin/pixmaps/toolbar/32/audio-call.png has changed diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/32/scalable/audio-call.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/toolbar/32/scalable/audio-call.svg Sun Aug 23 21:42:12 2009 +0000 @@ -0,0 +1,990 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/32/scalable/voice-call.svg --- a/pidgin/pixmaps/toolbar/32/scalable/voice-call.svg Sun Aug 23 21:40:34 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,990 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/32/voice-call.png Binary file pidgin/pixmaps/toolbar/32/voice-call.png has changed diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/48/audio-call.png Binary file pidgin/pixmaps/toolbar/48/audio-call.png has changed diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/48/scalable/audio-call.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/toolbar/48/scalable/audio-call.svg Sun Aug 23 21:42:12 2009 +0000 @@ -0,0 +1,756 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/48/scalable/voice-call.svg --- a/pidgin/pixmaps/toolbar/48/scalable/voice-call.svg Sun Aug 23 21:40:34 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,756 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b168718d1072 -r 9d620811c67c pidgin/pixmaps/toolbar/48/voice-call.png Binary file pidgin/pixmaps/toolbar/48/voice-call.png has changed diff -r b168718d1072 -r 9d620811c67c pidgin/plugins/Makefile.am --- a/pidgin/plugins/Makefile.am Sun Aug 23 21:40:34 2009 +0000 +++ b/pidgin/plugins/Makefile.am Sun Aug 23 21:42:12 2009 +0000 @@ -47,6 +47,7 @@ themeedit_la_LDFLAGS = -module -avoid-version timestamp_la_LDFLAGS = -module -avoid-version timestamp_format_la_LDFLAGS = -module -avoid-version +vvconfig_la_LDFLAGS = -module -avoid-version xmppconsole_la_LDFLAGS = -module -avoid-version if PLUGINS @@ -68,6 +69,10 @@ timestamp_format.la \ xmppconsole.la +if USE_VV +plugin_LTLIBRARIES += vvconfig.la +endif + noinst_LTLIBRARIES = \ contact_priority.la \ gtk_signals_test.la @@ -88,6 +93,7 @@ themeedit_la_SOURCES = themeedit.c themeedit-icon.c themeedit-icon.h timestamp_la_SOURCES = timestamp.c timestamp_format_la_SOURCES = timestamp_format.c +vvconfig_SOURCES = vvconfig.c xmppconsole_la_SOURCES = xmppconsole.c convcolors_la_LIBADD = $(GTK_LIBS) @@ -106,6 +112,7 @@ themeedit_la_LIBADD = $(GTK_LIBS) timestamp_la_LIBADD = $(GTK_LIBS) timestamp_format_la_LIBADD = $(GTK_LIBS) +vvconfig_la_LIBADD = $(GTK_LIBS) $(GSTREAMER_LIBS) xmppconsole_la_LIBADD = $(GTK_LIBS) endif # PLUGINS @@ -129,6 +136,7 @@ -I$(top_srcdir)/pidgin \ $(DEBUG_CFLAGS) \ $(GTK_CFLAGS) \ + $(GSTREAMER_CFLAGS) \ $(PLUGIN_CFLAGS) # diff -r b168718d1072 -r 9d620811c67c pidgin/plugins/disco/gtkdisco.c --- a/pidgin/plugins/disco/gtkdisco.c Sun Aug 23 21:40:34 2009 +0000 +++ b/pidgin/plugins/disco/gtkdisco.c Sun Aug 23 21:42:12 2009 +0000 @@ -224,6 +224,8 @@ /* This shouldn't ever happen since the account is connected */ server = g_strdup("jabber.org"); + /* Note to translators: The string "Enter an XMPP Server" is asking the + user to type the name of an XMPP server which will then be queried */ purple_request_input(my_plugin, _("Server name request"), _("Enter an XMPP Server"), _("Select an XMPP server to query"), server, FALSE, FALSE, NULL, diff -r b168718d1072 -r 9d620811c67c pidgin/plugins/vvconfig.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/plugins/vvconfig.c Sun Aug 23 21:42:12 2009 +0000 @@ -0,0 +1,566 @@ +/* + * Configures microphones and webcams for voice and video + * Copyright (C) 2009 Mike Ruprecht + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA. + */ +#include "internal.h" + +#include "debug.h" +#include "mediamanager.h" +#include "media-gst.h" +#include "version.h" +#include "gtkplugin.h" +#include "gtkutils.h" +#include "gtkprefs.h" + +#include + +static PurpleMediaElementInfo *old_video_src = NULL, *old_video_sink = NULL, + *old_audio_src = NULL, *old_audio_sink = NULL; + +static const gchar *AUDIO_SRC_PLUGINS[] = { + "alsasrc", "ALSA", + /* "esdmon", "ESD", ? */ + "osssrc", "OSS", + "pulsesrc", "PulseAudio", + /* "audiotestsrc wave=silence", "Silence", */ + "audiotestsrc", "Test Sound", + NULL +}; + +static const gchar *AUDIO_SINK_PLUGINS[] = { + "alsasink", "ALSA", + "artsdsink", "aRts", + "esdsink", "ESD", + "osssink", "OSS", + "pulsesink", "PulseAudio", + NULL +}; + +static const gchar *VIDEO_SRC_PLUGINS[] = { + "videotestsrc", "Test Input", + "dshowvideosrc","DirectDraw", + "ksvideosrc", "KS Video", + "qcamsrc", "Quickcam", + "v4lsrc", "Video4Linux", + "v4l2src", "Video4Linux2", + "v4lmjpegsrc", "Video4Linux MJPEG", + NULL +}; + +static const gchar *VIDEO_SINK_PLUGINS[] = { + /* "aasink", "AALib", Didn't work for me */ + "directdrawsink","DirectDraw", + "glimagesink", "OpenGL", + "ximagesink", "X Window System", + "xvimagesink", "X Window System (Xv)", + NULL +}; + +static GList * +get_element_devices(const gchar *element_name) +{ + GList *ret = NULL; + GstElement *element; + GObjectClass *klass; + GstPropertyProbe *probe; + const GParamSpec *pspec; + + if (!strcmp(element_name, "")) { + ret = g_list_prepend(ret, NULL); + ret = g_list_prepend(ret, (gpointer)_("Default")); + ret = g_list_prepend(ret, ""); + return ret; + } + + ret = g_list_prepend(ret, (gpointer)_("Default")); + ret = g_list_prepend(ret, ""); + + if (*element_name == '\0') { + ret = g_list_prepend(ret, NULL); + ret = g_list_reverse(ret); + return ret; + } + + element = gst_element_factory_make(element_name, "test"); + klass = G_OBJECT_GET_CLASS (element); + if (!g_object_class_find_property(klass, "device") || + !GST_IS_PROPERTY_PROBE(element) || + !(probe = GST_PROPERTY_PROBE(element)) || + !(pspec = gst_property_probe_get_property(probe, "device"))) { + purple_debug_info("vvconfig", "'%s' - no device\n", element_name); + } else { + gint n; + GValueArray *array; + + /* Set autoprobe[-fps] to FALSE to avoid delays when probing. */ + if (g_object_class_find_property (klass, "autoprobe")) { + g_object_set (G_OBJECT (element), "autoprobe", FALSE, NULL); + if (g_object_class_find_property (klass, "autoprobe-fps")) { + g_object_set (G_OBJECT (element), "autoprobe-fps", FALSE, NULL); + } + } + + array = gst_property_probe_probe_and_get_values (probe, pspec); + if (array == NULL) { + purple_debug_info("vvconfig", "'%s' has no devices\n", element_name); + ret = g_list_prepend(ret, NULL); + ret = g_list_reverse(ret); + return ret; + } + + for (n=0; n < array->n_values; ++n) { + GValue *device; + const gchar *name; + const gchar *device_name; + + device = g_value_array_get_nth(array, n); + g_object_set_property(G_OBJECT(element), "device", device); + if (gst_element_set_state(element, GST_STATE_READY) + != GST_STATE_CHANGE_SUCCESS) { + purple_debug_warning("vvconfig", + "Error changing state of %s\n", + element_name); + continue; + } + + g_object_get(G_OBJECT(element), "device-name", &name, NULL); + device_name = g_value_get_string(device); + if (name == NULL) + name = _("Unknown"); + purple_debug_info("vvconfig", "Found device %s : %s for %s\n", + device_name, name, element_name); + ret = g_list_prepend(ret, (gpointer)name); + ret = g_list_prepend(ret, (gpointer)device_name); + gst_element_set_state(element, GST_STATE_NULL); + } + } + gst_object_unref(element); + + ret = g_list_prepend(ret, NULL); + ret = g_list_reverse(ret); + + return ret; +} + +static GList * +get_element_plugins(const gchar **plugins) +{ + GList *ret = NULL; + + ret = g_list_prepend(ret, "Default"); + ret = g_list_prepend(ret, ""); + for (; plugins[0] && plugins[1]; plugins += 2) { + if (gst_default_registry_check_feature_version( + plugins[0], 0, 0, 0)) { + ret = g_list_prepend(ret, (gpointer)plugins[1]); + ret = g_list_prepend(ret, (gpointer)plugins[0]); + } + } + ret = g_list_prepend(ret, NULL); + ret = g_list_reverse(ret); + return ret; +} + +static void +device_changed_cb(const gchar *name, PurplePrefType type, + gconstpointer value, gpointer data) +{ + GtkSizeGroup *sg = data; + GtkWidget *parent, *widget; + GSList *widgets; + GList *devices; + GValue gvalue; + gint position; + gchar *label, *pref; + + widgets = gtk_size_group_get_widgets(GTK_SIZE_GROUP(sg)); + for (; widgets; widgets = g_slist_next(widgets)) { + const gchar *widget_name = + gtk_widget_get_name(GTK_WIDGET(widgets->data)); + if (!strcmp(widget_name, name)) { + gchar *temp_str; + gchar delimiters[3] = {0, 0, 0}; + const gchar *text; + gint keyval, pos; + + widget = widgets->data; + /* Get label with _ from the GtkLabel */ + text = gtk_label_get_text(GTK_LABEL(widget)); + keyval = gtk_label_get_mnemonic_keyval(GTK_LABEL(widget)); + delimiters[0] = g_ascii_tolower(keyval); + delimiters[1] = g_ascii_toupper(keyval); + pos = strcspn(text, delimiters); + if (pos != -1) { + temp_str = g_strndup(text, pos); + label = g_strconcat(temp_str, "_", + text + pos, NULL); + g_free(temp_str); + } else { + label = g_strdup(text); + } + break; + } + } + + if (widgets == NULL) + return; + + parent = gtk_widget_get_parent(widget); + widget = parent; + parent = gtk_widget_get_parent(GTK_WIDGET(widget)); + gvalue.g_type = 0; + g_value_init(&gvalue, G_TYPE_INT); + gtk_container_child_get_property(GTK_CONTAINER(parent), + GTK_WIDGET(widget), "position", &gvalue); + position = g_value_get_int(&gvalue); + g_value_unset(&gvalue); + gtk_widget_destroy(widget); + + pref = g_strdup(name); + strcpy(pref + strlen(pref) - strlen("plugin"), "device"); + devices = get_element_devices(value); + if (g_list_find(devices, purple_prefs_get_string(pref)) == NULL) + purple_prefs_set_string(pref, g_list_next(devices)->data); + widget = pidgin_prefs_dropdown_from_list(parent, + label, PURPLE_PREF_STRING, + pref, devices); + g_list_free(devices); + g_signal_connect_swapped(widget, "destroy", + G_CALLBACK(g_free), pref); + g_free(label); + gtk_misc_set_alignment(GTK_MISC(widget), 0, 0.5); + gtk_widget_set_name(widget, name); + gtk_size_group_add_widget(sg, widget); + gtk_box_reorder_child(GTK_BOX(parent), + gtk_widget_get_parent(GTK_WIDGET(widget)), position); +} + +static void +get_plugin_frame(GtkWidget *parent, GtkSizeGroup *sg, + const gchar *name, const gchar *plugin_label, + const gchar **plugin_strs, const gchar *plugin_pref, + const gchar *device_label, const gchar *device_pref) +{ + GtkWidget *vbox, *widget; + GList *plugins, *devices; + + vbox = pidgin_make_frame(parent, name); + + /* Setup plugin preference */ + plugins = get_element_plugins(plugin_strs); + widget = pidgin_prefs_dropdown_from_list(vbox, plugin_label, + PURPLE_PREF_STRING, plugin_pref, plugins); + g_list_free(plugins); + gtk_size_group_add_widget(sg, widget); + gtk_misc_set_alignment(GTK_MISC(widget), 0, 0.5); + + /* Setup device preference */ + devices = get_element_devices(purple_prefs_get_string(plugin_pref)); + if (g_list_find(devices, purple_prefs_get_string(device_pref)) == NULL) + purple_prefs_set_string(device_pref, g_list_next(devices)->data); + widget = pidgin_prefs_dropdown_from_list(vbox, device_label, + PURPLE_PREF_STRING, device_pref, devices); + g_list_free(devices); + gtk_widget_set_name(widget, plugin_pref); + gtk_size_group_add_widget(sg, widget); + gtk_misc_set_alignment(GTK_MISC(widget), 0, 0.5); + + purple_prefs_connect_callback(vbox, plugin_pref, + device_changed_cb, sg); + g_signal_connect_swapped(vbox, "destroy", + G_CALLBACK(purple_prefs_disconnect_by_handle), vbox); +} + +static GtkWidget * +get_plugin_config_frame(PurplePlugin *plugin) { + GtkWidget *notebook, *vbox_audio, *vbox_video; + GtkSizeGroup *sg; + + notebook = gtk_notebook_new(); + gtk_container_set_border_width(GTK_CONTAINER(notebook), + PIDGIN_HIG_BORDER); + gtk_widget_show(notebook); + + vbox_audio = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); + vbox_video = gtk_vbox_new(FALSE, PIDGIN_HIG_CAT_SPACE); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), + vbox_audio, gtk_label_new(_("Audio"))); + gtk_notebook_append_page(GTK_NOTEBOOK(notebook), + vbox_video, gtk_label_new(_("Video"))); + gtk_container_set_border_width(GTK_CONTAINER (vbox_audio), + PIDGIN_HIG_BORDER); + gtk_container_set_border_width(GTK_CONTAINER (vbox_video), + PIDGIN_HIG_BORDER); + + gtk_widget_show(vbox_audio); + gtk_widget_show(vbox_video); + + sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); + + get_plugin_frame(vbox_audio, sg, _("Output"), _("_Plugin"), AUDIO_SINK_PLUGINS, + "/plugins/core/vvconfig/audio/sink/plugin", _("_Device"), + "/plugins/core/vvconfig/audio/sink/device"); + get_plugin_frame(vbox_audio, sg, _("Input"), _("P_lugin"), AUDIO_SRC_PLUGINS, + "/plugins/core/vvconfig/audio/src/plugin", _("D_evice"), + "/plugins/core/vvconfig/audio/src/device"); + + get_plugin_frame(vbox_video, sg, _("Output"), _("_Plugin"), VIDEO_SINK_PLUGINS, + "/plugins/gtk/vvconfig/video/sink/plugin", _("_Device"), + "/plugins/gtk/vvconfig/video/sink/device"); + get_plugin_frame(vbox_video, sg, _("Input"), _("P_lugin"), VIDEO_SRC_PLUGINS, + "/plugins/core/vvconfig/video/src/plugin", _("D_evice"), + "/plugins/core/vvconfig/video/src/device"); + + return notebook; +} + +static GstElement * +create_video_src(PurpleMedia *media, + const gchar *session_id, const gchar *participant) +{ + const gchar *plugin = purple_prefs_get_string( + "/plugins/core/vvconfig/video/src/plugin"); + const gchar *device = purple_prefs_get_string( + "/plugins/core/vvconfig/video/src/device"); + GstElement *ret; + + if (plugin[0] == '\0') + return purple_media_element_info_call_create(old_video_src, + media, session_id, participant); + + ret = gst_element_factory_make(plugin, "vvconfig-videosrc"); + if (device[0] != '\0') + g_object_set(G_OBJECT(ret), "device", device, NULL); + if (!strcmp(plugin, "videotestsrc")) + g_object_set(G_OBJECT(ret), "is-live", 1, NULL); + return ret; +} + +static GstElement * +create_video_sink(PurpleMedia *media, + const gchar *session_id, const gchar *participant) +{ + const gchar *plugin = purple_prefs_get_string( + "/plugins/gtk/vvconfig/video/sink/plugin"); + const gchar *device = purple_prefs_get_string( + "/plugins/gtk/vvconfig/video/sink/device"); + GstElement *ret; + + if (plugin[0] == '\0') + return purple_media_element_info_call_create(old_video_sink, + media, session_id, participant); + + ret = gst_element_factory_make(plugin, NULL); + if (device[0] != '\0') + g_object_set(G_OBJECT(ret), "device", device, NULL); + return ret; +} + +static GstElement * +create_audio_src(PurpleMedia *media, + const gchar *session_id, const gchar *participant) +{ + const gchar *plugin = purple_prefs_get_string( + "/plugins/core/vvconfig/audio/src/plugin"); + const gchar *device = purple_prefs_get_string( + "/plugins/core/vvconfig/audio/src/device"); + GstElement *ret; + + if (plugin[0] == '\0') + return purple_media_element_info_call_create(old_audio_src, + media, session_id, participant); + + ret = gst_element_factory_make(plugin, NULL); + if (device[0] != '\0') + g_object_set(G_OBJECT(ret), "device", device, NULL); + return ret; +} + +static GstElement * +create_audio_sink(PurpleMedia *media, + const gchar *session_id, const gchar *participant) +{ + const gchar *plugin = purple_prefs_get_string( + "/plugins/core/vvconfig/audio/sink/plugin"); + const gchar *device = purple_prefs_get_string( + "/plugins/core/vvconfig/audio/sink/device"); + GstElement *ret; + + if (plugin[0] == '\0') + return purple_media_element_info_call_create(old_audio_sink, + media, session_id, participant); + + ret = gst_element_factory_make(plugin, NULL); + if (device[0] != '\0') + g_object_set(G_OBJECT(ret), "device", device, NULL); + return ret; +} + +static void +set_element_info_cond(PurpleMediaElementInfo *old_info, + PurpleMediaElementInfo *new_info, const gchar *id) +{ + gchar *element_id = purple_media_element_info_get_id(old_info); + if (!strcmp(element_id, id)) + purple_media_manager_set_active_element( + purple_media_manager_get(), new_info); + g_free(element_id); +} + +static gboolean +plugin_load(PurplePlugin *plugin) +{ + PurpleMediaManager *manager; + PurpleMediaElementInfo *video_src, *video_sink, + *audio_src, *audio_sink; + + /* Disable the plugin if the UI doesn't support VV */ + if (purple_media_manager_get_ui_caps(purple_media_manager_get()) == + PURPLE_MEDIA_CAPS_NONE) + return FALSE; + + purple_prefs_add_none("/plugins/core/vvconfig"); + purple_prefs_add_none("/plugins/core/vvconfig/audio"); + purple_prefs_add_none("/plugins/core/vvconfig/audio/src"); + purple_prefs_add_string("/plugins/core/vvconfig/audio/src/plugin", ""); + purple_prefs_add_string("/plugins/core/vvconfig/audio/src/device", ""); + purple_prefs_add_none("/plugins/core/vvconfig/audio/sink"); + purple_prefs_add_string("/plugins/core/vvconfig/audio/sink/plugin", ""); + purple_prefs_add_string("/plugins/core/vvconfig/audio/sink/device", ""); + purple_prefs_add_none("/plugins/core/vvconfig/video"); + purple_prefs_add_none("/plugins/core/vvconfig/video/src"); + purple_prefs_add_string("/plugins/core/vvconfig/video/src/plugin", ""); + purple_prefs_add_string("/plugins/core/vvconfig/video/src/device", ""); + purple_prefs_add_none("/plugins/gtk/vvconfig"); + purple_prefs_add_none("/plugins/gtk/vvconfig/video"); + purple_prefs_add_none("/plugins/gtk/vvconfig/video/sink"); + purple_prefs_add_string("/plugins/gtk/vvconfig/video/sink/plugin", ""); + purple_prefs_add_string("/plugins/gtk/vvconfig/video/sink/device", ""); + + video_src = g_object_new(PURPLE_TYPE_MEDIA_ELEMENT_INFO, + "id", "vvconfig-videosrc", + "name", "VV Conf Plugin Video Source", + "type", PURPLE_MEDIA_ELEMENT_VIDEO + | PURPLE_MEDIA_ELEMENT_SRC + | PURPLE_MEDIA_ELEMENT_ONE_SRC + | PURPLE_MEDIA_ELEMENT_UNIQUE, + "create-cb", create_video_src, NULL); + video_sink = g_object_new(PURPLE_TYPE_MEDIA_ELEMENT_INFO, + "id", "vvconfig-videosink", + "name", "VV Conf Plugin Video Sink", + "type", PURPLE_MEDIA_ELEMENT_VIDEO + | PURPLE_MEDIA_ELEMENT_SINK + | PURPLE_MEDIA_ELEMENT_ONE_SINK, + "create-cb", create_video_sink, NULL); + audio_src = g_object_new(PURPLE_TYPE_MEDIA_ELEMENT_INFO, + "id", "vvconfig-audiosrc", + "name", "VV Conf Plugin Audio Source", + "type", PURPLE_MEDIA_ELEMENT_AUDIO + | PURPLE_MEDIA_ELEMENT_SRC + | PURPLE_MEDIA_ELEMENT_ONE_SRC + | PURPLE_MEDIA_ELEMENT_UNIQUE, + "create-cb", create_audio_src, NULL); + audio_sink = g_object_new(PURPLE_TYPE_MEDIA_ELEMENT_INFO, + "id", "vvconfig-audiosink", + "name", "VV Conf Plugin Audio Sink", + "type", PURPLE_MEDIA_ELEMENT_AUDIO + | PURPLE_MEDIA_ELEMENT_SINK + | PURPLE_MEDIA_ELEMENT_ONE_SINK, + "create-cb", create_audio_sink, NULL); + + purple_debug_info("gtkmedia", "Registering media element types\n"); + manager = purple_media_manager_get(); + + old_video_src = purple_media_manager_get_active_element(manager, + PURPLE_MEDIA_ELEMENT_VIDEO | PURPLE_MEDIA_ELEMENT_SRC); + old_video_sink = purple_media_manager_get_active_element(manager, + PURPLE_MEDIA_ELEMENT_VIDEO | PURPLE_MEDIA_ELEMENT_SINK); + old_audio_src = purple_media_manager_get_active_element(manager, + PURPLE_MEDIA_ELEMENT_AUDIO | PURPLE_MEDIA_ELEMENT_SRC); + old_audio_sink = purple_media_manager_get_active_element(manager, + PURPLE_MEDIA_ELEMENT_AUDIO | PURPLE_MEDIA_ELEMENT_SINK); + + set_element_info_cond(old_video_src, video_src, "pidgindefaultvideosrc"); + set_element_info_cond(old_video_sink, video_sink, "pidgindefaultvideosink"); + set_element_info_cond(old_audio_src, audio_src, "pidgindefaultaudiosrc"); + set_element_info_cond(old_audio_sink, audio_sink, "pidgindefaultaudiosink"); + + return TRUE; +} + +static gboolean +plugin_unload(PurplePlugin *plugin) +{ + PurpleMediaManager *manager = purple_media_manager_get(); + purple_media_manager_set_active_element(manager, old_video_src); + purple_media_manager_set_active_element(manager, old_video_sink); + purple_media_manager_set_active_element(manager, old_audio_src); + purple_media_manager_set_active_element(manager, old_audio_sink); + return TRUE; +} + +static PidginPluginUiInfo ui_info = { + get_plugin_config_frame, + 0, /* page_num (Reserved) */ + /* Padding */ + NULL, + NULL, + NULL, + NULL +}; + +static PurplePluginInfo info = +{ + PURPLE_PLUGIN_MAGIC, /**< magic */ + PURPLE_MAJOR_VERSION, /**< major version */ + PURPLE_MINOR_VERSION, /**< minor version */ + PURPLE_PLUGIN_STANDARD, /**< type */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ + 0, /**< flags */ + NULL, /**< dependencies */ + PURPLE_PRIORITY_DEFAULT, /**< priority */ + + "gtk-maiku-vvconfig", /**< id */ + N_("Voice/Video Settings"), /**< name */ + DISPLAY_VERSION, /**< version */ + N_("Configure your microphone and webcam."), /**< summary */ + N_("Configure microphone and webcam " + "settings for voice/video calls."), /**< description */ + "Mike Ruprecht ", /**< author */ + PURPLE_WEBSITE, /**< homepage */ + + plugin_load, /**< load */ + plugin_unload, /**< unload */ + NULL, /**< destroy */ + + &ui_info, /**< ui_info */ + NULL, /**< extra_info */ + NULL, /**< prefs_info */ + NULL, /**< actions */ + + /* padding */ + NULL, + NULL, + NULL, + NULL +}; + +static void +init_plugin(PurplePlugin *plugin) { +} + +PURPLE_INIT_PLUGIN(vvconfig, init_plugin, info) diff -r b168718d1072 -r 9d620811c67c po/hu.po --- a/po/hu.po Sun Aug 23 21:40:34 2009 +0000 +++ b/po/hu.po Sun Aug 23 21:42:12 2009 +0000 @@ -10,10 +10,10 @@ msgstr "" "Project-Id-Version: pidgin 2.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-14 20:04+0200\n" -"PO-Revision-Date: 2009-08-14 19:58+0200\n" +"POT-Creation-Date: 2009-08-21 17:54+0200\n" +"PO-Revision-Date: 2009-08-21 17:54+0200\n" "Last-Translator: Gabor Kelemen \n" -"Language-Team: Hungarian \n" +"Language-Team: Hungarian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -869,7 +869,7 @@ msgid "System Log" msgstr "Rendszernapló" -msgid "Calling ... " +msgid "Calling..." msgstr "Hívás…" msgid "Hangup" @@ -1508,6 +1508,31 @@ "Ez a bővítmény új társalgás megnyitásakor beszúrja az utolsó társalgást az " "aktuális társalgásba." +#, c-format +msgid "" +"\n" +"Fetching TinyURL..." +msgstr "" +"\n" +"TinyURL lekérése…" + +msgid "Only create TinyURL for URLs of this length or greater" +msgstr "TinyURL készítése csak a legalább ilyen hosszú URL-címekhez" + +msgid "TinyURL (or other) address prefix" +msgstr "TinyURL (vagy más) címelőtag" + +msgid "TinyURL" +msgstr "TinyURL" + +msgid "TinyURL plugin" +msgstr "TinyURL bővítmény" + +msgid "When receiving a message with URL(s), use TinyURL for easier copying" +msgstr "" +"URL-címeket tartalmazó üzenet fogadásakor TinyURL használata a másolás " +"megkönnyítéséhez" + msgid "Online" msgstr "Elérhető" @@ -1551,31 +1576,6 @@ msgid "Lastlog plugin." msgstr "Lastlog bővítmény." -#, c-format -msgid "" -"\n" -"Fetching TinyURL..." -msgstr "" -"\n" -"TinyURL lekérése…" - -msgid "Only create TinyURL for urls of this length or greater" -msgstr "TinyURL készítése csak a legalább ilyen hosszú URL-címekhez" - -msgid "TinyURL (or other) address prefix" -msgstr "TinyURL (vagy más) címelőtag" - -msgid "TinyURL" -msgstr "TinyURL" - -msgid "TinyURL plugin" -msgstr "TinyURL bővítmény" - -msgid "When receiving a message with URL(s), TinyURL for easier copying" -msgstr "" -"URL-címeket tartalmazó üzenetek fogadásakor URL-rövidítés a másolás " -"megkönnyítéséhez" - msgid "accounts" msgstr "fiókok" @@ -1728,7 +1728,6 @@ "A(z) „%s” által bemutatott tanúsítvány saját aláírású. Nem ellenőrizhető " "automatikusan." -#. FIXME 2.6.1 #, c-format msgid "The certificate chain presented for %s is not valid." msgstr "A következőhöz bemutatott tanúsítványlánc nem érvényes: %s." @@ -1751,6 +1750,18 @@ msgid "Invalid certificate authority signature" msgstr "A hitelesítésszolgáltató aláírása érvénytelen" +#, c-format +msgid "Failed to validate expiration time for %s" +msgstr "Nem sikerült ellenőrizni a következő lejárati idejét: %s" + +#, c-format +msgid "The certificate for %s is expired." +msgstr "%s tanúsítványa lejárt." + +#, c-format +msgid "The certificate for %s should not yet be in use." +msgstr "A következő tanúsítványát még nem lenne szabad használni: %s." + #. Make messages #, c-format msgid "" @@ -1787,7 +1798,6 @@ msgstr "+++ %s kilépett" #. Unknown error -#, c-format msgid "Unknown error" msgstr "Ismeretlen hiba" @@ -1987,18 +1997,18 @@ msgstr "A fájlátvitel befejeződött" #, c-format -msgid "You canceled the transfer of %s" +msgid "You cancelled the transfer of %s" msgstr "Megszakította %s átvitelét" msgid "File transfer cancelled" msgstr "Fájlátvitel megszakítva" #, c-format -msgid "%s canceled the transfer of %s" +msgid "%s cancelled the transfer of %s" msgstr "%s megszakította %s átvitelét" #, c-format -msgid "%s canceled the file transfer" +msgid "%s cancelled the file transfer" msgstr "%s megszakította a fájlátvitelt" #, c-format @@ -2456,14 +2466,15 @@ "Bővítmények IPC támogatásának tesztelése kiszolgálóként. Ez regisztrálja az " "IPC parancsokat." -msgid "Join/Part Hiding Configuration" -msgstr "Belépés/kilépés rejtésének beállítása" - -msgid "Minimum Room Size" -msgstr "Szoba legkisebb mérete" - -msgid "User Inactivity Timeout (in minutes)" -msgstr "Felhasználó inaktivitási időtartama (perc)" +msgid "Hide Joins/Parts" +msgstr "Belépés/kilépés elrejtése" + +#. Translators: Followed by an input request a number of people +msgid "For rooms with more than this many people" +msgstr "Ennél több jelenlévővel rendelkező szobákhoz:" + +msgid "If user has not spoken in this many minutes" +msgstr "Ha a felhasználó nem szólalt meg ennyi percig" msgid "Apply hiding rules to buddies" msgstr "Elrejtési szabályok alkalmazása partnerekre" @@ -3917,15 +3928,21 @@ msgid "Logo" msgstr "Logó" +#, c-format +msgid "" +"%s will no longer be able to see your status updates. Do you want to " +"continue?" +msgstr "%s nem fogja többé látni az Ön állapotfrissítéseit. Folytatni akarja?" + +msgid "Cancel Presence Notification" +msgstr "Jelenlét-értesítés törlése" + msgid "Un-hide From" msgstr "Rejtettség visszavonása" msgid "Temporarily Hide From" msgstr "Ideiglenesen elrejt" -msgid "Cancel Presence Notification" -msgstr "Jelenlét-értesítés törlése" - msgid "(Re-)Request authorization" msgstr "Engedélyezés (újra)kérése" @@ -4537,11 +4554,11 @@ msgid "" "role <moderator|participant|visitor|none> [nick1] [nick2] ...: Get the " -"users with an role or set users' role with the room." -msgstr "" -"role <moderator|participant|visitor|none>: [1. becenév] [2. becenév]" -"… : Adott szereppel rendelkező felhasználók lekérése vagy a felhasználók " -"szerepének beállítása a szobával." +"users with a role or set users' role with the room." +msgstr "" +"role <moderator|participant|visitor|none> [1. becenév] [2. becenév] …: " +"Adott szerepű felhasználók lekérése vagy a felhasználók szerepének " +"beállítása a szobával." msgid "invite <user> [message]: Invite a user to the room." msgstr "invite <felhasználó> [üzenet]: Felhasználó meghívása a szobába." @@ -4961,8 +4978,7 @@ msgid "Not expected" msgstr "Váratlan" -#, c-format -msgid "Friendly name changes too rapidly" +msgid "Friendly name is changing too rapidly" msgstr "A felhasználónév túl gyorsan változik" #, c-format @@ -5531,8 +5547,9 @@ "%s meg szeretné tekinteni az Ön webkameráját, de ez még nem támogatott." #, c-format -msgid "%s has sent you a webcam invite, which is not yet supported." -msgstr "%s webkamera-meghívást küldött, ami még nem támogatott." +msgid "%s invited you to view his/her webcam, but this is not yet supported." +msgstr "" +"%s meghívta Önt a webkamerájának megnézésére, de ez még nem támogatott." msgid "Away From Computer" msgstr "Nem vagyok a gépnél" @@ -5583,6 +5600,10 @@ msgid "The username specified is invalid." msgstr "A megadott felhasználónév érvénytelen." +#, c-format +msgid "Friendly name changes too rapidly" +msgstr "A felhasználónév túl gyorsan változik" + msgid "This Hotmail account may not be active." msgstr "Lehetséges, hogy ez a Hotmail fiók nem aktív." @@ -5941,18 +5962,17 @@ msgid "Slapping %s..." msgstr "%s pofozása…" -# fixme: hát ez ezt jelenti ;) #. Goose means "to pinch someone on their butt" msgid "Goose" -msgstr "Seggberúgás" +msgstr "Megcsípés" #, c-format msgid "%s has goosed you!" -msgstr "%s seggberúgta!" +msgstr "%s megcsípte!" #, c-format msgid "Goosing %s..." -msgstr "%s seggberúgása…" +msgstr "%s megcsípése…" #. A high-five is when two people's hands slap each other #. * in the air above their heads. It is done to celebrate @@ -6261,8 +6281,10 @@ msgid "Server port" msgstr "Kiszolgáló portja" -msgid "Received unexpected response from " -msgstr "Váratlan válasz érkezett a következőtől: " +#. Note to translators: %s in this string is a URL +#, c-format +msgid "Received unexpected response from %s" +msgstr "Váratlan válasz érkezett innen: %s" #. username connecting too frequently msgid "" @@ -6272,9 +6294,11 @@ "Ön túl gyakran jelentkezik ki/be. Várjon tíz percet és próbálja meg újra. Ha " "tovább folytatja, még többet kell majd várnia." -#, c-format -msgid "Error requesting " -msgstr "Hiba a kéréskor: " +#. Note to translators: The first %s is a URL, the second is an +#. error message. +#, c-format +msgid "Error requesting %s: %s" +msgstr "Hiba %s lekérésekor: %s" msgid "AOL does not allow your screen name to authenticate here" msgstr "Az AOL nem engedélyezi ezen megjelenő név hitelesítését" @@ -7068,6 +7092,9 @@ msgid "C_onnect" msgstr "Kapcs_olódás" +msgid "You closed the connection." +msgstr "Lezárta a kapcsolatot." + msgid "Get AIM Info" msgstr "AIM információk lekérése" @@ -7078,6 +7105,9 @@ msgid "Get Status Msg" msgstr "Állapotüzenet lekérése" +msgid "End Direct IM Session" +msgstr "A közvetlen kapcsolat befejezése" + msgid "Direct IM" msgstr "Közvetlen IM" @@ -7909,7 +7939,7 @@ msgstr "Fájlküldés" #, c-format -msgid "%d canceled the transfer of %s" +msgid "%d cancelled the transfer of %s" msgstr "%d megszakította a(z) %s átvitelét" #, c-format @@ -9484,6 +9514,10 @@ msgid "Yahoo! JAPAN Protocol Plugin" msgstr "Yahoo! Japán protokollbővítmény" +#, c-format +msgid "%s has sent you a webcam invite, which is not yet supported." +msgstr "%s webkamera-meghívást küldött, ami még nem támogatott." + msgid "Your SMS was not delivered" msgstr "Az SMS nem lett kézbesítve" @@ -9560,8 +9594,26 @@ msgid "Ignore buddy?" msgstr "Mellőzi a partnert?" -msgid "Your account is locked, please log in to the Yahoo! website." -msgstr "A fiókja zárolva van, kérem jelentkezzen be a Yahoo! weboldalára." +msgid "Invalid username or password" +msgstr "Érvénytelen felhasználónév vagy jelszó" + +msgid "" +"Your account has been locked due to too many failed login attempts. Please " +"try logging into the Yahoo! website." +msgstr "" +"A fiók zárolva, mert túl sok bejelentkezési kísérlet hiúsult meg. Próbáljon " +"meg bejelentkezni a Yahoo! weboldalára." + +#, c-format +msgid "Unknown error 52. Reconnecting should fix this." +msgstr "Ismeretlen hiba: 52. Próbáljon újracsatlakozni." + +msgid "" +"Error 1013: The username you have entered is invalid. The most common cause " +"of this error is entering your e-mail address instead of your Yahoo! ID." +msgstr "" +"1013-as hiba: A megadott felhasználónév érvénytelen. Ennek leggyakoribb oka, " +"hogy az e-mail címét adta meg a Yahoo! azonosítója helyett." #, c-format msgid "Unknown error number %d. Logging into the Yahoo! website may fix this." @@ -10328,6 +10380,124 @@ "segítségével visszatérhet ehhez az ablakhoz fiókok hozzáadásához, " "szerkesztéséhez vagy eltávolításához." +#. Buddy List +msgid "Background Color" +msgstr "Háttérszín" + +msgid "The background color for the buddy list" +msgstr "A partnerlista háttérszíne" + +msgid "Layout" +msgstr "Elrendezés" + +msgid "The layout of icons, name, and status of the buddy list" +msgstr "A partnerlista ikonjainak, nevének és állapotának elrendezése" + +#. Group +#. Note to translators: These two strings refer to the background color +#. of a buddy list group when in its expanded state +msgid "Expanded Background Color" +msgstr "Kibontott háttérszín" + +msgid "The background color of an expanded group" +msgstr "Kibontott csoport háttérszíne" + +#. Note to translators: These two strings refer to the font and color +#. of a buddy list group when in its expanded state +msgid "Expanded Text" +msgstr "Kibontott szöveg" + +msgid "The text information for when a group is expanded" +msgstr "Szöveges információk kibontott csoport esetén" + +#. Note to translators: These two strings refer to the background color +#. of a buddy list group when in its collapsed state +msgid "Collapsed Background Color" +msgstr "Összecsukott háttérszín" + +msgid "The background color of a collapsed group" +msgstr "Összecsukott csoport háttérszíne" + +#. Note to translators: These two strings refer to the font and color +#. of a buddy list group when in its collapsed state +msgid "Collapsed Text" +msgstr "Összecsukott szöveg" + +msgid "The text information for when a group is collapsed" +msgstr "A szöveges információk összecsukott csoport esetén" + +#. Buddy +#. Note to translators: These two strings refer to the background color +#. of a buddy list contact or chat room +msgid "Contact/Chat Background Color" +msgstr "Partner/csevegés háttérszíne" + +msgid "The background color of a contact or chat" +msgstr "Partner vagy csevegés háttérszíne" + +#. Note to translators: These two strings refer to the font and color +#. of a buddy list contact when in its expanded state +msgid "Contact Text" +msgstr "Partnerszöveg" + +msgid "The text information for when a contact is expanded" +msgstr "Kibontott partner szöveges információi" + +#. Note to translators: These two strings refer to the font and color +#. of a buddy list buddy when it is online +msgid "Online Text" +msgstr "Elérhető szöveg" + +msgid "The text information for when a buddy is online" +msgstr "Elérhető partner szöveges információi" + +#. Note to translators: These two strings refer to the font and color +#. of a buddy list buddy when it is away +msgid "Away Text" +msgstr "Távol szöveg" + +msgid "The text information for when a buddy is away" +msgstr "Távol lévő partner szöveges információi" + +#. Note to translators: These two strings refer to the font and color +#. of a buddy list buddy when it is offline +msgid "Offline Text" +msgstr "Kilépett szöveg" + +msgid "The text information for when a buddy is offline" +msgstr "Kilépett partner szöveges információi" + +#. Note to translators: These two strings refer to the font and color +#. of a buddy list buddy when it is idle +msgid "Idle Text" +msgstr "Ráérő szöveg" + +msgid "The text information for when a buddy is idle" +msgstr "Ráérő partner szöveges információi" + +#. Note to translators: These two strings refer to the font and color +#. of a buddy list buddy when they have sent you a new message +msgid "Message Text" +msgstr "Üzenetszöveg" + +msgid "The text information for when a buddy has an unread message" +msgstr "Olvasatlan üzenetekkel rendelkező partner szöveges információi" + +#. Note to translators: These two strings refer to the font and color +#. of a buddy list buddy when they have sent you a new message +msgid "Message (Nick Said) Text" +msgstr "Üzenetszöveg (becenév említve)" + +msgid "" +"The text information for when a chat has an unread message that mentions " +"your nickname" +msgstr "" +"Szöveges információk, ha a csevegés olvasatlan üzeneteket tartalmaz, amelyek " +"az Ön becenevét említik" + +msgid "The text information for a buddy's status" +msgstr "Partner állapotának szöveges információi" + #, c-format msgid "You have %d contact named %s. Would you like to merge them?" msgid_plural "" @@ -10763,8 +10933,8 @@ msgid "_Group:" msgstr "_Csoport:" -msgid "Auto_join when account becomes online." -msgstr "Automatikus _csatlakozás a fiók elérhetővé válásakor." +msgid "Auto_join when account connects." +msgstr "Automatikus _csatlakozás a fiók csatlakozásakor." msgid "_Remain in chat after window is closed." msgstr "Csevegésben mara_dás az ablak bezárásakor." @@ -10796,100 +10966,6 @@ msgid "/Buddies/Sort Buddies" msgstr "/Partnerek/Partnerek rendezése" -#. Buddy List -msgid "Background Color" -msgstr "Háttérszín" - -msgid "The background color for the buddy list" -msgstr "A partnerlista háttérszíne" - -msgid "Layout" -msgstr "Elrendezés" - -msgid "The layout of icons, name, and status of the blist" -msgstr "A partnerlista ikonjainak, nevének és állapotának elrendezése" - -#. Group -msgid "Expanded Background Color" -msgstr "Kibontott háttérszín" - -msgid "The background color of an expanded group" -msgstr "Kibontott csoport háttérszíne" - -msgid "Expanded Text" -msgstr "Kibontott szöveg" - -msgid "The text information for when a group is expanded" -msgstr "Szöveges információk kibontott csoport esetén" - -msgid "Collapsed Background Color" -msgstr "Összecsukott háttérszín" - -msgid "The background color of a collapsed group" -msgstr "Összecsukott csoport háttérszíne" - -msgid "Collapsed Text" -msgstr "Összecsukott szöveg" - -msgid "The text information for when a group is collapsed" -msgstr "A szöveges információk összecsukott csoport esetén" - -#. Buddy -msgid "Contact/Chat Background Color" -msgstr "Partner/csevegés háttérszíne" - -msgid "The background color of a contact or chat" -msgstr "Partner vagy csevegés háttérszíne" - -msgid "Contact Text" -msgstr "Partnerszöveg" - -msgid "The text information for when a contact is expanded" -msgstr "Kibontott partner szöveges információi" - -msgid "On-line Text" -msgstr "Elérhető szöveg" - -msgid "The text information for when a buddy is online" -msgstr "Elérhető partner szöveges információi" - -msgid "Away Text" -msgstr "Távol szöveg" - -msgid "The text information for when a buddy is away" -msgstr "Távol lévő partner szöveges információi" - -msgid "Off-line Text" -msgstr "Kilépett szöveg" - -msgid "The text information for when a buddy is off-line" -msgstr "Kilépett partner szöveges információi" - -msgid "Idle Text" -msgstr "Ráérő szöveg" - -msgid "The text information for when a buddy is idle" -msgstr "Ráérő partner szöveges információi" - -msgid "Message Text" -msgstr "Üzenetszöveg" - -msgid "The text information for when a buddy has an unread message" -msgstr "Olvasatlan üzenetekkel rendelkező partner szöveges információi" - -msgid "Message (Nick Said) Text" -msgstr "Üzenetszöveg (becenév említve)" - -msgid "" -"The text information for when a chat has an unread message that mentions " -"your nick" -msgstr "" -"Szöveges információk, ha a csevegés olvasatlan üzeneteket tartalmaz, amelyek " -"az Ön becenevét említik" - -msgid "The text information for a buddy's status" -msgstr "Partner állapotának szöveges információi" - msgid "Type the host name for this certificate." msgstr "Írja be a tanúsítványt birtokló gép nevét." @@ -10974,6 +11050,9 @@ msgid "/Conversation/New Instant _Message..." msgstr "/Társalgás/Új azonnali ü_zenet…" +msgid "/Conversation/Join a _Chat..." +msgstr "/Társalgás/Csatlakozás _csevegéshez…" + msgid "/Conversation/_Find..." msgstr "/Társalgás/Ker_esés…" @@ -11356,7 +11435,7 @@ msgid "Estonian" msgstr "észt" -msgid "Euskera(Basque)" +msgid "Basque" msgstr "Baszk" msgid "Persian" @@ -11561,10 +11640,19 @@ #, c-format msgid "" "Help via e-mail: support@pidgin.im

" -msgstr "" -"Segítség e-mailben (angol): support@pidgin.im

" +"\">support@pidgin.im (This is a mailing list, and messages sent here are publicly archived! " +"Furthermore, we do not support MXit, Facebook, Skype, or any " +"other third-party plugins on this list.

" +msgstr "" +"Segítség e-mailben: support@pidgin.im (Ez egy angol nyelvű levelezőlista, az ide küldött levelek " +"nyilvánosan elérhetők " +"lesznek! Továbbá, ezen a listán nem támogatjuk az MXit, " +"Facebook, Skype, vagy bármely más harmadik féltől származó bővítményt.

" #, c-format msgid "" @@ -12121,65 +12209,45 @@ #, c-format msgid "" -"%s %s\n" "Usage: %s [OPTION]...\n" "\n" -" -c, --config=DIR use DIR for config files\n" -" -d, --debug print debugging messages to stdout\n" -" -f, --force-online force online, regardless of network status\n" -" -h, --help display this help and exit\n" -" -m, --multiple do not ensure single instance\n" -" -n, --nologin don't automatically login\n" -" -l, --login[=NAME] enable specified account(s) (optional argument NAME\n" -" specifies account(s) to use, separated by commas.\n" -" Without this only the first account will be enabled).\n" -" --display=DISPLAY X display to use\n" -" -v, --version display the current version and exit\n" -msgstr "" -"%s %s\n" +msgstr "" "Használat: %s [KAPCSOLÓ]…\n" "\n" -" -c, --config=KÖNYVTÁR A KÖNYVTÁR használata a beállítófájlokhoz\n" -" -d, --debug hibakereső üzenetek kiírása a szabványos kimenetre\n" -" -f, --force-online elérhető állapot kényszerítése, a hálózat állapotától\n" -" függetlenül\n" -" -h, --help ezen súgó megjelenítése és kilépés\n" -" -m, --multiple ne csak egy példány futhasson\n" -" -n, --nologin ne jelentkezzen be automatikusan\n" -" -l, --login[=NÉV] automatikus bejelentkezés (a NÉV paraméter megadja a\n" -" használandó fiókok vesszőkkel tagolt listáját)\n" -" --display=KÉPERNYŐ a használandó X megjelenítő\n" -" -v, --version az aktuális verzió megjelenítése és kilépés\n" - -#, c-format -msgid "" -"%s %s\n" -"Usage: %s [OPTION]...\n" -"\n" -" -c, --config=DIR use DIR for config files\n" -" -d, --debug print debugging messages to stdout\n" -" -f, --force-online force online, regardless of network status\n" -" -h, --help display this help and exit\n" -" -m, --multiple do not ensure single instance\n" -" -n, --nologin don't automatically login\n" -" -l, --login[=NAME] enable specified account(s) (optional argument NAME\n" -" specifies account(s) to use, separated by commas.\n" -" Without this only the first account will be enabled).\n" -" -v, --version display the current version and exit\n" -msgstr "" -"%s %s\n" -"Használat: %s [KAPCSOLÓ]…\n" -"\n" -" -c, --config=KÖNYVTÁR A KÖNYVTÁR használata a beállítófájlokhoz\n" -" -d, --debug hibakereső üzenetek kiírása a szabványos kimenetre\n" -" -f, --force-online elérhető állapot kényszerítése, a hálózat állapotától\n" -" függetlenül\n" -" -h, --help ezen súgó megjelenítése és kilépés\n" -" -m, --multiple ne csak egy példány futhasson\n" -" -n, --nologin ne jelentkezzen be automatikusan\n" -" -l, --login[=NÉV] automatikus bejelentkezés (a NÉV paraméter megadja a\n" -" használandó fiókok vesszőkkel tagolt listáját)\n" -" -v, --version az aktuális verzió megjelenítése és kilépés\n" + +msgid "use DIR for config files" +msgstr "a KÖNYVTÁR használata a beállítófájlokhoz" + +msgid "print debugging messages to stdout" +msgstr "hibakereső üzenetek kiírása a szabványos kimenetre" + +msgid "force online, regardless of network status" +msgstr "elérhető kényszerítése a hálózat állapotától függetlenül" + +msgid "display this help and exit" +msgstr "ezen súgó megjelenítése és kilépés" + +msgid "allow multiple instances" +msgstr "több példány engedélyezése" + +msgid "don't automatically login" +msgstr "ne jelentkezzen be automatikusan" + +msgid "" +"enable specified account(s) (optional argument NAME\n" +" specifies account(s) to use, separated by commas." +msgstr "" +"automatikus bejelentkezés (a NÉV paraméter megadja a\n" +" használandó fiókok vesszőkkel tagolt listáját." + +msgid "Without this only the first account will be enabled)." +msgstr "Enélkül csak az első fiók lesz engedélyezve)." + +msgid "X display to use" +msgstr "Használandó X-megjelenítő" + +msgid "display the current version and exit" +msgstr "az aktuális verzió megjelenítése és kilépés" #, c-format msgid "" @@ -12224,9 +12292,6 @@ msgid "/Media/_Hangup" msgstr "/Média/_Lerakás" -msgid "Calling..." -msgstr "Hívás…" - #, c-format msgid "%s wishes to start an audio/video session with you." msgstr "%s hang/videókapcsolatot szeretne indítani." @@ -13243,66 +13308,6 @@ msgid "Displays statistical information about your buddies' availability" msgstr "Statisztikai információk megjelenítése a partnerek elérhetőségéről" -msgid "Server name request" -msgstr "Kiszolgálónév-kérés" - -msgid "Enter an XMPP Server" -msgstr "Adjon meg egy XMPP kiszolgálót" - -msgid "Select an XMPP server to query" -msgstr "Válassza ki a lekérdezendő XMPP kiszolgálót" - -msgid "Find Services" -msgstr "Szolgáltatások keresése" - -msgid "Add to Buddy List" -msgstr "Felvétel a partnerlistára" - -msgid "Gateway" -msgstr "Átjáró" - -msgid "Directory" -msgstr "Címtár" - -msgid "PubSub Collection" -msgstr "PubSub gyűjtemény" - -msgid "PubSub Leaf" -msgstr "PubSub levél" - -msgid "" -"\n" -"Description: " -msgstr "" -"\n" -"Leírás:" - -#. Create the window. -msgid "Service Discovery" -msgstr "Szolgáltatásfeltérképezés" - -msgid "_Browse" -msgstr "_Tallózás" - -msgid "Server does not exist" -msgstr "A kiszolgáló nem létezik" - -msgid "Server does not support service discovery" -msgstr "A kiszolgáló nem támogatja a szolgáltatásfeltérképezést" - -msgid "XMPP Service Discovery" -msgstr "XMPP szolgáltatásfeltérképezés" - -msgid "Allows browsing and registering services." -msgstr "Lehetővé teszi szolgáltatások tallózását és regisztrálását." - -msgid "" -"This plugin is useful for registering with legacy transports or other XMPP " -"services." -msgstr "" -"Ez a bővítmény örökölt átvitelekkel történő, vagy más XMPP szolgáltatásokhoz " -"való regisztráláshoz hasznos." - msgid "Buddy is idle" msgstr "A partner inaktív" @@ -13395,6 +13400,68 @@ msgid "Apply in IMs" msgstr "Alkalmazás üzenetváltásokban" +#. Note to translators: The string "Enter an XMPP Server" is asking the +#. user to type the name of an XMPP server which will then be queried +msgid "Server name request" +msgstr "Kiszolgálónév-kérés" + +msgid "Enter an XMPP Server" +msgstr "Adjon meg egy XMPP kiszolgálót" + +msgid "Select an XMPP server to query" +msgstr "Válassza ki a lekérdezendő XMPP kiszolgálót" + +msgid "Find Services" +msgstr "Szolgáltatások keresése" + +msgid "Add to Buddy List" +msgstr "Felvétel a partnerlistára" + +msgid "Gateway" +msgstr "Átjáró" + +msgid "Directory" +msgstr "Címtár" + +msgid "PubSub Collection" +msgstr "PubSub gyűjtemény" + +msgid "PubSub Leaf" +msgstr "PubSub levél" + +msgid "" +"\n" +"Description: " +msgstr "" +"\n" +"Leírás:" + +#. Create the window. +msgid "Service Discovery" +msgstr "Szolgáltatásfeltérképezés" + +msgid "_Browse" +msgstr "_Tallózás" + +msgid "Server does not exist" +msgstr "A kiszolgáló nem létezik" + +msgid "Server does not support service discovery" +msgstr "A kiszolgáló nem támogatja a szolgáltatásfeltérképezést" + +msgid "XMPP Service Discovery" +msgstr "XMPP szolgáltatásfeltérképezés" + +msgid "Allows browsing and registering services." +msgstr "Lehetővé teszi szolgáltatások tallózását és regisztrálását." + +msgid "" +"This plugin is useful for registering with legacy transports or other XMPP " +"services." +msgstr "" +"Ez a bővítmény örökölt átvitelekkel történő, vagy más XMPP szolgáltatásokhoz " +"való regisztráláshoz hasznos." + msgid "By conversation count" msgstr "Társalgások száma szerint"