From 423611627a733b23ad5dd0ed0849977b20020de4 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 26 Nov 2014 17:42:34 +0000 Subject: IRC: fixed window title v.2(thx person) git-svn-id: http://svn.miranda-ng.org/main/trunk@11100 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IRCG/src/irc_dlg.h | 1 - protocols/IRCG/src/windows.cpp | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'protocols/IRCG') diff --git a/protocols/IRCG/src/irc_dlg.h b/protocols/IRCG/src/irc_dlg.h index c159bf08d8..cd251c5a16 100644 --- a/protocols/IRCG/src/irc_dlg.h +++ b/protocols/IRCG/src/irc_dlg.h @@ -95,7 +95,6 @@ struct CListDlg : public CProtoDlgBase virtual void OnDestroy(); virtual int Resizer(UTILRESIZECONTROL *urc); - TCHAR m_title[255]; CCtrlListView m_list, m_list2; CCtrlEdit m_filter, m_status; UINT_PTR m_timer; diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index eb3ecbe671..bb1f6d889c 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -307,6 +307,7 @@ INT_PTR CListDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) // Retrieve the input text TCHAR strFilterText[255]; + TCHAR newTitle[255]; m_filter.GetText(strFilterText, SIZEOF(strFilterText)); if (strFilterText[0]) { @@ -386,15 +387,14 @@ INT_PTR CListDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) ShowWindow(m_list.GetHwnd(), SW_HIDE); // New dialog title - TCHAR newTitle[255]; mir_sntprintf(newTitle, SIZEOF(newTitle), TranslateT("%s - Filtered - %d items"), strFilterText, itemCount); SetWindowText(m_hwnd, newTitle); } else { ShowWindow(m_list.GetHwnd(), SW_SHOW); ShowWindow(m_list2.GetHwnd(), SW_HIDE); - mir_sntprintf(m_title, SIZEOF(m_title), TranslateT("Channels on server")); - SetWindowText(m_hwnd, m_title); + mir_sntprintf(newTitle, SIZEOF(newTitle), TranslateT("Channels on server")); + SetWindowText(m_hwnd, newTitle); } } @@ -486,8 +486,6 @@ void CListDlg::OnJoin(CCtrlButton*) void CListDlg::UpdateList() { - GetWindowText(m_hwnd, m_title, 128); - int j = m_list.GetItemCount(); if (j > 0) { LVITEM lvm; -- cgit v1.2.3