summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-22 15:19:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-22 15:19:48 +0000
commit8b9b23f22332eeb056b00fb659e0e79838bc0527 (patch)
treeb2cdb529f2ca11962c8fde0f199cccdb8326d0b4 /plugins
parent7c06ec523d9ae5149f181b752c6ee340a9c18e17 (diff)
support for stored Expert Options flag
git-svn-id: http://svn.miranda-ng.org/main/trunk@2045 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ModernOpt/src/modernopt.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp
index 51a66fdac4..11c2bb2de1 100644
--- a/plugins/ModernOpt/src/modernopt.cpp
+++ b/plugins/ModernOpt/src/modernopt.cpp
@@ -93,7 +93,7 @@ typedef void (*ItemDestuctor)(void *);
static void ModernOptionsObject_Dtor(void *ptr)
{
- struct ModernOptionsObject *obj = (struct ModernOptionsObject *)ptr;
+ ModernOptionsObject *obj = (struct ModernOptionsObject *)ptr;
mir_free(obj->optObject.lptzSubsection);
mir_free(obj->optObject.iBoldControls);
@@ -101,11 +101,10 @@ static void ModernOptionsObject_Dtor(void *ptr)
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);
+ mir_free(obj->optObject.lpzThemeExtension);
+ mir_free(obj->optObject.lpzThemeModuleName);
- switch (obj->optObject.iType)
- {
+ switch (obj->optObject.iType) {
case MODERNOPT_TYPE_IGNOREOBJECT:
mir_free(obj->optObject.lpzIgnoreModule);
mir_free(obj->optObject.lpzIgnoreSetting);
@@ -113,7 +112,7 @@ static void ModernOptionsObject_Dtor(void *ptr)
}
if (obj->hwnd) DestroyWindow(obj->hwnd);
- mir_free(obj);
+ mir_free(obj);
}
static int ModernOptionsObject_Comparator(const ModernOptionsObject *ptr1, const ModernOptionsObject *ptr2)
@@ -247,10 +246,9 @@ static INT_PTR CALLBACK ModernOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
case IDC_BTN_CLASSICOPT:
PostMessage(hwndDlg, WM_CLOSE, 0, 0);
- DBWriteContactSettingByte(NULL, "Options", "Expert", 1);
+ db_set_b(NULL, "Options", "Expert", 1);
{
- OPENOPTIONSDIALOG ood = {0};
- ood.cbSize = sizeof(ood);
+ OPENOPTIONSDIALOG ood = { sizeof(ood) };
Options_Open(&ood);
}
break;
@@ -497,6 +495,11 @@ static INT_PTR svcModernOpt_Impl(WPARAM wParam, LPARAM lParam)
static INT_PTR svcModernOpt_Show(WPARAM wParam, LPARAM lParam)
{
+ if ( db_get_b(NULL, "Options", "Expert", 0)) {
+ OPENOPTIONSDIALOG ood = { sizeof(ood) };
+ return Options_Open(&ood);
+ }
+
g_iSectionRestore = 0;
return svcModernOpt_Impl(wParam, lParam);
}