pidgin/gtkthemes.c

changeset 26378
e85d894af8a5
parent 25888
d0fdd378a635
child 28075
2d472ed937db
child 32439
2c681e5daeeb
equal deleted inserted replaced
26377:9124a345ed3a 26378:e85d894af8a5
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));

mercurial