comparison pidgin/gtkthemes.c @ 27931:d8e6a2d592a4

propagate from branch 'im.pidgin.pidgin' (head 66190c21dfe7125476caca3c14725bac9db8b71b) to branch 'im.pidgin.pidgin.yaz' (head 30f1655106c7764e3f9cfc8a139784d9b0bd4459)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 03 Mar 2009 06:57:02 +0000
parents 584063555949
children c91832e94473 fe75cd926073
comparison
equal deleted inserted replaced
27930:25319f536d93 27931:d8e6a2d592a4
81 81
82 void pidgin_themes_remove_smiley_theme(const char *file) 82 void pidgin_themes_remove_smiley_theme(const char *file)
83 { 83 {
84 char *theme_dir = NULL, *last_slash = NULL; 84 char *theme_dir = NULL, *last_slash = NULL;
85 g_return_if_fail(NULL != file); 85 g_return_if_fail(NULL != file);
86 86
87 if (!g_file_test(file, G_FILE_TEST_EXISTS)) return; 87 if (!g_file_test(file, G_FILE_TEST_EXISTS)) return;
88 if ((theme_dir = g_strdup(file)) == NULL) return ; 88 if ((theme_dir = g_strdup(file)) == NULL) return ;
89 89
90 if ((last_slash = g_strrstr(theme_dir, G_DIR_SEPARATOR_S)) != NULL) { 90 if ((last_slash = g_strrstr(theme_dir, G_DIR_SEPARATOR_S)) != NULL) {
91 GSList *iter = NULL; 91 GSList *iter = NULL;
167 167
168 already_freed = g_hash_table_new(g_direct_hash, g_direct_equal); 168 already_freed = g_hash_table_new(g_direct_hash, g_direct_equal);
169 for (wer = theme->list; wer != NULL; wer = theme->list) { 169 for (wer = theme->list; wer != NULL; wer = theme->list) {
170 while (wer->smileys) { 170 while (wer->smileys) {
171 GtkIMHtmlSmiley *uio = wer->smileys->data; 171 GtkIMHtmlSmiley *uio = wer->smileys->data;
172 172
173 if (uio->imhtml) { 173 if (uio->imhtml) {
174 g_signal_handlers_disconnect_matched(uio->imhtml, G_SIGNAL_MATCH_DATA, 174 g_signal_handlers_disconnect_matched(uio->imhtml, G_SIGNAL_MATCH_DATA,
175 0, 0, NULL, NULL, uio); 175 0, 0, NULL, NULL, uio);
176 } 176 }
177 177
178 if (uio->icon) 178 if (uio->icon)
179 g_object_unref(uio->icon); 179 g_object_unref(uio->icon);
180 if (g_hash_table_lookup(already_freed, uio->file) == NULL) { 180 if (g_hash_table_lookup(already_freed, uio->file) == NULL) {
181 g_free(uio->file); 181 g_free(uio->file);
182 g_hash_table_insert(already_freed, uio->file, GINT_TO_POINTER(1)); 182 g_hash_table_insert(already_freed, uio->file, GINT_TO_POINTER(1));