Mercurial > pidgin
changeset 17777:7055885b1b70
Figured out how to keep reflecting current smiley theme after remove.
author | Gabriel Schulhof <nix@go-nix.ca> |
---|---|
date | Sat, 02 Jun 2007 07:30:43 +0000 |
parents | cf6b7aeae062 |
children | 855a767cd9a9 |
files | pidgin/gtkthemes.c |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkthemes.c Fri Jun 01 21:22:46 2007 +0000 +++ b/pidgin/gtkthemes.c Sat Jun 02 07:30:43 2007 +0000 @@ -87,7 +87,7 @@ if ((last_slash = g_strrstr(theme_dir, G_DIR_SEPARATOR_S)) != NULL) { GSList *iter = NULL; - struct smiley_theme *theme = NULL; + struct smiley_theme *theme = NULL, *new_theme = NULL; *last_slash = 0; @@ -101,8 +101,13 @@ break ; } if (iter) { - if (theme == current_smiley_theme) - current_smiley_theme = ((struct smiley_theme *)(NULL == iter->next ? (smiley_themes == iter ? NULL : smiley_themes->data) : iter->next->data)); + if (theme == current_smiley_theme) { + new_theme = ((struct smiley_theme *)(NULL == iter->next ? (smiley_themes == iter ? NULL : smiley_themes->data) : iter->next->data)); + if (new_theme) + purple_prefs_set_string(PIDGIN_PREFS_ROOT "/smileys/theme", new_theme->name); + else + current_smiley_theme = NULL; + } smiley_themes = g_slist_delete_link(smiley_themes, iter); /* Destroy theme structure */