From e64818967374ebdadf6f22d18296e7bc6088277b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 25 Sep 2013 12:07:46 +0000 Subject: IsFullScreen(), IsWorkstationLocked(), IsScreenSaverRunning() moved to the core git-svn-id: http://svn.miranda-ng.org/main/trunk@6226 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/GTalkExt/src/notifications.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'protocols/GTalkExt/src/notifications.cpp') diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index 373ca1cbba..59743a2a57 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -54,17 +54,13 @@ LPCSTR GetJidAcc(LPCTSTR jid) int count = 0; PROTOACCOUNT **protos; ProtoEnumAccounts(&count, &protos); - - DBVARIANT dbv; - for (int i=0; i < count; i++) - if (getJabberApi(protos[i]->szModuleName)) - if (!db_get_ts(0, protos[i]->szModuleName, "jid", &dbv)) - __try { - if (!lstrcmpi(jid, dbv.ptszVal)) return protos[i]->szModuleName; - } - __finally { - db_free(&dbv); - } + for (int i=0; i < count; i++) { + if ( getJabberApi(protos[i]->szModuleName)) { + ptrT tszJid( db_get_tsa(0, protos[i]->szModuleName, "jid")); + if ( !lstrcmpi(jid, tszJid)) + return protos[i]->szModuleName; + } + } return NULL; } @@ -246,7 +242,7 @@ void ShowNotification(LPCSTR acc, POPUPDATAT *data, LPCTSTR jid, LPCTSTR url, LP data->PluginWindowProc = PopupProc; int lurl = (lstrlen(url) + 1) * sizeof(TCHAR); int ljid = (lstrlen(jid) + 1) * sizeof(TCHAR); - + POPUP_DATA_HEADER *ppdh = (POPUP_DATA_HEADER*)malloc(sizeof(POPUP_DATA_HEADER) + lurl + ljid); ppdh->MarkRead = FALSE; ppdh->hContact = hCnt; -- cgit v1.2.3