Mercurial > pidgin.yaz
comparison src/gtkutils.c @ 9534:6f0c90000bb5
[gaim-migrate @ 10362]
Make paths behave sexier on Windows in file selector dialogs when a user
types a directory name and clicks "ok" when using a gtk < 2.4
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 15 Jul 2004 02:03:38 +0000 |
parents | 44a5bfa4730b |
children | d4634f26ef9b |
comparison
equal
deleted
inserted
replaced
9533:03066f174777 | 9534:6f0c90000bb5 |
---|---|
747 { | 747 { |
748 char *dirname; | 748 char *dirname; |
749 | 749 |
750 if (g_file_test(path, G_FILE_TEST_IS_DIR)) { | 750 if (g_file_test(path, G_FILE_TEST_IS_DIR)) { |
751 /* append a / if needed */ | 751 /* append a / if needed */ |
752 if (path[strlen(path) - 1] != '/') { | 752 if (path[strlen(path) - 1] != G_DIR_SEPARATOR) { |
753 dirname = g_strconcat(path, "/", NULL); | 753 dirname = g_strconcat(path, G_DIR_SEPARATOR_S, NULL); |
754 } else { | 754 } else { |
755 dirname = g_strdup(path); | 755 dirname = g_strdup(path); |
756 } | 756 } |
757 gtk_file_selection_set_filename(filesel, dirname); | 757 gtk_file_selection_set_filename(filesel, dirname); |
758 g_free(dirname); | 758 g_free(dirname); |