Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
4792:9212d1c5b7dc | 4793:677d3cb193a1 |
---|---|
272 | 272 |
273 destdir = g_strconcat(gaim_user_dir(), G_DIR_SEPARATOR_S "smileys", NULL); | 273 destdir = g_strconcat(gaim_user_dir(), G_DIR_SEPARATOR_S "smileys", NULL); |
274 | 274 |
275 /* We'll check this just to make sure. This also lets us do something different on | 275 /* We'll check this just to make sure. This also lets us do something different on |
276 * other platforms, if need be */ | 276 * other platforms, if need be */ |
277 if (!g_strcasecmp(tail, ".gz") || !g_strcasecmp(tail, ".tgz")) | 277 if (!g_ascii_strcasecmp(tail, ".gz") || !g_ascii_strcasecmp(tail, ".tgz")) |
278 command = g_strdup_printf("tar > /dev/null xzf \"%s\" -C %s", path, destdir); | 278 command = g_strdup_printf("tar > /dev/null xzf \"%s\" -C %s", path, destdir); |
279 else { | 279 else { |
280 g_free(destdir); | 280 g_free(destdir); |
281 return; | 281 return; |
282 } | 282 } |
310 | 310 |
311 if ((sd->length >= 0) && (sd->format == 8)) { | 311 if ((sd->length >= 0) && (sd->format == 8)) { |
312 /* Well, it looks like the drag event was cool. | 312 /* Well, it looks like the drag event was cool. |
313 * Let's do something with it */ | 313 * Let's do something with it */ |
314 | 314 |
315 if (!g_strncasecmp(name, "file://", 7)) { | 315 if (!g_ascii_strncasecmp(name, "file://", 7)) { |
316 /* It looks like we're dealing with a local file. Let's | 316 /* It looks like we're dealing with a local file. Let's |
317 * just untar it in the right place */ | 317 * just untar it in the right place */ |
318 theme_install_theme(name + 7, NULL); | 318 theme_install_theme(name + 7, NULL); |
319 } else if (!g_strncasecmp(name, "http://", 7)) { | 319 } else if (!g_ascii_strncasecmp(name, "http://", 7)) { |
320 /* Oo, a web drag and drop. This is where things | 320 /* Oo, a web drag and drop. This is where things |
321 * will start to get interesting */ | 321 * will start to get interesting */ |
322 gchar *tail; | 322 gchar *tail; |
323 | 323 |
324 if ((tail = strrchr(name, '.')) == NULL) | 324 if ((tail = strrchr(name, '.')) == NULL) |
1403 /* Close the window! It's getting cold in here! */ | 1403 /* Close the window! It's getting cold in here! */ |
1404 close_sounddialog(NULL, sounddialog); | 1404 close_sounddialog(NULL, sounddialog); |
1405 | 1405 |
1406 if (last_sound_dir) | 1406 if (last_sound_dir) |
1407 g_free(last_sound_dir); | 1407 g_free(last_sound_dir); |
1408 last_sound_dir = g_dirname(file); | 1408 last_sound_dir = g_path_get_dirname(file); |
1409 } | 1409 } |
1410 | 1410 |
1411 static void sel_sound(GtkWidget *button, gpointer being_NULL_is_fun) | 1411 static void sel_sound(GtkWidget *button, gpointer being_NULL_is_fun) |
1412 { | 1412 { |
1413 char *buf = g_malloc(BUF_LEN); | 1413 char *buf = g_malloc(BUF_LEN); |