Mercurial > pidgin
changeset 22164:d1fe81e3a850
merge of '131ee6ac42d38162c4fce7a7200a0afa01aed6ce'
and '7180f1790b23a722d6c377359e36bcc7cc7cca05'
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Sun, 20 Jan 2008 13:54:26 +0000 |
parents | 451b7edf79ef (current diff) caeb452845ef (diff) |
children | 5421a1dc36f6 |
files | |
diffstat | 31 files changed, 186 insertions(+), 124 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntcertmgr.c Sun Jan 20 13:31:19 2008 +0000 +++ b/finch/gntcertmgr.c Sun Jan 20 13:54:26 2008 +0000 @@ -235,7 +235,7 @@ purple_request_close_with_handle((void *)key); purple_request_yes_no((void *)key, _("Confirm certificate delete"), primary, NULL, - 2, + 1, NULL, NULL, NULL, g_strdup(key), tls_peers_mgmt_delete_confirm_cb,
--- a/finch/gntrequest.c Sun Jan 20 13:31:19 2008 +0000 +++ b/finch/gntrequest.c Sun Jan 20 13:54:26 2008 +0000 @@ -253,7 +253,7 @@ void *user_data, size_t actioncount, va_list actions) { - GntWidget *window, *box, *button; + GntWidget *window, *box, *button, *focus = NULL; int i; window = setup_request_window(title, primary, secondary, PURPLE_REQUEST_ACTION); @@ -272,9 +272,14 @@ g_object_set_data(G_OBJECT(button), "activate-userdata", user_data); g_object_set_data(G_OBJECT(button), "activate-id", GINT_TO_POINTER(i)); g_signal_connect(G_OBJECT(button), "activate", G_CALLBACK(request_action_cb), window); + + if (i == default_value) + focus = button; } gnt_widget_show(window); + if (focus) + gnt_box_give_focus_to_child(GNT_BOX(window), focus); return window; }
--- a/libpurple/certificate.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/certificate.c Sun Jan 20 13:54:26 2008 +0000 @@ -568,7 +568,7 @@ _("Single-use Certificate Verification"), primary, secondary, - 1, /* Accept by default */ + 0, /* Accept by default */ NULL, /* No account */ NULL, /* No other user */ NULL, /* No associated conversation */ @@ -1199,7 +1199,7 @@ _("SSL Certificate Verification"), primary, reason, - 2, /* Accept by default */ + 0, /* Accept by default */ NULL, /* No account */ NULL, /* No other user */ NULL, /* No associated conversation */
--- a/libpurple/example/Makefile.am Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/example/Makefile.am Sun Jan 20 13:54:26 2008 +0000 @@ -17,7 +17,8 @@ -DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/\" \ -DLOCALEDIR=\"$(datadir)/locale\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \ - -I$(top_srcdir)/libpurple/ \ + -I$(top_builddir)/libpurple \ + -I$(top_srcdir)/libpurple \ -I$(top_srcdir) \ $(DEBUG_CFLAGS) \ $(GLIB_CFLAGS) \
--- a/libpurple/example/nullclient.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/example/nullclient.c Sun Jan 20 13:54:26 2008 +0000 @@ -21,28 +21,11 @@ * */ -/* XXX: we probably shouldn't include internal.h in examples */ -#include "internal.h" - -#include "account.h" -#include "conversation.h" -#include "core.h" -#include "debug.h" -#include "eventloop.h" -#include "ft.h" -#include "log.h" -#include "notify.h" -#include "prefs.h" -#include "prpl.h" -#include "pounce.h" -#include "savedstatuses.h" -#include "sound.h" -#include "status.h" -#include "util.h" -#include "whiteboard.h" +#include "purple.h" #include <glib.h> +#include <signal.h> #include <string.h> #include <unistd.h>
--- a/libpurple/plugins/offlinemsg.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/plugins/offlinemsg.c Sun Jan 20 13:54:26 2008 +0000 @@ -159,7 +159,7 @@ purple_request_action(handle, _("Offline Message"), ask, _("You can edit/delete the pounce from the `Buddy Pounces' dialog"), - 1, + 0, offline->account, offline->who, offline->conv, offline, 2, _("Yes"), record_pounce,
--- a/libpurple/protocols/irc/dcc_send.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/irc/dcc_send.c Sun Jan 20 13:54:26 2008 +0000 @@ -56,7 +56,7 @@ l = htonl(xfer->bytes_sent); result = write(xfer->fd, &l, sizeof(l)); if (result != sizeof(l)) { - purple_debug_error("irc", "unable to send acknowledgement: %s\n", strerror(errno)); + purple_debug_error("irc", "unable to send acknowledgement: %s\n", g_strerror(errno)); /* TODO: We should probably close the connection here or something. */ } }
--- a/libpurple/protocols/jabber/auth.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/jabber/auth.c Sun Jan 20 13:54:26 2008 +0000 @@ -325,7 +325,7 @@ purple_request_yes_no(js->gc, _("Plaintext Authentication"), _("Plaintext Authentication"), msg, - 2, js->gc->account, NULL, NULL, js->gc->account, + 1, js->gc->account, NULL, NULL, js->gc->account, allow_cyrus_plaintext_auth, disallow_plaintext_auth); g_free(msg); @@ -527,7 +527,7 @@ purple_request_yes_no(js->gc, _("Plaintext Authentication"), _("Plaintext Authentication"), msg, - 2, + 1, purple_connection_get_account(js->gc), NULL, NULL, purple_connection_get_account(js->gc), allow_plaintext_auth, disallow_plaintext_auth); @@ -719,7 +719,7 @@ purple_request_yes_no(js->gc, _("Plaintext Authentication"), _("Plaintext Authentication"), _("This server requires plaintext authentication over an unencrypted connection. Allow this and continue authentication?"), - 2, + 1, purple_connection_get_account(js->gc), NULL, NULL, purple_connection_get_account(js->gc), allow_plaintext_auth, disallow_plaintext_auth);
--- a/libpurple/protocols/msn/msn.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/msn/msn.c Sun Jan 20 13:54:26 2008 +0000 @@ -351,7 +351,7 @@ _("Do you want to allow or disallow people on " "your buddy list to send you MSN Mobile pages " "to your cell phone or other mobile device?"), - -1, + PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc), NULL, NULL, gc, 3, _("Allow"), G_CALLBACK(enable_msn_pages_cb),
--- a/libpurple/protocols/msnp9/msn.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/msnp9/msn.c Sun Jan 20 13:54:26 2008 +0000 @@ -347,7 +347,7 @@ _("Do you want to allow or disallow people on " "your buddy list to send you MSN Mobile pages " "to your cell phone or other mobile device?"), - -1, + PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc), NULL, NULL, gc, 3, _("Allow"), G_CALLBACK(enable_msn_pages_cb),
--- a/libpurple/protocols/msnp9/notification.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/msnp9/notification.c Sun Jan 20 13:54:26 2008 +0000 @@ -1012,7 +1012,7 @@ { purple_debug_error("msn", "Error opening temp passport file: %s\n", - strerror(errno)); + g_strerror(errno)); } else { @@ -1061,7 +1061,7 @@ { purple_debug_error("msn", "Error closing temp passport file: %s\n", - strerror(errno)); + g_strerror(errno)); g_unlink(session->passport_info.file); g_free(session->passport_info.file);
--- a/libpurple/protocols/msnp9/servconn.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/msnp9/servconn.c Sun Jan 20 13:54:26 2008 +0000 @@ -392,7 +392,7 @@ return; else if (len <= 0) { - purple_debug_error("msn", "servconn read error, len: %d error: %s\n", len, strerror(errno)); + purple_debug_error("msn", "servconn read error, len: %d error: %s\n", len, g_strerror(errno)); msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_READ); return;
--- a/libpurple/protocols/myspace/myspace.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/myspace/myspace.c Sun Jan 20 13:54:26 2008 +0000 @@ -117,7 +117,7 @@ } return TRUE; } - + /** * Get possible user status types. Based on mockprpl. * @@ -552,10 +552,8 @@ * return 1 even if the message could not be sent, since I don't know if * it has failed yet--because the IM is only sent after the userid is * retrieved from the server (which happens after this function returns). + * If an error does occur, it should be logged to the IM window. */ - /* TODO: maybe if message is delayed, don't echo to conv window, - * but do echo it to conv window manually once it is actually - * sent? Would be complicated. */ rc = 1; } else { rc = -1; @@ -563,19 +561,6 @@ g_free(message_msim); - /* - * In MySpace, you login with your email address, but don't talk to other - * users using their email address. So there is currently an asymmetry in the - * IM windows when using this plugin: - * - * you@example.com: hello - * some_other_user: what's going on? - * you@example.com: just coding a prpl - * - * TODO: Make the sent IM's appear as from the user's username, instead of - * their email address. Purple uses the login (in MSIM, the email)--change this. - */ - return rc; } @@ -745,7 +730,10 @@ /* TODO: dump unknown msgs to file, so user can send them to me * if they wish, to help add support for new messages (inspired - * by Alexandr Shutko, who maintains OSCAR protocol documentation). */ + * by Alexandr Shutko, who maintains OSCAR protocol documentation). + * + * Filed enhancement ticket for libpurple as #4688. + */ purple_debug_info("msim", "Unrecognized data on account for %s\n", (session && session->account && session->account->username) ? @@ -787,9 +775,6 @@ msg_text, username); if (g_str_equal(msg_text, "%typing%")) { - /* TODO: find out if msim repeatedly sends typing messages, so we can - * give it a timeout. Right now, there does seem to be an inordinately - * amount of time between typing stopped-typing notifications. */ serv_got_typing(session->gc, username, 0, PURPLE_TYPING); rc = TRUE; } else if (g_str_equal(msg_text, "%stoptyping%")) { @@ -959,6 +944,7 @@ if (!user) { /* User isn't on blist, create a temporary user to store info. */ + /* TODO: is this legit, or is it somehow responsible for #3444? */ PurpleBuddy *buddy; user = g_new0(MsimUser, 1); @@ -1052,6 +1038,7 @@ guint status_code; const gchar *message; gchar *stripped; + gchar *unrecognized_msg; session = (MsimSession *)account->gc->proto_data; @@ -1083,6 +1070,12 @@ purple_debug_info("msim", "msim_set_status: unknown " "status interpreting as online"); status_code = MSIM_STATUS_CODE_ONLINE; + + unrecognized_msg = g_strdup_printf("msim_set_status, unrecognized status type: %d\n", + purple_status_type_get_primitive(type)); + msim_unrecognized(session, NULL, unrecognized_msg); + g_free(unrecognized_msg); + break; } @@ -1203,7 +1196,7 @@ msim_process(session, msg); /* TODO: Free copy cloned from msim_preprocess_incoming(). */ - //XXX msim_msg_free(msg); + /* msim_msg_free(msg); */ msim_msg_free(body); } @@ -1211,7 +1204,9 @@ * * @param wanted_uid * - * @return Username of wanted_uid, if on blist, or NULL. Static string. + * @return Username of wanted_uid, if on blist, or NULL. Static string. + * TODO: The username string here is a new string from g_strdup(), not + * a static string that doesn't need to be fixed. Probably leaks. TODO: fix. * */ static const gchar * @@ -1313,13 +1308,13 @@ g_return_val_if_fail(MSIM_SESSION_VALID(session), FALSE); delta = time(NULL) - session->last_comm; - //purple_debug_info("msim", "msim_check_alive: delta=%d\n", delta); + /* purple_debug_info("msim", "msim_check_alive: delta=%d\n", delta); */ if (delta >= MSIM_KEEPALIVE_INTERVAL) { errmsg = g_strdup_printf(_("Connection to server lost (no data received within %d seconds)"), (int)delta); purple_debug_info("msim", "msim_check_alive: %s > interval of %d, presumed dead\n", errmsg, MSIM_KEEPALIVE_INTERVAL); - purple_connection_error_reason (session->gc, + purple_connection_error_reason(session->gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, errmsg); purple_notify_error(session->gc, NULL, errmsg, NULL); @@ -1741,7 +1736,7 @@ static gboolean msim_web_challenge(MsimSession *session, MsimMessage *msg) { - /* TODO: web challenge, store token */ + /* TODO: web challenge, store token. #2659. */ return FALSE; } @@ -1832,13 +1827,14 @@ if (msim_msg_get(msg, "fatal")) { PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR; purple_debug_info("msim", "fatal error, closing\n"); + switch (err) { - case 260: /* Incorrect password */ + case MSIM_ERROR_INCORRECT_PASSWORD: /* Incorrect password */ reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; if (!purple_account_get_remember_password(session->account)) purple_account_set_password(session->account, NULL); break; - case 6: /* Logged in elsewhere */ + case MSIM_ERROR_LOGGED_IN_ELSEWHERE: /* Logged in elsewhere */ reason = PURPLE_CONNECTION_ERROR_NAME_IN_USE; if (!purple_account_get_remember_password(session->account)) purple_account_set_password(session->account, NULL); @@ -1871,6 +1867,7 @@ gchar *status_headline, *status_headline_escaped; gint status_code, purple_status_code; gchar *username; + gchar *unrecognized_msg; g_return_val_if_fail(MSIM_SESSION_VALID(session), FALSE); g_return_val_if_fail(msg != NULL, FALSE); @@ -1903,7 +1900,8 @@ blist = purple_get_blist(); - /* Add buddy if not found */ + /* Add buddy if not found. + * TODO: Could this be responsible for #3444? */ user = msim_find_user(session, username); if (!user) { PurpleBuddy *buddy; @@ -1915,7 +1913,7 @@ user = msim_get_user_from_buddy(buddy); - /* All buddies on list should have 'uid' integer associated with them. */ + /* All buddies on list should have a UserID integer associated with them. */ purple_blist_node_set_int(&buddy->node, "UserID", msim_msg_get_integer(msg, "f")); msim_store_user_info(session, msg, NULL); @@ -1959,9 +1957,15 @@ break; default: - purple_debug_info("msim", "msim_status for %s, unknown status code %d, treating as available\n", + purple_debug_info("msim", "msim_incoming_status for %s, unknown status code %d, treating as available\n", username, status_code); purple_status_code = PURPLE_STATUS_AVAILABLE; + + unrecognized_msg = g_strdup_printf("msim_incoming_status, unrecognized status code: %d\n", + status_code); + msim_unrecognized(session, NULL, unrecognized_msg); + g_free(unrecognized_msg); + } purple_prpl_got_user_status(session->account, username, purple_primitive_get_id_from_type(purple_status_code), NULL); @@ -2156,10 +2160,15 @@ gchar *msg; msg = g_strdup_printf(_("No such user: %s"), username); - purple_notify_error(NULL, NULL, _("User lookup"), msg); + if (!purple_conv_present_error(username, session->account, msg)) { + purple_notify_error(NULL, NULL, _("User lookup"), msg); + } + g_free(msg); g_free(username); - //msim_msg_free(msg); + /* TODO: free + * msim_msg_free(msg); + */ return; } @@ -2180,7 +2189,9 @@ g_free(uid_field_name); g_free(uid_before); g_free(username); - //msim_msg_free(msg); + /* TODO: free + * msim_msg_free(msg); + */ } /** Postprocess and send a message. @@ -2222,8 +2233,7 @@ uid = 0; } - if (!buddy || !uid) - { + if (!buddy || !uid) { /* Don't have uid offhand - need to ask for it, and wait until hear back before sending. */ purple_debug_info("msim", ">>> msim_postprocess_outgoing: couldn't find username %s in blist\n", username ? username : "(NULL)"); @@ -2244,7 +2254,9 @@ rc = msim_msg_send(session, msg); - //msim_msg_free(msg); + /* TODO: free + * msim_msg_free(msg); + */ return rc; } @@ -2304,7 +2316,7 @@ "blocklist", MSIM_TYPE_BOOLEAN, TRUE, "sesskey", MSIM_TYPE_INTEGER, session->sesskey, /* TODO: MsimMessage lists. Currently <uid> isn't replaced in lists. */ - //"idlist", MSIM_TYPE_STRING, g_strdup("a-|<uid>|b-|<uid>"), + /* "idlist", MSIM_TYPE_STRING, g_strdup("a-|<uid>|b-|<uid>"), */ "idlist", MSIM_TYPE_LIST, blocklist_updates, NULL); @@ -2317,9 +2329,12 @@ } /** - * Borrowed this code from oscar_normalize. Added checking for "if userid, get name before normalizing" + * Returns a string of a username in canonical form. Basically removes all the + * spaces, lowercases the string, and looks up user IDs to usernames. + * Normalizing tom, TOM, Tom, and 6221 wil all return 'tom'. * - * Basically... Returns a string that has been formated with all the spaces and caps removed. + * Borrowed this code from oscar_normalize. Added checking for + * "if userid, get name before normalizing" */ const char *msim_normalize(const PurpleAccount *account, const char *str) { static char normalized[BUF_LEN]; @@ -2345,7 +2360,7 @@ id = atol(str); username = msim_uid2username_from_blist(session, id); if (!username) { - /* Not in buddy list... scheisse... TODO: Manual Lookup! */ + /* Not in buddy list... scheisse... TODO: Manual Lookup! Bug #4631 */ /* Note: manual lookup using msim_lookup_user() is a problem inside * msim_normalize(), because msim_lookup_user() calls a callback function * when the user information has been looked up, but msim_normalize() expects @@ -2376,6 +2391,13 @@ g_free(tmp2); g_free(tmp1); + /* TODO: re-add caps and spacing back to what the user wanted. + * User can format their own names, for example 'msimprpl' is shown + * as 'MsIm PrPl' in the official client. + * + * TODO: file a ticket to add this enhancement. + */ + return normalized; } @@ -2427,16 +2449,17 @@ g_return_if_fail(cond == PURPLE_INPUT_READ); g_return_if_fail(MSIM_SESSION_VALID(session)); - /* Mark down that we got data, so don't timeout. */ + /* Mark down that we got data, so we don't timeout. */ session->last_comm = time(NULL); /* Only can handle so much data at once... - * If this happens, try recompiling with a higher MSIM_READ_BUF_SIZE. * Should be large enough to hold the largest protocol message. */ if (session->rxoff >= MSIM_READ_BUF_SIZE) { purple_debug_error("msim", - "msim_input_cb: %d-byte read buffer full! rxoff=%d\n", + "msim_input_cb: %d-byte read buffer full! rxoff=%d. " + "If this happens, try recompiling with a higher " + "MSIM_READ_BUF_SIZE.", MSIM_READ_BUF_SIZE, session->rxoff); purple_connection_error_reason (gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR, @@ -2534,8 +2557,9 @@ memmove(session->rxbuf, end + strlen(MSIM_FINAL_STRING), MSIM_READ_BUF_SIZE - (end + strlen(MSIM_FINAL_STRING) - session->rxbuf)); - /* Clear end of buffer */ - //memset(end, 0, MSIM_READ_BUF_SIZE - (end - session->rxbuf)); + /* Clear end of buffer + * memset(end, 0, MSIM_READ_BUF_SIZE - (end - session->rxbuf)); + */ } }
--- a/libpurple/protocols/myspace/myspace.h Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/myspace/myspace.h Sun Jan 20 13:54:26 2008 +0000 @@ -180,6 +180,10 @@ #define MSIM_CONTACT_LIST_IMPORT_ALL_FRIENDS 1 #define MSIM_CONTACT_LIST_IMPORT_TOP_FRIENDS 2 +/* Error codes */ +#define MSIM_ERROR_INCORRECT_PASSWORD 260 +#define MSIM_ERROR_LOGGED_IN_ELSEWHERE 6 + /* Functions */ gboolean msim_load(PurplePlugin *plugin); GList *msim_status_types(PurpleAccount *acct);
--- a/libpurple/protocols/novell/novell.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/novell/novell.c Sun Jan 20 13:54:26 2008 +0000 @@ -1920,6 +1920,7 @@ parms = g_slist_append(parms, nm_event_get_conference(event)); /* Prompt the user */ + /* TODO: Would it be better to use serv_got_chat_invite() here? */ gc = purple_account_get_connection(user->client_data); purple_request_action(gc, title, primary, secondary, PURPLE_DEFAULT_ACTION_NONE,
--- a/libpurple/protocols/oscar/oscar.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sun Jan 20 13:54:26 2008 +0000 @@ -1789,7 +1789,7 @@ purple_prpl_got_user_status_deactive(account, info->sn, OSCAR_STATUS_ID_MOBILE); } - if (status_id == OSCAR_STATUS_ID_AVAILABLE) + if (strcmp(status_id, OSCAR_STATUS_ID_AVAILABLE) == 0) { char *message = NULL; char *itmsurl = NULL; @@ -5227,7 +5227,7 @@ data->nick = (buddy ? g_strdup(purple_buddy_get_alias_only(buddy)) : NULL); purple_request_yes_no(gc, NULL, _("Authorization Given"), dialog_msg, - 1, /* Default action is "no" */ + PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc), sn, NULL, data, G_CALLBACK(purple_icq_buddyadd), @@ -5983,7 +5983,7 @@ _("Because this reveals your IP address, it " "may be considered a security risk. Do you " "wish to continue?"), - 0, + 0, /* Default action is "connect" */ purple_connection_get_account(gc), data->who, NULL, data, 2, _("C_onnect"), G_CALLBACK(oscar_ask_directim_yes_cb),
--- a/libpurple/protocols/oscar/peer.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/oscar/peer.c Sun Jan 20 13:54:26 2008 +0000 @@ -1041,7 +1041,7 @@ "Images. Because your IP address will be " "revealed, this may be considered a privacy " "risk."), - PURPLE_DEFAULT_ACTION_NONE, + 0, /* Default action is "connect" */ account, sn, NULL, conn, 2, _("C_onnect"), G_CALLBACK(peer_connection_got_proposition_yes_cb),
--- a/libpurple/protocols/qq/group_im.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/qq/group_im.c Sun Jan 20 13:54:26 2008 +0000 @@ -135,7 +135,7 @@ purple_request_action(gc, _("QQ Qun Operation"), msg, reason, - 2, + PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc), nombre, NULL, g, 3, _("Approve"),
--- a/libpurple/protocols/qq/group_opt.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/qq/group_opt.c Sun Jan 20 13:54:26 2008 +0000 @@ -96,7 +96,8 @@ g_return_if_fail(g != NULL && g->gc != NULL && g->member > 0); qq_send_packet_get_info(g->gc, g->member, TRUE); /* we want to see window */ - purple_request_action(g->gc, NULL, _("Do you want to approve the request?"), "", 2, + purple_request_action(g->gc, NULL, _("Do you want to approve the request?"), "", + PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(g->gc), NULL, NULL, g, 2, _("Reject"), G_CALLBACK(qq_group_reject_application_with_struct),
--- a/libpurple/protocols/qq/sys_msg.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/qq/sys_msg.c Sun Jan 20 13:54:26 2008 +0000 @@ -84,7 +84,8 @@ nombre = uid_to_purple_name(uid); purple_request_action - (gc, NULL, _("Do you want to approve the request?"), "", 2, + (gc, NULL, _("Do you want to approve the request?"), "", + PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc), nombre, NULL, g, 2, _("Reject"), G_CALLBACK(qq_reject_add_request_with_gc_and_uid), @@ -107,7 +108,8 @@ qq_send_packet_get_info(gc, uid, TRUE); /* we want to see window */ nombre = uid_to_purple_name(uid); purple_request_action - (gc, NULL, _("Do you want to add this buddy?"), "", 2, + (gc, NULL, _("Do you want to add this buddy?"), "", + PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc), nombre, NULL, g, 2, _("Cancel"), NULL, @@ -166,7 +168,8 @@ message = g_strdup_printf(_("You have been added by %s"), from); _qq_sys_msg_log_write(gc, message, from); purple_request_action(gc, NULL, message, - _("Would you like to add him?"), 2, + _("Would you like to add him?"), + PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc), name, NULL, g, 3, _("Cancel"), NULL, @@ -240,7 +243,7 @@ _qq_sys_msg_log_write(gc, message, from); purple_request_action - (gc, NULL, message, reason, 2, + (gc, NULL, message, reason, PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc), name, NULL, g, 3, _("Reject"), @@ -260,7 +263,7 @@ g2->uid = strtol(from, NULL, 10); message = g_strdup_printf(_("%s is not in your buddy list"), from); purple_request_action(gc, NULL, message, - _("Would you like to add him?"), 2, + _("Would you like to add him?"), PURPLE_DEFAULT_ACTION_NONE, purple_connection_get_account(gc), name, NULL, g2, 3, _("Cancel"), NULL,
--- a/libpurple/protocols/yahoo/util.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/yahoo/util.c Sun Jan 20 13:54:26 2008 +0000 @@ -164,6 +164,25 @@ return g_strdup(""); } +char *yahoo_convert_to_numeric(const char *str) +{ + GString *gstr = NULL; + char *retstr; + const unsigned char *p; + + gstr = g_string_sized_new(strlen(str) * 6 + 1); + + for (p = (unsigned char *)str; *p; p++) { + g_string_append_printf(gstr, "&#%u;", *p); + } + + retstr = gstr->str; + + g_string_free(gstr, FALSE); + + return retstr; +} + /* * I found these on some website but i don't know that they actually * work (or are supposed to work). I didn't implement them yet.
--- a/libpurple/protocols/yahoo/yahoo.h Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.h Sun Jan 20 13:54:26 2008 +0000 @@ -218,6 +218,8 @@ */ char *yahoo_string_decode(PurpleConnection *gc, const char *str, gboolean utf8); +char *yahoo_convert_to_numeric(const char *str); + /* previously-static functions, now needed for yahoo_profile.c */ void yahoo_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full);
--- a/libpurple/protocols/yahoo/yahoo_aliases.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo_aliases.c Sun Jan 20 13:54:26 2008 +0000 @@ -226,7 +226,8 @@ { struct yahoo_data *yd; struct YahooUser *yu; - char *content, *url, *request, *webpage, *webaddress, *strtmp, *alias_jp; + char *content, *url, *request, *webpage, *webaddress, *strtmp; + char *escaped_alias, *alias_jp, *converted_alias_jp; int inttmp; struct callback_data *cb; PurpleBuddy *buddy; @@ -236,7 +237,7 @@ g_return_if_fail(who != NULL); g_return_if_fail(gc != NULL); - purple_debug_info("yahoo", "Sending '%s' as new alias for user '%s'.\n", alias, who); + purple_debug_info("yahoo", "Sending '%s' as new alias for user '%s'.\n",alias, who); buddy = purple_find_buddy(gc->account, who); if (buddy == NULL || buddy->proto_data == NULL) { @@ -253,21 +254,24 @@ cb->gc = gc; /* Build all the info to make the web request */ - url = yd->jp ? YAHOOJP_ALIAS_UPDATE_URL : YAHOO_ALIAS_UPDATE_URL; + url = yd->jp? YAHOOJP_ALIAS_UPDATE_URL: YAHOO_ALIAS_UPDATE_URL; purple_url_parse(url, &webaddress, &inttmp, &webpage, &strtmp, &strtmp); if (yd->jp) { alias_jp = g_convert(alias, strlen(alias), "EUC-JP", "UTF-8", NULL, NULL, NULL); + converted_alias_jp = yahoo_convert_to_numeric(alias_jp); content = g_strdup_printf("<ab k=\"%s\" cc=\"1\">\n" "<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n", - gc->account->username, who, yu->id, - g_markup_escape_text(alias_jp, strlen(alias_jp))); + gc->account->username, who, yu->id, converted_alias_jp); + free(converted_alias_jp); g_free(alias_jp); } else { + escaped_alias = g_markup_escape_text(alias, strlen(alias)); content = g_strdup_printf("<?xml version=\"1.0\" encoding=\"utf-8\"?><ab k=\"%s\" cc=\"1\">\n" "<ct e=\"1\" yi='%s' id='%s' nn='%s' pr='0' />\n</ab>\r\n", - gc->account->username, who, yu->id, g_markup_escape_text(alias, strlen(alias))); + gc->account->username, who, yu->id, escaped_alias); + g_free(escaped_alias); } request = g_strdup_printf("POST /%s HTTP/1.1\r\n"
--- a/libpurple/protocols/zephyr/zephyr.c Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/protocols/zephyr/zephyr.c Sun Jan 20 13:54:26 2008 +0000 @@ -165,7 +165,7 @@ size_t len = strlen(zsubstr); result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zsubstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write a message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write a message: %s\n", g_strerror(errno)); } else { ret_val = ZERR_NONE; } @@ -1380,7 +1380,7 @@ size_t len = strlen(zlocstr); size_t result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zlocstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write a message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write a message: %s\n", g_strerror(errno)); } g_free(zlocstr); } @@ -2293,7 +2293,7 @@ len = strlen(zlocstr); result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zlocstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write a message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write a message: %s\n", g_strerror(errno)); } g_free(zlocstr); } @@ -2322,7 +2322,7 @@ len = strlen(zexpstr); result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zexpstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write message: %s\n", g_strerror(errno)); } g_free(zexpstr); } @@ -2336,7 +2336,7 @@ len = strlen(zexpstr); result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zexpstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write message: %s\n", g_strerror(errno)); } g_free(zexpstr); }
--- a/libpurple/request.h Sun Jan 20 13:31:19 2008 +0000 +++ b/libpurple/request.h Sun Jan 20 13:54:26 2008 +0000 @@ -1318,6 +1318,8 @@ * @param secondary Secondary information, or @c NULL if there is none. * @param default_action The default action, zero-indexed; if the third action * supplied should be the default, supply <tt>2</tt>. + * The should be the action that users are most likely + * to select. * @param account The #PurpleAccount associated with this request, or @c * NULL if none is. * @param who The username of the buddy associated with this request, @@ -1356,6 +1358,8 @@ * @param secondary Secondary information, or @c NULL if there is none. * @param default_action The default action, zero-indexed; if the third action * supplied should be the default, supply <tt>2</tt>. + * The should be the action that users are most likely + * to select. * @param account The #PurpleAccount associated with this request, or @c * NULL if none is. * @param who The username of the buddy associated with this request,
--- a/pidgin/gtkcertmgr.c Sun Jan 20 13:31:19 2008 +0000 +++ b/pidgin/gtkcertmgr.c Sun Jan 20 13:54:26 2008 +0000 @@ -373,7 +373,7 @@ purple_request_yes_no(tpm_dat, _("Confirm certificate delete"), primary, NULL, /* Can this be NULL? */ - 2, /* NO is default action */ + 1, /* NO is default action */ NULL, NULL, NULL, id, /* id ownership passed to callback */ tls_peers_mgmt_delete_confirm_cb,
--- a/pidgin/gtkconv.c Sun Jan 20 13:31:19 2008 +0000 +++ b/pidgin/gtkconv.c Sun Jan 20 13:54:26 2008 +0000 @@ -3428,9 +3428,14 @@ gtk_text_buffer_delete_mark(buffer, stmark); gtk_text_buffer_delete_mark(buffer, enmark); gtk_text_buffer_delete(buffer, &start, &end); - } else if (message && *message == '\n' && !*(message + 1)) + } else if (message && *message == '\n' && message[1] == ' ' && message[2] == '\0') message = NULL; +#ifdef RESERVE_LINE + if (!message) + message = "\n "; /* The blank space is required to avoid a GTK+/Pango bug */ +#endif + if (message) { GtkTextIter iter; gtk_text_buffer_get_end_iter(buffer, &iter); @@ -3458,7 +3463,11 @@ return; if (purple_conv_im_get_typing_state(im) == PURPLE_NOT_TYPING) { - update_typing_message(gtkconv, "\n"); +#ifdef RESERVE_LINE + update_typing_message(gtkconv, NULL); +#else + update_typing_message(gtkconv, "\n "); +#endif return; } @@ -4980,7 +4989,7 @@ gtk_text_buffer_create_tag(GTK_IMHTML(gtkconv->imhtml)->text_buffer, "TYPING-NOTIFICATION", "foreground", "#888888", "justification", GTK_JUSTIFY_LEFT, /* XXX: RTL'ify */ - "weight", PANGO_WEIGHT_BOLD, + "weight", PANGO_WEIGHT_LIGHT, "scale", PANGO_SCALE_SMALL, NULL);
--- a/pidgin/gtkimhtml.c Sun Jan 20 13:31:19 2008 +0000 +++ b/pidgin/gtkimhtml.c Sun Jan 20 13:54:26 2008 +0000 @@ -1455,9 +1455,6 @@ gtk_text_buffer_create_tag(imhtml->text_buffer, "SUP", "rise", 5000, NULL); gtk_text_buffer_create_tag(imhtml->text_buffer, "PRE", "family", "Monospace", NULL); gtk_text_buffer_create_tag(imhtml->text_buffer, "search", "background", "#22ff00", "weight", "bold", NULL); -#if GTK_CHECK_VERSION(2,8,0) - gtk_text_buffer_create_tag(imhtml->text_buffer, "comment", "invisible", FALSE, NULL); -#endif /* When hovering over a link, we show the hand cursor--elsewhere we show the plain ol' pointer cursor */ imhtml->hand_cursor = gdk_cursor_new (GDK_HAND2); @@ -2984,15 +2981,10 @@ gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); -#if GTK_CHECK_VERSION(2,8,0) - wpos = g_snprintf (ws, len, "%s", tag); - gtk_text_buffer_insert_with_tags_by_name(imhtml->text_buffer, iter, ws, wpos, "comment", NULL); -#else if (imhtml->show_comments && !(options & GTK_IMHTML_NO_COMMENTS)) { wpos = g_snprintf (ws, len, "%s", tag); gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos); } -#endif ws[0] = '\0'; wpos = 0; /* NEW_BIT (NEW_COMMENT_BIT); */ @@ -3138,12 +3130,6 @@ void gtk_imhtml_show_comments (GtkIMHtml *imhtml, gboolean show) { -#if GTK_CHECK_VERSION(2,8,0) - GtkTextTag *tag; - tag = gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(imhtml->text_buffer), "comment"); - if (tag) - g_object_set(G_OBJECT(tag), "invisible", !show, NULL); -#endif imhtml->show_comments = show; }
--- a/pidgin/gtkrequest.c Sun Jan 20 13:31:19 2008 +0000 +++ b/pidgin/gtkrequest.c Sun Jan 20 13:54:26 2008 +0000 @@ -663,7 +663,11 @@ gtk_widget_grab_focus(img); gtk_widget_grab_default(img); } else - gtk_dialog_set_default_response(GTK_DIALOG(dialog), default_action); + /* + * Need to invert the default_action number because the + * buttons are added to the dialog in reverse order. + */ + gtk_dialog_set_default_response(GTK_DIALOG(dialog), action_count - 1 - default_action); /* Show everything. */ pidgin_auto_parent_window(dialog);
--- a/pidgin/gtkutils.c Sun Jan 20 13:31:19 2008 +0000 +++ b/pidgin/gtkutils.c Sun Jan 20 13:54:26 2008 +0000 @@ -1595,7 +1595,7 @@ else if (!(im || ft)) purple_request_yes_no(NULL, NULL, _("You have dragged an image"), _("Would you like to set it as the buddy icon for this user?"), - 0, + PURPLE_DEFAULT_ACTION_NONE, account, who, NULL, data, (GCallback)dnd_set_icon_ok_cb, (GCallback)dnd_set_icon_cancel_cb); else
--- a/po/de.po Sun Jan 20 13:31:19 2008 +0000 +++ b/po/de.po Sun Jan 20 13:54:26 2008 +0000 @@ -11,8 +11,8 @@ msgstr "" "Project-Id-Version: de\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-01-08 11:16+0100\n" -"PO-Revision-Date: 2008-01-08 11:15+0100\n" +"POT-Creation-Date: 2008-01-17 22:50+0100\n" +"PO-Revision-Date: 2008-01-17 22:50+0100\n" "Last-Translator: Jochen Kemnade <jochenkemnade@web.de>\n" "Language-Team: Deutsch <de@li.org>\n" "MIME-Version: 1.0\n" @@ -2688,6 +2688,9 @@ msgid "Could not listen on socket" msgstr "Kann nicht an der Socket hören" +msgid "Error communicating with local mDNSResponder." +msgstr "Fehler bei der Kommunikation mit lokalem mDNSResponder." + msgid "Invalid proxy settings" msgstr "Falsche Proxy-Einstellungen" @@ -4237,6 +4240,8 @@ msgid "Unable to buzz, because the user %s does not support it." msgstr "Kann nicht anklopfen, da der Benutzer %s dies nicht unterstützt." +#. Yahoo only supports one attention command: the 'buzz'. +#. This is index number YAHOO_BUZZ. msgid "Buzz" msgstr "Anklopfen" @@ -9151,6 +9156,10 @@ msgid "Unable to establish file descriptor." msgstr "Konnte Dateibeschreibung nicht erstellen." +#, c-format +msgid "%s is trying to send you a group of %d files.\n" +msgstr "%s versucht, Ihnen eine Gruppe von %d Dateien zu senden.\n" + msgid "Write Error" msgstr "Schreibfehler" @@ -12295,6 +12304,9 @@ msgid "_Open Mail" msgstr "Mail ö_ffnen" +msgid "Pidgin Tooltip" +msgstr "Pidgin-Tooltip" + msgid "Pidgin smileys" msgstr "Pidgin-Smileys"