Mercurial > pidgin.yaz
changeset 27822:1d012e75153f
propagate from branch 'im.pidgin.pidgin' (head 1b822949efa4354726f0d774f743e3417426728a)
to branch 'im.pidgin.pidgin.yaz' (head 07b6c247ee684e6ff132270b5424a7ed82d7fd33)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Thu, 17 Apr 2008 17:04:20 +0000 |
parents | 3a305a4511ea (current diff) 9fa57410e743 (diff) |
children | e64f06237ff9 |
files | configure.ac libpurple/protocols/jabber/si.c libpurple/protocols/oscar/oscar.c libpurple/protocols/yahoo/yahoo.c libpurple/util.h pidgin/gtkimhtml.c |
diffstat | 15 files changed, 86 insertions(+), 71 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Thu Apr 17 17:02:07 2008 +0000 +++ b/configure.ac Thu Apr 17 17:04:20 2008 +0000 @@ -2247,7 +2247,7 @@ dnl ####################################################################### dnl # Disable pixmap installation dnl ####################################################################### -AC_ARG_ENABLE(pixmaps-install, AC_HELP_STRING([--disable-pixmaps-install], [disable installation of pixmap files]), enable_pixmaps="$enableval", enable_pixmaps=yes) +AC_ARG_ENABLE(pixmaps-install, AC_HELP_STRING([--disable-pixmaps-install], [disable installation of pixmap files - Pidgin still needs them!]), enable_pixmaps="$enableval", enable_pixmaps=yes) AM_CONDITIONAL(INSTALL_PIXMAPS, test "x$enable_pixmaps" = "xyes") @@ -2436,6 +2436,12 @@ if test "x$pidginpath" != "x" ; then echo Warning: You have an old copy of Pidgin at $pidginpath. fi +if test "x$enable_pixmaps" = "xno" ; then + echo + echo Warning: You have disabled the installation of pixmap data, but Pidgin + echo still requires installed pixmaps. Be sure you know what you\'re doing. +fi echo echo configure complete, now type \'make\' echo +
--- a/libpurple/blist.h Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/blist.h Thu Apr 17 17:04:20 2008 +0000 @@ -475,7 +475,8 @@ * @param buddy The new buddy who gets added * @param contact The optional contact to place the buddy in. * @param group The group to add the new buddy to. - * @param node The insertion point + * @param node The insertion point. Pass in NULL to add the node as + * the last child in the given group. */ void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGroup *group, PurpleBlistNode *node);
--- a/libpurple/protocols/bonjour/jabber.c Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Thu Apr 17 17:04:20 2008 +0000 @@ -114,6 +114,28 @@ return "1"; } +static gchar * +get_xmlnode_contents(xmlnode *node) +{ + gchar *contents; + + contents = xmlnode_to_str(node, NULL); + + /* we just want the stuff inside <font></font> + * There isn't stuff exposed in xmlnode.c to do this more cleanly. */ + + if (contents) { + char *bodystart = strchr(contents, '>'); + char *bodyend = strrchr(bodystart, '<'); + if (bodystart && bodyend && (bodystart + 1) != bodyend) { + *bodyend = '\0'; + memmove(contents, bodystart + 1, (bodyend - bodystart)); + } + } + + return contents; +} + static void _jabber_parse_and_write_message_to_ui(xmlnode *message_node, PurpleBuddy *pb) { @@ -167,7 +189,7 @@ if (font_size != NULL) font_size = _font_size_ichat_to_purple(atoi(font_size)); font_color = xmlnode_get_attrib(html_body_font_node, "color"); - html_body = xmlnode_get_data(html_body_font_node); + html_body = get_xmlnode_contents(html_body_font_node); if (html_body == NULL) /* This is the kind of formated messages that Purple creates */
--- a/libpurple/protocols/jabber/auth.c Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/protocols/jabber/auth.c Thu Apr 17 17:04:20 2008 +0000 @@ -490,12 +490,6 @@ { char *mech_name = xmlnode_get_data(mechnode); #ifdef HAVE_CYRUS_SASL - /* Skip the GSSAPI mechanism unless it's enabled for this account */ - if (mech_name && !strcmp(mech_name, "GSSAPI") && - !purple_account_get_bool(js->gc->account, "auth_gssapi", TRUE)) { - continue; - } - g_string_append(js->sasl_mechs, mech_name); g_string_append_c(js->sasl_mechs, ' '); #else @@ -723,13 +717,16 @@ } else if(xmlnode_get_child(query, "password")) { if(js->gsc == NULL && !purple_account_get_bool(js->gc->account, "auth_plain_in_clear", FALSE)) { + char *msg = g_strdup_printf(_("%s requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"), + js->gc->account->username); purple_request_yes_no(js->gc, _("Plaintext Authentication"), _("Plaintext Authentication"), - _("This server requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"), + msg, 1, purple_connection_get_account(js->gc), NULL, NULL, purple_connection_get_account(js->gc), allow_plaintext_auth, disallow_plaintext_auth); + g_free(msg); return; } finish_plaintext_authentication(js);
--- a/libpurple/protocols/jabber/libxmpp.c Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Thu Apr 17 17:04:20 2008 +0000 @@ -223,14 +223,6 @@ "auth_plain_in_clear", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); - -#ifdef HAVE_CYRUS_SASL - option = purple_account_option_bool_new( - _("Use GSSAPI (Kerberos v5) for authentication"), - "auth_gssapi", TRUE); - prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, - option); -#endif option = purple_account_option_int_new(_("Connect port"), "port", 5222); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options,
--- a/libpurple/protocols/jabber/si.c Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/protocols/jabber/si.c Thu Apr 17 17:04:20 2008 +0000 @@ -666,6 +666,9 @@ if(!(jid = xmlnode_get_attrib(streamhost_used, "jid"))) return; + purple_debug_info("jabber", "jabber_si_connect_proxy_cb() will be looking at jsx %p: jsx->streamhosts is %p and jid is %p", + jsx, jsx->streamhosts, jid); + if(!(matched = g_list_find_custom(jsx->streamhosts, jid, jabber_si_compare_jid))) { gchar *my_jid = g_strdup_printf("%s@%s/%s", jsx->js->user->node, @@ -782,6 +785,8 @@ g_snprintf(port, sizeof(port), "%hu", portnum); + purple_debug_info("jabber", "jabber_si_xfer_bytestreams_listen_cb() will be looking at jsx %p: jsx->streamhosts %p and ft_proxy_list[%i] %p", + jsx, jsx->streamhosts, i, ft_proxy_list[i]); if(g_list_find_custom(jsx->streamhosts, ft_proxy_list[i], jabber_si_compare_jid) != NULL) continue; @@ -809,6 +814,8 @@ if (!(sh->jid && sh->host && sh->port > 0)) continue; + purple_debug_info("jabber", "jabber_si_xfer_bytestreams_listen_cb() will be looking at jsx %p: jsx->streamhosts %p and sh->jid %p", + jsx, jsx->streamhosts, sh->jid); if(g_list_find_custom(jsx->streamhosts, sh->jid, jabber_si_compare_jid) != NULL) continue; @@ -980,6 +987,8 @@ g_free(jsx->rxqueue); g_free(jsx); xfer->data = NULL; + + purple_debug_info("jabber", "jabber_si_xfer_free(): freeing jsx %p", jsx); } static void jabber_si_xfer_cancel_send(PurpleXfer *xfer)
--- a/libpurple/protocols/msnp9/userlist.c Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/protocols/msnp9/userlist.c Thu Apr 17 17:04:20 2008 +0000 @@ -362,6 +362,20 @@ passport = msn_user_get_passport(user); store = msn_user_get_friendly_name(user); + if (list_op & MSN_LIST_AL_OP) + { + /* These are users who are allowed to see our status. */ + purple_privacy_deny_remove(account, passport, TRUE); + purple_privacy_permit_add(account, passport, TRUE); + } + + if (list_op & MSN_LIST_BL_OP) + { + /* These are users who are not allowed to see our status. */ + purple_privacy_permit_remove(account, passport, TRUE); + purple_privacy_deny_add(account, passport, TRUE); + } + if (list_op & MSN_LIST_FL_OP) { GSList *c; @@ -377,20 +391,6 @@ serv_got_alias(gc, passport, store); } - if (list_op & MSN_LIST_AL_OP) - { - /* These are users who are allowed to see our status. */ - purple_privacy_deny_remove(account, passport, TRUE); - purple_privacy_permit_add(account, passport, TRUE); - } - - if (list_op & MSN_LIST_BL_OP) - { - /* These are users who are not allowed to see our status. */ - purple_privacy_permit_remove(account, passport, TRUE); - purple_privacy_deny_add(account, passport, TRUE); - } - if (list_op & MSN_LIST_RL_OP) { /* These are users who have us on their buddy list. */
--- a/libpurple/protocols/oscar/oscar.c Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.c Thu Apr 17 17:04:20 2008 +0000 @@ -2307,19 +2307,6 @@ } static void -purple_auth_dontrequest(struct name_data *data) -{ - PurpleConnection *gc = data->gc; - PurpleBuddy *b = purple_find_buddy(purple_connection_get_account(gc), data->name); - - /* Remove from local list */ - purple_blist_remove_buddy(b); - - oscar_free_name_data(data); -} - - -static void purple_auth_sendrequest(PurpleConnection *gc, const char *name) { struct name_data *data; @@ -2331,12 +2318,11 @@ purple_request_input(data->gc, NULL, _("Authorization Request Message:"), NULL, _("Please authorize me!"), TRUE, FALSE, NULL, _("_OK"), G_CALLBACK(purple_auth_request), - _("_Cancel"), G_CALLBACK(purple_auth_dontrequest), + _("_Cancel"), G_CALLBACK(oscar_free_name_data), purple_connection_get_account(gc), name, NULL, data); } - static void purple_auth_sendrequest_menu(PurpleBlistNode *node, gpointer ignored) { @@ -4832,12 +4818,6 @@ oscar_set_extendedstatus(gc); - /* Activate SSI */ - /* Sending the enable causes other people to be able to see you, and you to see them */ - /* Make sure your privacy setting/invisibility is set how you want it before this! */ - purple_debug_info("oscar", "ssi: activating server-stored buddy list\n"); - aim_ssi_enable(od); - return 1; }
--- a/libpurple/protocols/yahoo/yahoo.c Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Thu Apr 17 17:04:20 2008 +0000 @@ -518,7 +518,7 @@ } else { /* This buddy is on the ignore list (and therefore in no group) */ - purple_debug_info("yahoo", "%s adding %s to the deny list because of the ignore list / no group was found", + purple_debug_info("yahoo", "%s adding %s to the deny list because of the ignore list / no group was found\n", account->username, norm_bud); purple_privacy_deny_add(account, norm_bud, 1); }
--- a/libpurple/util.h Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/util.h Thu Apr 17 17:04:20 2008 +0000 @@ -476,7 +476,8 @@ * * @param str The string to strip HTML from. * - * @return The new string without HTML. This must be freed. + * @return The new string without HTML. You must g_free this string + * when finished with it. */ char *purple_markup_strip_html(const char *str); @@ -485,7 +486,9 @@ * * @param str The string to linkify. * - * @return The linkified text. + * @return The new string with all URIs surrounded in standard + * HTML <a href="whatever"></a> tags. You must g_free this + * string when finished with it. */ char *purple_markup_linkify(const char *str); @@ -497,7 +500,8 @@ * * @param html The string in which to unescape any HTML entities * - * @return the text with HTML entities literalized + * @return The text with HTML entities literalized. You must g_free + * this string when finished with it. */ char *purple_unescape_html(const char *html);
--- a/libpurple/win32/libc_interface.h Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/win32/libc_interface.h Thu Apr 17 17:04:20 2008 +0000 @@ -44,8 +44,8 @@ #endif /* sys/socket.h */ -#define socket( namespace, style, protocol ) \ -wpurple_socket( namespace, style, protocol ) +#define socket( domain, style, protocol ) \ +wpurple_socket( domain, style, protocol ) #define connect( socket, addr, length ) \ wpurple_connect( socket, addr, length )
--- a/libpurple/win32/libc_internal.h Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/win32/libc_internal.h Thu Apr 17 17:04:20 2008 +0000 @@ -30,7 +30,7 @@ #endif /* __cplusplus */ /* sys/socket.h */ -int wpurple_socket(int namespace, int style, int protocol); +int wpurple_socket(int domain, int style, int protocol); int wpurple_connect(int socket, struct sockaddr *addr, u_long length); int wpurple_getsockopt(int socket, int level, int optname, void *optval, socklen_t *optlenptr); int wpurple_setsockopt(int socket, int level, int optname, const void *optval, socklen_t optlen);
--- a/libpurple/win32/targets.mak Thu Apr 17 17:02:07 2008 +0000 +++ b/libpurple/win32/targets.mak Thu Apr 17 17:04:20 2008 +0000 @@ -12,11 +12,10 @@ sed -e 's/@PLUGINS_DEFINE@/#define PURPLE_PLUGINS 1/' $@.in > $@ $(PURPLE_VERSION_H): $(PURPLE_VERSION_H).in $(PIDGIN_TREE_TOP)/configure.ac - cp $@.in $@ awk 'BEGIN {FS="[\\(\\)\\[\\]]"} \ - /^m4_define..purple_major_version/ {system("sed -i -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $@");} \ - /^m4_define..purple_minor_version/ {system("sed -i -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $@");} \ - /^m4_define..purple_micro_version/ {system("sed -i -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $@"); exit}' $(PIDGIN_TREE_TOP)/configure.ac + /^m4_define..purple_major_version/ {system("sed -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $@.in > $@");} \ + /^m4_define..purple_minor_version/ {system("sed -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $@ > $@.tmp & mv $@.tmp $@");} \ + /^m4_define..purple_micro_version/ {system("sed -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $@ > $@.tmp & mv $@.tmp $@"); exit}' $(PIDGIN_TREE_TOP)/configure.ac $(PURPLE_DLL) $(PURPLE_DLL).a: $(PURPLE_VERSION_H) $(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) libpurple.dll
--- a/pidgin/gtkblist.c Thu Apr 17 17:02:07 2008 +0000 +++ b/pidgin/gtkblist.c Thu Apr 17 17:04:20 2008 +0000 @@ -4436,9 +4436,10 @@ } static gboolean -headline_click_callback(gpointer data) -{ - ((GSourceFunc)gtkblist->headline_callback)(gtkblist->headline_data); +headline_click_callback(gpointer unused) +{ + if (gtkblist->headline_callback) + ((GSourceFunc) gtkblist->headline_callback)(gtkblist->headline_data); reset_headline(gtkblist); return FALSE; } @@ -4448,7 +4449,7 @@ { gtk_widget_hide(gtkblist->headline_hbox); if (gtkblist->headline_callback && !headline_hover_close((int)event->x, (int)event->y)) - g_idle_add((GSourceFunc)headline_click_callback, gtkblist->headline_data); + g_idle_add(headline_click_callback, NULL); else { if (gtkblist->headline_destroy) gtkblist->headline_destroy(gtkblist->headline_data);
--- a/pidgin/gtkimhtml.c Thu Apr 17 17:02:07 2008 +0000 +++ b/pidgin/gtkimhtml.c Thu Apr 17 17:04:20 2008 +0000 @@ -2705,8 +2705,11 @@ if (sml) font->sml = sml; - else if (oldfont && oldfont->sml) - font->sml = g_strdup(oldfont->sml); + else { + g_free(sml); + if (oldfont && oldfont->sml) + font->sml = g_strdup(oldfont->sml); + } if (size && !(options & GTK_IMHTML_NO_SIZES) && (imhtml->format_functions & (GTK_IMHTML_GROW|GTK_IMHTML_SHRINK))) { if (*size == '+') { @@ -2758,7 +2761,7 @@ case 46: /* IMG (opt) */ case 59: /* IMG */ { - const char *id; + char *id; gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); ws[0] = '\0'; wpos = 0; @@ -2770,6 +2773,7 @@ if (!id) break; gtk_imhtml_insert_image_at_iter(imhtml, atoi(id), iter); + g_free(id); break; } case 47: /* P (opt) */