|
|
@ -24,8 +24,7 @@ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#ifdef WIN32_APP |
|
|
|
#ifdef WIN32_APP |
|
|
|
#include <windows.h> |
|
|
|
#include <windows.h> // TODO: move away to win32app |
|
|
|
#include "Win32/Win32App.h" |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
enum LogLevel |
|
|
|
enum LogLevel |
|
|
@ -220,23 +219,17 @@ void ShowMessageBox (LogLevel level, TArgs&&... args) noexcept |
|
|
|
LogPrint (ss, std::forward<TArgs>(args)...); |
|
|
|
LogPrint (ss, std::forward<TArgs>(args)...); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
HWND hWnd = FindWindow (I2PD_WIN32_CLASSNAME, TEXT("i2pd")); |
|
|
|
|
|
|
|
if (!hWnd) hWnd = NULL; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UINT uType; |
|
|
|
UINT uType; |
|
|
|
switch (level) { |
|
|
|
switch (level) |
|
|
|
|
|
|
|
{ |
|
|
|
case eLogError : |
|
|
|
case eLogError : |
|
|
|
case eLogWarning : |
|
|
|
case eLogWarning : |
|
|
|
uType = MB_ICONWARNING; |
|
|
|
uType = MB_ICONWARNING; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case eLogNone : |
|
|
|
|
|
|
|
case eLogInfo : |
|
|
|
|
|
|
|
case eLogDebug : |
|
|
|
|
|
|
|
default : |
|
|
|
default : |
|
|
|
uType = MB_ICONINFORMATION; |
|
|
|
uType = MB_ICONINFORMATION; |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
MessageBox( hWnd, TEXT(ss.str ().c_str ()), TEXT("i2pd"), uType | MB_TASKMODAL | MB_OK ); |
|
|
|
MessageBox(0, TEXT(ss.str ().c_str ()), TEXT("i2pd"), uType | MB_TASKMODAL | MB_OK ); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif // WIN32_APP
|
|
|
|
#endif // WIN32_APP
|
|
|
|
|
|
|
|
|
|
|
|