diff options
author | George Hazan <george.hazan@gmail.com> | 2024-09-18 18:05:30 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-09-18 18:05:30 +0300 |
commit | 66aae3c929b110d9621c649ebaeba2e75dc2a1b9 (patch) | |
tree | c23c27e717ff555be68afba5939585bf5c59d233 | |
parent | 9526839551e4958e8064d4b29ee45460597af9ec (diff) |
fixes #4682 (Scriver: пропала подсветка свёрнутого окна в панели задач)
-rw-r--r-- | include/m_database.h | 1 | ||||
-rw-r--r-- | libs/win32/mir_app.lib | bin | 299124 -> 299410 bytes | |||
-rw-r--r-- | libs/win64/mir_app.lib | bin | 299152 -> 299442 bytes | |||
-rw-r--r-- | plugins/Scriver/src/msgutils.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/db_events.cpp | 15 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 |
7 files changed, 15 insertions, 5 deletions
diff --git a/include/m_database.h b/include/m_database.h index 1a8b5b3dd0..9f3420d407 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -734,6 +734,7 @@ namespace DB bool isSrmm() const; // could be displayed in a SRMM window
bool isHistory() const; // could be displayed in a history window
bool isAlertable() const; // should raise SRMM window
+ bool isCustom(int iType) const; // iType = DETF_* constant
wchar_t* getString(const char *str) const;
wchar_t* getText() const;
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex a800d0dd2b..c9ac321152 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex 5beaf47e15..ad2d09676a 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp index 263afe7da8..275b56e1fe 100644 --- a/plugins/Scriver/src/msgutils.cpp +++ b/plugins/Scriver/src/msgutils.cpp @@ -101,7 +101,7 @@ void CMsgDialog::EventAdded(MEVENT hDbEvent, const DB::EventInfo &dbei) else RemakeLog(); - if (!(dbei.flags & DBEF_SENT) && !dbei.isSrmm()) { + if (!(dbei.flags & DBEF_SENT) && !dbei.isCustom(DETF_MSGWINDOW)) { if (!bIsActive) { m_iShowUnread = 1; UpdateIcon(); diff --git a/src/mir_app/src/db_events.cpp b/src/mir_app/src/db_events.cpp index 4b8f32cc95..cadc794090 100644 --- a/src/mir_app/src/db_events.cpp +++ b/src/mir_app/src/db_events.cpp @@ -199,11 +199,18 @@ void DB::EventInfo::wipeNotify() Clist_RemoveEvent(-1, m_hEvent);
}
+// is a custom event of the specified type
+bool DB::EventInfo::isCustom(int iType) const
+{
+ auto *et = DbEvent_GetType(szModule, eventType);
+ return et && (et->flags & iType) != 0;
+}
+
// could be displayed in a SRMM window
bool DB::EventInfo::isSrmm() const
{
- if (auto *et = DbEvent_GetType(szModule, eventType))
- return (et->flags & DETF_MSGWINDOW) != 0;
+ if (isCustom(DETF_MSGWINDOW))
+ return true;
return (eventType == EVENTTYPE_MESSAGE || eventType == EVENTTYPE_FILE);
}
@@ -211,8 +218,8 @@ bool DB::EventInfo::isSrmm() const // could be displayed in a history window
bool DB::EventInfo::isHistory() const
{
- if (auto *et = DbEvent_GetType(szModule, eventType))
- return (et->flags & DETF_HISTORY) != 0;
+ if (isCustom(DETF_HISTORY))
+ return true;
return (eventType == EVENTTYPE_MESSAGE || eventType == EVENTTYPE_FILE);
}
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 975784af91..1a41fffe6a 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -987,3 +987,4 @@ _Proto_CanDeleteHistory@8 @1124 NONAME ?OnCacheInit@PROTO_INTERFACE@@UAEXXZ @1125 NONAME
?DoRtfToTags@CSrmmBaseDialog@@IBE_NAAV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@@Z @1126 NONAME
?bUseGroup@Chat@@3V?$CMOption@_N@@A @1127 NONAME
+?isCustom@EventInfo@DB@@QBE_NH@Z @1128 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 26d32d197a..b884360513 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -987,3 +987,4 @@ Proto_CanDeleteHistory @1118 NONAME ?OnCacheInit@PROTO_INTERFACE@@UEAAXXZ @1119 NONAME
?DoRtfToTags@CSrmmBaseDialog@@IEBA_NAEAV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@@Z @1120 NONAME
?bUseGroup@Chat@@3V?$CMOption@_N@@A @1121 NONAME
+?isCustom@EventInfo@DB@@QEBA_NH@Z @1122 NONAME
|