diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-01-08 12:41:36 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-01-08 12:41:36 +0000 |
commit | 495135e81dfd63a86627a8b475aca10bc63aace2 (patch) | |
tree | 4ac4bb02399588ed2265b27aa98b7217372ecde7 /plugins | |
parent | 83e12b19441b510f6f65b9bca851bedc22570a23 (diff) |
IEView: ReloadOptions service
git-svn-id: http://svn.miranda-ng.org/main/trunk@16062 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/IEView/src/Options.cpp | 13 | ||||
-rw-r--r-- | plugins/IEView/src/Options.h | 1 | ||||
-rw-r--r-- | plugins/IEView/src/ieview_main.cpp | 1 | ||||
-rw-r--r-- | plugins/IEView/src/ieview_services.cpp | 8 | ||||
-rw-r--r-- | plugins/IEView/src/ieview_services.h | 1 |
5 files changed, 23 insertions, 1 deletions
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index 59dbde9186..d40902b863 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -469,7 +469,7 @@ static void MarkInitialized(int i) initialized |= i;
}
-static void ApplyChanges(int i)
+void ApplyChanges(int i)
{
changed &= ~i;
initialized &= ~i;
@@ -1747,3 +1747,14 @@ void Options::saveProtocolSettings() db_set_s(NULL, ieviewModuleName, dbsName, tmpPath);
}
}
+
+void Options::Reload()
+{
+ ProtocolSettings *p, *p1;
+ for (p = Options::protocolList; p != NULL; p = p1) {
+ p1 = p->getNext();
+ delete p;
+ }
+ isInited = false;
+ init();
+}
\ No newline at end of file diff --git a/plugins/IEView/src/Options.h b/plugins/IEView/src/Options.h index 8e626cb9b4..6fc9a1c27b 100644 --- a/plugins/IEView/src/Options.h +++ b/plugins/IEView/src/Options.h @@ -240,6 +240,7 @@ public: static void resetProtocolSettings();
static ProtocolSettings*getProtocolSettings();
static ProtocolSettings*getProtocolSettings(const char *protocolName);
+ static void Reload();
};
#endif
diff --git a/plugins/IEView/src/ieview_main.cpp b/plugins/IEView/src/ieview_main.cpp index b155b45129..852bc3ccaf 100644 --- a/plugins/IEView/src/ieview_main.cpp +++ b/plugins/IEView/src/ieview_main.cpp @@ -75,6 +75,7 @@ extern "C" int __declspec(dllexport) Load(void) CreateServiceFunction(MS_IEVIEW_WINDOW, HandleIEWindow);
CreateServiceFunction(MS_IEVIEW_EVENT, HandleIEEvent);
CreateServiceFunction(MS_IEVIEW_NAVIGATE, HandleIENavigate);
+ CreateServiceFunction("IEView/ReloadOptions", ReloadOptions);
hHookOptionsChanged = CreateHookableEvent(ME_IEVIEW_OPTIONSCHANGED);
return 0;
}
diff --git a/plugins/IEView/src/ieview_services.cpp b/plugins/IEView/src/ieview_services.cpp index 47dbc1a997..2b7fc6f8a6 100644 --- a/plugins/IEView/src/ieview_services.cpp +++ b/plugins/IEView/src/ieview_services.cpp @@ -103,3 +103,11 @@ INT_PTR HandleIENavigate(WPARAM, LPARAM lParam) }
return 0;
}
+
+void ApplyChanges(int i);
+
+INT_PTR ReloadOptions(WPARAM, LPARAM)
+{
+ Options::Reload();
+ return 0;
+}
\ No newline at end of file diff --git a/plugins/IEView/src/ieview_services.h b/plugins/IEView/src/ieview_services.h index 3ab3772a6a..fe3f42bd4a 100644 --- a/plugins/IEView/src/ieview_services.h +++ b/plugins/IEView/src/ieview_services.h @@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern INT_PTR HandleIEWindow(WPARAM wParam, LPARAM lParam);
extern INT_PTR HandleIEEvent(WPARAM wParam, LPARAM lParam);
extern INT_PTR HandleIENavigate(WPARAM wParam, LPARAM lParam);
+extern INT_PTR ReloadOptions(WPARAM, LPARAM);
#endif
|