projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a4f9e0b
)
Adapt to new topic message type
author
Manuel Nickschas
<sputnick@quassel-irc.org>
Thu, 6 Aug 2009 20:48:19 +0000
(22:48 +0200)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Thu, 6 Aug 2009 20:48:19 +0000
(22:48 +0200)
data/default.qss
patch
|
blob
|
history
src/qtui/qtuistyle.cpp
patch
|
blob
|
history
src/uisupport/qssparser.cpp
patch
|
blob
|
history
src/uisupport/uistyle.cpp
patch
|
blob
|
history
src/uisupport/uistyle.h
patch
|
blob
|
history
diff --git
a/data/default.qss
b/data/default.qss
index
281cb66
..
22d2401
100644
(file)
--- a/
data/default.qss
+++ b/
data/default.qss
@@
-84,6
+84,7
@@
ChatLine#server { foreground: #916409; }
ChatLine#info { foreground: #916409; }
ChatLine#error { foreground: #916409; }
ChatLine#daychange { foreground: #916409; }
ChatLine#info { foreground: #916409; }
ChatLine#error { foreground: #916409; }
ChatLine#daychange { foreground: #916409; }
+ChatLine#topic { foreground: #960096; }
// BufferView Colors
ChatListItem[state="inactive"] { foreground: #a0a0a4; }
// BufferView Colors
ChatListItem[state="inactive"] { foreground: #a0a0a4; }
diff --git
a/src/qtui/qtuistyle.cpp
b/src/qtui/qtuistyle.cpp
index
2e505a6
..
26c9048
100644
(file)
--- a/
src/qtui/qtuistyle.cpp
+++ b/
src/qtui/qtuistyle.cpp
@@
-81,6
+81,7
@@
void QtUiStyle::generateSettingsQss() const {
<< msgTypeQss("info", "ServerMsg", s)
<< msgTypeQss("error", "ErrorMsg", s)
<< msgTypeQss("daychange", "ServerMsg", s)
<< msgTypeQss("info", "ServerMsg", s)
<< msgTypeQss("error", "ErrorMsg", s)
<< msgTypeQss("daychange", "ServerMsg", s)
+ << msgTypeQss("topic", "CommandMsg", s)
<< "\n";
}
<< "\n";
}
diff --git
a/src/uisupport/qssparser.cpp
b/src/uisupport/qssparser.cpp
index
ccb2204
..
d8af2dc
100644
(file)
--- a/
src/uisupport/qssparser.cpp
+++ b/
src/uisupport/qssparser.cpp
@@
-222,6
+222,8
@@
quint64 QssParser::parseFormatType(const QString &decl) {
fmtType |= UiStyle::ErrorMsg;
else if(msgType == "daychange")
fmtType |= UiStyle::DayChangeMsg;
fmtType |= UiStyle::ErrorMsg;
else if(msgType == "daychange")
fmtType |= UiStyle::DayChangeMsg;
+ else if(msgType == "topic")
+ fmtType |= UiStyle::TopicMsg;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message type in %1").arg(decl);
}
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message type in %1").arg(decl);
}
diff --git
a/src/uisupport/uistyle.cpp
b/src/uisupport/uistyle.cpp
index
555f877
..
18934d6
100644
(file)
--- a/
src/uisupport/uistyle.cpp
+++ b/
src/uisupport/uistyle.cpp
@@
-394,6
+394,8
@@
UiStyle::FormatType UiStyle::formatType(Message::Type msgType) {
return ErrorMsg;
case Message::DayChange:
return DayChangeMsg;
return ErrorMsg;
case Message::DayChange:
return DayChangeMsg;
+ case Message::Topic:
+ return TopicMsg;
}
//Q_ASSERT(false); // we need to handle all message types
qWarning() << Q_FUNC_INFO << "Unknown message type:" << msgType;
}
//Q_ASSERT(false); // we need to handle all message types
qWarning() << Q_FUNC_INFO << "Unknown message type:" << msgType;
@@
-608,6
+610,9
@@
void UiStyle::StyledMessage::style() const {
//: Day Change Message
t = tr("{Day changed to %1}").arg(timestamp().toString());
break;
//: Day Change Message
t = tr("{Day changed to %1}").arg(timestamp().toString());
break;
+ case Message::Topic:
+ //: Topic Message
+ t = tr("%1").arg(txt); break;
default:
t = tr("[%1]").arg(txt);
}
default:
t = tr("[%1]").arg(txt);
}
@@
-672,6
+677,8
@@
QString UiStyle::StyledMessage::decoratedSender() const {
return tr("*"); break;
case Message::DayChange:
return tr("-"); break;
return tr("*"); break;
case Message::DayChange:
return tr("-"); break;
+ case Message::Topic:
+ return tr("*"); break;
default:
return tr("%1").arg(plainSender());
}
default:
return tr("%1").arg(plainSender());
}
diff --git
a/src/uisupport/uistyle.h
b/src/uisupport/uistyle.h
index
5b96bed
..
f10dd4c
100644
(file)
--- a/
src/uisupport/uistyle.h
+++ b/
src/uisupport/uistyle.h
@@
-69,6
+69,7
@@
public:
InfoMsg = 0x0000000c,
ErrorMsg = 0x0000000d,
DayChangeMsg = 0x0000000e,
InfoMsg = 0x0000000c,
ErrorMsg = 0x0000000d,
DayChangeMsg = 0x0000000e,
+ TopicMsg = 0x0000000f,
// Standard Formats
Bold = 0x00000100,
// Standard Formats
Bold = 0x00000100,