summaryrefslogtreecommitdiff
path: root/yapp
diff options
context:
space:
mode:
Diffstat (limited to 'yapp')
-rw-r--r--yapp/popups2.cpp9
-rw-r--r--yapp/popwin.cpp4
2 files changed, 9 insertions, 4 deletions
diff --git a/yapp/popups2.cpp b/yapp/popups2.cpp
index 53b45e9..cdd7eea 100644
--- a/yapp/popups2.cpp
+++ b/yapp/popups2.cpp
@@ -72,8 +72,9 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
}
-int ReloadFont(WPARAM wParam, LPARAM lParam) {
-
+int ReloadFont(WPARAM wParam, LPARAM lParam)
+{
+#ifdef _UNICODE
if(ServiceExists(MS_FONT_GETW)) {
LOGFONTW log_font;
if(hFontFirstLine) DeleteObject(hFontFirstLine);
@@ -90,7 +91,9 @@ int ReloadFont(WPARAM wParam, LPARAM lParam) {
colBorder = CallService(MS_COLOUR_GETW, (WPARAM)&colour_id_borderw, 0);
colSidebar = CallService(MS_COLOUR_GETW, (WPARAM)&colour_id_sidebarw, 0);
colTitleUnderline = CallService(MS_COLOUR_GETW, (WPARAM)&colour_id_titleunderlinew, 0);
- } else {
+ } else
+#endif
+ {
LOGFONTA log_font;
if(hFontFirstLine) DeleteObject(hFontFirstLine);
colFirstLine = CallService(MS_FONT_GET, (WPARAM)&font_id_firstline, (LPARAM)&log_font);
diff --git a/yapp/popwin.cpp b/yapp/popwin.cpp
index 8957dd1..cceee79 100644
--- a/yapp/popwin.cpp
+++ b/yapp/popwin.cpp
@@ -618,7 +618,9 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
// titlebar height
if(hFontFirstLine) SelectObject(hdc, (HGDIOBJ)hFontFirstLine);
- GetTextExtentPoint32W(hdc, pd->pwzTitle, (int)wcslen(pd->pwzTitle), &size);
+ TCHAR *title = mir_u2t(pd->pwzTitle);
+ GetTextExtentPoint32(hdc, title, (int)_tcslen(title), &size);
+ mir_free(title);
pwd->tb_height = size.cy;
if(options.time_layout == PT_LEFT || options.time_layout == PT_RIGHT) {
if(pwd->tb_height < pwd->time_height) pwd->tb_height = pwd->time_height;