GNOME Bugzilla – Bug 664795
Theme previews are not rendered correctly (depending on which theme is previewed beforehand)
Last modified: 2011-11-25 14:51:55 UTC
Distriubution: Fedora 16 Specific Empathy Version: 3.2.1.2 To Reproduce: Contact List window > Edit > Preferences > Themes tab I have four themes installed by default (Blue, Classic, Clean and Simple). If I change the chat theme from Classic to Clean in the "Chat Theme" dropdown I get what looks like a correctly rendered theme. If I now change to Simple, nothing happens. If I switch back to Classic, and then to Simple directly, I get what looks like a different correctly rendered theme. Then I if I switch to Clean, the background of the headers to the blocks of messages changes from blue to grey (as per each theme), but the text remains white. Expected behaviour: Each theme is correctly and fully rendered each time the user switches from the "Chat Theme" dropdown.
I can reproduce this. That's because of this code in theme_manager_notify_name_cb: /* Do not emit theme-changed if theme type didn't change. If theme * changed from a boxed to another boxed, all view are updated in place. * If theme changed from an adium to another adium, the signal will be * emited from theme_manager_notify_adium_path_cb () */ if (old_type != new_type) { theme_manager_emit_changed (manager); } In this case old_type == new_type == THEME_TYPE_BOXED so the signal is not fired, preferences_preview_theme_changed_cb() isn't called and so the preview isn't updated.
Created attachment 202123 [details] [review] Properly update the 'simple' theme We have to call the callback manually to update the theme when it's changed. Also make sure that style-set signal is only connected once and we update the theme only if the 'simple' one is used.
looks good. +1
Attachment 202123 [details] pushed as 70025f4 - Properly update the 'simple' theme
I merged to 3.2 as well.