diff options
author | George Hazan <george.hazan@gmail.com> | 2024-04-09 15:37:56 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-04-09 15:37:56 +0300 |
commit | 2372899bd100889437edf20d10ca91cfb97db7e3 (patch) | |
tree | 3132f6a0a0692e1002f50dd1ae9547057f6c5c68 | |
parent | af44d1a42ade597fe5a716e4c1e35964f9d4b843 (diff) |
fixes #4323 (Clist_modern: плагин не позволяет перетащить файл на контакт, который не в сети)
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/clcfiledrop.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index b57b583774..7dba34ffba 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1333,7 +1333,6 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam int contacticon = Clist_GetContactIcon(wParam);
MCONTACT hSelItem = 0;
- ClcGroup *selgroup;
ClcContact *selcontact = nullptr;
char *szProto = Proto_GetBaseAccountName(wParam);
@@ -1401,6 +1400,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam }
if (hSelItem) {
+ ClcGroup *selgroup;
if (Clist_FindItem(hwnd, dat, hSelItem, &selcontact, &selgroup))
dat->selection = g_clistApi.pfnGetRowsPriorTo(&dat->list, selgroup, selgroup->cl.indexOf(selcontact));
else
diff --git a/src/mir_app/src/clcfiledrop.cpp b/src/mir_app/src/clcfiledrop.cpp index 6ee2cb1d8a..4e708e2b40 100644 --- a/src/mir_app/src/clcfiledrop.cpp +++ b/src/mir_app/src/clcfiledrop.cpp @@ -85,8 +85,12 @@ static MCONTACT HContactFromPoint(HWND hwnd, ClcData *dat, int x, int y, int *hi uint32_t protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1);
if (!(protoCaps & PF1_FILESEND))
return 0;
- if (ID_STATUS_OFFLINE == db_get_w(contact->hContact, szProto, "Status", ID_STATUS_OFFLINE))
- return 0;
+
+ if (ID_STATUS_OFFLINE == db_get_w(contact->hContact, szProto, "Status", ID_STATUS_OFFLINE)) {
+ protoCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4);
+ if (!(protoCaps & PF4_OFFLINEFILES))
+ return 0;
+ }
if (hitLine)
*hitLine = hit;
return contact->hContact;
|