Mercurial > pidgin
diff src/protocols/gg/gg.c @ 4793:677d3cb193a1
[gaim-migrate @ 5113]
this removes all the remaining deprecated glib, gdk, gdk-pixbuf, and gtk
function calls. Hopefully I didn't break anything.
Most of this is due to the deprecation of g_strcasecmp and g_strncasecmp.
Two functions I never thought would be deprecated, but apparently they're
no good at comparing utf8 text. g_ascii_str{,n}casecmp is OK when you're
sure that it's ASCII. Otherwise, we're supposed to use g_utf8_collate(),
except that it is case sensitive. Since glib doesn't currently have a
case-insensitive one, I wrote one. If you need to compare utf8 text, you
can use gaim_utf8_strcasecmp().
I have to go do dishes now.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 16 Mar 2003 00:01:49 +0000 |
parents | 1e28e7d802a1 |
children | d9b6b5ae34e4 |
line wrap: on
line diff
--- a/src/protocols/gg/gg.c Sat Mar 15 22:22:39 2003 +0000 +++ b/src/protocols/gg/gg.c Sun Mar 16 00:01:49 2003 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 5105 2003-03-15 03:23:30Z faceprint $ + * $Id: gg.c 5113 2003-03-16 00:01:49Z faceprint $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -116,10 +116,7 @@ static gint args_compare(gconstpointer a, gconstpointer b) { - gchar *arg_a = (gchar *)a; - gchar *arg_b = (gchar *)b; - - return g_strcasecmp(arg_a, arg_b); + return g_ascii_strcasecmp((const gchar *)a,(const gchar *)b); } static gboolean allowed_uin(struct gaim_connection *gc, char *uin) @@ -194,27 +191,27 @@ gc->away = NULL; } - if (!g_strcasecmp(state, AGG_STATUS_AVAIL)) + if (!gaim_utf8_strcasecmp(state, AGG_STATUS_AVAIL)) status = GG_STATUS_AVAIL; - else if (!g_strcasecmp(state, AGG_STATUS_AVAIL_FRIENDS)) { + else if (!gaim_utf8_strcasecmp(state, AGG_STATUS_AVAIL_FRIENDS)) { status = GG_STATUS_AVAIL | GG_STATUS_FRIENDS_MASK; gc->away = g_strdup(""); - } else if (!g_strcasecmp(state, AGG_STATUS_BUSY)) { + } else if (!gaim_utf8_strcasecmp(state, AGG_STATUS_BUSY)) { status = GG_STATUS_BUSY; gc->away = g_strdup(""); - } else if (!g_strcasecmp(state, AGG_STATUS_BUSY_FRIENDS)) { + } else if (!gaim_utf8_strcasecmp(state, AGG_STATUS_BUSY_FRIENDS)) { status = GG_STATUS_BUSY | GG_STATUS_FRIENDS_MASK; gc->away = g_strdup(""); - } else if (!g_strcasecmp(state, AGG_STATUS_INVISIBLE)) { + } else if (!gaim_utf8_strcasecmp(state, AGG_STATUS_INVISIBLE)) { status = GG_STATUS_INVISIBLE; gc->away = g_strdup(""); - } else if (!g_strcasecmp(state, AGG_STATUS_INVISIBLE_FRIENDS)) { + } else if (!gaim_utf8_strcasecmp(state, AGG_STATUS_INVISIBLE_FRIENDS)) { status = GG_STATUS_INVISIBLE | GG_STATUS_FRIENDS_MASK; gc->away = g_strdup(""); - } else if (!g_strcasecmp(state, AGG_STATUS_NOT_AVAIL)) { + } else if (!gaim_utf8_strcasecmp(state, AGG_STATUS_NOT_AVAIL)) { status = GG_STATUS_NOT_AVAIL; gc->away = g_strdup(""); - } else if (!g_strcasecmp(state, GAIM_AWAY_CUSTOM)) { + } else if (!gaim_utf8_strcasecmp(state, GAIM_AWAY_CUSTOM)) { if (msg) { status = GG_STATUS_BUSY; gc->away = g_strdup("");