From 140598d6c6061678f54c65acb2059ebc7b6b9aa7 Mon Sep 17 00:00:00 2001 From: George Hazan <ghazan@miranda.im> Date: Wed, 7 Nov 2018 19:24:43 +0300 Subject: code reordering --- plugins/IEView/src/Options.cpp | 80 +++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'plugins/IEView/src') diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index 6b50ed9866..b74d604dfe 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -23,30 +23,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define UM_CHECKSTATECHANGE (WM_USER+100) HANDLE hHookOptionsChanged; -static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -static INT_PTR CALLBACK IEViewSRMMOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -static INT_PTR CALLBACK IEViewGroupChatsOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -static INT_PTR CALLBACK IEViewHistoryOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -#define OPTIONS_PAGES 4 + static ProtocolSettings *srmmCurrentProtoItem = nullptr; static ProtocolSettings *chatCurrentProtoItem = nullptr; static ProtocolSettings *historyCurrentProtoItem = nullptr; static HIMAGELIST hProtocolImageList = nullptr; static HIMAGELIST hImageList = nullptr; -struct -{ - DLGPROC dlgProc; - DWORD dlgId; - wchar_t *tabName; -} -static tabPages[] = -{ - { IEViewSRMMOptDlgProc, IDD_SRMM_OPTIONS, LPGENW("Message Log") }, - { IEViewGroupChatsOptDlgProc, IDD_SRMM_OPTIONS, LPGENW("Group chats") }, - { IEViewHistoryOptDlgProc, IDD_SRMM_OPTIONS, LPGENW("History") } -}; - static LPARAM GetItemParam(HWND hwndTreeView, HTREEITEM hItem) { TVITEM tvi = { 0 }; @@ -427,28 +410,6 @@ static bool BrowseFile(HWND hwndDlg, char *filter, char *defExt, char *path, int return false; } -int IEViewOptInit(WPARAM wParam, LPARAM) -{ - OPTIONSDIALOGPAGE odp = {}; - odp.szGroup.w = LPGENW("Message sessions"); - odp.szTitle.w = LPGENW("IEView"); - odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_GENERAL_OPTIONS); - odp.pfnDlgProc = IEViewGeneralOptDlgProc; - odp.szTab.w = LPGENW("General"); - g_plugin.addOptions(wParam, &odp); - - odp.szGroup.w = LPGENW("Skins"); - odp.szTitle.w = LPGENW("IEView"); - for (auto &it : tabPages) { - odp.pszTemplate = MAKEINTRESOURCEA(it.dlgId); - odp.pfnDlgProc = it.dlgProc; - odp.szTab.w = it.tabName; - g_plugin.addOptions(wParam, &odp); - } - return 0; -} - static int initialized = 0; static int changed = 0; @@ -961,6 +922,45 @@ static INT_PTR CALLBACK IEViewGroupChatsOptDlgProc(HWND hwndDlg, UINT msg, WPARA return FALSE; } +///////////////////////////////////////////////////////////////////////////////////////// + +struct +{ + DLGPROC dlgProc; + DWORD dlgId; + wchar_t *tabName; +} +static tabPages[] = +{ + { IEViewSRMMOptDlgProc, IDD_SRMM_OPTIONS, LPGENW("Message Log") }, + { IEViewGroupChatsOptDlgProc, IDD_SRMM_OPTIONS, LPGENW("Group chats") }, + { IEViewHistoryOptDlgProc, IDD_SRMM_OPTIONS, LPGENW("History") } +}; + +int IEViewOptInit(WPARAM wParam, LPARAM) +{ + OPTIONSDIALOGPAGE odp = {}; + odp.szGroup.w = LPGENW("Message sessions"); + odp.szTitle.w = LPGENW("IEView"); + odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE; + odp.pszTemplate = MAKEINTRESOURCEA(IDD_GENERAL_OPTIONS); + odp.pfnDlgProc = IEViewGeneralOptDlgProc; + odp.szTab.w = LPGENW("General"); + g_plugin.addOptions(wParam, &odp); + + odp.szGroup.w = LPGENW("Skins"); + odp.szTitle.w = LPGENW("IEView"); + for (auto &it : tabPages) { + odp.pszTemplate = MAKEINTRESOURCEA(it.dlgId); + odp.pfnDlgProc = it.dlgProc; + odp.szTab.w = it.tabName; + g_plugin.addOptions(wParam, &odp); + } + return 0; +} + +///////////////////////////////////////////////////////////////////////////////////////// + bool Options::isInited = false; bool Options::bSmileyAdd = false; int Options::avatarServiceFlags = 0; -- cgit v1.2.3