Handle all message types properly in UiStyle; eliminate msgtype format codes
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 17 Jun 2009 06:50:27 +0000 (08:50 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 6 Aug 2009 18:25:05 +0000 (20:25 +0200)
commit76ff3775486d1f813d932adf38a53b45966eb274
treed9f5f4788b8f7bad8904d1d71659f068b75e3c3e
parent426c0a2e8bef92d3100339e6f588c641c4684d98
Handle all message types properly in UiStyle; eliminate msgtype format codes

Turned out we didn't handle all message types (as in Message::Type) in
UiStyle, e.g. the daychange message was treated like an error. Possibly this
also fixes the "daychange msg not translated" bug, but I haven't tested yet.

Also, styleString() now takes a base message format as optional parameter. This
eliminates the need to add the msgtype as one of the %Dx format codes in every message.
Accordingly, I've removed those format codes and added a mapping for Message::Type -> UiStyle::FormatType
instead that is used to set the initial format for a string to be styled.

Sorry translators, this touches most of the strings in UiStyle, so those will have to be updated.
src/qtui/settingspages/colorsettingspage.cpp
src/qtui/topiclabel.cpp
src/uisupport/qssparser.cpp
src/uisupport/uistyle.cpp
src/uisupport/uistyle.h