Mercurial > pidgin.yaz
changeset 25488:bb8ad59ae9c4
propagate from branch 'im.pidgin.pidgin' (head 62e9d17cd37551991c5040ce6ca48e6d7578dde3)
to branch 'im.pidgin.pidgin.yaz' (head f809703c53ba0d2fc5eece06d368a3fcfec6748f)
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sun, 20 May 2007 04:16:11 +0000 |
parents | e5cc13b1e0ca (diff) e15aaa2db6a4 (current diff) |
children | 23e95d20597a |
files | libpurple/conversation.c libpurple/protocols/oscar/oscar.c |
diffstat | 27 files changed, 293 insertions(+), 206 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Sat May 19 03:31:37 2007 +0000 +++ b/COPYRIGHT Sun May 20 04:16:11 2007 +0000 @@ -172,6 +172,7 @@ Thomas Huriaux Instant Messaging Freedom, Inc. Vitaliy Ischenko +Intel Corporation Scott Jackson Hans Petter Jansson Henry Jen @@ -303,7 +304,7 @@ David Schmitt Mark Schneider Evan Schoenberg -Gabriel Schulof +Gabriel Schulhof Federico Schwindt Torrey Searle Peter Seebach @@ -356,6 +357,7 @@ Junichi Uekawa István Váradi Martijn van Beers +Arjan van de Ven Philip Van Hoof Kristof Vansant James Vega
--- a/finch/gntaccount.c Sat May 19 03:31:37 2007 +0000 +++ b/finch/gntaccount.c Sun May 20 04:16:11 2007 +0000 @@ -930,11 +930,15 @@ static PurpleAccountUiOps ui_ops = { - .notify_added = notify_added, - .status_changed = NULL, - .request_add = request_add, - .request_authorize = finch_request_authorize, - .close_account_request = finch_request_close + notify_added, + NULL, + request_add, + finch_request_authorize, + finch_request_close, + NULL, + NULL, + NULL, + NULL }; PurpleAccountUiOps *finch_accounts_get_ui_ops()
--- a/finch/gntblist.c Sat May 19 03:31:37 2007 +0000 +++ b/finch/gntblist.c Sun May 20 04:16:11 2007 +0000 @@ -447,9 +447,13 @@ node_remove, NULL, NULL, - .request_add_buddy = finch_request_add_buddy, - .request_add_chat = finch_request_add_chat, - .request_add_group = finch_request_add_group + finch_request_add_buddy, + finch_request_add_chat, + finch_request_add_group, + NULL, + NULL, + NULL, + NULL }; static gpointer
--- a/finch/gntconn.c Sat May 19 03:31:37 2007 +0000 +++ b/finch/gntconn.c Sun May 20 04:16:11 2007 +0000 @@ -56,11 +56,17 @@ static PurpleConnectionUiOps ops = { - .connect_progress = NULL, - .connected = NULL, - .disconnected = NULL, - .notice = NULL, - .report_disconnect = finch_connection_report_disconnect + NULL, /* connect_progress */ + NULL, /* connected */ + NULL, /* disconnected */ + NULL, /* notice */ + finch_connection_report_disconnect, + NULL, /* network_connected */ + NULL, /* network_disconnected */ + NULL, + NULL, + NULL, + NULL }; PurpleConnectionUiOps *finch_connections_get_ui_ops()
--- a/finch/gntconv.c Sat May 19 03:31:37 2007 +0000 +++ b/finch/gntconv.c Sun May 20 04:16:11 2007 +0000 @@ -747,7 +747,7 @@ } static void -finch_chat_remove_user(PurpleConversation *conv, GList *list) +finch_chat_remove_users(PurpleConversation *conv, GList *list) { /* Remove the name from string completion */ FinchConv *ggc = conv->ui_data; @@ -769,20 +769,25 @@ static PurpleConversationUiOps conv_ui_ops = { - .create_conversation = finch_create_conversation, - .destroy_conversation = finch_destroy_conversation, - .write_chat = finch_write_chat, - .write_im = finch_write_im, - .write_conv = finch_write_conv, - .chat_add_users = finch_chat_add_users, - .chat_rename_user = finch_chat_rename_user, - .chat_remove_users = finch_chat_remove_user, - .chat_update_user = finch_chat_update_user, - .present = NULL, - .has_focus = NULL, - .custom_smiley_add = NULL, - .custom_smiley_write = NULL, - .custom_smiley_close = NULL + finch_create_conversation, + finch_destroy_conversation, + finch_write_chat, + finch_write_im, + finch_write_conv, + finch_chat_add_users, + finch_chat_rename_user, + finch_chat_remove_users, + finch_chat_update_user, + NULL, /* present */ + NULL, /* has_focus */ + NULL, /* custom_smiley_add */ + NULL, /* custom_smiley_write */ + NULL, /* custom_smiley_close */ + NULL, /* send_confirm */ + NULL, + NULL, + NULL, + NULL }; PurpleConversationUiOps *finch_conv_get_ui_ops()
--- a/finch/gntnotify.c Sat May 19 03:31:37 2007 +0000 +++ b/finch/gntnotify.c Sun May 20 04:16:11 2007 +0000 @@ -405,17 +405,21 @@ static PurpleNotifyUiOps ops = { - .notify_message = finch_notify_message, - .close_notify = finch_close_notify, /* The rest of the notify-uiops return a GntWidget. - These widgets should be destroyed from here. */ - .notify_formatted = finch_notify_formatted, - .notify_email = finch_notify_email, - .notify_emails = finch_notify_emails, - .notify_userinfo = finch_notify_userinfo, + finch_notify_message, + finch_notify_email, + finch_notify_emails, + finch_notify_formatted, + finch_notify_searchresults, + finch_notify_sr_new_rows, + finch_notify_userinfo, + NULL, /* notify_uri is of low-priority to me. --sadrul */ + finch_close_notify, /* The rest of the notify-uiops return a GntWidget. + These widgets should be destroyed from here. */ + NULL, + NULL, + NULL, + NULL - .notify_searchresults = finch_notify_searchresults, - .notify_searchresults_new_rows = finch_notify_sr_new_rows, - .notify_uri = NULL /* This is of low-priority to me */ }; PurpleNotifyUiOps *finch_notify_get_ui_ops()
--- a/finch/gntprefs.c Sat May 19 03:31:37 2007 +0000 +++ b/finch/gntprefs.c Sun May 20 04:16:11 2007 +0000 @@ -76,7 +76,7 @@ get_idle_options() { GList *list = NULL; - list = g_list_append(list, _("Based on keyboard use")); + list = g_list_append(list, (char *)_("Based on keyboard use")); list = g_list_append(list, "system"); list = g_list_append(list, (char*)_("From last sent message")); list = g_list_append(list, "purple");
--- a/finch/gntrequest.c Sat May 19 03:31:37 2007 +0000 +++ b/finch/gntrequest.c Sun May 20 04:16:11 2007 +0000 @@ -612,13 +612,17 @@ static PurpleRequestUiOps uiops = { - .request_input = finch_request_input, - .close_request = finch_close_request, - .request_choice = finch_request_choice, - .request_action = finch_request_action, - .request_fields = finch_request_fields, - .request_file = finch_request_file, - .request_folder = NULL /* No plans for this */ + finch_request_input, + finch_request_choice, + finch_request_action, + finch_request_fields, + finch_request_file, + finch_close_request, + NULL, /* No plans for request_folder */ + NULL, + NULL, + NULL, + NULL }; PurpleRequestUiOps *finch_request_get_ui_ops()
--- a/finch/libgnt/gntwm.c Sat May 19 03:31:37 2007 +0000 +++ b/finch/libgnt/gntwm.c Sun May 20 04:16:11 2007 +0000 @@ -697,7 +697,11 @@ if (bgp == -1) bgp = COLOR_WHITE; if (now & A_REVERSE) - fgp ^= bgp ^= fgp ^= bgp; /* *wink* */ + { + short tmp = fgp; + fgp = bgp; + bgp = tmp; + } ret = color_content(fgp, &r, &g, &b); fg.r = r; fg.b = b; fg.g = g; ret = color_content(bgp, &r, &g, &b);
--- a/libpurple/account.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/account.c Sun May 20 04:16:11 2007 +0000 @@ -548,9 +548,9 @@ data = xmlnode_get_attrib(node, "active"); if (data == NULL) return; - if (strcasecmp(data, "true") == 0) + if (g_ascii_strcasecmp(data, "true") == 0) active = TRUE; - else if (strcasecmp(data, "false") == 0) + else if (g_ascii_strcasecmp(data, "false") == 0) active = FALSE; else return;
--- a/libpurple/cipher.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/cipher.c Sun May 20 04:16:11 2007 +0000 @@ -2000,8 +2000,8 @@ /* Check for a supported algorithm. */ g_return_val_if_fail(algorithm == NULL || *algorithm == '\0' || - strcasecmp(algorithm, "MD5") || - strcasecmp(algorithm, "MD5-sess"), NULL); + g_ascii_strcasecmp(algorithm, "MD5") || + g_ascii_strcasecmp(algorithm, "MD5-sess"), NULL); cipher = purple_ciphers_find_cipher("md5"); g_return_val_if_fail(cipher != NULL, NULL); @@ -2014,7 +2014,7 @@ purple_cipher_context_append(context, (guchar *)":", 1); purple_cipher_context_append(context, (guchar *)password, strlen(password)); - if (algorithm != NULL && !strcasecmp(algorithm, "MD5-sess")) + if (algorithm != NULL && !g_ascii_strcasecmp(algorithm, "MD5-sess")) { guchar digest[16]; @@ -2065,14 +2065,14 @@ /* Check for a supported algorithm. */ g_return_val_if_fail(algorithm == NULL || *algorithm == '\0' || - strcasecmp(algorithm, "MD5") || - strcasecmp(algorithm, "MD5-sess"), NULL); + g_ascii_strcasecmp(algorithm, "MD5") || + g_ascii_strcasecmp(algorithm, "MD5-sess"), NULL); /* Check for a supported "quality of protection". */ g_return_val_if_fail(qop == NULL || *qop == '\0' || - strcasecmp(qop, "auth") || - strcasecmp(qop, "auth-int"), NULL); + g_ascii_strcasecmp(qop, "auth") || + g_ascii_strcasecmp(qop, "auth-int"), NULL); cipher = purple_ciphers_find_cipher("md5"); g_return_val_if_fail(cipher != NULL, NULL); @@ -2083,7 +2083,7 @@ purple_cipher_context_append(context, (guchar *)":", 1); purple_cipher_context_append(context, (guchar *)digest_uri, strlen(digest_uri)); - if (qop != NULL && !strcasecmp(qop, "auth-int")) + if (qop != NULL && !g_ascii_strcasecmp(qop, "auth-int")) { PurpleCipherContext *context2; gchar entity_hash[33];
--- a/libpurple/conversation.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/conversation.c Sun May 20 04:16:11 2007 +0000 @@ -1507,7 +1507,7 @@ } else if (a->buddy != b->buddy) { ret = a->buddy ? -1 : 1; } else { - ret = strcasecmp(user1, user2); + ret = purple_utf8_strcasecmp(user1, user2); } return ret;
--- a/libpurple/example/nullclient.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/example/nullclient.c Sun May 20 04:16:11 2007 +0000 @@ -137,7 +137,25 @@ static PurpleConversationUiOps null_conv_uiops = { - .write_conv = null_write_conv + NULL, /* create_conversation */ + NULL, /* destroy_conversation */ + NULL, /* write_chat */ + NULL, /* write_im */ + null_write_conv, /* write_conv */ + NULL, /* chat_add_users */ + NULL, /* chat_rename_user */ + NULL, /* chat_remove_users */ + NULL, /* chat_update_user */ + NULL, /* present */ + NULL, /* has_focus */ + NULL, /* custom_smiley_add */ + NULL, /* custom_smiley_write */ + NULL, /* custom_smiley_close */ + NULL, /* send_confirm */ + NULL, + NULL, + NULL, + NULL }; static void
--- a/libpurple/idle.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/idle.c Sun May 20 04:16:11 2007 +0000 @@ -92,6 +92,7 @@ } +static int no_away = 0; static gint time_until_next_idle_event; /* * This function should be called when you think your idle state @@ -121,7 +122,7 @@ gboolean report_idle; GList *l; gint away_seconds = 0; - static int no_away = 0; + gint idle_recheck_interval; purple_signal_emit(purple_blist_get_handle(), "update-idle"); @@ -132,11 +133,13 @@ { /* Use system idle time (mouse or keyboard movement, etc.) */ time_idle = idle_ui_ops->get_time_idle(); + idle_recheck_interval = 60; } else if (!strcmp(idle_reporting, "purple")) { /* Use 'Purple idle' */ time_idle = time(NULL) - last_active_time; + idle_recheck_interval = 0; } else { @@ -150,14 +153,39 @@ /* If we're not reporting idle, we can still do auto-away. * First try "system" and if that isn't possible, use "purple" */ - if (!report_idle && auto_away) { - if ((idle_ui_ops != NULL) && (idle_ui_ops->get_time_idle != NULL)) - time_idle = idle_ui_ops->get_time_idle(); + if (!report_idle) + { + if (auto_away) + { + if ((idle_ui_ops != NULL) && (idle_ui_ops->get_time_idle != NULL)) + { + time_idle = idle_ui_ops->get_time_idle(); + idle_recheck_interval = 60; + } + else + { + time_idle = time(NULL) - last_active_time; + idle_recheck_interval = 0; + } + } else - time_idle = time(NULL) - last_active_time; + { + if (!no_away) + { + purple_savedstatus_set_idleaway(FALSE); + no_away = 1; + } + time_until_next_idle_event = 0; + return; + } } - time_until_next_idle_event = IDLEMARK - time_idle; /* reasonable start upperbound */ + time_until_next_idle_event = IDLEMARK - time_idle; + if (time_until_next_idle_event < 0) + { + /* If we're already idle, check again as appropriate. */ + time_until_next_idle_event = idle_recheck_interval; + } if (auto_away || !no_away) away_seconds = 60 * purple_prefs_get_int("/purple/away/mins_before_away"); @@ -166,14 +194,12 @@ { purple_savedstatus_set_idleaway(TRUE); no_away = 0; - if (time_idle < away_seconds && (away_seconds - time_idle) < time_until_next_idle_event) - time_until_next_idle_event = away_seconds - time_idle; } else if (!no_away && time_idle < away_seconds) { purple_savedstatus_set_idleaway(FALSE); no_away = 1; - if (time_idle < away_seconds && (away_seconds - time_idle) < time_until_next_idle_event) + if (time_until_next_idle_event == 0 || (away_seconds - time_idle) < time_until_next_idle_event) time_until_next_idle_event = away_seconds - time_idle; } @@ -191,9 +217,6 @@ while (idled_accts != NULL) set_account_unidle(idled_accts->data); } - - if (time_until_next_idle_event < 0) - time_until_next_idle_event = IDLEMARK; } @@ -204,7 +227,10 @@ check_idleness_timer() { check_idleness(); - idle_timer = purple_timeout_add(1000 * (time_until_next_idle_event + 1), check_idleness_timer, NULL); + if (time_until_next_idle_event == 0) + idle_timer = 0; + else + idle_timer = purple_timeout_add(1000 * (time_until_next_idle_event + 1), check_idleness_timer, NULL); return FALSE; } @@ -232,10 +258,26 @@ set_account_unidle(account); } +static void +idle_reporting_cb(const char *name, PurplePrefType type, gconstpointer val, gpointer data) +{ + if (idle_timer) + purple_timeout_remove(idle_timer); + idle_timer = 0; + check_idleness_timer(); +} + void purple_idle_touch() { time(&last_active_time); + if (!no_away) + { + if (idle_timer) + purple_timeout_remove(idle_timer); + idle_timer = 0; + check_idleness_timer(); + } } void @@ -280,6 +322,9 @@ purple_idle_get_handle(), PURPLE_CALLBACK(signing_off_cb), NULL); + purple_prefs_connect_callback(purple_idle_get_handle(), "/purple/away/idle_reporting", + idle_reporting_cb, NULL); + purple_idle_touch(); } @@ -287,6 +332,7 @@ purple_idle_uninit() { purple_signals_disconnect_by_handle(purple_idle_get_handle()); + purple_prefs_disconnect_by_handle(purple_idle_get_handle()); /* Remove the idle timer */ if (idle_timer > 0)
--- a/libpurple/protocols/bonjour/jabber.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/bonjour/jabber.c Sun May 20 04:16:11 2007 +0000 @@ -242,7 +242,7 @@ if (cbba->bj->account == gb->account) { bb = gb->proto_data; - if ((bb != NULL) && (g_strcasecmp(bb->ip, cbba->address) == 0)) + if ((bb != NULL) && (g_ascii_strcasecmp(bb->ip, cbba->address) == 0)) *(cbba->gb) = gb; } }
--- a/libpurple/protocols/gg/lib/pubdir50.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/gg/lib/pubdir50.c Sun May 20 04:16:11 2007 +0000 @@ -347,7 +347,7 @@ /* je¶li dostali¶my namier na nastêpne wyniki, to znaczy ¿e * mamy koniec wyników i nie jest to kolejna osoba. */ - if (!strcasecmp(field, "nextstart")) { + if (!g_ascii_strcasecmp(field, "nextstart")) { res->next = atoi(value); num--; } else { @@ -390,7 +390,7 @@ } for (i = 0; i < res->entries_count; i++) { - if (res->entries[i].num == num && !strcasecmp(res->entries[i].field, field)) { + if (res->entries[i].num == num && !g_ascii_strcasecmp(res->entries[i].field, field)) { value = res->entries[i].value; break; }
--- a/libpurple/protocols/irc/parse.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/irc/parse.c Sun May 20 04:16:11 2007 +0000 @@ -264,7 +264,7 @@ while (*charset == ' ') charset++; - if (!strcasecmp("UTF-8", charset)) { + if (!g_ascii_strcasecmp("UTF-8", charset)) { if (g_utf8_validate(string, -1, NULL)) utf8 = g_strdup(string); } else {
--- a/libpurple/protocols/novell/nmuser.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/novell/nmuser.c Sun May 20 04:16:11 2007 +0000 @@ -944,7 +944,7 @@ } /* Remove item from the cached list */ - if ((node = g_slist_find_custom(*list_ptr, dn, (GCompareFunc)nm_utf8_strcasecmp))) { + if ((node = g_slist_find_custom(*list_ptr, dn, (GCompareFunc)purple_utf8_strcasecmp))) { *list_ptr = g_slist_remove_link(*list_ptr, node); g_slist_free_1(node); } @@ -1223,13 +1223,13 @@ locate = nm_locate_field(NM_A_LOCKED_ATTR_LIST, user->fields); if (locate && locate->ptr_value) { if (locate->type == NMFIELD_TYPE_UTF8 && - (nm_utf8_strcasecmp(locate->ptr_value, NM_A_BLOCKING) == 0)) { + (purple_utf8_strcasecmp(locate->ptr_value, NM_A_BLOCKING) == 0)) { user->privacy_locked = TRUE; } else if (locate->type == NMFIELD_TYPE_MV || locate->type == NMFIELD_TYPE_ARRAY) { NMField *tmp = (NMField *)locate->ptr_value; while (tmp && tmp->tag) { - if (nm_utf8_strcasecmp(tmp->ptr_value, NM_A_BLOCKING) == 0) { + if (purple_utf8_strcasecmp(tmp->ptr_value, NM_A_BLOCKING) == 0) { user->privacy_locked = TRUE; break; } @@ -1800,25 +1800,11 @@ * Some utility functions...haven't figured out where * they belong yet. */ -gint -nm_utf8_strcasecmp(gconstpointer str1, gconstpointer str2) -{ - gint rv; - char *str1_down = g_utf8_strdown(str1, -1); - char *str2_down = g_utf8_strdown(str2, -1); - - rv = g_utf8_collate(str1_down, str2_down); - - g_free(str1_down); - g_free(str2_down); - - return rv; -} gboolean nm_utf8_str_equal(gconstpointer str1, gconstpointer str2) { - return (nm_utf8_strcasecmp(str1, str2) == 0); + return (purple_utf8_strcasecmp(str1, str2) == 0); } char *
--- a/libpurple/protocols/novell/nmuser.h Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/novell/nmuser.h Sun May 20 04:16:11 2007 +0000 @@ -646,18 +646,6 @@ */ gboolean nm_are_guids_equal(const char *guid1, const char *guid2); - -/** - * Case insensitive compare for utf8 strings - * - * @param guid1 First string to compare - * @param guid2 Second string to compare - * - * @return -1 if str1 < str2, 0 if str1 = str2, 1 if str1 > str2 - * - */ -gint nm_utf8_strcasecmp(gconstpointer str1, gconstpointer str2); - /** * Compare UTF8 strings for equality only (case insensitive) *
--- a/libpurple/protocols/novell/novell.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/novell/novell.c Sun May 20 04:16:11 2007 +0000 @@ -734,14 +734,14 @@ if (allowed) { if (!g_slist_find_custom(gc->account->permit, - display_id, (GCompareFunc)nm_utf8_strcasecmp)) { + display_id, (GCompareFunc)purple_utf8_strcasecmp)) { purple_privacy_permit_add(gc->account, display_id, TRUE); } } else { if (!g_slist_find_custom(gc->account->permit, - display_id, (GCompareFunc)nm_utf8_strcasecmp)) { + display_id, (GCompareFunc)purple_utf8_strcasecmp)) { purple_privacy_deny_add(gc->account, display_id, TRUE); } } @@ -782,7 +782,7 @@ if (display_id) { if (!g_slist_find_custom(gc->account->deny, - display_id, (GCompareFunc)nm_utf8_strcasecmp)) { + display_id, (GCompareFunc)purple_utf8_strcasecmp)) { purple_privacy_deny_add(gc->account, display_id, TRUE); } @@ -834,7 +834,7 @@ if (!g_slist_find_custom(gc->account->permit, display_id, - (GCompareFunc)nm_utf8_strcasecmp)) { + (GCompareFunc)purple_utf8_strcasecmp)) { purple_privacy_permit_add(gc->account, display_id, TRUE); } @@ -1412,7 +1412,7 @@ name =(char *)node->data; if (!g_slist_find_custom(gc->account->permit, - name, (GCompareFunc)nm_utf8_strcasecmp)) { + name, (GCompareFunc)purple_utf8_strcasecmp)) { purple_privacy_permit_add(gc->account, name , TRUE); } } @@ -1425,7 +1425,7 @@ name =(char *)node->data; if (!g_slist_find_custom(gc->account->deny, - name, (GCompareFunc)nm_utf8_strcasecmp)) { + name, (GCompareFunc)purple_utf8_strcasecmp)) { purple_privacy_deny_add(gc->account, name, TRUE); } } @@ -1436,7 +1436,7 @@ dn = nm_lookup_dn(user, (char *)node->data); if (dn != NULL && !g_slist_find_custom(user->allow_list, - dn, (GCompareFunc)nm_utf8_strcasecmp)) { + dn, (GCompareFunc)purple_utf8_strcasecmp)) { rem_list = g_slist_append(rem_list, node->data); } } @@ -1453,7 +1453,7 @@ dn = nm_lookup_dn(user, (char *)node->data); if (dn != NULL && !g_slist_find_custom(user->deny_list, - dn, (GCompareFunc)nm_utf8_strcasecmp)) { + dn, (GCompareFunc)purple_utf8_strcasecmp)) { rem_list = g_slist_append(rem_list, node->data); } } @@ -3268,7 +3268,7 @@ name = nm_user_record_get_display_id(user_record); if (!g_slist_find_custom(gc->account->permit, - name, (GCompareFunc)nm_utf8_strcasecmp)) { + name, (GCompareFunc)purple_utf8_strcasecmp)) { purple_privacy_permit_add(gc->account, name , TRUE); } } @@ -3282,7 +3282,7 @@ name = nm_user_record_get_display_id(user_record); if (!g_slist_find_custom(user->allow_list, - dn, (GCompareFunc)nm_utf8_strcasecmp)) { + dn, (GCompareFunc)purple_utf8_strcasecmp)) { rc = nm_send_create_privacy_item(user, dn, TRUE, _create_privacy_item_deny_resp_cb, g_strdup(dn)); @@ -3310,7 +3310,7 @@ name = nm_user_record_get_display_id(user_record); if (!g_slist_find_custom(gc->account->deny, - name, (GCompareFunc)nm_utf8_strcasecmp)) { + name, (GCompareFunc)purple_utf8_strcasecmp)) { purple_privacy_deny_add(gc->account, name , TRUE); } } @@ -3325,7 +3325,7 @@ name = nm_user_record_get_display_id(user_record); if (!g_slist_find_custom(user->deny_list, - dn, (GCompareFunc)nm_utf8_strcasecmp)) { + dn, (GCompareFunc)purple_utf8_strcasecmp)) { rc = nm_send_create_privacy_item(user, dn, FALSE, _create_privacy_item_deny_resp_cb, g_strdup(name)); @@ -3358,7 +3358,7 @@ contact = nm_folder_get_contact(user->root_folder, i); dn = nm_contact_get_dn(contact); if (dn && !g_slist_find_custom(user->allow_list, - dn, (GCompareFunc)nm_utf8_strcasecmp)) + dn, (GCompareFunc)purple_utf8_strcasecmp)) { rc = nm_send_create_privacy_item(user, dn, TRUE, _create_privacy_item_deny_resp_cb, @@ -3377,7 +3377,7 @@ contact = nm_folder_get_contact(folder, j); dn = nm_contact_get_dn(contact); if (dn && !g_slist_find_custom(user->allow_list, - dn, (GCompareFunc)nm_utf8_strcasecmp)) + dn, (GCompareFunc)purple_utf8_strcasecmp)) { rc = nm_send_create_privacy_item(user, dn, TRUE, _create_privacy_item_deny_resp_cb,
--- a/libpurple/protocols/oscar/oscar.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sun May 20 04:16:11 2007 +0000 @@ -322,16 +322,16 @@ } else { purple_debug_info("yaz oscar", "Conversion failed\n"); } - } else if (!strcasecmp(encoding, "iso-8859-1")) { + } else if (!g_ascii_strcasecmp(encoding, "iso-8859-1")) { utf8 = g_convert(text, textlen, "UTF-8", "iso-8859-1", NULL, NULL, NULL); - } else if (!strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1") || - !strcasecmp(encoding, "us-ascii")) + } else if (!g_ascii_strcasecmp(encoding, "ISO-8859-1-Windows-3.1-Latin-1") || + !g_ascii_strcasecmp(encoding, "us-ascii")) { utf8 = g_convert(text, textlen, "UTF-8", "Windows-1252", NULL, NULL, NULL); - } else if (!strcasecmp(encoding, "unicode-2-0")) { + } else if (!g_ascii_strcasecmp(encoding, "unicode-2-0")) { sanitize_ucs(text, textlen); utf8 = g_convert(text, textlen, "UTF-8", "UCS-2BE", NULL, NULL, NULL); - } else if (strcasecmp(encoding, "utf-8")) { + } else if (g_ascii_strcasecmp(encoding, "utf-8")) { purple_debug_warning("oscar", "Unrecognized character encoding \"%s\", " "attempting to convert to UTF-8 anyway\n", encoding); utf8 = g_convert(text, textlen, "UTF-8", encoding, NULL, NULL, NULL); @@ -381,7 +381,7 @@ if ((charsetstr == NULL) || (*charsetstr == '\0')) return NULL; - if (strcasecmp("UTF-8", charsetstr)) { + if (g_ascii_strcasecmp("UTF-8", charsetstr)) { if (fallback) ret = g_convert_with_fallback(data, datalen, "UTF-8", charsetstr, "?", NULL, NULL, &err); else
--- a/libpurple/protocols/sametime/sametime.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/sametime/sametime.c Sun May 20 04:16:11 2007 +0000 @@ -611,9 +611,9 @@ static struct mwAwareListHandler mw_aware_list_handler = { - .on_aware = mw_aware_list_on_aware, - .on_attrib = mw_aware_list_on_attrib, - .clear = mw_aware_list_clear, + mw_aware_list_on_aware, + mw_aware_list_on_attrib, + mw_aware_list_clear, }; @@ -1777,14 +1777,14 @@ static struct mwSessionHandler mw_session_handler = { - .io_write = mw_session_io_write, - .io_close = mw_session_io_close, - .clear = mw_session_clear, - .on_stateChange = mw_session_stateChange, - .on_setPrivacyInfo = mw_session_setPrivacyInfo, - .on_setUserStatus = mw_session_setUserStatus, - .on_admin = mw_session_admin, - .on_announce = mw_session_announce, + mw_session_io_write, + mw_session_io_close, + mw_session_clear, + mw_session_stateChange, + mw_session_setPrivacyInfo, + mw_session_setUserStatus, + mw_session_admin, + mw_session_announce, }; @@ -1803,8 +1803,8 @@ static struct mwAwareHandler mw_aware_handler = { - .on_attrib = mw_aware_on_attrib, - .clear = mw_aware_clear, + mw_aware_on_attrib, + mw_aware_clear, }; @@ -2042,14 +2042,14 @@ static struct mwConferenceHandler mw_conference_handler = { - .on_invited = mw_conf_invited, - .conf_opened = mw_conf_opened, - .conf_closed = mw_conf_closed, - .on_peer_joined = mw_conf_peer_joined, - .on_peer_parted = mw_conf_peer_parted, - .on_text = mw_conf_text, - .on_typing = mw_conf_typing, - .clear = mw_conf_clear, + mw_conf_invited, + mw_conf_opened, + mw_conf_closed, + mw_conf_peer_joined, + mw_conf_peer_parted, + mw_conf_text, + mw_conf_typing, + mw_conf_clear, }; @@ -2287,12 +2287,12 @@ static struct mwFileTransferHandler mw_ft_handler = { - .ft_offered = mw_ft_offered, - .ft_opened = mw_ft_opened, - .ft_closed = mw_ft_closed, - .ft_recv = mw_ft_recv, - .ft_ack = mw_ft_ack, - .clear = mw_ft_clear, + mw_ft_offered, + mw_ft_opened, + mw_ft_closed, + mw_ft_recv, + mw_ft_ack, + mw_ft_clear, }; @@ -2854,11 +2854,11 @@ static struct mwImHandler mw_im_handler = { - .conversation_opened = mw_conversation_opened, - .conversation_closed = mw_conversation_closed, - .conversation_recv = mw_conversation_recv, - .place_invite = mw_place_invite, - .clear = mw_im_clear, + mw_conversation_opened, + mw_conversation_closed, + mw_conversation_recv, + mw_place_invite, + mw_im_clear, }; @@ -3052,14 +3052,14 @@ static struct mwPlaceHandler mw_place_handler = { - .opened = mw_place_opened, - .closed = mw_place_closed, - .peerJoined = mw_place_peerJoined, - .peerParted = mw_place_peerParted, - .peerSetAttribute = mw_place_peerSetAttribute, - .peerUnsetAttribute = mw_place_peerUnsetAttribute, - .message = mw_place_message, - .clear = mw_place_clear, + mw_place_opened, + mw_place_closed, + mw_place_peerJoined, + mw_place_peerParted, + mw_place_peerSetAttribute, + mw_place_peerUnsetAttribute, + mw_place_message, + mw_place_clear, }; @@ -4575,9 +4575,9 @@ struct mwSession *session; struct mwPrivacyInfo privacy = { - .deny = FALSE, - .count = 0, - .users = NULL, + FALSE, /* deny */ + 0, /* count */ + NULL, /* users */ }; g_return_if_fail(gc != NULL); @@ -5167,7 +5167,13 @@ static PurplePluginUiInfo mw_plugin_ui_info = { - .get_plugin_pref_frame = mw_plugin_get_plugin_pref_frame, + mw_plugin_get_plugin_pref_frame, + 0, /* page_num */ + NULL, /* frame */ + NULL, + NULL, + NULL, + NULL }; @@ -5648,30 +5654,39 @@ g_log_remove_handler("meanwhile", log_handler[1]); } - -static PurplePluginInfo mw_plugin_info = { - .magic = PURPLE_PLUGIN_MAGIC, - .major_version = PURPLE_MAJOR_VERSION, - .minor_version = PURPLE_MINOR_VERSION, - .type = PURPLE_PLUGIN_PROTOCOL, - .ui_requirement = NULL, - .flags = 0, - .dependencies = NULL, - .priority = PURPLE_PRIORITY_DEFAULT, - .id = PLUGIN_ID, - .name = PLUGIN_NAME, - .version = VERSION, - .summary = PLUGIN_SUMMARY, - .description = PLUGIN_DESC, - .author = PLUGIN_AUTHOR, - .homepage = PLUGIN_HOMEPAGE, - .load = mw_plugin_load, - .unload = mw_plugin_unload, - .destroy = mw_plugin_destroy, - .ui_info = NULL, - .extra_info = &mw_prpl_info, - .prefs_info = &mw_plugin_ui_info, - .actions = mw_plugin_actions, +static PurplePluginInfo mw_plugin_info = +{ + PURPLE_PLUGIN_MAGIC, + PURPLE_MAJOR_VERSION, + PURPLE_MINOR_VERSION, + PURPLE_PLUGIN_PROTOCOL, /**< type */ + NULL, /**< ui_requirement */ + 0, /**< flags */ + NULL, /**< dependencies */ + PURPLE_PRIORITY_DEFAULT, /**< priority */ + + PLUGIN_ID, /**< id */ + PLUGIN_NAME, /**< name */ + VERSION, /**< version */ + PLUGIN_SUMMARY, /**< summary */ + PLUGIN_DESC, /**< description */ + PLUGIN_AUTHOR, /**< author */ + PLUGIN_HOMEPAGE, /**< homepage */ + + mw_plugin_load, /**< load */ + mw_plugin_unload, /**< unload */ + mw_plugin_destroy, /**< destroy */ + + NULL, /**< ui_info */ + &mw_prpl_info, /**< extra_info */ + &mw_plugin_ui_info, /**< prefs_info */ + mw_plugin_actions, + + /* padding */ + NULL, + NULL, + NULL, + NULL };
--- a/libpurple/protocols/silc/util.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/silc/util.c Sun May 20 04:16:11 2007 +0000 @@ -620,15 +620,15 @@ ct = strrchr(filename, '.'); if (!ct) return NULL; - else if (!strcasecmp(".png", ct)) + else if (!g_ascii_strcasecmp(".png", ct)) return strdup("image/png"); - else if (!strcasecmp(".jpg", ct)) + else if (!g_ascii_strcasecmp(".jpg", ct)) return strdup("image/jpeg"); - else if (!strcasecmp(".jpeg", ct)) + else if (!g_ascii_strcasecmp(".jpeg", ct)) return strdup("image/jpeg"); - else if (!strcasecmp(".gif", ct)) + else if (!g_ascii_strcasecmp(".gif", ct)) return strdup("image/gif"); - else if (!strcasecmp(".tiff", ct)) + else if (!g_ascii_strcasecmp(".tiff", ct)) return strdup("image/tiff"); return NULL;
--- a/libpurple/protocols/simple/simple.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/simple/simple.c Sun May 20 04:16:11 2007 +0000 @@ -1237,9 +1237,9 @@ while(tmp && tmp < acceptheader + strlen(acceptheader)) { gchar *tmp2 = strchr(tmp, ','); if(tmp2) *tmp2 = '\0'; - if(!strcasecmp("application/pidf+xml", tmp)) + if(!g_ascii_strcasecmp("application/pidf+xml", tmp)) foundpidf = TRUE; - if(!strcasecmp("application/xpidf+xml", tmp)) + if(!g_ascii_strcasecmp("application/xpidf+xml", tmp)) foundxpidf = TRUE; if(tmp2) { *tmp2 = ',';
--- a/libpurple/protocols/simple/sipmsg.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/simple/sipmsg.c Sun May 20 04:16:11 2007 +0000 @@ -180,7 +180,7 @@ GSList *tmp = msg->headers; while(tmp) { elem = tmp->data; - if(strcasecmp(elem->name, name)==0) { + if(g_ascii_strcasecmp(elem->name, name)==0) { msg->headers = g_slist_remove(msg->headers, elem); g_free(elem->name); g_free(elem->value); @@ -198,7 +198,7 @@ tmp = msg->headers; while(tmp) { elem = tmp->data; - if(strcasecmp(elem->name, name)==0) { + if(g_ascii_strcasecmp(elem->name, name)==0) { return elem->value; } tmp = g_slist_next(tmp);
--- a/libpurple/protocols/zephyr/zephyr.c Sat May 19 03:31:37 2007 +0000 +++ b/libpurple/protocols/zephyr/zephyr.c Sun May 20 04:16:11 2007 +0000 @@ -990,7 +990,8 @@ tc = tree_child(ptree,0)->contents; - if (ptree->num_children > 0 && tc && !strcasecmp(tc, key)) { + /* g_strcasecmp() is deprecated. What is the encoding here??? */ + if (ptree->num_children > 0 && tc && !g_strcasecmp(tc, key)) { return ptree; } else { parse_tree *result = &null_parse_tree;
--- a/pidgin/gtkutils.c Sat May 19 03:31:37 2007 +0000 +++ b/pidgin/gtkutils.c Sun May 20 04:16:11 2007 +0000 @@ -3017,7 +3017,7 @@ PangoLogAttr *log_attrs; gchar *word; - if (strcasecmp(key, "Global Thermonuclear War") == 0) + if (g_ascii_strcasecmp(key, "Global Thermonuclear War") == 0) { purple_notify_info(NULL, "WOPR", "Wouldn't you prefer a nice game of chess?", NULL);