diff options
author | George Hazan <ghazan@miranda.im> | 2019-07-23 21:49:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-07-23 21:49:24 +0300 |
commit | 86044ff725361e319a9bb41bf87ca1c7d365864b (patch) | |
tree | 5e142271006f1fe4cf163fed1b29a98e624fcdb0 /plugins/BuddyPounce | |
parent | cc7ce9ae393ea6a72ce2f9af5a4ce6db85079d89 (diff) |
code cleaning
Diffstat (limited to 'plugins/BuddyPounce')
-rw-r--r-- | plugins/BuddyPounce/src/dialog.cpp | 9 | ||||
-rw-r--r-- | plugins/BuddyPounce/src/main.cpp | 2 |
2 files changed, 2 insertions, 9 deletions
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index 1e1ef44a5c..e962347e2c 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -16,7 +16,7 @@ void populateContacts(MCONTACT BPhContact, HWND hwnd2CB) char *szProto = GetContactProto(hContact);
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
wchar_t name[300];
- mir_snwprintf(name, L"%s (%s)", Clist_GetContactDisplayName(hContact), _A2T(szProto));
+ mir_snwprintf(name, L"%s (%S)", Clist_GetContactDisplayName(hContact), szProto);
int index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name);
SendMessage(hwnd2CB, CB_SETITEMDATA, index, hContact);
if (BPhContact == hContact)
@@ -240,10 +240,6 @@ INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM case WM_INITDIALOG:
TranslateDialogDefault(hwnd);
wi = (windowInfo *)mir_alloc(sizeof(windowInfo));
- if (!wi) {
- msg(TranslateT("error......"), TranslateT("Buddy Pounce"));
- DestroyWindow(hwnd);
- }
wi->hContact = lParam;
wi->SendIfMy = nullptr;
wi->SendWhenThey = nullptr;
@@ -495,9 +491,6 @@ INT_PTR CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP case WM_INITDIALOG:
TranslateDialogDefault(hwnd);
spdps = (SendPounceDlgProcStruct*)lParam;
- if (!spdps)
- DestroyWindow(hwnd);
-
spdps->timer = g_plugin.getWord(spdps->hContact, "ConfirmTimeout");
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)spdps);
{
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 19a9b86bbd..1e83f43d36 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -130,7 +130,7 @@ int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) int newStatus = cws->value.wVal;
int oldStatus = db_get_w(hContact, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
- if (newStatus != oldStatus && hContact != NULL && newStatus != ID_STATUS_OFFLINE) {
+ if (newStatus != oldStatus && newStatus != ID_STATUS_OFFLINE) {
DBVARIANT dbv;
if (!g_plugin.getWString(hContact, "PounceMsg", &dbv) && (dbv.pwszVal[0] != '\0')) {
// check my status
|