projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
68802b3
)
fixes #580 - nick-dropdown is updated even if nickchange fails
author
Marcus Eggenberger
<egs@quassel-irc.org>
Wed, 11 Mar 2009 16:51:21 +0000
(17:51 +0100)
committer
Marcus Eggenberger
<egs@quassel-irc.org>
Wed, 11 Mar 2009 18:20:50 +0000
(19:20 +0100)
src/qtui/inputwidget.cpp
patch
|
blob
|
history
diff --git
a/src/qtui/inputwidget.cpp
b/src/qtui/inputwidget.cpp
index
3c7bec5
..
d4ca832
100644
(file)
--- a/
src/qtui/inputwidget.cpp
+++ b/
src/qtui/inputwidget.cpp
@@
-204,8
+204,11
@@
void InputWidget::updateNickSelector() const {
return;
IrcUser *me = net->me();
return;
IrcUser *me = net->me();
- if(me)
- nicks[nickIdx] = net->myNick() + QString(" (+%1)").arg(me->userModes());
+ if(me) {
+ nicks[nickIdx] = net->myNick();
+ if(!me->userModes().isEmpty())
+ nicks[nickIdx] += QString(" (+%1)").arg(me->userModes());
+ }
ui.ownNick->addItems(nicks);
ui.ownNick->addItems(nicks);
@@
-219,7
+222,11
@@
void InputWidget::changeNick(const QString &newNick) const {
const Network *net = currentNetwork();
if(!net || net->isMyNick(newNick))
return;
const Network *net = currentNetwork();
if(!net || net->isMyNick(newNick))
return;
- emit userInput(currentBufferInfo(), QString("/nick %1").arg(newNick));
+
+ // we reset the nick selecter as we have no confirmation yet, that this will succeed.
+ // if the action succeeds it will be properly updated anyways.
+ updateNickSelector();
+ emit userInput(BufferInfo::fakeStatusBuffer(net->networkId()), QString("/nick %1").arg(newNick));
}
void InputWidget::sendText(QString text) {
}
void InputWidget::sendText(QString text) {