diff options
author | aunsane <aunsane@gmail.com> | 2018-02-25 14:45:28 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-02-25 14:45:28 +0300 |
commit | a76776079b6d15e92dffd0c5c0016389092b1c8b (patch) | |
tree | ac686f25c8714b11824624b7773f499035b6827c | |
parent | 7fc01c9c474a732cd8b978d2f163f0839b2f956d (diff) |
Fixes related with 7fc01c9
-rw-r--r-- | include/m_gui.h | 2 | ||||
-rw-r--r-- | plugins/CloudFile/res/resource.rc | 4 | ||||
-rw-r--r-- | plugins/CloudFile/src/oauth.cpp | 8 | ||||
-rw-r--r-- | plugins/CloudFile/src/oauth.h | 4 | ||||
-rw-r--r-- | plugins/CloudFile/src/resource.h | 2 | ||||
-rw-r--r-- | plugins/CloudFile/src/transfers.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_options.cpp | 18 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_options.h | 16 | ||||
-rw-r--r-- | protocols/Steam/src/steam_options.cpp | 7 | ||||
-rw-r--r-- | protocols/Steam/src/steam_options.h | 3 | ||||
-rw-r--r-- | protocols/Tox/res/resource.rc | 6 | ||||
-rw-r--r-- | protocols/Tox/src/tox_dialogs.h | 27 | ||||
-rw-r--r-- | protocols/Tox/src/tox_options.cpp | 24 | ||||
-rw-r--r-- | protocols/Tox/src/tox_options.h | 23 |
14 files changed, 26 insertions, 120 deletions
diff --git a/include/m_gui.h b/include/m_gui.h index 7b0fa6894b..5c3eab3909 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -1293,7 +1293,7 @@ protected: };
/////////////////////////////////////////////////////////////////////////////////////////
-// CCtrlTreeView
+// CCtrlPages
#define PSN_INFOCHANGED 1
#define PSN_PARAMCHANGED 2
diff --git a/plugins/CloudFile/res/resource.rc b/plugins/CloudFile/res/resource.rc index 53021dfa69..ac6165d105 100644 --- a/plugins/CloudFile/res/resource.rc +++ b/plugins/CloudFile/res/resource.rc @@ -109,8 +109,8 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,75,62,50,14 PUSHBUTTON "Cancel",IDCANCEL,136,62,50,14 LTEXT "Enter authorization code:",IDC_STATIC,7,33,179,8 - LTEXT "To allow Miranda NG access to %s account:",IDC_AUTH_TEXT,7,7,140,8 - PUSHBUTTON "Authorize",IDC_OAUTH_AUTHORIZE,58,17,74,14 + LTEXT "To allow Miranda NG access to %s:",IDC_AUTH_TEXT,7,7,179,8 + CONTROL "Go to this link",IDC_OAUTH_AUTHORIZE,"Hyperlink",WS_GROUP | WS_TABSTOP | 0x1,7,18,179,8 END diff --git a/plugins/CloudFile/src/oauth.cpp b/plugins/CloudFile/src/oauth.cpp index 1f837f021d..9ecd3a9ab8 100644 --- a/plugins/CloudFile/src/oauth.cpp +++ b/plugins/CloudFile/src/oauth.cpp @@ -15,14 +15,14 @@ COAuthDlg::COAuthDlg(CCloudService *service, const char *authUrl, pThreadFuncOwn void COAuthDlg::OnInitDialog() { - /*CCtrlBase *ctrl = FindControl(IDC_AUTH_TEXT); - ptrW format(ctrl->GetText()); + CCtrlLabel &ctrl = *(CCtrlLabel*)FindControl(IDC_AUTH_TEXT); + ptrW format(ctrl.GetText()); wchar_t text[MAX_PATH]; mir_snwprintf(text, (const wchar_t*)format, m_service->GetUserName()); - ctrl->SetText(text);*/ + ctrl.SetText(text); } -void COAuthDlg::Auth_OnClick(CCtrlButton*) +void COAuthDlg::Auth_OnClick(CCtrlHyperlink*) { if (SUCCEEDED(OleInitialize(NULL))) { CComPtr<IWebBrowser2> browser; diff --git a/plugins/CloudFile/src/oauth.h b/plugins/CloudFile/src/oauth.h index cbc4b3855e..e38ae45fa3 100644 --- a/plugins/CloudFile/src/oauth.h +++ b/plugins/CloudFile/src/oauth.h @@ -8,14 +8,14 @@ private: const char *m_authUrl; pThreadFuncOwner m_requestAccessTokenThread; - CCtrlButton m_authorize; + CCtrlHyperlink m_authorize; CCtrlEdit m_code; CCtrlButton m_ok; protected: void OnInitDialog() override; - void Auth_OnClick(CCtrlButton*); + void Auth_OnClick(CCtrlHyperlink*); void Code_OnChange(CCtrlBase*); void Ok_OnClick(CCtrlButton*); diff --git a/plugins/CloudFile/src/resource.h b/plugins/CloudFile/src/resource.h index 5a625809ca..aa5daf96da 100644 --- a/plugins/CloudFile/src/resource.h +++ b/plugins/CloudFile/src/resource.h @@ -29,7 +29,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 132 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1032 +#define _APS_NEXT_CONTROL_VALUE 1033 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff --git a/plugins/CloudFile/src/transfers.cpp b/plugins/CloudFile/src/transfers.cpp index b72c934abb..c70dbcf33f 100644 --- a/plugins/CloudFile/src/transfers.cpp +++ b/plugins/CloudFile/src/transfers.cpp @@ -8,7 +8,7 @@ INT_PTR CCloudService::SendFileInterceptor(WPARAM, LPARAM lParam) for (auto &service : Services) { auto it = service->InterceptedContacts.find(pccsd->hContact); if (it == service->InterceptedContacts.end()) - return CALLSERVICE_NOTFOUND; + continue; service->InterceptedContacts.erase(it); return (INT_PTR)service->SendFile(pccsd->hContact, (wchar_t*)pccsd->wParam, (wchar_t**)pccsd->lParam); } diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp index 9a4438d408..2a7d141e41 100644 --- a/plugins/MirLua/src/mlua_options.cpp +++ b/plugins/MirLua/src/mlua_options.cpp @@ -1,23 +1,5 @@ #include "stdafx.h"
-CCtrlScriptList::CCtrlScriptList(CDlgBase* dlg, int ctrlId)
- : CCtrlListView(dlg, ctrlId)
-{
-}
-
-BOOL CCtrlScriptList::OnNotify(int idCtrl, NMHDR *pnmh)
-{
- if (pnmh->code == NM_CLICK)
- {
- TEventInfo evt = { this, pnmh };
- OnClick(&evt);
- return TRUE;
- }
- return CCtrlListView::OnNotify(idCtrl, pnmh);
-}
-
-/****************************************/
-
CMLuaOptions::CMLuaOptions(int idDialog)
: CPluginDlgBase(g_hInstance, idDialog, MODULE),
m_popupOnError(this, IDC_POPUPONERROR),
diff --git a/plugins/MirLua/src/mlua_options.h b/plugins/MirLua/src/mlua_options.h index 5d36188604..a8168d70da 100644 --- a/plugins/MirLua/src/mlua_options.h +++ b/plugins/MirLua/src/mlua_options.h @@ -3,20 +3,6 @@ #include <m_gui.h>
-class CCtrlScriptList : public CCtrlListView
-{
-private:
- typedef CCtrlListView CSuper;
-
-protected:
- BOOL OnNotify(int idCtrl, NMHDR *pnmh);
-
-public:
- CCtrlScriptList(CDlgBase* dlg, int ctrlId);
-
- CCallback<TEventInfo> OnClick;
-};
-
class CMLuaOptions : public CPluginDlgBase
{
private:
@@ -24,7 +10,7 @@ private: CCtrlCheck m_popupOnObsolete;
bool isScriptListInit;
- CCtrlScriptList m_scripts;
+ CCtrlListView m_scripts;
CCtrlButton m_reload;
void LoadScripts();
diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp index bfc0255b09..88716ca0c9 100644 --- a/protocols/Steam/src/steam_options.cpp +++ b/protocols/Steam/src/steam_options.cpp @@ -3,8 +3,8 @@ CSteamOptionsMain::CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwndParent)
: CSteamDlgBase(proto, idDialog, false),
m_username(this, IDC_USERNAME), m_password(this, IDC_PASSWORD),
- m_group(this, IDC_GROUP), m_biggerAvatars(this, IDC_BIGGER_AVATARS), m_showChatEvents(this, IDC_SHOW_CHAT_EVENTS),
- m_pollingErrorLimit(this, IDC_POLLINGERRORLIMIT), m_pollingErrorLimitSpin(this, IDC_POLLINGERRORLIMITSPIN)
+ m_group(this, IDC_GROUP), m_biggerAvatars(this, IDC_BIGGER_AVATARS),
+ m_showChatEvents(this, IDC_SHOW_CHAT_EVENTS), m_pollingErrorLimit(this, IDC_POLLINGERRORLIMITSPIN)
{
SetParent(hwndParent);
@@ -27,8 +27,7 @@ void CSteamOptionsMain::OnInitDialog() SendMessage(m_password.GetHwnd(), EM_LIMITTEXT, 64, 0);
SendMessage(m_group.GetHwnd(), EM_LIMITTEXT, 64, 0);
- m_pollingErrorLimitSpin.SetRange(255, 0);
- m_pollingErrorLimitSpin.SetPosition(m_proto->getByte("PollingErrorsLimit", STEAM_API_POLLING_ERRORS_LIMIT));
+ m_pollingErrorLimit.SetRange(255, 0);
}
void CSteamOptionsMain::OnApply()
diff --git a/protocols/Steam/src/steam_options.h b/protocols/Steam/src/steam_options.h index 388bf2c70a..d0aaf03bd9 100644 --- a/protocols/Steam/src/steam_options.h +++ b/protocols/Steam/src/steam_options.h @@ -11,8 +11,7 @@ private: CCtrlCheck m_biggerAvatars;
CCtrlCheck m_showChatEvents;
- CCtrlEdit m_pollingErrorLimit;
- CCtrlSpin m_pollingErrorLimitSpin;
+ CCtrlSpin m_pollingErrorLimit;
protected:
CSteamOptionsMain(CSteamProto *proto, int idDialog, HWND hwndParent = NULL);
diff --git a/protocols/Tox/res/resource.rc b/protocols/Tox/res/resource.rc index 741f076104..90ddb8da93 100644 --- a/protocols/Tox/res/resource.rc +++ b/protocols/Tox/res/resource.rc @@ -63,7 +63,9 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_TOX ICON "tox.ico"
+
IDI_ME ICON "me.ico"
+
IDI_EDIT ICON "edit.ico"
@@ -209,9 +211,9 @@ BEGIN DEFPUSHBUTTON "OK",IDOK,101,65,50,14
PUSHBUTTON "Cancel",IDCANCEL,154,65,50,14
EDITTEXT IDC_PASSWORD_NEW,7,14,197,12,ES_PASSWORD | ES_AUTOHSCROLL
- LTEXT "New password:",-1,7,4,197,8
+ LTEXT "New password:",IDC_STATIC,7,4,197,8
EDITTEXT IDC_PASSWORD_CONFIRM,7,39,197,12,ES_PASSWORD | ES_AUTOHSCROLL
- LTEXT "Confirm password:",-1,7,29,197,8
+ LTEXT "Confirm password:",IDC_STATIC,7,29,197,8
LTEXT "",IDC_PASSWORD_VALIDATION,7,55,197,8
END
diff --git a/protocols/Tox/src/tox_dialogs.h b/protocols/Tox/src/tox_dialogs.h index dedd355e1b..b5cbba0639 100644 --- a/protocols/Tox/src/tox_dialogs.h +++ b/protocols/Tox/src/tox_dialogs.h @@ -1,33 +1,6 @@ #ifndef _TOX_DIALOGS_H_
#define _TOX_DIALOGS_H_
-class CCtrlLabel : public CCtrlData
-{
- typedef CCtrlData CSuper;
-
-public:
- CCtrlLabel(CDlgBase *dlg, int ctrlId) :
- CSuper(dlg, ctrlId)
- {
- }
-
- virtual void OnInit()
- {
- CSuper::OnInit();
- OnReset();
- }
-
- virtual void OnReset()
- {
- if (GetDataType() == DBVT_WCHAR)
- SetText(LoadText());
- else if (GetDataType() != DBVT_DELETED)
- SetInt(LoadInt());
- }
-};
-
-///////////////////////////////////////////////
-
typedef CProtoDlgBase<CToxProto> CToxDlgBase;
#endif //_TOX_DIALOGS_H_
\ No newline at end of file diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 71353d3263..119bce5a0d 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -9,8 +9,7 @@ CToxOptionsMain::CToxOptionsMain(CToxProto *proto, int idDialog) m_passwordRemove(this, IDC_PASSWORD_REMOVE), m_group(this, IDC_GROUP),
m_enableUdp(this, IDC_ENABLE_UDP), m_enableUdpHolePunching(this, IDC_ENABLE_HOLEPUNCHING),
m_enableIPv6(this, IDC_ENABLE_IPV6), m_enableLocalDiscovery(this, IDC_ENABLE_LOCALDISCOVERY),
- m_maxConnectRetries(this, IDC_MAXCONNECTRETRIES), m_maxConnectRetriesSpin(this, IDC_MAXCONNECTRETRIESSPIN),
- m_maxReconnectRetries(this, IDC_MAXRECONNECTRETRIES), m_maxReconnectRetriesSpin(this, IDC_MAXRECONNECTRETRIESSPIN)
+ m_maxConnectRetries(this, IDC_MAXCONNECTRETRIESSPIN), m_maxReconnectRetries(this, IDC_MAXRECONNECTRETRIESSPIN)
{
CreateLink(m_toxAddress, TOX_SETTINGS_ID, L"");
CreateLink(m_nickname, "Nick", L"");
@@ -67,10 +66,8 @@ void CToxOptionsMain::OnInitDialog() m_nickname.SetMaxLength(TOX_MAX_NAME_LENGTH);
m_group.SetMaxLength(64);
- m_maxConnectRetriesSpin.SetRange(255, 1);
- m_maxConnectRetriesSpin.SetPosition(m_proto->getByte("MaxConnectRetries", TOX_MAX_CONNECT_RETRIES));
- m_maxReconnectRetriesSpin.SetRange(255, 1);
- m_maxReconnectRetriesSpin.SetPosition(m_proto->getByte("MaxReconnectRetries", TOX_MAX_RECONNECT_RETRIES));
+ m_maxConnectRetries.SetRange(255, 1);
+ m_maxReconnectRetries.SetRange(255, 1);
}
void CToxOptionsMain::PasswordCreate_OnClick(CCtrlButton*)
@@ -333,21 +330,6 @@ void CToxNodeEditor::OnClose() Utils_SaveWindowPosition(m_hwnd, NULL, MODULE, "EditNodeDlg");
}
-/****************************************/
-
-CCtrlNodeList::CCtrlNodeList(CDlgBase* dlg, int ctrlId)
- : CCtrlListView(dlg, ctrlId)
-{}
-
-BOOL CCtrlNodeList::OnNotify(int idCtrl, NMHDR *pnmh)
-{
- if (pnmh->code == NM_CLICK) {
- TEventInfo evt = { this, pnmh };
- OnClick(&evt);
- return TRUE;
- }
- return CCtrlListView::OnNotify(idCtrl, pnmh);
-}
/****************************************/
diff --git a/protocols/Tox/src/tox_options.h b/protocols/Tox/src/tox_options.h index 5a85edea61..74987139da 100644 --- a/protocols/Tox/src/tox_options.h +++ b/protocols/Tox/src/tox_options.h @@ -24,10 +24,8 @@ private: CCtrlCheck m_enableIPv6;
CCtrlCheck m_enableLocalDiscovery;
- CCtrlEdit m_maxConnectRetries;
- CCtrlSpin m_maxConnectRetriesSpin;
- CCtrlEdit m_maxReconnectRetries;
- CCtrlSpin m_maxReconnectRetriesSpin;
+ CCtrlSpin m_maxConnectRetries;
+ CCtrlSpin m_maxReconnectRetries;
protected:
void OnInitDialog();
@@ -85,21 +83,6 @@ public: CToxNodeEditor(int iItem, CCtrlListView *m_list);
};
-/****************************************/
-
-class CCtrlNodeList : public CCtrlListView
-{
-private:
- typedef CCtrlListView CSuper;
-
-protected:
- BOOL OnNotify(int idCtrl, NMHDR *pnmh);
-
-public:
- CCtrlNodeList(CDlgBase* dlg, int ctrlId);
-
- CCallback<TEventInfo> OnClick;
-};
/****************************************/
@@ -108,7 +91,7 @@ class CToxOptionsNodeList : public CToxDlgBase private:
typedef CToxDlgBase CSuper;
- CCtrlNodeList m_nodes;
+ CCtrlListView m_nodes;
CCtrlButton m_addNode;
CCtrlButton m_updateNodes;
|