# HG changeset patch # User Gabriel Schulhof # Date 1180769443 0 # Node ID 7055885b1b706608bfc2718357b0fb646cdef95d # Parent cf6b7aeae0620f9a0f259fd8d4ccb9d7abbff0c9 Figured out how to keep reflecting current smiley theme after remove. diff -r cf6b7aeae062 -r 7055885b1b70 pidgin/gtkthemes.c --- 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 */