diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 20:12:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 20:12:53 +0300 |
commit | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (patch) | |
tree | 96b0db981b4f5054f24d484902b597ba7da1c1a5 /plugins/MyDetails/src | |
parent | 9b35784c5042984fbb60785f0a4a41a64af545f6 (diff) |
end of ME_OPT_INITIALISE related zoo in another plugins
Diffstat (limited to 'plugins/MyDetails/src')
-rw-r--r-- | plugins/MyDetails/src/mydetails.cpp | 7 | ||||
-rw-r--r-- | plugins/MyDetails/src/options.cpp | 7 | ||||
-rw-r--r-- | plugins/MyDetails/src/options.h | 2 |
3 files changed, 5 insertions, 11 deletions
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp index bd4c42fd95..e493b38fdd 100644 --- a/plugins/MyDetails/src/mydetails.cpp +++ b/plugins/MyDetails/src/mydetails.cpp @@ -131,14 +131,15 @@ static int MainUninit(WPARAM, LPARAM) int CMPlugin::Load()
{
+ g_plugin.registerIcon(LPGEN("My details"), iconList);
+
// Hook event to load messages and show first one
HookEvent(ME_SYSTEM_MODULESLOADED, MainInit);
HookEvent(ME_SYSTEM_PRESHUTDOWN, MainUninit);
+ HookEvent(ME_OPT_INITIALISE, InitOptionsCallback);
// Options
- InitOptions();
-
- g_plugin.registerIcon(LPGEN("My details"), iconList);
+ LoadOptions();
// Register services
CreateServiceFunction(MS_MYDETAILS_SETMYNICKNAME, PluginCommand_SetMyNickname);
diff --git a/plugins/MyDetails/src/options.cpp b/plugins/MyDetails/src/options.cpp index e1cd488025..77b7c0dfb4 100644 --- a/plugins/MyDetails/src/options.cpp +++ b/plugins/MyDetails/src/options.cpp @@ -171,10 +171,3 @@ int InitOptionsCallback(WPARAM wParam, LPARAM) g_plugin.addOptions(wParam, &odp);
return 0;
}
-
-void InitOptions()
-{
- LoadOptions();
-
- HookEvent(ME_OPT_INITIALISE, InitOptionsCallback);
-}
diff --git a/plugins/MyDetails/src/options.h b/plugins/MyDetails/src/options.h index 5dce0b8677..38ef790687 100644 --- a/plugins/MyDetails/src/options.h +++ b/plugins/MyDetails/src/options.h @@ -70,7 +70,7 @@ extern Options opts; // Initializations needed by options
-void InitOptions();
+int InitOptionsCallback(WPARAM, LPARAM);
// Loads the options from DB
// It don't need to be called, except in some rare cases
|