diff options
Diffstat (limited to 'plugins/ModernOpt')
21 files changed, 1958 insertions, 0 deletions
diff --git a/plugins/ModernOpt/Res/big_advanced.ico b/plugins/ModernOpt/Res/big_advanced.ico Binary files differnew file mode 100644 index 0000000000..2354a3ee30 --- /dev/null +++ b/plugins/ModernOpt/Res/big_advanced.ico diff --git a/plugins/ModernOpt/Res/big_buddylist.ico b/plugins/ModernOpt/Res/big_buddylist.ico Binary files differnew file mode 100644 index 0000000000..613e877e24 --- /dev/null +++ b/plugins/ModernOpt/Res/big_buddylist.ico diff --git a/plugins/ModernOpt/Res/big_ignore.ico b/plugins/ModernOpt/Res/big_ignore.ico Binary files differnew file mode 100644 index 0000000000..15c84ea235 --- /dev/null +++ b/plugins/ModernOpt/Res/big_ignore.ico diff --git a/plugins/ModernOpt/Res/big_message.ico b/plugins/ModernOpt/Res/big_message.ico Binary files differnew file mode 100644 index 0000000000..f23971e82b --- /dev/null +++ b/plugins/ModernOpt/Res/big_message.ico diff --git a/plugins/ModernOpt/Res/big_modules.ico b/plugins/ModernOpt/Res/big_modules.ico Binary files differnew file mode 100644 index 0000000000..9ab2a5c74d --- /dev/null +++ b/plugins/ModernOpt/Res/big_modules.ico diff --git a/plugins/ModernOpt/Res/big_network.ico b/plugins/ModernOpt/Res/big_network.ico Binary files differnew file mode 100644 index 0000000000..0c29463af6 --- /dev/null +++ b/plugins/ModernOpt/Res/big_network.ico diff --git a/plugins/ModernOpt/Res/big_network_alt.ico b/plugins/ModernOpt/Res/big_network_alt.ico Binary files differnew file mode 100644 index 0000000000..0c29463af6 --- /dev/null +++ b/plugins/ModernOpt/Res/big_network_alt.ico diff --git a/plugins/ModernOpt/Res/big_skins.ico b/plugins/ModernOpt/Res/big_skins.ico Binary files differnew file mode 100644 index 0000000000..d1bfee7145 --- /dev/null +++ b/plugins/ModernOpt/Res/big_skins.ico diff --git a/plugins/ModernOpt/Res/big_status.ico b/plugins/ModernOpt/Res/big_status.ico Binary files differnew file mode 100644 index 0000000000..96f66334e9 --- /dev/null +++ b/plugins/ModernOpt/Res/big_status.ico diff --git a/plugins/ModernOpt/commonheaders.cpp b/plugins/ModernOpt/commonheaders.cpp new file mode 100644 index 0000000000..95b2201163 --- /dev/null +++ b/plugins/ModernOpt/commonheaders.cpp @@ -0,0 +1,2 @@ +#include "commonheaders.h"
+
diff --git a/plugins/ModernOpt/commonheaders.h b/plugins/ModernOpt/commonheaders.h new file mode 100644 index 0000000000..d2d5ed8b86 --- /dev/null +++ b/plugins/ModernOpt/commonheaders.h @@ -0,0 +1,80 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2008 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+// to enable all 0.8.0 core functions
+#define MIRANDA_VER 0x0A00
+
+#define WINVER 0x0501
+#define _WIN32_WINNT 0x0501
+#define _WIN32_IE 0x0501
+
+#define _CRT_SECURE_NO_WARNINGS
+#define CINTERFACE
+
+#include "m_stdhdr.h"
+
+#include <windows.h>
+#include <windowsx.h>
+#include <shlobj.h>
+#include <uxtheme.h>
+#include <commctrl.h>
+#include <stdio.h>
+#include <time.h>
+#include <stddef.h>
+#include <process.h>
+#include <io.h>
+#include <string.h>
+#include <locale.h>
+#include <direct.h>
+#include <win2k.h>
+
+#include <newpluginapi.h>
+#include <m_system.h>
+#include <m_system_cpp.h>
+#include <m_database.h>
+#include <m_clc.h>
+#include <m_clui.h>
+#include <m_langpack.h>
+#include <m_clist.h>
+#include <m_clistint.h>
+#include <m_button.h>
+#include <m_protosvc.h>
+#include <m_protomod.h>
+#include <m_protocols.h>
+#include <m_plugins.h>
+#include <m_options.h>
+#include <m_skin.h>
+#include <m_contacts.h>
+#include <m_message.h>
+#include <m_userinfo.h>
+#include <m_history.h>
+#include <m_addcontact.h>
+#include <m_findadd.h>
+#include <m_file.h>
+#include <m_email.h>
+#include <m_awaymsg.h>
+#include <m_idle.h>
+#include <m_ignore.h>
+#include <m_icolib.h>
+
+#include "resource.h"
diff --git a/plugins/ModernOpt/main.cpp b/plugins/ModernOpt/main.cpp new file mode 100644 index 0000000000..5adb79cc25 --- /dev/null +++ b/plugins/ModernOpt/main.cpp @@ -0,0 +1,81 @@ +
+#include "commonheaders.h"
+
+PLUGINLINK *pluginLink;
+HINSTANCE hInst;
+MM_INTERFACE mmi;
+LIST_INTERFACE li;
+int hLangpack;
+
+#if defined( _UNICODE )
+ // {621f886b-a7f6-457f-9d62-8ee84c275993}
+ #define MIID_MODERNOPTS { 0x621f886b, 0xa7f6, 0x457f, { 0x9d, 0x62, 0x8e, 0xe8, 0x4c, 0x27, 0x59, 0x93 }}
+#else
+ // {0a8e1133-d12d-4103-a912-39 96 3b 49 b3 5f}
+ #define MIID_MODERNOPTS { 0x0a8e1133, 0xd12d, 0x4103, { 0xa9, 0x12, 0x39, 0x96, 0x3b, 0x49, 0xb3, 0x5f }}
+#endif
+
+PLUGININFOEX pluginInfoEx = {
+ sizeof(PLUGININFOEX),
+ "Support for new options design",
+ PLUGIN_MAKE_VERSION(0,1,0,0),
+ "Support for new options design.",
+ "Victor Pavlychko, George Hazan",
+ "ghazan@miranda-im.org",
+ "é 2009 Victor Pavlychko, George Hazan",
+ "http://www.miranda-im.org",
+ UNICODE_AWARE,
+ 0,
+ MIID_MODERNOPTS
+};
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ hInst = hinstDLL;
+ return TRUE;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// MirandaPluginInfoEx - returns an information about a plugin
+
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 8, 0, 0))
+ return NULL;
+
+ return &pluginInfoEx;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// MirandaPluginInterfaces - returns the protocol interface to the core
+
+static const MUUID interfaces[] = { MIID_MODERNOPTS, MIID_LAST };
+
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Performs a primary set of actions upon plugin loading
+
+int LoadModernOptsModule();
+
+extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+{
+ pluginLink = link;
+ mir_getMMI( &mmi );
+ mir_getLI( &li );
+ mir_getLP(&pluginInfoEx);
+
+ LoadModernOptsModule();
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Unload a plugin
+
+extern "C" int __declspec(dllexport) Unload(void)
+{
+ return 0;
+}
diff --git a/plugins/ModernOpt/modernopt.cpp b/plugins/ModernOpt/modernopt.cpp new file mode 100644 index 0000000000..a06db2040c --- /dev/null +++ b/plugins/ModernOpt/modernopt.cpp @@ -0,0 +1,696 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2007 Artem Shpynov
+Copyright 2000-2007 Miranda ICQ/IM project,
+
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+#include "modernopt.h"
+#include "../../src/resource.h"
+
+//#define MOPT_SAMPLE_PAGES
+
+extern HMODULE hInst;
+
+static HANDLE hevtModernOpt_Initialize = 0;
+
+static HWND hwndModernOpt = NULL;
+static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+
+struct ModernOptionsObject
+{
+ MODERNOPTOBJECT optObject;
+
+ HWND hwnd;
+ BOOL bChanged;
+ DWORD dwFlags;
+ int iTreeImageIndex;
+ DWORD dwIdx;
+};
+
+static DWORD g_dwIdx = 0;
+static int g_iSectionRestore = 0;
+
+static int ModernOptionsObject_Comparator(const ModernOptionsObject *ptr1, const ModernOptionsObject *ptr2);
+
+struct ModernOptionsData
+{
+ __inline void* operator new( size_t size )
+ { return calloc( 1, size );
+ }
+ __inline void operator delete( void* p )
+ { free( p );
+ }
+
+ ModernOptionsData(): pObjectList(1, ModernOptionsObject_Comparator) {}
+
+ LIST<ModernOptionsObject> pObjectList;
+ HFONT hfntBold;
+ int iPage, iSection;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// Forwards
+static INT_PTR svcModernOpt_Show(WPARAM wParam, LPARAM lParam);
+static INT_PTR svcModernOpt_Restore(WPARAM wParam, LPARAM lParam);
+static INT_PTR svcModernOpt_SelectPage(WPARAM wParam, LPARAM lParam);
+static INT_PTR svcModernOpt_AddObject(WPARAM wParam, LPARAM lParam);
+static int hookModernOpt_Initialize(WPARAM wParam, LPARAM lParam);
+
+static void ModernOptUI_ShowPage(HWND hwndDlg, struct ModernOptionsData *dat, int iPage);
+static void ModernOptUI_SelectSection(HWND hwndDlg, struct ModernOptionsData *dat, int iSection);
+
+////////////////////////////////////////////////////////////////////////////////
+// Main option pages
+struct ModernOptMainPageInfo g_ModernOptPages[MODERNOPT_PAGE_COUNT] =
+{
+ {0, FALSE, IDI_MIRANDA, _T("Home"), _T("Miranda IM configuration center")},
+ {IDC_BTN_ACCOUNTS, TRUE, IDI_BIG_NETWORK, _T("Accounts"), _T("Setup your account information to start messaging.")},
+ {IDC_BTN_SKINS, TRUE, IDI_BIG_SKINS, _T("Style"), _T("Change the look of Miranda IM according to your taste.")},
+ {IDC_BTN_CLIST, TRUE, IDI_BIG_BUDDYLIST, _T("Contacts"), _T("Configure behaviour of your contact list.")},
+ {IDC_BTN_MESSAGING, TRUE, IDI_BIG_MESSAGE, _T("Chats"), _T("Customize look&&feel of your chat windows here.")},
+ {IDC_BTN_IGNORE, TRUE, IDI_BIG_IGNORE, _T("Ignore"), _T("Ban those users and events, you are annoyed with.")},
+ {IDC_BTN_STATUS, TRUE, IDI_BIG_STATUS, _T("Status"), _T("Set your status messages and idle reporting.")},
+ {IDC_BTN_ADVANCED, TRUE, IDI_BIG_ADVANCED, _T("Advanced"), _T("")},
+ {IDC_BTN_PLUGINS, TRUE, IDI_BIG_MODULES, _T("Addons"), _T("Miranda IM is all about plugins. Manage all the plugins you have here.")},
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// Utilities
+typedef void (*ItemDestuctor)(void *);
+
+static void ModernOptionsObject_Dtor(void *ptr)
+{
+ struct ModernOptionsObject *obj = (struct ModernOptionsObject *)ptr;
+
+ mir_free(obj->optObject.lptzSubsection);
+ mir_free(obj->optObject.iBoldControls);
+ mir_free(obj->optObject.lpzClassicGroup);
+ mir_free(obj->optObject.lpzClassicPage);
+ mir_free(obj->optObject.lpzClassicTab);
+ mir_free(obj->optObject.lpzHelpUrl);
+ mir_free(obj->optObject.lpzThemeExtension);
+ mir_free(obj->optObject.lpzThemeModuleName);
+
+ switch (obj->optObject.iType)
+ {
+ case MODERNOPT_TYPE_IGNOREOBJECT:
+ mir_free(obj->optObject.lpzIgnoreModule);
+ mir_free(obj->optObject.lpzIgnoreSetting);
+ break;
+ }
+
+ if (obj->hwnd) DestroyWindow(obj->hwnd);
+ mir_free(obj);
+}
+
+static int ModernOptionsObject_Comparator(const ModernOptionsObject *ptr1, const ModernOptionsObject *ptr2)
+{
+#define obj1 ((struct ModernOptionsObject *)ptr1)
+#define obj2 ((struct ModernOptionsObject *)ptr2)
+
+ if (obj1->optObject.iSection < obj2->optObject.iSection) return -1;
+ if (obj1->optObject.iSection > obj2->optObject.iSection) return +1;
+
+ if (obj1->optObject.iType < obj2->optObject.iType) return -1;
+ if (obj1->optObject.iType > obj2->optObject.iType) return +1;
+
+ if (obj1->optObject.lptzSubsection && obj2->optObject.lptzSubsection)
+ {
+ int c = lstrcmp(obj1->optObject.lptzSubsection, obj2->optObject.lptzSubsection);
+ if (c) return c;
+ }
+
+ if (obj1->dwIdx < obj2->dwIdx) return -1;
+ if (obj1->dwIdx > obj2->dwIdx) return +1;
+ return 0;
+
+#undef obj1
+#undef obj2
+}
+
+void li_List_Destruct(LIST<ModernOptionsObject> &pList, ItemDestuctor pItemDestructor)
+{
+ int i=0;
+ for (i=0; i<pList.getCount(); i++) pItemDestructor(pList[i]);
+ pList.destroy();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Load module
+int LoadModernOptsModule()
+{
+ CreateServiceFunction(MS_MODERNOPT_SHOW, svcModernOpt_Show);
+ CreateServiceFunction(MS_MODERNOPT_RESTORE, svcModernOpt_Restore);
+ CreateServiceFunction(MS_MODERNOPT_SELECTPAGE, svcModernOpt_SelectPage);
+ CreateServiceFunction(MS_MODERNOPT_ADDOBJECT, svcModernOpt_AddObject);
+ hevtModernOpt_Initialize = CreateHookableEvent(ME_MODERNOPT_INITIALIZE);
+ HookEvent(ME_MODERNOPT_INITIALIZE, hookModernOpt_Initialize);
+ return 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Main dlgproc
+static void sttNotifyPages(struct ModernOptionsData *dat, int code)
+{
+ PSHNOTIFY pshn = {0};
+ pshn.hdr.code = code;
+ for (int i = 0; i < dat->pObjectList.getCount(); ++i)
+ {
+ struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[i];
+ if (obj->hwnd && obj->bChanged)
+ {
+ obj->bChanged = FALSE;
+ pshn.hdr.hwndFrom = obj->hwnd;
+ SendMessage(obj->hwnd, WM_NOTIFY, 0, (LPARAM)&pshn);
+ }
+ }
+}
+
+static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ struct ModernOptionsData *dat = (struct ModernOptionsData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+
+ int i;
+ HWND hwndCtrl;
+
+ switch (msg) {
+ case WM_INITDIALOG:
+ {
+ TranslateDialogDefault(hwndDlg);
+ HIMAGELIST himl = 0;
+
+ dat = (struct ModernOptionsData *)lParam;
+ dat->iPage = -1;
+
+ LOGFONT lf;
+ dat->hfntBold = (HFONT)SendMessage(hwndDlg, WM_GETFONT, 0, 0);
+ GetObject(dat->hfntBold, sizeof(lf), &lf);
+ lf.lfWeight = FW_BOLD;
+ dat->hfntBold = CreateFontIndirect(&lf);
+
+ hwndCtrl = GetDlgItem(hwndDlg, IDC_TV_SUBSECTIONS);
+ himl = ImageList_Create(16, 16, ILC_MASK + ( IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16 ), 2, 1);
+ TreeView_SetImageList(hwndCtrl, himl, TVSIL_NORMAL);
+
+ for (i = 0; i < dat->pObjectList.getCount(); ++i) {
+ struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[i];
+ if ((obj->optObject.iSection >= 0) && (obj->optObject.iSection < MODERNOPT_PAGE_COUNT))
+ g_ModernOptPages[obj->optObject.iSection].bShow = TRUE;
+ if (obj->optObject.hIcon)
+ obj->iTreeImageIndex = ImageList_AddIcon(himl, obj->optObject.hIcon);
+ }
+
+ hwndCtrl = GetDlgItem(hwndDlg, IDC_ICOTABS);
+ for (i = 0; i < SIZEOF(g_ModernOptPages); ++i)
+ if (g_ModernOptPages[i].bShow && g_ModernOptPages[i].bShowTab)
+ {
+ HICON hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(g_ModernOptPages[i].iIcon), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
+ MIcoTab_AddItem(hwndCtrl, TranslateTS(g_ModernOptPages[i].lpzTitle), hIcon, i, FALSE);
+ DestroyIcon(hIcon);
+ }
+
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
+ hwndModernOpt = hwndDlg;
+
+ if (g_iSectionRestore)
+ CallService(MS_MODERNOPT_SELECTPAGE, g_iSectionRestore, 0);
+ else
+ ModernOptUI_SelectSection(hwndDlg, dat, g_iSectionRestore);
+
+ Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, "Options", "");
+
+ return TRUE;
+ }
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDC_ICOTABS:
+ {
+ int iPage = MIcoTab_GetItemData(GetDlgItem(hwndDlg, IDC_ICOTABS), lParam);
+ ModernOptUI_SelectSection(hwndDlg, dat, iPage);
+ SetFocus(GetDlgItem(hwndDlg, IDC_ICOTABS));
+ }
+ break;
+
+ case IDC_BTN_HELP:
+ {
+ struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[dat->iPage];
+ if (obj->optObject.lpzHelpUrl)
+ ShellExecuteA(hwndDlg, "open", obj->optObject.lpzHelpUrl, "", "", SW_SHOW);
+ }
+ break;
+
+ case IDC_BTN_EXPERT:
+ if (IsWindowEnabled(GetDlgItem(hwndDlg, IDC_BTN_APPLY)))
+ {
+ int idResult = MessageBox(hwndDlg,
+ TranslateT("You have some unsaved changes here.\n Do you wish to apply settings before switching?"),
+ _T("Miranda IM"), MB_ICONQUESTION|MB_YESNOCANCEL);
+ if (idResult == IDCANCEL) break;
+ sttNotifyPages(dat, (idResult == IDYES) ? PSN_APPLY : PSN_RESET);
+ }
+
+ { Utils_SaveWindowPosition(hwndDlg, NULL, "Options", "");
+ g_iSectionRestore = dat->iSection;
+ struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[dat->iPage];
+ if (obj->optObject.lpzClassicGroup || obj->optObject.lpzClassicPage)
+ {
+ OPENOPTIONSDIALOG ood = {0};
+ ood.cbSize = sizeof(ood);
+ ood.pszGroup = obj->optObject.lpzClassicGroup;
+ ood.pszPage = obj->optObject.lpzClassicPage;
+ ood.pszTab = obj->optObject.lpzClassicTab;
+ HWND hwndOpt = (HWND)CallService(MS_OPT_OPENOPTIONSPAGE, 0, (LPARAM)&ood);
+ PostMessage(hwndDlg, WM_CLOSE, 0, 0);
+ }
+ else {
+ CallService("Options/OptionsCommand", 0, 0);
+ PostMessage(hwndDlg, WM_CLOSE, 0, 0);
+ } }
+ break;
+
+ case IDOK:
+ sttNotifyPages(dat, PSN_APPLY);
+ PostMessage(hwndDlg, WM_CLOSE, 0, 0);
+ break;
+
+ case IDCANCEL:
+ sttNotifyPages(dat, PSN_RESET);
+ PostMessage(hwndDlg, WM_CLOSE, 0, 0);
+ break;
+
+ case IDC_BTN_APPLY:
+ EnableWindow(GetDlgItem(hwndDlg,IDC_BTN_APPLY), FALSE);
+ sttNotifyPages(dat, PSN_APPLY);
+ break;
+ }
+
+ return TRUE;
+
+ case PSM_CHANGED:
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_APPLY), TRUE);
+ for (i = 0; i < dat->pObjectList.getCount(); ++i) {
+ struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[i];
+ if (obj->hwnd && IsWindowVisible(obj->hwnd))
+ obj->bChanged = TRUE;
+ }
+ break;
+
+ case WM_NOTIFY:
+ {
+ LPNMHDR lpnmhdr = (LPNMHDR)lParam;
+ if (lpnmhdr->idFrom == IDC_TV_SUBSECTIONS ) {
+ LPNMTREEVIEW lpnmtv = (LPNMTREEVIEW)lParam;
+ if (lpnmhdr->code == TVN_SELCHANGED ) {
+ ModernOptUI_ShowPage(hwndDlg, dat, lpnmtv->itemNew.lParam);
+ break;
+ }
+ break;
+ }
+ return TRUE;
+ }
+
+ case WM_CLOSE:
+ DestroyWindow(hwndDlg);
+ hwndModernOpt = 0;
+ return TRUE;
+
+ case WM_DESTROY:
+ if (!dat) return TRUE;
+ li_List_Destruct(dat->pObjectList, ModernOptionsObject_Dtor);
+ DeleteObject(dat->hfntBold);
+ ImageList_Destroy(TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_TV_SUBSECTIONS), NULL, TVSIL_NORMAL));
+ Utils_SaveWindowPosition(hwndDlg, NULL, "Options", "");
+ delete dat;
+ }
+ return FALSE;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// UI utilities
+static HWND ModernOptUI_ShowPage_Impl(HWND hwndDlg, struct ModernOptionsData *dat, int iPage, int dx, HWND hwndInsertAfter)
+{
+ if ((iPage < 0) || (iPage >= dat->pObjectList.getCount()))
+ return NULL;
+
+ dat->iPage = iPage;
+ struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[dat->iPage];
+ if (!obj->hwnd) {
+ RECT rc1, rc2;
+ GetWindowRect(GetDlgItem(hwndDlg, IDC_TV_SUBSECTIONS), &rc1);
+ GetWindowRect(GetDlgItem(hwndDlg, IDC_TXT_DUMMY), &rc2);
+ MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rc1, 2);
+ MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rc2, 2);
+ rc1.top += dx; rc2.top += dx;
+
+ obj->hwnd = CreateDialogParamA(obj->optObject.hInstance, obj->optObject.lpzTemplate, hwndDlg, obj->optObject.pfnDlgProc, (LPARAM)&obj->optObject);
+ if (obj->hwnd) {
+ DWORD dwShowFlags =
+ SWP_SHOWWINDOW |
+ ((obj->optObject.dwFlags & MODEROPT_FLG_NORESIZE) ? SWP_NOSIZE : 0);
+
+ int i = 0;
+
+ if (obj->optObject.iBoldControls)
+ for (i = 0; obj->optObject.iBoldControls[i]; ++i) {
+ HWND hwndChild = GetDlgItem(obj->hwnd, obj->optObject.iBoldControls[i]);
+ if (!hwndChild) continue;
+ SendMessage(hwndChild, WM_SETFONT, (WPARAM)dat->hfntBold, TRUE);
+ }
+
+ if (obj->optObject.iType == MODERNOPT_TYPE_SECTIONPAGE)
+ SetWindowPos(obj->hwnd, hwndInsertAfter, rc1.left, rc1.top, rc2.right-rc1.left, rc2.bottom-rc1.top, dwShowFlags);
+ else
+ SetWindowPos(obj->hwnd, hwndInsertAfter, rc2.left, rc2.top, rc2.right-rc2.left, rc2.bottom-rc2.top, dwShowFlags);
+
+ if (obj->optObject.iSection == MODERNOPT_PAGE_IGNORE) {
+ for (i = 0; i < dat->pObjectList.getCount(); ++i) {
+ struct ModernOptionsObject *ignoreObj = (struct ModernOptionsObject *)dat->pObjectList[i];
+ if (ignoreObj->optObject.iType == MODERNOPT_TYPE_IGNOREOBJECT)
+ ModernOptIgnore_AddItem(&ignoreObj->optObject);
+ } } }
+ }
+ else ShowWindow(obj->hwnd, SW_SHOW);
+
+ ShowWindow(GetDlgItem(hwndDlg, IDC_BTN_EXPERT), (obj->optObject.lpzClassicGroup || obj->optObject.lpzClassicPage) ? SW_SHOW : SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_BTN_HELP), obj->optObject.lpzHelpUrl ? SW_SHOW : SW_HIDE);
+
+ return obj->hwnd;
+}
+
+static int lstrcmp_null(TCHAR *p1, TCHAR *p2)
+{
+ if (!p1 && !p2) return 0;
+ if (!p1) return -1;
+ if (!p2) return 1;
+ return lstrcmp(p1, p2);
+}
+
+static void ModernOptUI_ShowPage(HWND hwndDlg, struct ModernOptionsData *dat, int iPage)
+{
+ HWND hwndInsertAfter = GetDlgItem(hwndDlg, IDC_TV_SUBSECTIONS);
+
+ int dx = 0;
+ for (int i = 0; i < dat->pObjectList.getCount(); ++i)
+ if ((dat->pObjectList[i]->optObject.iType == dat->pObjectList[iPage]->optObject.iType) &&
+ (dat->pObjectList[i]->optObject.iSection == dat->pObjectList[iPage]->optObject.iSection) &&
+ !lstrcmp_null(dat->pObjectList[i]->optObject.lptzSubsection, dat->pObjectList[iPage]->optObject.lptzSubsection))
+ {
+ hwndInsertAfter = ModernOptUI_ShowPage_Impl(hwndDlg, dat, i, dx, hwndInsertAfter);
+
+ if (dat->pObjectList[i]->hwnd) {
+ RECT rcWnd; GetWindowRect(dat->pObjectList[i]->hwnd, &rcWnd);
+ dx += rcWnd.bottom - rcWnd.top;// + 30;
+ }
+ }
+ else if (dat->pObjectList[i]->hwnd)
+ {
+ ShowWindow(dat->pObjectList[i]->hwnd, SW_HIDE);
+ }
+}
+
+static void ModernOptUI_SelectSection(HWND hwndDlg, struct ModernOptionsData *dat, int iSection)
+{
+ int i;
+ int iPageType = -1;
+
+ HWND hwndTree = GetDlgItem(hwndDlg, IDC_TV_SUBSECTIONS);
+ dat->iSection = iSection;
+
+ SendMessage(hwndTree, WM_SETREDRAW, FALSE, 0);
+ TreeView_DeleteAllItems(hwndTree);
+ for (i = 0; i < dat->pObjectList.getCount(); ++i) {
+ struct ModernOptionsObject *obj = (struct ModernOptionsObject *)dat->pObjectList[i];
+ if (obj->optObject.iSection != iSection) continue;
+
+ if ((iPageType < -1) && (iPageType != obj->optObject.iType)) continue;
+ iPageType = obj->optObject.iType;
+
+ if (obj->optObject.iType == MODERNOPT_TYPE_SECTIONPAGE) {
+ ModernOptUI_ShowPage(hwndDlg, dat, i);
+ break;
+ }
+
+ if (obj->optObject.iType == MODERNOPT_TYPE_SUBSECTIONPAGE) {
+ TVINSERTSTRUCT tvis = {0};
+ tvis.hParent = TVI_ROOT;
+ tvis.hInsertAfter = TVI_LAST;
+ tvis.item.mask = TVIF_IMAGE|TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM;
+ tvis.item.pszText = TranslateTS(obj->optObject.lptzSubsection);
+ tvis.item.cchTextMax = lstrlen(tvis.item.pszText);
+ tvis.item.iImage = tvis.item.iSelectedImage = obj->iTreeImageIndex;
+ tvis.item.lParam = i;
+ TreeView_InsertItem(hwndTree, &tvis);
+ } }
+
+ SendMessage(hwndTree, WM_SETREDRAW, TRUE, 0);
+
+ if (iPageType < 0)
+ return;
+
+ if (iPageType != MODERNOPT_TYPE_SECTIONPAGE) {
+ ShowWindow(hwndTree, SW_SHOW);
+ RedrawWindow(hwndTree, NULL, NULL, RDW_INVALIDATE);
+ TreeView_Select(hwndTree, TreeView_GetRoot(hwndTree), TVGN_CARET);
+ }
+ else ShowWindow(hwndTree, SW_HIDE);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Services
+static INT_PTR svcModernOpt_Impl(WPARAM wParam, LPARAM lParam)
+{
+ if (!hwndModernOpt) {
+ ModernOptionsData *dat = new ModernOptionsData;
+ g_dwIdx = 0;
+ NotifyEventHooks(hevtModernOpt_Initialize, (WPARAM)dat, 0);
+ hwndModernOpt = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MODERNOPT), NULL, ModernOptDlgProc, (LPARAM)dat);
+ ShowWindow(hwndModernOpt, SW_SHOW);
+ }
+ else SetForegroundWindow(hwndModernOpt);
+
+ return 0;
+}
+
+static INT_PTR svcModernOpt_Show(WPARAM wParam, LPARAM lParam)
+{
+ g_iSectionRestore = 0;
+ return svcModernOpt_Impl(wParam, lParam);
+}
+
+static INT_PTR svcModernOpt_Restore(WPARAM wParam, LPARAM lParam)
+{
+ if (g_iSectionRestore == 0) return 0;
+ return svcModernOpt_Impl(wParam, lParam);
+}
+
+static INT_PTR svcModernOpt_SelectPage(WPARAM wParam, LPARAM lParam)
+{
+ struct ModernOptionsData *dat;
+
+ if (!hwndModernOpt)
+ return 0;
+
+ dat = (struct ModernOptionsData *)GetWindowLongPtr(hwndModernOpt, GWLP_USERDATA);
+ if (!dat)
+ return 0;
+
+ int nIdx = 0;
+ for (size_t i = 0; i < MODERNOPT_PAGE_COUNT; ++i)
+ if (g_ModernOptPages[i].bShow && g_ModernOptPages[i].bShowTab) {
+ if (i == wParam) {
+ MIcoTab_SetSel(GetDlgItem(hwndModernOpt, IDC_ICOTABS), nIdx);
+ break;
+ }
+
+ ++nIdx;
+ }
+
+// ModernOptUI_SelectSection(hwndModernOpt, dat, wParam);
+ return 0;
+}
+
+static INT_PTR svcModernOpt_AddObject(WPARAM wParam, LPARAM lParam)
+{
+ struct ModernOptionsData *dat = (struct ModernOptionsData *)wParam;
+ MODERNOPTOBJECT *obj = (MODERNOPTOBJECT *)lParam;
+ struct ModernOptionsObject *objCopy = (struct ModernOptionsObject *)mir_calloc(sizeof(struct ModernOptionsObject));
+
+ objCopy->dwIdx = ++g_dwIdx;
+
+ objCopy->optObject.cbSize = sizeof(MODERNOPTOBJECT);
+ objCopy->optObject.dwFlags = obj->dwFlags;
+ objCopy->optObject.hIcon = obj->hIcon;
+ objCopy->optObject.iSection = obj->iSection;
+ objCopy->optObject.iType = obj->iType;
+ objCopy->optObject.hInstance = obj->hInstance;
+ objCopy->optObject.lpzTemplate = obj->lpzTemplate;
+ objCopy->optObject.pfnDlgProc = obj->pfnDlgProc;
+
+ if (obj->lpzClassicGroup) objCopy->optObject.lpzClassicGroup = mir_strdup(obj->lpzClassicGroup);
+ if (obj->lpzClassicPage) objCopy->optObject.lpzClassicPage = mir_strdup(obj->lpzClassicPage);
+ if (obj->lpzClassicTab) objCopy->optObject.lpzClassicTab = mir_strdup(obj->lpzClassicTab);
+ if (obj->lpzHelpUrl) objCopy->optObject.lpzHelpUrl = mir_strdup(obj->lpzHelpUrl);
+
+ if (obj->iBoldControls) {
+ int count = 0;
+ while (obj->iBoldControls[count++]) ;
+ objCopy->optObject.iBoldControls = (int *)mir_alloc(sizeof(int) * count);
+ memcpy(objCopy->optObject.iBoldControls, obj->iBoldControls, sizeof(int) * count);
+ }
+
+ switch (obj->iType) {
+ case MODERNOPT_TYPE_SECTIONPAGE:
+ objCopy->optObject.lptzSubsection = NULL;
+ break;
+
+ case MODERNOPT_TYPE_SUBSECTIONPAGE:
+ objCopy->optObject.lptzSubsection = (objCopy->optObject.dwFlags & MODEROPT_FLG_UNICODE) ?
+ mir_u2t(obj->lpwzSubsection) :
+ mir_a2t(obj->lpzSubsection);
+ break;
+
+ case MODERNOPT_TYPE_IGNOREOBJECT:
+ objCopy->optObject.lptzSubsection = (objCopy->optObject.dwFlags & MODEROPT_FLG_UNICODE) ?
+ mir_u2t(obj->lpwzSubsection) :
+ mir_a2t(obj->lpzSubsection);
+ objCopy->optObject.lpzIgnoreModule = mir_strdup(obj->lpzIgnoreModule);
+ objCopy->optObject.lpzIgnoreSetting = mir_strdup(obj->lpzIgnoreSetting);
+ objCopy->optObject.dwIgnoreBit = obj->dwIgnoreBit;
+ break;
+
+ case MODERNOPT_TYPE_SELECTORPAGE:
+ objCopy->optObject.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
+ objCopy->optObject.hInstance = hInst;
+ objCopy->optObject.lpzTemplate = MAKEINTRESOURCEA(IDD_MODERNOPT_SKINS);
+ objCopy->optObject.pfnDlgProc = ModernOptSelector_DlgProc;
+ objCopy->optObject.lptzSubsection = (objCopy->optObject.dwFlags & MODEROPT_FLG_UNICODE) ?
+ mir_u2t(obj->lpwzSubsection) :
+ mir_a2t(obj->lpzSubsection);
+ objCopy->optObject.lpzThemeExtension = mir_strdup(obj->lpzThemeExtension);
+ objCopy->optObject.lpzThemeModuleName = mir_strdup(obj->lpzThemeModuleName);
+ break;
+ }
+
+ dat->pObjectList.insert(objCopy);
+ return 0;
+}
+
+static int hookModernOpt_Initialize(WPARAM wParam, LPARAM lParam)
+{
+ static int iBoldControls[] =
+ {
+ IDC_TXT_TITLE1, IDC_TXT_TITLE2, IDC_TXT_TITLE3, IDC_TXT_TITLE4,
+// IDC_TXT_TITLE5, IDC_TXT_TITLE6, IDC_TXT_TITLE7, IDC_TXT_TITLE8,
+ MODERNOPT_CTRL_LAST
+ };
+
+ MODERNOPTOBJECT obj = {0};
+
+ obj.cbSize = sizeof(obj);
+ obj.dwFlags = MODEROPT_FLG_TCHAR;
+
+ obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.hInstance = hInst;
+
+ obj.iSection = MODERNOPT_PAGE_HOME;
+ obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
+ obj.lpzTemplate = MAKEINTRESOURCEA(IDD_MODERNOPT_HOME);
+ obj.pfnDlgProc = ModernOptHome_DlgProc;
+ obj.lpzHelpUrl = "http://wiki.miranda-im.org/";
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+
+ #if defined(_DEBUG) && defined(MOPT_SAMPLE_PAGES)
+ obj.iSection = MODERNOPT_PAGE_ADVANCED;
+ obj.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
+ obj.lptzSubsection = _T("Page 1");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.lptzSubsection = _T("Page 2");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.lptzSubsection = _T("Page 3");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+
+ obj.iType = MODERNOPT_TYPE_IGNOREOBJECT;
+ obj.hIcon = LoadSkinnedIcon(SKINICON_EVENT_FILE);
+ obj.lptzSubsection = _T("Files");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
+ obj.lptzSubsection = _T("Messages");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.hIcon = LoadSkinnedIcon(SKINICON_EVENT_URL);
+ obj.lptzSubsection = _T("URL events");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_TYPING);
+ obj.lptzSubsection = _T("Typing notifications");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_ADDCONTACT);
+ obj.lptzSubsection = _T("Added notifications");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.hIcon = LoadSkinnedIcon(SKINICON_OTHER_MIRANDA);
+ obj.lptzSubsection = _T("Auth requests");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+
+ obj.iSection = MODERNOPT_PAGE_SKINS;
+ obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
+ obj.lpzTemplate = MAKEINTRESOURCEA(IDD_MODERNOPT_SKINS);
+ obj.pfnDlgProc = NULL;
+ obj.iBoldControls = iBoldControls;
+ obj.lpzHelpUrl = NULL;
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+
+ obj.lpzTemplate = MAKEINTRESOURCEA(IDD_MODERNOPT_EMPTY);
+ obj.pfnDlgProc = NULL;
+ obj.iBoldControls = 0;
+ obj.lpzClassicGroup = 0;
+ obj.lpzClassicPage = 0;
+ obj.lpzHelpUrl = 0;
+
+ obj.iSection = MODERNOPT_PAGE_CLIST;
+ obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+
+ obj.iSection = MODERNOPT_PAGE_MSGS;
+ obj.iType = MODERNOPT_TYPE_SECTIONPAGE;
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+
+ obj.iSection = MODERNOPT_PAGE_ADVANCED;
+ obj.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
+ obj.lptzSubsection = _T("Page 1");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.lptzSubsection = _T("Page 2");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.lptzSubsection = _T("Page 3");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+
+ obj.iSection = MODERNOPT_PAGE_MODULES;
+ obj.iType = MODERNOPT_TYPE_SUBSECTIONPAGE;
+ obj.lptzSubsection = _T("Configure");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.lptzSubsection = _T("Update");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ obj.lptzSubsection = _T("Download");
+ CallService(MS_MODERNOPT_ADDOBJECT, wParam, (LPARAM)&obj);
+ #endif
+
+ return 0;
+}
diff --git a/plugins/ModernOpt/modernopt.h b/plugins/ModernOpt/modernopt.h new file mode 100644 index 0000000000..728488d810 --- /dev/null +++ b/plugins/ModernOpt/modernopt.h @@ -0,0 +1,53 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2007 Artem Shpynov
+Copyright 2000-2007 Miranda ICQ/IM project,
+
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef MODERNOPT_H__
+#define MODERNOPT_H__ 1
+
+#include "m_descbutton.h"
+#include "m_iconheader.h"
+#include "m_modernopt.h"
+
+struct ModernOptMainPageInfo
+{
+ int idcButton;
+ BOOL bShowTab;
+ int iIcon;
+ TCHAR *lpzTitle;
+ TCHAR *lpzDescription;
+ int iPageType;
+ BOOL bShow;
+};
+
+extern struct ModernOptMainPageInfo g_ModernOptPages[MODERNOPT_PAGE_COUNT];
+
+extern HMODULE hInst;
+
+INT_PTR CALLBACK ModernOptHome_DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK ModernOptSelector_DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+
+void ModernOptIgnore_AddItem(MODERNOPTOBJECT *obj);
+
+#endif // MODERNOPT_H__
diff --git a/plugins/ModernOpt/modernopt_10.vcxproj b/plugins/ModernOpt/modernopt_10.vcxproj new file mode 100644 index 0000000000..0577182a8f --- /dev/null +++ b/plugins/ModernOpt/modernopt_10.vcxproj @@ -0,0 +1,297 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>modernopt</ProjectName>
+ <ProjectGuid>{153DD132-084C-4DE4-8F40-A088BCB22723}</ProjectGuid>
+ <RootNamespace>modernopt</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/mebeam.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;mebeam_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x080c</Culture>
+ <AdditionalIncludeDirectories>./../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Debug/mebeam.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;mebeam_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x080c</Culture>
+ <AdditionalIncludeDirectories>./../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/mebeam.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x080c</Culture>
+ <AdditionalIncludeDirectories>./../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Release/mebeam.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <OmitFramePointers>false</OmitFramePointers>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;mebeam_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <CompileAs>Default</CompileAs>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x080c</Culture>
+ <AdditionalIncludeDirectories>./../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="commonheaders.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="main.cpp" />
+ <ClCompile Include="modernopt.cpp" />
+ <ClCompile Include="mopt_home.cpp" />
+ <ClCompile Include="mopt_ignore.cpp" />
+ <ClCompile Include="mopt_selector.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="commonheaders.h" />
+ <ClInclude Include="modernopt.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Res\big_advanced.ico" />
+ <None Include="Res\big_buddylist.ico" />
+ <None Include="Res\big_ignore.ico" />
+ <None Include="Res\big_message.ico" />
+ <None Include="Res\big_modules.ico" />
+ <None Include="Res\big_network.ico" />
+ <None Include="Res\big_skins.ico" />
+ <None Include="Res\big_status.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/ModernOpt/modernopt_10.vcxproj.filters b/plugins/ModernOpt/modernopt_10.vcxproj.filters new file mode 100644 index 0000000000..86a8c7efcc --- /dev/null +++ b/plugins/ModernOpt/modernopt_10.vcxproj.filters @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{71014e62-0e8c-4230-ae7f-44b8be91f5ab}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{bcb87915-818c-4466-98c7-109ed4d2f974}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{3047613f-a83d-4d2b-87af-14844ab89a24}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="commonheaders.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="modernopt.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="mopt_home.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="mopt_ignore.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="mopt_selector.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="commonheaders.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="modernopt.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Res\big_advanced.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="Res\big_buddylist.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="Res\big_ignore.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="Res\big_message.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="Res\big_modules.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="Res\big_network.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="Res\big_skins.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="Res\big_status.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/ModernOpt/mopt_home.cpp b/plugins/ModernOpt/mopt_home.cpp new file mode 100644 index 0000000000..980f580121 --- /dev/null +++ b/plugins/ModernOpt/mopt_home.cpp @@ -0,0 +1,80 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2007 Artem Shpynov
+Copyright 2000-2007 Miranda ICQ/IM project,
+
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+#include "modernopt.h"
+
+extern HMODULE hInst;
+
+INT_PTR CALLBACK ModernOptHome_DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ int i;
+
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ for (i = 0; i < SIZEOF(g_ModernOptPages); ++i) {
+ if (g_ModernOptPages[i].idcButton) {
+ HWND hwndCtrl = GetDlgItem(hwndDlg, g_ModernOptPages[i].idcButton);
+ if (g_ModernOptPages[i].bShow) {
+ HICON hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(g_ModernOptPages[i].iIcon), IMAGE_ICON, 32, 32, LR_DEFAULTCOLOR);
+ MDescButton_SetIcon(hwndCtrl, hIcon);
+ MDescButton_SetTitle(hwndCtrl, TranslateTS(g_ModernOptPages[i].lpzTitle));
+ MDescButton_SetDescription(hwndCtrl, TranslateTS(g_ModernOptPages[i].lpzDescription));
+ DestroyIcon(hIcon);
+ }
+ else ShowWindow(hwndCtrl, SW_HIDE);
+ } }
+
+ return FALSE;
+
+ case WM_COMMAND:
+ switch ( LOWORD(wParam)) {
+ case IDC_BTN_CLASSICOPT:
+ PostMessage(GetParent(hwndDlg), WM_CLOSE, 0, 0);
+ {
+ OPENOPTIONSDIALOG ood = {0};
+ ood.cbSize = sizeof(ood);
+ CallService(MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood);
+ }
+ break;
+
+ case IDC_BTN_HELP:
+ ShellExecuteA(hwndDlg, "open", "http://www.miranda-im.org/", "", "", SW_SHOW);
+ break;
+
+ default:
+ for (i = 0; i < SIZEOF(g_ModernOptPages); ++i) {
+ if (g_ModernOptPages[i].idcButton == LOWORD(wParam))
+ {
+ CallService(MS_MODERNOPT_SELECTPAGE, i, 0);
+ return TRUE;
+ } } }
+
+ case WM_DESTROY:
+ return FALSE;
+ }
+ return FALSE;
+}
diff --git a/plugins/ModernOpt/mopt_ignore.cpp b/plugins/ModernOpt/mopt_ignore.cpp new file mode 100644 index 0000000000..8576b3f2bb --- /dev/null +++ b/plugins/ModernOpt/mopt_ignore.cpp @@ -0,0 +1,61 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2007 Artem Shpynov
+Copyright 2000-2007 Miranda ICQ/IM project,
+
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+#include "modernopt.h"
+
+static HWND g_hwndModernOptIgnore = NULL;
+
+void ModernOptIgnore_AddItem(MODERNOPTOBJECT *obj)
+{
+ if ( g_hwndModernOptIgnore )
+ SendMessage(g_hwndModernOptIgnore, WM_APP, 0, (LPARAM)obj);
+}
+
+static void ResetListOptions(HWND hwndList)
+{
+ SendMessage(hwndList,CLM_SETBKBITMAP,0,(LPARAM)(HBITMAP)NULL);
+ SendMessage(hwndList,CLM_SETBKCOLOR,GetSysColor(COLOR_WINDOW),0);
+ SendMessage(hwndList,CLM_SETGREYOUTFLAGS,0,0);
+ SendMessage(hwndList,CLM_SETLEFTMARGIN,4,0);
+ SendMessage(hwndList,CLM_SETINDENT,10,0);
+ SendMessage(hwndList,CLM_SETHIDEEMPTYGROUPS,1,0);
+
+ for(int i=0;i<=FONTID_MAX;i++)
+ SendMessage(hwndList,CLM_SETTEXTCOLOR,i,GetSysColor(COLOR_WINDOWTEXT));
+}
+
+static void SetAllContactIcons(HWND hwndList, int count)
+{
+ HANDLE hContact=(HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ do {
+ DWORD hItem = SendMessage(hwndList,CLM_FINDCONTACT,(WPARAM)hContact,0);
+ for (int i = 0; i < count; ++i)
+ SendMessage(hwndList,CLM_SETEXTRAIMAGE,hItem,MAKELPARAM(i, i+1));
+ if(!DBGetContactSettingByte(hContact,"CList","Hidden",0))
+ SendMessage(hwndList,CLM_SETCHECKMARK,hItem,1);
+ }
+ while(hContact=(HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0));
+}
diff --git a/plugins/ModernOpt/mopt_selector.cpp b/plugins/ModernOpt/mopt_selector.cpp new file mode 100644 index 0000000000..42b15f51bb --- /dev/null +++ b/plugins/ModernOpt/mopt_selector.cpp @@ -0,0 +1,385 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2007 Artem Shpynov
+Copyright 2000-2007 Miranda ICQ/IM project,
+
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+#include "modernopt.h"
+
+static void sttApplySkin(MODERNOPTOBJECT *obj, TCHAR *fn)
+{
+ char svc[128];
+ mir_snprintf(svc, SIZEOF(svc), "%s%s", obj->lpzThemeModuleName, TS_SKIN_APPLY);
+ CallService(svc, NULL, (LPARAM)fn);
+}
+
+static TCHAR *sttGetActiveSkin(MODERNOPTOBJECT *obj)
+{
+ char svc[128];
+ mir_snprintf(svc, SIZEOF(svc), "%s%s", obj->lpzThemeModuleName, TS_SKIN_ACTIVE);
+ return ServiceExists(svc) ? (TCHAR *)CallService(svc, 0, 0) : 0;
+}
+
+static void sttPreviewSkin(MODERNOPTOBJECT *obj, TCHAR *fn, LPDRAWITEMSTRUCT lps)
+{
+ if (!fn) return;
+
+ char svc[128];
+ mir_snprintf(svc, SIZEOF(svc), "%s%s", obj->lpzThemeModuleName, TS_SKIN_PREVIEW);
+ if (ServiceExists(svc))
+ CallService(svc, (WPARAM)lps, (LPARAM)fn);
+ else {
+ char *afn = mir_t2a(fn);
+ char *fnpreview = (char *)mir_alloc(lstrlenA(afn) + 10);
+ lstrcpyA(fnpreview, afn);
+ lstrcatA(fnpreview, ".png");
+ HBITMAP hbmPreview = (HBITMAP)CallService(MS_UTILS_LOADBITMAP, 0, (LPARAM)fnpreview);
+ mir_free(afn);
+ mir_free(fnpreview);
+
+ if (!hbmPreview) return;
+
+ BITMAP bmp;
+ GetObject(hbmPreview, sizeof(bmp), &bmp);
+
+ SIZE szDst = { abs(bmp.bmWidth), abs(bmp.bmHeight) };
+ if ((szDst.cx > lps->rcItem.right-lps->rcItem.left) || (szDst.cy > lps->rcItem.bottom-lps->rcItem.top)) {
+ float q = min(
+ float(lps->rcItem.right-lps->rcItem.left) / szDst.cx,
+ float(lps->rcItem.bottom-lps->rcItem.top) / szDst.cy);
+ szDst.cx *= q;
+ szDst.cy *= q;
+ }
+ POINT ptDst = {
+ (lps->rcItem.left+lps->rcItem.right-szDst.cx) / 2,
+ (lps->rcItem.top+lps->rcItem.bottom-szDst.cy) / 2 };
+
+ HDC hdc = CreateCompatibleDC(lps->hDC);
+ SelectObject(hdc, hbmPreview);
+ SetStretchBltMode(hdc, HALFTONE);
+ StretchBlt(lps->hDC, ptDst.x, ptDst.y, szDst.cx, szDst.cy, hdc, 0, 0, abs(bmp.bmWidth), abs(bmp.bmHeight), SRCCOPY);
+ DeleteDC(hdc);
+ DeleteObject(hbmPreview);
+ }
+}
+
+struct TSkinListItem
+{
+ TCHAR *path;
+ TCHAR *title;
+ TCHAR *filename;
+
+ TSkinListItem(TCHAR *fn)
+ {
+ title = mir_tstrdup(fn);
+ if (TCHAR *p = _tcsrchr(title, _T('.'))) *p = 0;
+
+ TCHAR curPath[MAX_PATH];
+ GetCurrentDirectory(SIZEOF(curPath), curPath);
+
+ path = (TCHAR *)mir_alloc(MAX_PATH * sizeof(TCHAR));
+ CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)curPath, (LPARAM)path);
+
+ int length = lstrlen(curPath)+lstrlen(fn)+2;
+ filename = (TCHAR *)mir_alloc(length * sizeof(TCHAR));
+ mir_sntprintf(filename, length, _T("%s\\%s"), curPath, fn);
+ }
+
+ ~TSkinListItem()
+ {
+ mir_free(path);
+ mir_free(title);
+ mir_free(filename);
+ }
+};
+
+struct TSelectorData
+{
+ MODERNOPTOBJECT *obj;
+ TCHAR *active;
+ HBITMAP hbmpPreview;
+
+ TSelectorData()
+ {
+ ZeroMemory(this, sizeof(*this));
+ }
+ ~TSelectorData()
+ {
+ mir_free(active);
+ DeleteObject(hbmpPreview);
+ }
+};
+
+static bool CheckExt(TCHAR *fn, TCHAR *ext, int n)
+{
+ int l = lstrlen(fn);
+ return (l > n) && !lstrcmp(fn + l - n, ext);
+}
+
+static void BuildSkinList(HWND hwndList, TCHAR *szExt, int nExtLength = -1, bool start = true)
+{
+ if (start) {
+ static TCHAR mirPath[MAX_PATH];
+ GetModuleFileName(NULL, mirPath, SIZEOF(mirPath));
+ if (TCHAR *p = _tcsrchr(mirPath, _T('\\'))) *p = 0;
+ SetCurrentDirectory(mirPath);
+ SendMessage(hwndList, LB_RESETCONTENT, 0, 0);
+ nExtLength = lstrlen(szExt);
+ SendMessage(hwndList, WM_SETREDRAW, FALSE, 0);
+ }
+
+ WIN32_FIND_DATA ffd = {0};
+ HANDLE h = FindFirstFile(_T("*.*"), &ffd);
+ if (h != INVALID_HANDLE_VALUE) {
+ do {
+ if (!lstrcmp(ffd.cFileName, _T("")) || !lstrcmp(ffd.cFileName, _T(".")) || !lstrcmp(ffd.cFileName, _T("..")))
+ continue;
+
+ if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ SetCurrentDirectory(ffd.cFileName);
+ BuildSkinList(hwndList, szExt, nExtLength, false);
+ SetCurrentDirectory(_T(".."));
+ }
+ else {
+ if (CheckExt(ffd.cFileName, szExt, nExtLength)) {
+ TSkinListItem *dat = new TSkinListItem(ffd.cFileName);
+ DWORD dwItem = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)ffd.cFileName);
+ SendMessage(hwndList, LB_SETITEMDATA, dwItem, (LPARAM)dat);
+ } }
+ }
+ while (FindNextFile(h, &ffd));
+ FindClose(h);
+ }
+
+ if (start) {
+ SendMessage(hwndList, WM_SETREDRAW, TRUE, 0);
+ RedrawWindow(hwndList, NULL, NULL, RDW_INVALIDATE);
+ }
+}
+
+static void CreatePreview(TSelectorData *sd, TCHAR *fn, LPDRAWITEMSTRUCT lps)
+{
+ HDC hdc = CreateCompatibleDC(lps->hDC);
+ sd->hbmpPreview = CreateCompatibleBitmap(lps->hDC, lps->rcItem.right - lps->rcItem.left, lps->rcItem.bottom - lps->rcItem.top);
+ SelectObject(hdc, sd->hbmpPreview);
+
+ RECT rc;
+ HBRUSH hbr;
+
+ BITMAPINFO bi = {0};
+ bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
+ bi.bmiHeader.biWidth = 8;
+ bi.bmiHeader.biHeight = -8;
+ bi.bmiHeader.biPlanes = 1;
+ bi.bmiHeader.biBitCount = 32;
+ bi.bmiHeader.biCompression = BI_RGB;
+
+ HBITMAP hBmpBrush = (HBITMAP)CreateDIBSection(0, &bi, DIB_RGB_COLORS, 0, 0, 0);
+ HDC dcBmp = CreateCompatibleDC(0);
+ HBITMAP hBmpSave = (HBITMAP)SelectObject(dcBmp, hBmpBrush);
+ hbr = CreateSolidBrush(RGB(0xcc, 0xcc, 0xcc));
+ SetRect(&rc, 0, 0, 8, 8);
+ FillRect(dcBmp, &rc, hbr);
+ DeleteObject(hbr);
+ hbr = CreateSolidBrush(RGB(0xff, 0xff, 0xff));
+ SetRect(&rc, 4, 0, 8, 4);
+ FillRect(dcBmp, &rc, hbr);
+ SetRect(&rc, 0, 4, 4, 8);
+ FillRect(dcBmp, &rc, hbr);
+ DeleteObject(hbr);
+ SelectObject(dcBmp, hBmpSave);
+ DeleteDC(dcBmp);
+
+ rc = lps->rcItem;
+ OffsetRect(&rc, -rc.left, -rc.top);
+ hbr = CreatePatternBrush(hBmpBrush);
+ SetBrushOrgEx(hdc, 1, 1, 0);
+ FillRect(hdc, &rc, hbr);
+ DeleteObject(hbr);
+ DeleteObject(hBmpBrush);
+
+ HDC hdcSave = lps->hDC;
+ lps->hDC = hdc;
+ sttPreviewSkin(sd->obj, fn, lps);
+ lps->hDC = hdcSave;
+
+ FrameRect(hdc, &rc, GetStockBrush(LTGRAY_BRUSH));
+ DeleteDC(hdc);
+}
+
+INT_PTR CALLBACK ModernOptSelector_DlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ TSelectorData *sd = (TSelectorData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MODERNOPTOBJECT *&obj = sd->obj;
+
+ switch (msg) {
+ case WM_INITDIALOG:
+ {
+ sd = new TSelectorData;
+ MODERNOPTOBJECT *&obj = sd->obj;
+
+ sd->obj = (MODERNOPTOBJECT *)lParam;
+ sd->active = sttGetActiveSkin(obj);
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)sd);
+
+ TCHAR *s = mir_a2t(obj->lpzThemeExtension);
+ BuildSkinList(GetDlgItem(hwndDlg, IDC_SKINLIST), s);
+ mir_free(s);
+ }
+ return FALSE;
+
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDC_SKINLIST) {
+ switch (HIWORD(wParam)) {
+ case LBN_SELCHANGE:
+ DeleteObject(sd->hbmpPreview);
+ sd->hbmpPreview = 0;
+ RedrawWindow(GetDlgItem(hwndDlg, IDC_PREVIEW1), NULL, NULL, RDW_INVALIDATE);
+ break;
+
+ case LBN_DBLCLK:
+ {
+ int idx = SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETCURSEL, 0, 0);
+ if (idx >= 0)
+ {
+ TSkinListItem *dat = (TSkinListItem *)SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETITEMDATA, idx, 0);
+ sttApplySkin(obj, dat->filename);
+ mir_free(sd->active);
+ sd->active = sttGetActiveSkin(obj);
+ RedrawWindow(GetDlgItem(hwndDlg, IDC_SKINLIST), NULL, NULL, RDW_INVALIDATE);
+ }
+ break;
+ } }
+ break;
+ }
+ return FALSE;
+
+ case WM_MEASUREITEM:
+ {
+ LPMEASUREITEMSTRUCT lps = (LPMEASUREITEMSTRUCT)lParam;
+ if (lps->CtlID != IDC_SKINLIST)
+ break;
+ TSkinListItem *dat = (TSkinListItem *)lps->itemData;
+ if (!dat) break;
+
+ lps->itemWidth = 10;
+ lps->itemHeight = 30;
+
+ return FALSE;
+ }
+
+ case WM_DRAWITEM:
+ {
+ LPDRAWITEMSTRUCT lps = (LPDRAWITEMSTRUCT)lParam;
+ if (lps->CtlID == IDC_SKINLIST) {
+ TSkinListItem *dat = (TSkinListItem *)lps->itemData;
+ if (!dat) break;
+
+ SetBkMode(lps->hDC, TRANSPARENT);
+ COLORREF clLine1, clLine2, clBack;
+ if (lps->itemState & ODS_SELECTED) {
+ FillRect(lps->hDC, &lps->rcItem, GetSysColorBrush(COLOR_HIGHLIGHT));
+ clBack = GetSysColor(COLOR_HIGHLIGHT);
+ clLine1 = GetSysColor(COLOR_HIGHLIGHTTEXT);
+ }
+ else {
+ FillRect(lps->hDC, &lps->rcItem, GetSysColorBrush(COLOR_WINDOW));
+ clBack = GetSysColor(COLOR_WINDOW);
+ clLine1 = GetSysColor(COLOR_WINDOWTEXT);
+ }
+ clLine2 = RGB(
+ GetRValue(clLine1) * 0.66 + GetRValue(clBack) * 0.34,
+ GetGValue(clLine1) * 0.66 + GetGValue(clBack) * 0.34,
+ GetBValue(clLine1) * 0.66 + GetBValue(clBack) * 0.34
+ );
+
+ lps->rcItem.left += 2;
+ lps->rcItem.top += 2;
+ lps->rcItem.bottom -= 2;
+ lps->rcItem.right -= 5;
+
+ int cxIcon = GetSystemMetrics(SM_CXSMICON);
+ int cyIcon = GetSystemMetrics(SM_CYSMICON);
+
+ if (sd->active && !lstrcmp(sd->active, dat->filename)) {
+ DrawIconEx(lps->hDC, lps->rcItem.left, (lps->rcItem.top+lps->rcItem.bottom-cyIcon)/2,
+ LoadSkinnedIcon(SKINICON_OTHER_EMPTYBLOB),
+ cxIcon, cyIcon, 0, NULL, DI_NORMAL);
+ }
+ else {
+ DrawIconEx(lps->hDC, lps->rcItem.left, (lps->rcItem.top+lps->rcItem.bottom-cyIcon)/2,
+ LoadSkinnedIcon(SKINICON_OTHER_SMALLDOT),
+ cxIcon, cyIcon, 0, NULL, DI_NORMAL);
+ }
+ lps->rcItem.left += cxIcon;
+ lps->rcItem.left += 5;
+
+// SelectObject(lps->hDC, dat->hfntTitle);
+ SetTextColor(lps->hDC, clLine1);
+ DrawText(lps->hDC, dat->title, -1, &lps->rcItem, DT_LEFT|DT_NOPREFIX|DT_SINGLELINE|DT_END_ELLIPSIS|DT_TOP);
+ lps->rcItem.left += cxIcon;
+
+ SetTextColor(lps->hDC, clLine2);
+ DrawText(lps->hDC, dat->path, -1, &lps->rcItem, DT_LEFT|DT_NOPREFIX|DT_SINGLELINE|DT_PATH_ELLIPSIS|DT_BOTTOM);
+ }
+ else if (lps->CtlID == IDC_PREVIEW1) {
+ int idx = SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETCURSEL, 0, 0);
+
+ if (!sd->hbmpPreview) {
+ if (idx >= 0) {
+ TSkinListItem *dat = (TSkinListItem *)SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETITEMDATA, idx, 0);
+ CreatePreview(sd, dat->filename, lps);
+ //sttPreviewSkin(obj, dat->filename, lps);
+ }
+ else CreatePreview(sd, NULL, lps);
+ }
+
+ if (sd->hbmpPreview) {
+ HDC hdc = CreateCompatibleDC(lps->hDC);
+ SelectObject(hdc, sd->hbmpPreview);
+ BitBlt(lps->hDC,
+ lps->rcItem.left, lps->rcItem.top,
+ lps->rcItem.right - lps->rcItem.left, lps->rcItem.bottom - lps->rcItem.top,
+ hdc, 0, 0, SRCCOPY);
+ DeleteDC(hdc);
+ }
+ }
+
+ return TRUE;
+ }
+
+ case WM_DELETEITEM:
+ {
+ LPDELETEITEMSTRUCT lps = (LPDELETEITEMSTRUCT)lParam;
+ if (lps->CtlID != IDC_SKINLIST) break;
+ TSkinListItem *dat = (TSkinListItem *)lps->itemData;
+ if (dat) delete dat;
+ return FALSE;
+ }
+
+ case WM_DESTROY:
+ delete sd;
+ return FALSE;
+ }
+ return FALSE;
+}
diff --git a/plugins/ModernOpt/resource.h b/plugins/ModernOpt/resource.h new file mode 100644 index 0000000000..de4fbab2e0 --- /dev/null +++ b/plugins/ModernOpt/resource.h @@ -0,0 +1,36 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by resource.rc
+//
+
+#define IDD_MODERNOPT_EMPTY 206
+#define IDD_MODERNOPT 216
+#define IDD_MODERNOPT_HOME 219
+#define IDD_MODERNOPT_SKINS 220
+
+#define IDI_BIG_ADVANCED 308
+#define IDI_BIG_BUDDYLIST 309
+#define IDI_BIG_IGNORE 310
+#define IDI_BIG_MESSAGE 311
+#define IDI_BIG_MODULES 312
+#define IDI_BIG_NETWORK 313
+#define IDI_BIG_SKINS 314
+#define IDI_BIG_STATUS 315
+
+#define IDC_BTN_HELP 1001
+#define IDC_BTN_CLASSICOPT 1002
+#define IDC_BTN_ACCOUNTS 1004
+#define IDC_BTN_SKINS 1005
+#define IDC_BTN_CLIST 1006
+#define IDC_BTN_MESSAGING 1007
+#define IDC_BTN_IGNORE 1008
+#define IDC_BTN_STATUS 1009
+#define IDC_BTN_ADVANCED 1010
+#define IDC_BTN_PLUGINS 1011
+#define IDC_TV_SUBSECTIONS 1012
+#define IDC_ICOTABS 1013
+#define IDC_BTN_EXPERT 1015
+#define IDC_BTN_APPLY 1016
+#define IDC_TXT_DUMMY 1017
+#define IDC_SKINLIST 1029
+#define IDC_PREVIEW1 1030
diff --git a/plugins/ModernOpt/resource.rc b/plugins/ModernOpt/resource.rc new file mode 100644 index 0000000000..44ee23cf2b --- /dev/null +++ b/plugins/ModernOpt/resource.rc @@ -0,0 +1,111 @@ +// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <windows.h>
+#include <winres.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_MODERNOPT_SKINS DIALOGEX 0, 0, 260, 210
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LISTBOX IDC_SKINLIST,0,115,260,95,LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ CONTROL "",IDC_PREVIEW1,"Static",SS_OWNERDRAW,0,0,260,110
+END
+
+IDD_MODERNOPT_HOME DIALOGEX 0, 0, 368, 210
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ CONTROL "Visit official Miranda IM website",IDC_BTN_HELP,
+ "Hyperlink",WS_TABSTOP,15,180,338,9
+ CONTROL "Switch to classic options",IDC_BTN_CLASSICOPT,"Hyperlink",WS_TABSTOP,15,195,338,9
+ CONTROL "Custom1",IDC_BTN_ACCOUNTS,"MirandaDescButtonClass",0x0,15,0,160,41
+ CONTROL "Custom1",IDC_BTN_PLUGINS,"MirandaDescButtonClass",0x0,193,135,160,41
+ CONTROL "Custom1",IDC_BTN_IGNORE,"MirandaDescButtonClass",0x0,193,0,160,41
+ CONTROL "`",IDC_BTN_SKINS,"MirandaDescButtonClass",0x0,15,45,160,41
+ CONTROL "Custom1",IDC_BTN_STATUS,"MirandaDescButtonClass",0x0,193,45,160,41
+ CONTROL "Custom1",IDC_BTN_CLIST,"MirandaDescButtonClass",0x0,15,90,160,41
+ CONTROL "Custom1",IDC_BTN_ADVANCED,"MirandaDescButtonClass",0x0,193,90,160,41
+ CONTROL "Custom1",IDC_BTN_MESSAGING,"MirandaDescButtonClass",0x0,15,135,160,41
+END
+
+IDD_MODERNOPT_EMPTY DIALOGEX 0, 0, 369, 210
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CLIENTEDGE
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ LTEXT "Sample page",IDC_STATIC,8,7,121,14
+END
+
+IDD_MODERNOPT DIALOGEX 0, 0, 382, 286
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "Miranda IM Options"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ CONTROL "Use arrow keys to choose category",IDC_ICOTABS,"MirandaIcoTabClass",WS_TABSTOP,0,0,382,42
+ CONTROL "",IDC_TV_SUBSECTIONS,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_FULLROWSELECT | TVS_INFOTIP | WS_BORDER | WS_HSCROLL | WS_TABSTOP,7,50,103,210
+ CTEXT "Miranda IM Options",IDC_TXT_DUMMY,115,50,260,210,SS_CENTERIMAGE | NOT WS_VISIBLE | WS_BORDER
+ DEFPUSHBUTTON "OK",IDOK,215,265,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,271,265,50,14
+ PUSHBUTTON "Apply",IDC_BTN_APPLY,325,265,50,14,WS_DISABLED
+ CONTROL "View help online",IDC_BTN_HELP,"Hyperlink",WS_TABSTOP,7,269,118,9
+ PUSHBUTTON "Advanced",IDC_BTN_EXPERT,146,265,64,14,NOT WS_VISIBLE
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_BIG_ADVANCED ICON "res/big_advanced.ico"
+IDI_BIG_BUDDYLIST ICON "res/big_buddylist.ico"
+IDI_BIG_IGNORE ICON "res/big_ignore.ico"
+IDI_BIG_MESSAGE ICON "res/big_message.ico"
+IDI_BIG_MODULES ICON "res/big_modules.ico"
+IDI_BIG_NETWORK ICON "res/big_network.ico"
+IDI_BIG_SKINS ICON "res/big_skins.ico"
+IDI_BIG_STATUS ICON "res/big_status.ico"
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
|