Mercurial > pidgin
diff src/prefs.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 | 9e8ae330fb28 |
children | 4af15fbcb00a |
line wrap: on
line diff
--- a/src/prefs.c Sat Mar 15 22:22:39 2003 +0000 +++ b/src/prefs.c Sun Mar 16 00:01:49 2003 +0000 @@ -274,7 +274,7 @@ /* We'll check this just to make sure. This also lets us do something different on * other platforms, if need be */ - if (!g_strcasecmp(tail, ".gz") || !g_strcasecmp(tail, ".tgz")) + if (!g_ascii_strcasecmp(tail, ".gz") || !g_ascii_strcasecmp(tail, ".tgz")) command = g_strdup_printf("tar > /dev/null xzf \"%s\" -C %s", path, destdir); else { g_free(destdir); @@ -312,11 +312,11 @@ /* Well, it looks like the drag event was cool. * Let's do something with it */ - if (!g_strncasecmp(name, "file://", 7)) { + if (!g_ascii_strncasecmp(name, "file://", 7)) { /* It looks like we're dealing with a local file. Let's * just untar it in the right place */ theme_install_theme(name + 7, NULL); - } else if (!g_strncasecmp(name, "http://", 7)) { + } else if (!g_ascii_strncasecmp(name, "http://", 7)) { /* Oo, a web drag and drop. This is where things * will start to get interesting */ gchar *tail; @@ -1405,7 +1405,7 @@ if (last_sound_dir) g_free(last_sound_dir); - last_sound_dir = g_dirname(file); + last_sound_dir = g_path_get_dirname(file); } static void sel_sound(GtkWidget *button, gpointer being_NULL_is_fun)