summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/weather/proto_weather/proto_weather_10.vcxproj223
-rw-r--r--protocols/weather/proto_weather/proto_weather_9.vcproj68
-rw-r--r--protocols/weather/proto_weather/resource.rc76
-rw-r--r--protocols/weather/resource.h2
-rw-r--r--protocols/weather/resource.rc53
-rw-r--r--protocols/weather/weather.c8
-rw-r--r--protocols/weather/weather.h23
-rw-r--r--protocols/weather/weather_10.sln10
-rw-r--r--protocols/weather/weather_10.vcxproj2
-rw-r--r--protocols/weather/weather_conv.c53
-rw-r--r--protocols/weather/weather_data.c7
-rw-r--r--protocols/weather/weather_mwin.c4
-rw-r--r--protocols/weather/weather_opt.c82
-rw-r--r--protocols/weather/weather_userinfo.c2
14 files changed, 426 insertions, 187 deletions
diff --git a/protocols/weather/proto_weather/proto_weather_10.vcxproj b/protocols/weather/proto_weather/proto_weather_10.vcxproj
new file mode 100644
index 0000000000..408b20b82a
--- /dev/null
+++ b/protocols/weather/proto_weather/proto_weather_10.vcxproj
@@ -0,0 +1,223 @@
+<?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>Proto_Weather</ProjectName>
+ <ProjectGuid>{B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}</ProjectGuid>
+ <RootNamespace>proto_weather</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>NotSet</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>NotSet</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.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\Obj\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\Obj\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration)64\Obj\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IgnoreImportLibrary>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration)64\Obj\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</IgnoreImportLibrary>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</GenerateManifest>
+ <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'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PROTO_WEATHER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <ProjectReference>
+ <LinkLibraryDependencies>false</LinkLibraryDependencies>
+ </ProjectReference>
+ <Link>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <ProgramDatabaseFile>
+ </ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <NoEntryPoint>true</NoEntryPoint>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>
+ </ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PROTO_WEATHER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <NoEntryPoint>true</NoEntryPoint>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>
+ </ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;PROTO_WEATHER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <ProjectReference>
+ <LinkLibraryDependencies>false</LinkLibraryDependencies>
+ </ProjectReference>
+ <Link>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)proto_weather.pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <NoEntryPoint>true</NoEntryPoint>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PROTO_WEATHER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <NoEntryPoint>true</NoEntryPoint>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>
+ </ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="wicons\Cloud.ico" />
+ <None Include="wicons\FOG.ico" />
+ <None Include="wicons\LIGHT.ICO" />
+ <None Include="wicons\NA.ico" />
+ <None Include="wicons\PCLOUDY.ico" />
+ <None Include="wicons\RAIN.ico" />
+ <None Include="wicons\RSHOWER.ico" />
+ <None Include="wicons\SNOW.ICO" />
+ <None Include="wicons\SSHOWER.ico" />
+ <None Include="wicons\SUN.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/protocols/weather/proto_weather/proto_weather_9.vcproj b/protocols/weather/proto_weather/proto_weather_9.vcproj
index fbf137c71c..4ddb33d5a1 100644
--- a/protocols/weather/proto_weather/proto_weather_9.vcproj
+++ b/protocols/weather/proto_weather/proto_weather_9.vcproj
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9.00"
- Name="proto_weather"
+ Version="9,00"
+ Name="Proto_Weather"
ProjectGUID="{B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}"
RootNamespace="proto_weather"
Keyword="Win32Proj"
@@ -21,8 +21,8 @@
<Configurations>
<Configuration
Name="Debug|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\Obj"
+ OutputDirectory="../../../../Files/Debug/Icons"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="0"
@@ -67,17 +67,13 @@
Name="VCLinkerTool"
IgnoreImportLibrary="true"
LinkLibraryDependencies="false"
- OutputFile="$(OutDir)/proto_weather.dll"
- LinkIncremental="2"
- GenerateManifest="false"
IgnoreAllDefaultLibraries="true"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/proto_weather.pdb"
+ ProgramDatabaseFile=""
SubSystem="2"
ResourceOnlyDLL="true"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
- ImportLibrary="$(OutDir)/proto_weather.lib"
+ ImportLibrary=""
TargetMachine="1"
/>
<Tool
@@ -103,12 +99,12 @@
/>
</Configuration>
<Configuration
- Name="Debug|x64"
- OutputDirectory="$(ConfigurationName)64"
- IntermediateDirectory="$(ConfigurationName)64\Obj"
+ Name="Release|Win32"
+ OutputDirectory="../../../../Files/Release/Icons"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="0"
+ CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
@@ -124,15 +120,11 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PROTO_WEATHER_EXPORTS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PROTO_WEATHER_EXPORTS"
+ RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@@ -150,17 +142,15 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
- LinkLibraryDependencies="false"
- OutputFile="$(OutDir)/proto_weather.dll"
- GenerateManifest="false"
IgnoreAllDefaultLibraries="true"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/proto_weather.pdb"
+ SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ResourceOnlyDLL="true"
RandomizedBaseAddress="1"
- TargetMachine="17"
+ DataExecutionPrevention="0"
+ ImportLibrary=""
+ TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
@@ -185,12 +175,12 @@
/>
</Configuration>
<Configuration
- Name="Release|Win32"
- OutputDirectory="$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)\Obj"
+ Name="Debug|x64"
+ OutputDirectory="$(ConfigurationName)64"
+ IntermediateDirectory="$(ConfigurationName)64\Obj"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
+ CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
@@ -206,11 +196,15 @@
/>
<Tool
Name="VCMIDLTool"
+ TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;PROTO_WEATHER_EXPORTS"
- RuntimeLibrary="0"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PROTO_WEATHER_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@@ -228,19 +222,17 @@
<Tool
Name="VCLinkerTool"
IgnoreImportLibrary="true"
+ LinkLibraryDependencies="false"
OutputFile="$(OutDir)/proto_weather.dll"
- LinkIncremental="1"
GenerateManifest="false"
IgnoreAllDefaultLibraries="true"
- GenerateDebugInformation="false"
- SubSystem="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/proto_weather.pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ResourceOnlyDLL="true"
RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- ImportLibrary=""
- TargetMachine="1"
+ TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
diff --git a/protocols/weather/proto_weather/resource.rc b/protocols/weather/proto_weather/resource.rc
index 09a6fb0cb9..930886b96f 100644
--- a/protocols/weather/proto_weather/resource.rc
+++ b/protocols/weather/proto_weather/resource.rc
@@ -1,23 +1,21 @@
-// Microsoft Visual C++ generated resource script.
+//Microsoft Developer Studio 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
/////////////////////////////////////////////////////////////////////////////
-// Neutral resources
+// English (U.S.) resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
@@ -28,54 +26,16 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_ONLINE ICON "wicons\\SUN.ico"
-IDI_OFFLINE ICON "wicons\\NA.ico"
-IDI_AWAY ICON "wicons\\PCLOUDY.ico"
-IDI_DND ICON "wicons\\RSHOWER.ico"
-IDI_INVISIBLE ICON "wicons\\LIGHT.ico"
-IDI_OCCUPIED ICON "wicons\\RAIN.ico"
-IDI_FREE4CHAT ICON "wicons\\SNOW.ico"
-IDI_NA ICON "wicons\\CLOUD.ico"
-IDI_ONTHEPHONE ICON "wicons\\SSHOWER.ico"
-IDI_OUTTOLUNCH ICON "wicons\\FOG.ico"
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include <windows.h>\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // Neutral resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+104 ICON DISCARDABLE "wicons\\SUN.ico"
+105 ICON DISCARDABLE "wicons\\NA.ico"
+128 ICON DISCARDABLE "wicons\\PCLOUDY.ico"
+129 ICON DISCARDABLE "wicons\\RSHOWER.ico"
+130 ICON DISCARDABLE "wicons\\LIGHT.ico"
+131 ICON DISCARDABLE "wicons\\RAIN.ico"
+158 ICON DISCARDABLE "wicons\\SNOW.ico"
+159 ICON DISCARDABLE "wicons\\CLOUD.ico"
+1002 ICON DISCARDABLE "wicons\\SSHOWER.ico"
+1003 ICON DISCARDABLE "wicons\\FOG.ico"
+
+#endif // English (U.S.) resources
+///////////////////////////////////////////////////////////////////////////// \ No newline at end of file
diff --git a/protocols/weather/resource.h b/protocols/weather/resource.h
index a897f2f313..e88e4c19de 100644
--- a/protocols/weather/resource.h
+++ b/protocols/weather/resource.h
@@ -143,6 +143,8 @@
#define IDC_AVATARSPIN 2124
#define IDC_SEARCHCITY 2125
#define IDC_HEADERBAR 2126
+#define IDC_E1 2128
+#define IDC_E2 2129
#define OIC_HAND 32513
#define OIC_QUES 32514
#define OIC_BANG 32515
diff --git a/protocols/weather/resource.rc b/protocols/weather/resource.rc
index 4cac31dfe1..79854b8c84 100644
--- a/protocols/weather/resource.rc
+++ b/protocols/weather/resource.rc
@@ -39,7 +39,7 @@ BEGIN
DEFPUSHBUTTON "Close",IDCANCEL,184,213,48,13
END
-IDD_OPTIONS DIALOGEX 0, 0, 306, 212
+IDD_OPTIONS DIALOGEX 0, 0, 306, 222
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
@@ -49,7 +49,7 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,10,219,8
CONTROL "Update weather information every",IDC_UPDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,19,206,8
EDITTEXT IDC_UPDATETIME,231,15,21,12,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE
- LTEXT "minutes",IDC_STATIC,257,16,45,9
+ LTEXT "minutes",IDC_STATIC,257,16,43,9
CONTROL "Consider weather info updated only when condition and temperature are changed",IDC_UPDCONDCHG,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,28,282,8
CONTROL "Remove old data when updating",IDC_REMOVEOLD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,38,282,8
@@ -60,7 +60,7 @@ BEGIN
CONTROL "Use weather condition as protocol status",IDC_PROTOCOND,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,81,278,8
CONTROL "Avatar only mode",IDC_DISCONDICON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,91,278,8
- GROUPBOX "Units",IDC_STATIC,3,107,299,70,WS_GROUP
+ GROUPBOX "Units",IDC_STATIC,3,107,299,80,WS_GROUP
LTEXT "Temperature",IDC_STATIC,8,116,53,8
CONTROL "Celsius",IDC_T1,"Button",BS_AUTORADIOBUTTON,65,116,40,8
CONTROL "Fahrenheit",IDC_T2,"Button",BS_AUTORADIOBUTTON,120,116,47,8
@@ -83,12 +83,15 @@ BEGIN
CONTROL "No change",IDC_D1,"Button",BS_AUTORADIOBUTTON,65,153,52,8
CONTROL "2 chars",IDC_D2,"Button",BS_AUTORADIOBUTTON,120,153,56,8
CONTROL "3 chars",IDC_D3,"Button",BS_AUTORADIOBUTTON,176,153,56,8
- CONTROL "Do not append units to values",IDC_DONOTAPPUNITS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,164,144,8
- CONTROL "Do not display fractional values",IDC_NOFRAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,155,165,146,8
- GROUPBOX "Frame",IDC_STATIC,3,177,300,29
- EDITTEXT IDC_AVATARSIZE,11,187,29,14,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE
- CONTROL "",IDC_AVATARSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,28,187,11,14
- LTEXT "Avatar size",IDC_STATIC,42,190,85,9
+ LTEXT "Elevation",IDC_STATIC,8,163,53,8
+ CONTROL "ft",IDC_E1,"Button",BS_AUTORADIOBUTTON,65,163,34,8
+ CONTROL "m",IDC_E2,"Button",BS_AUTORADIOBUTTON,120,163,34,8
+ CONTROL "Do not append units to values",IDC_DONOTAPPUNITS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,174,144,8
+ CONTROL "Do not display fractional values",IDC_NOFRAC,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,155,174,146,8
+ GROUPBOX "Frame",IDC_STATIC,3,187,300,29
+ EDITTEXT IDC_AVATARSIZE,11,197,29,14,ES_AUTOHSCROLL | ES_NUMBER | NOT WS_BORDER,WS_EX_CLIENTEDGE | WS_EX_STATICEDGE
+ CONTROL "",IDC_AVATARSPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,28,197,11,14
+ LTEXT "Avatar size",IDC_STATIC,42,200,85,9
END
IDD_EDIT DIALOGEX 0, 0, 241, 226
@@ -172,26 +175,26 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- CONTROL "Contact List",IDC_TM1,"MButtonClass",WS_TABSTOP | 0x100,2,9,58,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
- EDITTEXT IDC_CTEXT,64,8,139,12,ES_AUTOHSCROLL
- CONTROL "Brief Info Title",IDC_TM2,"MButtonClass",WS_TABSTOP,2,41,58,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
- EDITTEXT IDC_BTITLE,64,40,139,12,ES_AUTOHSCROLL
- CONTROL "Brief Info",IDC_TM3,"MButtonClass",WS_TABSTOP,2,55,58,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
- EDITTEXT IDC_BTEXT,64,54,139,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
- CONTROL "Note Text",IDC_TM4,"MButtonClass",WS_TABSTOP,2,101,58,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
- EDITTEXT IDC_NTEXT,64,100,139,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
- CONTROL "Extra Text",IDC_TM5,"MButtonClass",WS_TABSTOP,2,147,58,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
- EDITTEXT IDC_XTEXT,64,146,139,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
- CONTROL "External Log",IDC_TM6,"MButtonClass",WS_TABSTOP,2,193,58,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
- EDITTEXT IDC_ETEXT,64,192,139,12,ES_AUTOHSCROLL
- CONTROL "History Log",IDC_TM7,"MButtonClass",WS_TABSTOP,2,208,58,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
- EDITTEXT IDC_HTEXT,64,207,139,12,ES_AUTOHSCROLL
+ CONTROL "Contact List",IDC_TM1,"MButtonClass",WS_TABSTOP | 0x100,2,9,77,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
+ EDITTEXT IDC_CTEXT,80,8,124,12,ES_AUTOHSCROLL
+ CONTROL "Brief Info Title",IDC_TM2,"MButtonClass",WS_TABSTOP,2,41,77,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
+ EDITTEXT IDC_BTITLE,80,40,124,12,ES_AUTOHSCROLL
+ CONTROL "Brief Info",IDC_TM3,"MButtonClass",WS_TABSTOP,2,55,77,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
+ EDITTEXT IDC_BTEXT,80,54,124,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
+ CONTROL "Note Text",IDC_TM4,"MButtonClass",WS_TABSTOP,2,101,77,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
+ EDITTEXT IDC_NTEXT,80,100,124,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
+ CONTROL "Extra Text",IDC_TM5,"MButtonClass",WS_TABSTOP,2,147,77,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
+ EDITTEXT IDC_XTEXT,80,146,124,44,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
+ CONTROL "External Log",IDC_TM6,"MButtonClass",WS_TABSTOP,2,193,77,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
+ EDITTEXT IDC_ETEXT,80,192,124,12,ES_AUTOHSCROLL
+ CONTROL "History Log",IDC_TM7,"MButtonClass",WS_TABSTOP,2,208,77,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
+ EDITTEXT IDC_HTEXT,80,207,124,12,ES_AUTOHSCROLL
GROUPBOX "Variable List",IDC_STATIC,206,4,99,198
LTEXT "",IDC_VARLIST,213,15,86,158
CONTROL "More Variables",IDC_MORE,"MButtonClass",WS_TABSTOP,214,188,76,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
CONTROL "Reset",IDC_RESET,"MButtonClass",WS_TABSTOP,222,208,61,12,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
- EDITTEXT IDC_BTITLE2,64,24,139,12,ES_AUTOHSCROLL
- CONTROL "Status Message",IDC_TM8,"MButtonClass",WS_TABSTOP | 0x100,2,25,58,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
+ EDITTEXT IDC_BTITLE2,80,24,124,12,ES_AUTOHSCROLL
+ CONTROL "Status Message",IDC_TM8,"MButtonClass",WS_TABSTOP | 0x100,2,25,77,9,WS_EX_WINDOWEDGE | WS_EX_NOACTIVATE | 0x10000000L
END
IDD_USERINFO DIALOGEX 0, 0, 222, 132
diff --git a/protocols/weather/weather.c b/protocols/weather/weather.c
index 42505e11c1..f2ac4a8e7d 100644
--- a/protocols/weather/weather.c
+++ b/protocols/weather/weather.c
@@ -69,12 +69,12 @@ static const PLUGININFOEX pluginInfoEx =
{
sizeof(PLUGININFOEX),
#ifdef _WIN64
- "Weather Protocol x64",
+ "Weather Protocol x64 Mataes Release",
#else
- "Weather Protocol",
+ "Weather Protocol Mataes Release",
#endif
__VERSION_DWORD,
- "Retrieve weather information and display them in your contact list",
+ "Retrieve weather information and display them in your contact list. Mod for Mataes Pack.",
AUTH,
"borkra@miranda-im.org",
"(c) 2002-2005 NoName, 2005-2010 Boris Krasnovskiy",
@@ -281,7 +281,7 @@ int __declspec(dllexport) Load(PLUGINLINK *link)
hUpdateMutex = CreateMutex(NULL, FALSE, NULL);
// register weather protocol
- pd.cbSize = sizeof(pd);
+ pd.cbSize = PROTOCOLDESCRIPTOR_V3_SIZE;
pd.szName = WEATHERPROTONAME;
pd.type = PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
diff --git a/protocols/weather/weather.h b/protocols/weather/weather.h
index f2459849f0..46c5ec6bae 100644
--- a/protocols/weather/weather.h
+++ b/protocols/weather/weather.h
@@ -37,8 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <win2k.h>
-#define MIRANDA_VER 0x0700
-#define MIRANDA_CUSTOM_LP
+#define MIRANDA_VER 0x0A00
#include <newpluginapi.h>
#include <m_system.h>
@@ -155,15 +154,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 505 HTTP Version Not Supported
// defaults constants
-#define C_DEFAULT Translate("%n [%t, %c]")
-#define N_DEFAULT Translate("%c\nTemperature: %t\nFeel-Like: %f\nPressure: %p\nWind: %i %w\nHumidity: %m\nDew Point: %e\nVisibility: %v\n\nSun Rise: %r\nSun Set: %y\n\n5 Days Forecast:\n%[Forecast Day 1]\n%[Forecast Day 2]\n%[Forecast Day 3]\n%[Forecast Day 4]\n%[Forecast Day 5]")
-#define B_DEFAULT Translate("Feel-Like: %f\nPressure: %p\nWind: %i %w\nHumidity: %m\nDew Point: %e\nVisibility: %v\n\nSun Rise: %r\nSun Set: %y\n\n5 Days Forecast:\n%[Forecast Day 1]\n%[Forecast Day 2]\n%[Forecast Day 3]\n%[Forecast Day 4]\n%[Forecast Day 5]")
-#define b_DEFAULT Translate("Weather Condition for %n as of %u")
+#define C_DEFAULT "%n"
+#define N_DEFAULT ""
+#define B_DEFAULT "Max/Min: %[Max]/%[Min]\r\nCondition: %[Condition]\r\nTemperature: %[Temperature]\r\nPressure: %[Pressure] (%[Pressure Change])\r\nWind: %[Wind Direction], %[Wind Speed]\r\nHumidity: %[Humidity]\r\nVisibility: %[Visibility]\r\nDew Point: %[Dewpoint]\r\nUV Index: %[UV Index]\r\nMoon: %[Moon]\r\nCoordinates: Latitude: %[Latitude] Longitude: %[Longitude]\r\n\r\nSunrise: %[Sunrise]\r\nSunset: %[Sunset]\r\nDay Length: %[Day Length]\r\n\r\n5 Days Forecast:\r\n%[Forecast Day 1]\r\n%[Forecast Day 2]\r\n%[Forecast Day 3]\r\n%[Forecast Day 4]\r\n%[Forecast Day 5]"
+#define b_DEFAULT "Weather Condition for %n as of %u"
#define X_DEFAULT N_DEFAULT
-#define H_DEFAULT Translate("%c, %t (feel-like %f) Wind: %i %w Humidity: %m")
-#define E_DEFAULT Translate("%n at %u: %c, %t (feel-like %f) Wind: %i %w Humidity: %m")
-#define P_DEFAULT Translate("%n (%u)")
-#define p_DEFAULT Translate("%c, %t\nToday: High %h, Low %l")
+#define H_DEFAULT ""
+#define E_DEFAULT ""
+#define P_DEFAULT "Weather Condition for %n as of %u"
+#define p_DEFAULT "Condition: %[Condition]\r\nTemperature: %[Temperature]\r\nPressure: %[Pressure] (%[Pressure Change])\r\nWind: %[Wind Direction], %[Wind Speed]\r\nHumidity: %[Humidity]\r\nVisibility: %[Visibility]\r\nUV Index: %[UV Index]"
+#define s_DEFAULT "Temperature: %[Temperature]"
//============ OPTION STRUCT ============
@@ -187,6 +187,7 @@ typedef struct {
WORD vUnit;
WORD pUnit;
WORD dUnit;
+ WORD eUnit;
char DegreeSign[4];
BOOL DoNotAppendUnit;
BOOL NoFrac;
@@ -408,9 +409,9 @@ void GetTemp(char *tempchar, char *unit, char *str);
void GetSpeed(char *tempchar, char *unit, char *str);
void GetPressure(char *tempchar, char *unit, char *str);
void GetDist(char *tempchar, char *unit, char *str);
+void GetElev(char *tempchar, char *unit, char *str);
WORD GetIcon(const char* cond, WIDATA *Data);
-void FixStr(const char *orig, char* str);
void CaseConv(char *str);
void TrimString(char *str);
void ConvertBackslashes(char *str);
diff --git a/protocols/weather/weather_10.sln b/protocols/weather/weather_10.sln
index 038ac8b9a7..d9a98c21a2 100644
--- a/protocols/weather/weather_10.sln
+++ b/protocols/weather/weather_10.sln
@@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Weather", "weather_10.vcxproj", "{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Weather", "proto_weather\proto_weather_10.vcxproj", "{B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -19,6 +21,14 @@ Global
{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.Build.0 = Release|Win32
{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.ActiveCfg = Release|x64
{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.Build.0 = Release|x64
+ {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|Win32.Build.0 = Debug|Win32
+ {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.ActiveCfg = Debug|x64
+ {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Debug|x64.Build.0 = Debug|x64
+ {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.ActiveCfg = Release|Win32
+ {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|Win32.Build.0 = Release|Win32
+ {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.ActiveCfg = Release|x64
+ {B2F4BA6C-1BD6-4A50-A706-DCBC6A5D439B}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/protocols/weather/weather_10.vcxproj b/protocols/weather/weather_10.vcxproj
index 23339b8aaa..64ea807e1a 100644
--- a/protocols/weather/weather_10.vcxproj
+++ b/protocols/weather/weather_10.vcxproj
@@ -21,7 +21,7 @@
<PropertyGroup Label="Globals">
<ProjectName>Weather</ProjectName>
<ProjectGuid>{6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}</ProjectGuid>
- <RootNamespace>Weather</RootNamespace>
+ <RootNamespace>weather</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
diff --git a/protocols/weather/weather_conv.c b/protocols/weather/weather_conv.c
index 82e86a7765..23554d4d5f 100644
--- a/protocols/weather/weather_conv.c
+++ b/protocols/weather/weather_conv.c
@@ -279,6 +279,47 @@ void GetDist(char *tempchar, char *unit, char *str)
}
}
+// elevation conversion
+// tempchar = the string containing the elevation value
+// unit = the unit for elevation
+// return value = the converted elevation with unit; if fail, return original string
+void GetElev(char *tempchar, char *unit, char *str)
+{
+ // unit can be ft, m
+ double tempunit = 0, output;
+ int intunit;
+
+ // convert the string to a floating point number (always positive)
+ // if it end up with 0, then it's not a number, return the original string and quit
+ output = atof(tempchar);
+ if (output == 0)
+ {
+ strcpy(str, tempchar);
+ return;
+ }
+
+ // convert all to m first
+ if (!_stricmp(unit, "M"))
+ tempunit = (double)output;
+ else if (!_stricmp(unit, "FT"))
+ tempunit = (double)output / 3.28;
+
+ // convert to apporiate unit
+ switch (opt.eUnit) {
+ case 1:
+ intunit = (int)((tempunit*10 * 3.28) + 0.5);
+ wsprintf(str, "%i.%i %s", intunit/10, intunit%10, opt.DoNotAppendUnit ? "" : Translate("ft"));
+ break;
+ case 2:
+ intunit = (int)((tempunit*10) + 0.5);
+ wsprintf(str, "%i.%i %s", intunit/10, intunit%10, opt.DoNotAppendUnit ? "" : Translate("m"));
+ break;
+ default:
+ strcpy(str, tempchar);
+ break;
+ }
+}
+
//============ CONDITION ICON ASSIGNMENT ============
// assign the contact icon (status) from the condition string
@@ -409,18 +450,6 @@ WORD GetIcon(const char* cond, WIDATA *Data)
//============ STRING CONVERSIONS ============
-// language pack can't translate str with /r; text box can't display properly for str without /r
-void FixStr(const char *orig, char* str)
-{
- size_t i, ci = 0, li = strlen(orig);
- for (i = 0; i < li; i++)
- {
- if (orig[i] == '\n') str[ci++] = '\r';
- str[ci++] = orig[i];
- }
- str[ci] = 0;
-}
-
// this function convert the string to the format with 1 upper case followed by lower case char
void CaseConv(char *str)
{
diff --git a/protocols/weather/weather_data.c b/protocols/weather/weather_data.c
index 52c681fb6b..86f051199f 100644
--- a/protocols/weather/weather_data.c
+++ b/protocols/weather/weather_data.c
@@ -277,6 +277,13 @@ void ConvertDataValue(WIDATAITEM *UpdateData, char *Data)
GetDist(Data, UpdateData->Unit, str);
strcpy(Data, str);
}
+ // elevation
+ else if (!strcmp(UpdateData->Name, "Elevation") || !_stricmp(UpdateData->Unit, "FT") ||
+ !_stricmp(UpdateData->Unit, "M"))
+ {
+ GetElev(Data, UpdateData->Unit, str);
+ strcpy(Data, str);
+ }
// converting case for condition to the upper+lower format
else if (!_stricmp(UpdateData->Unit, "COND"))
CaseConv(Data);
diff --git a/protocols/weather/weather_mwin.c b/protocols/weather/weather_mwin.c
index ce41e80d17..0f534fdf19 100644
--- a/protocols/weather/weather_mwin.c
+++ b/protocols/weather/weather_mwin.c
@@ -399,11 +399,11 @@ void InitMwin(void)
strcpy(fontid.prefix, "fnt0");
hdc = GetDC(NULL);
- fontid.deffontsettings.size = -MulDiv(8, GetDeviceCaps(hdc, LOGPIXELSY), 72);;
+ fontid.deffontsettings.size = -13;
ReleaseDC(0, hdc);
fontid.deffontsettings.charset = DEFAULT_CHARSET;
- strcpy(fontid.deffontsettings.szFace, "Tahoma");
+ strcpy(fontid.deffontsettings.szFace, "Verdana");
strcpy(fontid.backgroundGroup, WEATHERPROTONAME);
strcpy(fontid.backgroundName, "Frame Background");
diff --git a/protocols/weather/weather_opt.c b/protocols/weather/weather_opt.c
index 1bc19d0a1a..59419edf1b 100644
--- a/protocols/weather/weather_opt.c
+++ b/protocols/weather/weather_opt.c
@@ -36,51 +36,54 @@ void SetTextDefault(const char* in)
if (strchr(in, 'C') != NULL)
{
- FixStr(C_DEFAULT, str);
- wSetData(&opt.cText, str);
+ strcpy(str, C_DEFAULT);
+ wSetData(&opt.cText, Translate(str));
}
if (strchr(in, 'b') != NULL)
{
- FixStr(b_DEFAULT, str);
- wSetData(&opt.bTitle, str);
+ strcpy(str, b_DEFAULT);
+ wSetData(&opt.bTitle, Translate(str));
}
if (strchr(in, 'B') != NULL)
{
- FixStr(B_DEFAULT, str);
- wSetData(&opt.bText, str);
+ strcpy(str, B_DEFAULT);
+ wSetData(&opt.bText, Translate(str));
}
if (strchr(in, 'N') != NULL)
{
- FixStr(N_DEFAULT, str);
- wSetData(&opt.nText, str);
+ strcpy(str, N_DEFAULT);
+ wSetData(&opt.nText, Translate(str));
}
if (strchr(in, 'E') != NULL)
{
- FixStr(E_DEFAULT, str);
- wSetData(&opt.eText, str);
+ strcpy(str, E_DEFAULT);
+ wSetData(&opt.eText, Translate(str));
}
if (strchr(in, 'H') != NULL)
{
- FixStr(H_DEFAULT, str);
- wSetData(&opt.hText, str);
+ strcpy(str, H_DEFAULT);
+ wSetData(&opt.hText, Translate(str));
}
if (strchr(in, 'X') != NULL)
{
- FixStr(X_DEFAULT, str);
- wSetData(&opt.xText, str);
+ strcpy(str, X_DEFAULT);
+ wSetData(&opt.xText, Translate(str));
}
if (strchr(in, 'P') != NULL)
{
- FixStr(P_DEFAULT, str);
- wSetData(&opt.pTitle, str);
+ strcpy(str, P_DEFAULT);
+ wSetData(&opt.pTitle, Translate(str));
}
if (strchr(in, 'p') != NULL)
{
- FixStr(p_DEFAULT, str);
- wSetData(&opt.pText, str);
+ strcpy(str, p_DEFAULT);
+ wSetData(&opt.pText, Translate(str));
}
if (strchr(in, 'S') != NULL)
- wSetData(&opt.sText, "");
+ {
+ strcpy(str, s_DEFAULT);
+ wSetData(&opt.sText, Translate(str));
+ }
}
void DestroyOptions(void)
@@ -106,21 +109,22 @@ void LoadOptions(void)
// main options
opt.StartupUpdate = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"StartupUpdate",TRUE);
opt.AutoUpdate = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"AutoUpdate",TRUE);
- opt.UpdateTime = (WORD)DBGetContactSettingWord(NULL,WEATHERPROTONAME,"UpdateTime",20);
+ opt.UpdateTime = (WORD)DBGetContactSettingWord(NULL,WEATHERPROTONAME,"UpdateTime",30);
opt.NewBrowserWin = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"NewWindow",TRUE);
- opt.NoProtoCondition = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"NoStatus",TRUE);
+ opt.NoProtoCondition = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"NoStatus",0);
opt.UpdateOnlyConditionChanged = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"CondChangeAsUpdate",TRUE);
opt.RemoveOldData = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"RemoveOld",FALSE);
opt.MakeItalic = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"MakeItalic",TRUE);
- opt.AvatarSize = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"AvatarSize", 32);
+ opt.AvatarSize = DBGetContactSettingByte(NULL,WEATHERPROTONAME,"AvatarSize", 128);
// units
opt.tUnit = (WORD)DBGetContactSettingWord(NULL, WEATHERPROTONAME, "tUnit", 1);
- opt.wUnit = (WORD)DBGetContactSettingWord(NULL, WEATHERPROTONAME, "wUnit", 1);
+ opt.wUnit = (WORD)DBGetContactSettingWord(NULL, WEATHERPROTONAME, "wUnit", 2);
opt.vUnit = (WORD)DBGetContactSettingWord(NULL, WEATHERPROTONAME, "vUnit", 1);
- opt.pUnit = (WORD)DBGetContactSettingWord(NULL, WEATHERPROTONAME, "pUnit", 1);
+ opt.pUnit = (WORD)DBGetContactSettingWord(NULL, WEATHERPROTONAME, "pUnit", 4);
opt.dUnit = (WORD)DBGetContactSettingWord(NULL, WEATHERPROTONAME, "dUnit", 1);
+ opt.eUnit = (WORD)DBGetContactSettingWord(NULL, WEATHERPROTONAME, "eUnit", 2);
if (DBGetContactSettingString(NULL,WEATHERPROTONAME,"DegreeSign",&dbv))
- FixStr(Translate(""), opt.DegreeSign);
+ strcpy(opt.DegreeSign, "");
else
{
strcpy(opt.DegreeSign, dbv.pszVal);
@@ -133,56 +137,56 @@ void LoadOptions(void)
SetTextDefault("C");
else
{
- wSetData(&opt.cText, dbv.pszVal);
+ wSetData(&opt.cText, Translate(dbv.pszVal));
DBFreeVariant(&dbv);
}
if (DBGetContactSettingString(NULL,WEATHERPROTONAME,"BriefTextTitle",&dbv))
SetTextDefault("b");
else
{
- wSetData(&opt.bTitle, dbv.pszVal);
+ wSetData(&opt.bTitle, Translate(dbv.pszVal));
DBFreeVariant(&dbv);
}
if (DBGetContactSettingString(NULL,WEATHERPROTONAME,"BriefText",&dbv))
SetTextDefault("B");
else
{
- wSetData(&opt.bText, dbv.pszVal);
+ wSetData(&opt.bText, Translate(dbv.pszVal));
DBFreeVariant(&dbv);
}
if (DBGetContactSettingString(NULL,WEATHERPROTONAME,"NoteText",&dbv))
SetTextDefault("N");
else
{
- wSetData(&opt.nText, dbv.pszVal);
+ wSetData(&opt.nText, Translate(dbv.pszVal));
DBFreeVariant(&dbv);
}
if (DBGetContactSettingString(NULL,WEATHERPROTONAME,"ExtText",&dbv))
SetTextDefault("E");
else
{
- wSetData(&opt.eText, dbv.pszVal);
+ wSetData(&opt.eText, Translate(dbv.pszVal));
DBFreeVariant(&dbv);
}
if (DBGetContactSettingString(NULL,WEATHERPROTONAME,"HistoryText",&dbv))
SetTextDefault("H");
else
{
- wSetData(&opt.hText, dbv.pszVal);
+ wSetData(&opt.hText, Translate(dbv.pszVal));
DBFreeVariant(&dbv);
}
if (DBGetContactSettingString(NULL,WEATHERPROTONAME,"ExtraText",&dbv))
SetTextDefault("X");
else
{
- wSetData(&opt.xText, dbv.pszVal);
+ wSetData(&opt.xText, Translate(dbv.pszVal));
DBFreeVariant(&dbv);
}
if (DBGetContactSettingString(NULL,WEATHERPROTONAME,"StatusText",&dbv))
SetTextDefault("S");
else
{
- wSetData(&opt.sText, dbv.pszVal);
+ wSetData(&opt.sText, Translate(dbv.pszVal));
DBFreeVariant(&dbv);
}
@@ -199,7 +203,7 @@ void LoadOptions(void)
opt.TextColour = DBGetContactSettingDword(NULL,WEATHERPROTONAME,"TextColour",GetSysColor(COLOR_WINDOWTEXT));
opt.UseWinColors = (BOOL)DBGetContactSettingByte(NULL,WEATHERPROTONAME, "UseWinColors", FALSE);
// popup actions
- opt.LeftClickAction = DBGetContactSettingDword(NULL,WEATHERPROTONAME,"LeftClickAction",IDM_M1);
+ opt.LeftClickAction = DBGetContactSettingDword(NULL,WEATHERPROTONAME,"LeftClickAction",IDM_M2);
opt.RightClickAction = DBGetContactSettingDword(NULL,WEATHERPROTONAME,"RightClickAction",IDM_M1);
// popup delay
opt.pDelay = DBGetContactSettingDword(NULL,WEATHERPROTONAME,"PopupDelay",0);
@@ -247,6 +251,7 @@ void SaveOptions(void)
DBWriteContactSettingWord(NULL, WEATHERPROTONAME, "vUnit", opt.vUnit);
DBWriteContactSettingWord(NULL, WEATHERPROTONAME, "pUnit", opt.pUnit);
DBWriteContactSettingWord(NULL, WEATHERPROTONAME, "dUnit", opt.dUnit);
+ DBWriteContactSettingWord(NULL, WEATHERPROTONAME, "eUnit", opt.eUnit);
DBWriteContactSettingString(NULL, WEATHERPROTONAME, "DegreeSign", opt.DegreeSign);
DBWriteContactSettingByte(NULL, WEATHERPROTONAME, "DoNotAppendUnit", (BYTE)opt.DoNotAppendUnit);
DBWriteContactSettingByte(NULL, WEATHERPROTONAME, "NoFractions", (BYTE)opt.NoFrac);
@@ -296,7 +301,7 @@ int OptInit(WPARAM wParam,LPARAM lParam) {
odp.position = 95600;
odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS);
odp.pfnDlgProc = OptionsProc;
- odp.pszGroup = LPGEN("Plugins");
+ odp.pszGroup = LPGEN("Network");
odp.pszTitle = WEATHERPROTOTEXT;
odp.pszTab = LPGEN("General");
odp.flags = ODPF_BOLDGROUPS;
@@ -382,6 +387,11 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
case 3: CheckRadioButton(hdlg, IDC_D1, IDC_D3, IDC_D3); break;
}
+ switch (opt.eUnit) { // elev
+ case 1: CheckRadioButton(hdlg, IDC_E1, IDC_E2, IDC_E1); break;
+ case 2: CheckRadioButton(hdlg, IDC_E1, IDC_E2, IDC_E2); break;
+ }
+
opt_startup = FALSE;
return 0;
@@ -443,6 +453,8 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
if (IsDlgButtonChecked(hdlg, IDC_D1)) opt.dUnit = 1;
if (IsDlgButtonChecked(hdlg, IDC_D2)) opt.dUnit = 2;
if (IsDlgButtonChecked(hdlg, IDC_D3)) opt.dUnit = 3;
+ if (IsDlgButtonChecked(hdlg, IDC_E1)) opt.eUnit = 1;
+ if (IsDlgButtonChecked(hdlg, IDC_E2)) opt.eUnit = 2;
// save the new weather options
SaveOptions();
diff --git a/protocols/weather/weather_userinfo.c b/protocols/weather/weather_userinfo.c
index 07b296f601..2addea14da 100644
--- a/protocols/weather/weather_userinfo.c
+++ b/protocols/weather/weather_userinfo.c
@@ -362,7 +362,7 @@ void LoadBriefInfoText(HWND hwndDlg, HANDLE hContact)
// check if data exist. If not, display error message box
if (!(BOOL)DBGetContactSettingByte(hContact, WEATHERPROTONAME, "IsUpdated", FALSE))
{
- FixStr(Translate("No information available.\nPlease update weather condition first."), str);
+ strcpy(str, Translate("No information available.\r\nPlease update weather condition first."));
}
else
// set the display text and show the message box