comparison src/gtkthemes.c @ 11557:1e7c0773380f

[gaim-migrate @ 13819] Fix smiley theme selection being lost when gaim is restarted. We now save the smiley theme name instead of path as the pref. Avoid leaking a GtkTreeRowReference. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 20 Sep 2005 21:47:57 +0000
parents b47708f46a38
children fe2cb084ab16
comparison
equal deleted inserted replaced
11556:7fbf5e4e8f5f 11557:1e7c0773380f
267 return list ? list->smileys : def->smileys; 267 return list ? list->smileys : def->smileys;
268 } 268 }
269 269
270 void gaim_gtkthemes_init() 270 void gaim_gtkthemes_init()
271 { 271 {
272 if (current_smiley_theme == NULL) { 272 GSList *l;
273 gaim_gtkthemes_smiley_theme_probe(); 273 const char *current_theme =
274 if (smiley_themes != NULL) { 274 gaim_prefs_get_string("/gaim/gtk/smileys/theme");
275 struct smiley_theme *smile = smiley_themes->data; 275
276 gaim_gtkthemes_smiley_theme_probe();
277
278 for (l = smiley_themes; l; l = l->next) {
279 struct smiley_theme *smile = l->data;
280 if (smile->name && strcmp(current_theme, smile->name) == 0) {
276 gaim_gtkthemes_load_smiley_theme(smile->path, TRUE); 281 gaim_gtkthemes_load_smiley_theme(smile->path, TRUE);
277 } 282 break;
278 } 283 }
279 } 284 }
285
286 /* If we still don't have a smiley theme, choose the first one */
287 if (!current_smiley_theme && smiley_themes) {
288 struct smiley_theme *smile = smiley_themes->data;
289 gaim_gtkthemes_load_smiley_theme(smile->path, TRUE);
290 }
291
292 }