summaryrefslogtreecommitdiff
path: root/protocols/GTalkExt/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-25 12:29:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-25 12:29:40 +0000
commitb0fc2c1110d77fce11882cb64b6dc2300cf5355b (patch)
tree9e7618eeb386b0238cfd73f4b2518bae55a1c3a4 /protocols/GTalkExt/src
parente64818967374ebdadf6f22d18296e7bc6088277b (diff)
GTalkExt not to intercept focus when displaying popups
git-svn-id: http://svn.miranda-ng.org/main/trunk@6227 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/GTalkExt/src')
-rw-r--r--protocols/GTalkExt/src/handlers.cpp4
-rw-r--r--protocols/GTalkExt/src/notifications.cpp18
-rw-r--r--protocols/GTalkExt/src/options.cpp4
3 files changed, 10 insertions, 16 deletions
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp
index aa8f45371e..4f47f3b1d5 100644
--- a/protocols/GTalkExt/src/handlers.cpp
+++ b/protocols/GTalkExt/src/handlers.cpp
@@ -169,9 +169,9 @@ BOOL InternalListHandler(IJabberInterface *ji, HXML node, LPCTSTR jid, LPCTSTR m
LPCTSTR url = xi.getAttrValue(thread, ATTRNAME_URL);
LPCTSTR tid = xi.getAttrValue(thread, ATTRNAME_TID);
- if (ReadCheckbox(0, IDC_STANDARDVIEW, settings))
+ if ( ReadCheckbox(0, IDC_STANDARDVIEW, settings))
FormatMessageUrl(MESSAGE_URL_FORMAT_STANDARD, (LPTSTR)url, mailboxUrl, tid);
- else if (ReadCheckbox(0, IDC_HTMLVIEW, settings))
+ else if ( ReadCheckbox(0, IDC_HTMLVIEW, settings))
FormatMessageUrl(MESSAGE_URL_FORMAT_HTML, (LPTSTR)url, mailboxUrl, tid);
else
MakeUrlHex((LPTSTR)url, tid);
diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp
index 59743a2a57..4b911dbc6c 100644
--- a/protocols/GTalkExt/src/notifications.cpp
+++ b/protocols/GTalkExt/src/notifications.cpp
@@ -68,7 +68,7 @@ LPCSTR GetJidAcc(LPCTSTR jid)
void MarkEventRead(HANDLE hCnt, HANDLE hEvt)
{
DWORD settings = (DWORD)TlsGetValue(itlsSettings);
- if (ReadCheckbox(0, IDC_POPUPSENABLED, settings) &&
+ if ( ReadCheckbox(0, IDC_POPUPSENABLED, settings) &&
ReadCheckbox(0, IDC_PSEUDOCONTACTENABLED, settings) &&
ReadCheckbox(0, IDC_MARKEVENTREAD, settings) &&
db_event_markRead(hCnt, hEvt) != -1)
@@ -146,22 +146,16 @@ LRESULT CALLBACK PopupProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
static bool DoAddPopup(POPUPDATAT *data)
{
- bool result = false;
- HWND handle = 0;
-
- if (ReadCheckbox(0, IDC_POPUPSINFULLSCREEN, (DWORD)TlsGetValue(itlsSettings))) {
- handle = CreateWindowEx(WS_EX_TOOLWINDOW, TEMP_WINDOW_CLASS_NAME, NULL, WS_OVERLAPPED | WS_VISIBLE,
- -100, -100, 10, 10, NULL, NULL, NULL, NULL);
+ if ( ReadCheckbox(0, IDC_POPUPSINFULLSCREEN, (DWORD)TlsGetValue(itlsSettings)) && IsFullScreen()) {
+ HWND handle = CreateWindowEx(WS_EX_TOOLWINDOW, TEMP_WINDOW_CLASS_NAME, NULL, WS_OVERLAPPED | WS_VISIBLE, -100, -100, 10, 10, 0, 0, 0, 0);
if (handle) {
ShowWindow(handle, SW_MINIMIZE);
ShowWindow(handle, SW_RESTORE);
}
+ DestroyWindow(handle);
}
- result = PUAddPopupT(data) == 0;
-
- if (handle) DestroyWindow(handle);
- return result;
+ return PUAddPopupT(data) == 0;
}
void FormatPseudocontactDisplayName(LPTSTR buff, LPCTSTR jid, LPCTSTR unreadCount)
@@ -281,7 +275,7 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre
currSender += lstrlen(currSender);
}
- if (ReadCheckbox(0, IDC_ADDSNIP, (DWORD)TlsGetValue(itlsSettings)))
+ if ( ReadCheckbox(0, IDC_ADDSNIP, (DWORD)TlsGetValue(itlsSettings)))
mir_sntprintf(&data.lptzText[0], SIZEOF(data.lptzText), TranslateTS(FULL_NOTIFICATION_FORMAT), mtn->subj, senders, mtn->snip);
else
mir_sntprintf(&data.lptzText[0], SIZEOF(data.lptzText), TranslateTS(SHORT_NOTIFICATION_FORMAT), mtn->subj, senders);
diff --git a/protocols/GTalkExt/src/options.cpp b/protocols/GTalkExt/src/options.cpp
index ade91850e9..0d5fdc25ee 100644
--- a/protocols/GTalkExt/src/options.cpp
+++ b/protocols/GTalkExt/src/options.cpp
@@ -71,7 +71,7 @@ BOOL ReadCheckbox(HWND wnd, int id, DWORD controls)
DWORD ReadCheckboxes(HWND wnd, LPCSTR mod)
{
- DWORD controls = db_get_dw(0, NOTIFY_SETTINGS_FROM_MOD_NAME, mod, 0);
+ DWORD controls = db_get_dw(NULL, NOTIFY_SETTINGS_FROM_MOD_NAME, mod, 0);
ReadCheckbox(wnd, IDC_POPUPSENABLED, controls);
ReadCheckbox(wnd, IDC_PSEUDOCONTACTENABLED, controls);
ReadCheckbox(wnd, IDC_CLEARPSEUDOCONTACTLOG, controls);
@@ -105,7 +105,7 @@ void SaveControls(HWND wnd, LPCSTR mod)
GetCheckboxSaveValue(wnd, IDC_STANDARDVIEW) |
GetCheckboxSaveValue(wnd, IDC_HTMLVIEW);
- db_set_dw(0, NOTIFY_SETTINGS_FROM_MOD_NAME, mod, controls);
+ db_set_dw(NULL, NOTIFY_SETTINGS_FROM_MOD_NAME, mod, controls);
}
INT_PTR CALLBACK AccOptionsDlgProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)