From 3791ce0c509d1d7a64cbba67015db38f4db5404c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 18 Feb 2014 18:37:18 +0000 Subject: - introducing ME_DB_EVENT_MARKED_READ - an event being called upon the call of db_event_markRead; - various m_database.h related code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@8165 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stduihist/history.cpp | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) (limited to 'src/core/stduihist') diff --git a/src/core/stduihist/history.cpp b/src/core/stduihist/history.cpp index 13c08b692a..af51a6e95d 100644 --- a/src/core/stduihist/history.cpp +++ b/src/core/stduihist/history.cpp @@ -86,14 +86,12 @@ static void GetObjectDescription(DBEVENTINFO *dbei, TCHAR* str, int cbStr) break; default: - { - DBEVENTTYPEDESCR* et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType); - if (et && (et->flags & DETF_HISTORY)) { - GetMessageDescription(dbei, str, cbStr); - } - else - str[ 0 ] = 0; -} } } + DBEVENTTYPEDESCR *et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType); + if (et && (et->flags & DETF_HISTORY)) + GetMessageDescription(dbei, str, cbStr); + else + *str = 0; +} } static void GetObjectSummary(DBEVENTINFO *dbei, TCHAR* str, int cbStr) { @@ -116,21 +114,18 @@ static void GetObjectSummary(DBEVENTINFO *dbei, TCHAR* str, int cbStr) break; default: - { - DBEVENTTYPEDESCR* et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType); - if (et && (et->flags & DETF_HISTORY)) { - pszTmp = mir_a2t(et->descr); - pszSrc = TranslateTS(pszTmp); - break; - } - else { - str[ 0 ] = 0; - return; - } } } + DBEVENTTYPEDESCR* et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType); + if (et && (et->flags & DETF_HISTORY)) { + pszTmp = mir_a2t(et->descr); + pszSrc = TranslateTS(pszTmp); + break; + } + *str = 0; + return; + } _tcsncpy(str, (const TCHAR*)pszSrc, cbStr); - str[ cbStr-1 ] = 0; - + str[cbStr-1] = 0; mir_free(pszTmp); } -- cgit v1.2.3