summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-05-16 20:25:05 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-05-16 20:25:05 +0300
commit5e6a88f7497947aec3f8d66bc023725c75e814eb (patch)
treeaefb14053f19ef69ae1fe1f5767f725f1ff27efa /protocols
parent71f2771dab10825634e3aa3770d13f96ab46a483 (diff)
no need to keep separate file just for one variable
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Weather/src/stdafx.h2
-rw-r--r--protocols/Weather/src/weather.cpp19
-rw-r--r--protocols/Weather/src/weather_icons.cpp40
3 files changed, 17 insertions, 44 deletions
diff --git a/protocols/Weather/src/stdafx.h b/protocols/Weather/src/stdafx.h
index bd4cddffbe..9c540783ae 100644
--- a/protocols/Weather/src/stdafx.h
+++ b/protocols/Weather/src/stdafx.h
@@ -499,8 +499,6 @@ INT_PTR CALLBACK DlgProcINIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
int BriefInfo(WPARAM wParam, LPARAM lParam);
INT_PTR BriefInfoSvc(WPARAM wParam, LPARAM lParam);
-void InitIcons(void);
-
//============ Plugin Class ============
struct CMPlugin : public PLUGIN<CMPlugin>
diff --git a/protocols/Weather/src/weather.cpp b/protocols/Weather/src/weather.cpp
index 243156ef22..8d1f3e6a1e 100644
--- a/protocols/Weather/src/weather.cpp
+++ b/protocols/Weather/src/weather.cpp
@@ -139,13 +139,28 @@ int WeatherInit(WPARAM, LPARAM)
//============ MISC FUNCTIONS ============
+static IconItem iconList[] =
+{
+ { LPGEN("Protocol icon"), "main", IDI_ICON },
+ { LPGEN("Update Disabled"), "disabled", IDI_DISABLED },
+ { LPGEN("View Log"), "log", IDI_LOG },
+ { LPGEN("Update with Clear"), "update2", IDI_UPDATE2 },
+ { LPGEN("View Brief"), "brief", IDI_S },
+ { LPGEN("View Complete"), "read", IDI_READ },
+ { LPGEN("Weather Update"), "update", IDI_UPDATE },
+ { LPGEN("Weather Map"), "map", IDI_MAP },
+ { LPGEN("Popup"), "popup", IDI_POPUP },
+ { LPGEN("No Popup"), "nopopup", IDI_NOPOPUP },
+ { LPGEN("Edit Settings"), "edit", IDI_EDIT },
+};
+
int CMPlugin::Load()
{
+ g_plugin.registerIcon(MODULENAME, iconList, MODULENAME);
+
// load options and set defaults
LoadOptions();
- InitIcons();
-
// reset the weather data at startup for individual contacts
EraseAllInfo();
diff --git a/protocols/Weather/src/weather_icons.cpp b/protocols/Weather/src/weather_icons.cpp
deleted file mode 100644
index b869dbcdb2..0000000000
--- a/protocols/Weather/src/weather_icons.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-Weather Protocol plugin for Miranda IM
-Copyright (c) 2012 Miranda NG team
-Copyright (c) 2005-2011 Boris Krasnovskiy All Rights Reserved
-
-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; version 2
-of the License.
-
-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, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
-
-static IconItem iconList[] =
-{
- { LPGEN("Protocol icon"), "main", IDI_ICON },
- { LPGEN("Update Disabled"), "disabled", IDI_DISABLED },
- { LPGEN("View Log"), "log", IDI_LOG },
- { LPGEN("Update with Clear"), "update2", IDI_UPDATE2 },
- { LPGEN("View Brief"), "brief", IDI_S },
- { LPGEN("View Complete"), "read", IDI_READ },
- { LPGEN("Weather Update"), "update", IDI_UPDATE },
- { LPGEN("Weather Map"), "map", IDI_MAP },
- { LPGEN("Popup"), "popup", IDI_POPUP },
- { LPGEN("No Popup"), "nopopup", IDI_NOPOPUP },
- { LPGEN("Edit Settings"), "edit", IDI_EDIT },
-};
-
-void InitIcons(void)
-{
- g_plugin.registerIcon(MODULENAME, iconList, MODULENAME);
-}