Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
5966:5fb6bd688a5b | 5967:156953fe3e14 |
---|---|
810 return optmenu; | 810 return optmenu; |
811 } | 811 } |
812 | 812 |
813 gboolean gaim_gtk_check_if_dir(const char *path, GtkFileSelection *filesel) | 813 gboolean gaim_gtk_check_if_dir(const char *path, GtkFileSelection *filesel) |
814 { | 814 { |
815 struct stat st; | 815 char *dirname; |
816 char *name; | 816 |
817 | 817 if (g_file_test(path, G_FILE_TEST_IS_DIR)) { |
818 if (stat(path, &st) == 0 && S_ISDIR(st.st_mode)) { | |
819 /* append a / if needed */ | 818 /* append a / if needed */ |
820 if (path[strlen(path) - 1] != '/') { | 819 if (path[strlen(path) - 1] != '/') { |
821 name = g_strconcat(path, "/", NULL); | 820 dirname = g_strconcat(path, "/", NULL); |
822 } else { | 821 } else { |
823 name = g_strdup(path); | 822 dirname = g_strdup(path); |
824 } | 823 } |
825 gtk_file_selection_set_filename(filesel, name); | 824 gtk_file_selection_set_filename(filesel, dirname); |
826 g_free(name); | 825 g_free(dirname); |
827 return TRUE; | 826 return TRUE; |
828 } | 827 } |
829 | 828 |
830 return FALSE; | 829 return FALSE; |
831 } | 830 } |