diff options
| author | 2016-05-23 01:25:59 +0100 | |
|---|---|---|
| committer | 2016-05-23 02:54:26 +0100 | |
| commit | addf2b756f7f8d95b828099e8905ccab55fbbaad (patch) | |
| tree | b30e9ae12cfb7c96e621fcc1f9049e6ef5ac72c0 /src | |
| parent | various: minor tweaks and string fix (diff) | |
| download | KVIrc-addf2b756f7f8d95b828099e8905ccab55fbbaad.tar.gz KVIrc-addf2b756f7f8d95b828099e8905ccab55fbbaad.tar.bz2 KVIrc-addf2b756f7f8d95b828099e8905ccab55fbbaad.zip | |
KviIrcView_events: if no topic, show msg in tooltip for chan link
Diffstat (limited to 'src')
| -rw-r--r-- | src/kvirc/ui/KviIrcView_events.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/kvirc/ui/KviIrcView_events.cpp b/src/kvirc/ui/KviIrcView_events.cpp index c776aaa47..96546365f 100644 --- a/src/kvirc/ui/KviIrcView_events.cpp +++ b/src/kvirc/ui/KviIrcView_events.cpp @@ -1080,13 +1080,23 @@ void KviIrcView::doLinkToolTip(const QRect & rct, QString & linkCmd, QString & l KviIrcUrl::join(szUrl, console()->connection()->target()->server()); szUrl.append(szChan); - tip += tdh; - tip += __tr2qs("Channel Topic") + enr + nrs; - tip += KviQString::toHtmlEscaped(topic) + enr + tdp; + if(!topic.isEmpty()) + { + tip += tdh; + tip += __tr2qs("Channel Topic") + enr + nrs; + tip += KviQString::toHtmlEscaped(topic) + enr + tdp; + } + else + { + tip += tdh; + tip += __tr2qs("Channel Topic") + enr + nrs; + tip += __tr2qs("No topic message has been received from the server yet") + enr + tdp; + } + tip += __tr2qs("Channel modes: <b>+%1</b>").arg(KviQString::toHtmlEscaped(chanMode)) + enr + tdp; tip += __tr2qs("Total users: <b>%1</b>").arg(c->count()) + enr + tdp; tip += __tr2qs("IRC URI") + cln + nbspc; - tip += "<font color=\"#0022FF\">" + ub + KviQString::toHtmlEscaped(szUrl) + ue + "</font>"; + tip += "<font color=\"#0022FF\">" + ub + KviQString::toHtmlEscaped(szUrl) + ue + "</font>"; tip += enr; } else |
