diff options
Diffstat (limited to 'protocols/Weather/src/weather_svcs.cpp')
-rw-r--r-- | protocols/Weather/src/weather_svcs.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/protocols/Weather/src/weather_svcs.cpp b/protocols/Weather/src/weather_svcs.cpp index ced1ce5c71..daeb7f8bd1 100644 --- a/protocols/Weather/src/weather_svcs.cpp +++ b/protocols/Weather/src/weather_svcs.cpp @@ -35,17 +35,18 @@ extern VARSW g_pwszIconsName; // protocol service function for setting weather protocol status INT_PTR WeatherSetStatus(WPARAM new_status, LPARAM) { - new_status = new_status != ID_STATUS_OFFLINE ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE; - // if we don't want to show status for default station - if (!opt.NoProtoCondition && status != new_status) { + if (status != new_status) { old_status = status; - status = new_status != ID_STATUS_OFFLINE ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE; - ProtoBroadcastAck(MODULENAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, status); + status = new_status = new_status != ID_STATUS_OFFLINE ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE; + + if (!opt.NoProtoCondition) { + ProtoBroadcastAck(MODULENAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, status); - UpdateMenu(new_status != ID_STATUS_OFFLINE); - if (new_status != ID_STATUS_OFFLINE) - UpdateAll(FALSE, FALSE); + UpdateMenu(new_status != ID_STATUS_OFFLINE); + if (new_status != ID_STATUS_OFFLINE) + UpdateAll(FALSE, FALSE); + } } return 0; |