summaryrefslogtreecommitdiff
path: root/src/mir_app/src/proto_opts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_app/src/proto_opts.cpp')
-rw-r--r--src/mir_app/src/proto_opts.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp
index d4f29726c7..151a3c2ff8 100644
--- a/src/mir_app/src/proto_opts.cpp
+++ b/src/mir_app/src/proto_opts.cpp
@@ -1034,9 +1034,11 @@ static int OnAccListChanged(WPARAM eventCode, LPARAM lParam)
switch (eventCode) {
case PRAC_CHANGED:
if (pa->ppro) {
- mir_free(pa->ppro->m_tszUserName);
- pa->ppro->m_tszUserName = mir_tstrdup(pa->tszAccountName);
+ replaceStrT(pa->ppro->m_tszUserName, pa->tszAccountName);
pa->ppro->OnEvent(EV_PROTO_ONRENAME, 0, lParam);
+
+ if (pa->ppro->m_hMainMenuItem)
+ Menu_ModifyItem(pa->ppro->m_hMainMenuItem, pa->tszAccountName);
}
}