Mercurial > pidgin
diff src/gtkutils.c @ 5967:156953fe3e14
[gaim-migrate @ 6414]
I gave gtkimhtml some TLC. It no longer contains the word "Gaim," and
it doesn't complain about needing to include a header.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 28 Jun 2003 00:49:56 +0000 |
parents | 5fb6bd688a5b |
children | 7ff81c01d238 |
line wrap: on
line diff
--- a/src/gtkutils.c Fri Jun 27 23:11:21 2003 +0000 +++ b/src/gtkutils.c Sat Jun 28 00:49:56 2003 +0000 @@ -812,18 +812,17 @@ gboolean gaim_gtk_check_if_dir(const char *path, GtkFileSelection *filesel) { - struct stat st; - char *name; + char *dirname; - if (stat(path, &st) == 0 && S_ISDIR(st.st_mode)) { + if (g_file_test(path, G_FILE_TEST_IS_DIR)) { /* append a / if needed */ if (path[strlen(path) - 1] != '/') { - name = g_strconcat(path, "/", NULL); + dirname = g_strconcat(path, "/", NULL); } else { - name = g_strdup(path); + dirname = g_strdup(path); } - gtk_file_selection_set_filename(filesel, name); - g_free(name); + gtk_file_selection_set_filename(filesel, dirname); + g_free(dirname); return TRUE; }