After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664795 - Theme previews are not rendered correctly (depending on which theme is previewed beforehand)
Theme previews are not rendered correctly (depending on which theme is previe...
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat themes
3.2.x
Other Linux
: Normal minor
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-11-25 10:32 UTC by ch3pjw
Modified: 2011-11-25 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Properly update the 'simple' theme (2.50 KB, patch)
2011-11-25 11:47 UTC, Guillaume Desmottes
committed Details | Review

Description ch3pjw 2011-11-25 10:32:01 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.
Comment 1 Guillaume Desmottes 2011-11-25 11:14:12 UTC
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.
Comment 2 Guillaume Desmottes 2011-11-25 11:47:56 UTC
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.
Comment 3 Xavier Claessens 2011-11-25 13:23:15 UTC
looks good. +1
Comment 4 Guillaume Desmottes 2011-11-25 14:40:05 UTC
Attachment 202123 [details] pushed as 70025f4 - Properly update the 'simple' theme
Comment 5 Guillaume Desmottes 2011-11-25 14:51:55 UTC
I merged to 3.2 as well.