https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5a81a5bc1426f7728b9d5…
commit 5a81a5bc1426f7728b9d5fda3d8a7de66d66ed41
Author: Bișoc George <fraizeraust99(a)gmail.com>
AuthorDate: Mon Feb 24 11:56:02 2020 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Feb 24 19:56:02 2020 +0900
[TIMEDATE] Implement the dynamic NTP status notification (#2352)
Time/Date control panel applet displays the status of the NTP server synchronization with the system informing the user the actual condition of the said sync, if it has failed or suceeded. The commit also implements IDS_INETTIMEWELCOME which serves as a placeholder as Time/Date loads the last successful attempt of NTP synchronization which I don't know how the CPL remembers it. With that said, IDS_INETTIMEWELCOME will stay for a while until someone figures out how timedate.cpl works i [...]
CORE-16684
---
dll/cpl/timedate/internettime.c | 104 +++++++++++++++++++++++++++++++++++++---
dll/cpl/timedate/lang/bg-BG.rc | 2 +
dll/cpl/timedate/lang/cs-CZ.rc | 2 +
dll/cpl/timedate/lang/da-DK.rc | 2 +
dll/cpl/timedate/lang/de-DE.rc | 2 +
dll/cpl/timedate/lang/el-GR.rc | 2 +
dll/cpl/timedate/lang/en-US.rc | 2 +
dll/cpl/timedate/lang/es-ES.rc | 2 +
dll/cpl/timedate/lang/et-EE.rc | 2 +
dll/cpl/timedate/lang/eu-ES.rc | 2 +
dll/cpl/timedate/lang/fr-FR.rc | 2 +
dll/cpl/timedate/lang/he-IL.rc | 2 +
dll/cpl/timedate/lang/hu-HU.rc | 2 +
dll/cpl/timedate/lang/id-ID.rc | 2 +
dll/cpl/timedate/lang/it-IT.rc | 2 +
dll/cpl/timedate/lang/ja-JP.rc | 2 +
dll/cpl/timedate/lang/nl-NL.rc | 2 +
dll/cpl/timedate/lang/no-NO.rc | 2 +
dll/cpl/timedate/lang/pl-PL.rc | 2 +
dll/cpl/timedate/lang/pt-BR.rc | 2 +
dll/cpl/timedate/lang/ro-RO.rc | 2 +
dll/cpl/timedate/lang/ru-RU.rc | 2 +
dll/cpl/timedate/lang/sk-SK.rc | 2 +
dll/cpl/timedate/lang/sq-AL.rc | 2 +
dll/cpl/timedate/lang/sv-SE.rc | 2 +
dll/cpl/timedate/lang/th-TH.rc | 2 +
dll/cpl/timedate/lang/tr-TR.rc | 2 +
dll/cpl/timedate/lang/uk-UA.rc | 2 +
dll/cpl/timedate/lang/zh-CN.rc | 2 +
dll/cpl/timedate/lang/zh-TW.rc | 2 +
dll/cpl/timedate/resource.h | 2 +
dll/cpl/timedate/timedate.h | 11 +++++
32 files changed, 168 insertions(+), 7 deletions(-)
diff --git a/dll/cpl/timedate/internettime.c b/dll/cpl/timedate/internettime.c
index 88e95ae0f6e..c1ee0294b0f 100644
--- a/dll/cpl/timedate/internettime.c
+++ b/dll/cpl/timedate/internettime.c
@@ -11,6 +11,7 @@
#include <stdlib.h>
DWORD WINAPI W32TimeSyncNow(LPCWSTR cmdline, UINT blocking, UINT flags);
+SYNC_STATUS SyncStatus;
static VOID
CreateNTPServerList(HWND hwnd)
@@ -89,7 +90,7 @@ CreateNTPServerList(HWND hwnd)
/* Set the selected server in the registry */
static VOID
-SetNTPServer(HWND hwnd)
+SetNTPServer(HWND hwnd, BOOL bBeginUpdate)
{
HKEY hKey;
HWND hList;
@@ -97,6 +98,7 @@ SetNTPServer(HWND hwnd)
WCHAR szSel[4];
LONG lRet;
WCHAR buffer[256];
+ WCHAR szFormat[BUFSIZE];
hList = GetDlgItem(hwnd,
IDC_SERVERLIST);
@@ -105,6 +107,15 @@ SetNTPServer(HWND hwnd)
SendDlgItemMessageW(hwnd, IDC_SERVERLIST, WM_GETTEXT, _countof(buffer), (LPARAM)buffer);
+ /* If the condition is true that means the user wants to update (synchronize) the time */
+ if (bBeginUpdate)
+ {
+ /* Inform the user that the synchronization is about to begin (depending on how reachable the NTP server is) */
+ StringCchPrintfW(szFormat, _countof(szFormat), SyncStatus.szSyncWait, buffer);
+ SyncStatus.lpszSyncStatus = szFormat;
+ SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus);
+ }
+
/* If there is new data entered then save it in the registry
The same key name of "0" is used to store all user entered values
*/
@@ -177,6 +188,87 @@ EnableDialogText(HWND hwnd)
EnableWindow(GetDlgItem(hwnd, IDC_NEXTSYNC), bChecked);
}
+static VOID
+SyncNTPStatusInit(HWND hwnd)
+{
+ /* Initialize the Synchronization NTP status members */
+ LoadStringW(hApplet, IDS_INETTIMEWELCOME, SyncStatus.szSyncInit, _countof(SyncStatus.szSyncInit));
+ LoadStringW(hApplet, IDS_INETTIMESUCSYNC, SyncStatus.szSyncSuc, _countof(SyncStatus.szSyncSuc));
+ LoadStringW(hApplet, IDS_INETTIMESYNCING, SyncStatus.szSyncWait, _countof(SyncStatus.szSyncWait));
+ LoadStringW(hApplet, IDS_INETTIMEERROR, SyncStatus.szSyncErr, _countof(SyncStatus.szSyncErr));
+ LoadStringW(hApplet, IDS_INETTIMESUCFILL, SyncStatus.szSyncType, _countof(SyncStatus.szSyncType));
+
+ /*
+ * TODO: XP's and Server 2003's timedate.cpl loads the last successful attempt of the NTP synchronization
+ * displaying the last time and date of the said sync. I have no idea how does timedate.cpl remember its last
+ * successful sync so for the time being, we will only load the initial remark string.
+ */
+ SyncStatus.lpszSyncStatus = SyncStatus.szSyncInit;
+ SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus);
+}
+
+static VOID
+UpdateNTPStatus(HWND hwnd, DWORD dwReason)
+{
+ WCHAR szFormat[BUFSIZE];
+ WCHAR szNtpServerName[MAX_VALUE_NAME];
+ WCHAR szLocalDate[BUFSIZE];
+ WCHAR szLocalTime[BUFSIZE];
+ HWND hDlgComboList;
+
+ /* Retrieve the server NTP name from the edit box */
+ hDlgComboList = GetDlgItem(hwnd, IDC_SERVERLIST);
+ SendMessageW(hDlgComboList, WM_GETTEXT, _countof(szNtpServerName), (LPARAM)szNtpServerName);
+
+ /* Iterate over the case reasons so we can compute the exact status of the NTP synchronization */
+ switch (dwReason)
+ {
+ /* The NTP time synchronization has completed successfully */
+ case ERROR_SUCCESS:
+ {
+ /* Get the current date based on the locale identifier */
+ GetDateFormatW(LOCALE_USER_DEFAULT,
+ DATE_SHORTDATE,
+ NULL,
+ NULL,
+ szLocalDate,
+ _countof(szLocalDate));
+
+ /* Get the current time based on the locale identifier */
+ GetTimeFormatW(LOCALE_USER_DEFAULT,
+ TIME_NOSECONDS,
+ NULL,
+ NULL,
+ szLocalTime,
+ _countof(szLocalTime));
+
+ /* Format the resource sting with the given NTP server name and the current time data */
+ StringCchPrintfW(szFormat, _countof(szFormat), SyncStatus.szSyncSuc, szNtpServerName, szLocalDate, szLocalTime);
+ SyncStatus.lpszSyncStatus = szFormat;
+ SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus);
+ break;
+ }
+
+ /* Empty field data has been caught -- simply tell the user to write the NTP name to continue */
+ case ERROR_INVALID_DATA:
+ {
+ SyncStatus.lpszSyncStatus = SyncStatus.szSyncType;
+ SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus);
+ DPRINT("UpdateNTPStatus(): The user didn't submit any NTP server name!\n");
+ break;
+ }
+
+ /* General failure -- the NTP synchronization has failed for whatever reason */
+ default:
+ {
+ StringCchPrintfW(szFormat, _countof(szFormat), SyncStatus.szSyncErr, szNtpServerName);
+ SyncStatus.lpszSyncStatus = szFormat;
+ SetDlgItemTextW(hwnd, IDC_SUCSYNC, SyncStatus.lpszSyncStatus);
+ DPRINT("UpdateNTPStatus(): Failed to synchronize the time! (Error: %lu).\n", dwReason);
+ break;
+ }
+ }
+}
static VOID
GetSyncSetting(HWND hwnd)
@@ -216,6 +308,7 @@ OnInitDialog(HWND hwnd)
GetSyncSetting(hwnd);
EnableDialogText(hwnd);
CreateNTPServerList(hwnd);
+ SyncNTPStatusInit(hwnd);
}
static VOID
@@ -273,13 +366,10 @@ InetTimePageProc(HWND hwndDlg,
{
DWORD dwError;
- SetNTPServer(hwndDlg);
+ SetNTPServer(hwndDlg, TRUE);
dwError = W32TimeSyncNow(L"localhost", 0, 0);
- if (dwError != ERROR_SUCCESS)
- {
- DPRINT("Failed to synchronize the time! Invalid NTP server name has been caught or no server name could be found (Error: %lu).\n", dwError);
- }
+ UpdateNTPStatus(hwndDlg, dwError);
}
break;
@@ -313,7 +403,7 @@ InetTimePageProc(HWND hwndDlg,
switch (lpnm->code)
{
case PSN_APPLY:
- SetNTPServer(hwndDlg);
+ SetNTPServer(hwndDlg, FALSE);
if (SendDlgItemMessageW(hwndDlg, IDC_AUTOSYNC, BM_GETCHECK, 0, 0) == BST_CHECKED)
OnAutoSync(TRUE);
diff --git a/dll/cpl/timedate/lang/bg-BG.rc b/dll/cpl/timedate/lang/bg-BG.rc
index 2ae40c9ed15..98187f865e2 100644
--- a/dll/cpl/timedate/lang/bg-BG.rc
+++ b/dll/cpl/timedate/lang/bg-BG.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Следващо сверяване: %s at %s"
IDS_INETTIMESYNCING "Почакайте, докато РеактОС сверява времето с %s"
IDS_INETTIMEERROR "Възникна грешка при сверяване на времето %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/cs-CZ.rc b/dll/cpl/timedate/lang/cs-CZ.rc
index f4470649051..acc05cb7acb 100644
--- a/dll/cpl/timedate/lang/cs-CZ.rc
+++ b/dll/cpl/timedate/lang/cs-CZ.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Další synchronizace: %s v %s"
IDS_INETTIMESYNCING "Prosím čekejte, zatímco systém ReactOS synchronizuje čas s %s"
IDS_INETTIMEERROR "Při synchronizaci času s %s nastala chyba"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/da-DK.rc b/dll/cpl/timedate/lang/da-DK.rc
index 59c0d5472bc..47f7207be07 100644
--- a/dll/cpl/timedate/lang/da-DK.rc
+++ b/dll/cpl/timedate/lang/da-DK.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s"
IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s"
IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/de-DE.rc b/dll/cpl/timedate/lang/de-DE.rc
index 7afc80ecfcc..29936291053 100644
--- a/dll/cpl/timedate/lang/de-DE.rc
+++ b/dll/cpl/timedate/lang/de-DE.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Nächste Synchronisierung am %s um %s."
IDS_INETTIMESYNCING "Bitte warten Sie, während ReactOS die Zeit mit %s synchronisiert."
IDS_INETTIMEERROR "Ein Fehler trat beim Synchronisieren mit %s auf."
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/el-GR.rc b/dll/cpl/timedate/lang/el-GR.rc
index abc8550b662..ae402546fd4 100644
--- a/dll/cpl/timedate/lang/el-GR.rc
+++ b/dll/cpl/timedate/lang/el-GR.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s"
IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s"
IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/en-US.rc b/dll/cpl/timedate/lang/en-US.rc
index 59e83fee61b..84fd7fdfbb7 100644
--- a/dll/cpl/timedate/lang/en-US.rc
+++ b/dll/cpl/timedate/lang/en-US.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s"
IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s"
IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/es-ES.rc b/dll/cpl/timedate/lang/es-ES.rc
index bd5a908058d..097bfce12ef 100644
--- a/dll/cpl/timedate/lang/es-ES.rc
+++ b/dll/cpl/timedate/lang/es-ES.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Próxima sincronización: %s a las %s"
IDS_INETTIMESYNCING "Por favor espere mientras ReactOS sincroniza la hora con %s"
IDS_INETTIMEERROR "Ha ocurrido un error mientras ReactOS se sincronizaba con %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/et-EE.rc b/dll/cpl/timedate/lang/et-EE.rc
index b1c465cb1cc..49b1d41c5d9 100644
--- a/dll/cpl/timedate/lang/et-EE.rc
+++ b/dll/cpl/timedate/lang/et-EE.rc
@@ -61,4 +61,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s"
IDS_INETTIMESYNCING "Palun oodake, kuni ReactOS sünkroonib serveriga %s"
IDS_INETTIMEERROR "ReactOSi sünkroonimisel serveriga %s ilmnes tõrge."
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/eu-ES.rc b/dll/cpl/timedate/lang/eu-ES.rc
index 1b7a482b3e5..1ada2669c3b 100644
--- a/dll/cpl/timedate/lang/eu-ES.rc
+++ b/dll/cpl/timedate/lang/eu-ES.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Hurrengo sinkronizatzea: %s-n %s-etan"
IDS_INETTIMESYNCING "Mesedez itxoin ReactOSek %s-rekin ordua sinkronizatu arte"
IDS_INETTIMEERROR "Errore bat gertatu da ReactOS %s-kin sinkronizatzen zen bitartean"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/fr-FR.rc b/dll/cpl/timedate/lang/fr-FR.rc
index 9cd145884a9..6cc76bcabcd 100644
--- a/dll/cpl/timedate/lang/fr-FR.rc
+++ b/dll/cpl/timedate/lang/fr-FR.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Prochaine synchronisation: %s à %s"
IDS_INETTIMESYNCING "Veuillez patienter pendant que ReactOS synchronise l'heure avec %s"
IDS_INETTIMEERROR "Une erreur a eu lieu pendant que ReactOS synchronisait avec %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/he-IL.rc b/dll/cpl/timedate/lang/he-IL.rc
index f1ebafdc00e..3af8a1fd367 100644
--- a/dll/cpl/timedate/lang/he-IL.rc
+++ b/dll/cpl/timedate/lang/he-IL.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "הסנכרון הבא: %s ב %s"
IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s"
IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/hu-HU.rc b/dll/cpl/timedate/lang/hu-HU.rc
index 1a37ed95198..e4c110a43ec 100644
--- a/dll/cpl/timedate/lang/hu-HU.rc
+++ b/dll/cpl/timedate/lang/hu-HU.rc
@@ -56,4 +56,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "A következő szinkronizálás: %s %s-kor"
IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s"
IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/id-ID.rc b/dll/cpl/timedate/lang/id-ID.rc
index 224d5609f82..580febab484 100644
--- a/dll/cpl/timedate/lang/id-ID.rc
+++ b/dll/cpl/timedate/lang/id-ID.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Penyelarasan berikutnya: %s pada %s"
IDS_INETTIMESYNCING "Harap menunggu saat ReactOS menyelaraskan waktu dengan %s"
IDS_INETTIMEERROR "Kesalahan terjadi ketika ReactOS menyelaraskan dengan %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/it-IT.rc b/dll/cpl/timedate/lang/it-IT.rc
index 201ea28496f..7df5e6a2bcc 100644
--- a/dll/cpl/timedate/lang/it-IT.rc
+++ b/dll/cpl/timedate/lang/it-IT.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Prossima sincronizzazione: %s alle %s"
IDS_INETTIMESYNCING "Sincronizzazione ora con %s"
IDS_INETTIMEERROR "E' stato rilevato un errore mentre ReactOS si stava sincronizzando con %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/ja-JP.rc b/dll/cpl/timedate/lang/ja-JP.rc
index 99263dff8e9..17e19ad38f1 100644
--- a/dll/cpl/timedate/lang/ja-JP.rc
+++ b/dll/cpl/timedate/lang/ja-JP.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "次回の同期: %s %s"
IDS_INETTIMESYNCING "ReactOSが %s と同期する間、お待ちください"
IDS_INETTIMEERROR "ReactOSが %s と同期中にエラーが発生しました"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/nl-NL.rc b/dll/cpl/timedate/lang/nl-NL.rc
index dddf6e95763..12b950f4126 100644
--- a/dll/cpl/timedate/lang/nl-NL.rc
+++ b/dll/cpl/timedate/lang/nl-NL.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Volgende synchronisatie: %s om %s"
IDS_INETTIMESYNCING "ReactOS voert een synchronisatie met %s uit. Een ogenblik geduld."
IDS_INETTIMEERROR "Er is een fout opgetreden bij een poging om een synchronisatie met %s uit te voeren."
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/no-NO.rc b/dll/cpl/timedate/lang/no-NO.rc
index 1b43ef6f27f..34808eb71da 100644
--- a/dll/cpl/timedate/lang/no-NO.rc
+++ b/dll/cpl/timedate/lang/no-NO.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Neste synkonisering: %s med %s"
IDS_INETTIMESYNCING "Vennligst vent mens ReactOS sykroniserer tiden med %s"
IDS_INETTIMEERROR "En feil har oppstatt mens ReactOS ble sykronisert med %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/pl-PL.rc b/dll/cpl/timedate/lang/pl-PL.rc
index a2a93d17cb5..e0dc3256b19 100644
--- a/dll/cpl/timedate/lang/pl-PL.rc
+++ b/dll/cpl/timedate/lang/pl-PL.rc
@@ -63,4 +63,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Następna synchronizacja w dniu %s o %s"
IDS_INETTIMESYNCING "Proszę czekać, gdy ReactOS zsynchronizuje czas z %s"
IDS_INETTIMEERROR "Wystąpił błąd podczas próby synchronizacji czasu z %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/pt-BR.rc b/dll/cpl/timedate/lang/pt-BR.rc
index b84d407bae8..420ceb8169c 100644
--- a/dll/cpl/timedate/lang/pt-BR.rc
+++ b/dll/cpl/timedate/lang/pt-BR.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Próxima sincronização: %s às %s"
IDS_INETTIMESYNCING "Aguarde enquanto o ReactOS é sincronizado com %s"
IDS_INETTIMEERROR "Erro enquanto o ReactOS estava sincronizando com %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/ro-RO.rc b/dll/cpl/timedate/lang/ro-RO.rc
index 308c45c7668..9589fb56d2b 100644
--- a/dll/cpl/timedate/lang/ro-RO.rc
+++ b/dll/cpl/timedate/lang/ro-RO.rc
@@ -56,4 +56,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Următoarea sincronizare: %s la %s"
IDS_INETTIMESYNCING "Așteptați sincronizarea cu %s"
IDS_INETTIMEERROR "A survenit o eroare la sincronizarea cu %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/ru-RU.rc b/dll/cpl/timedate/lang/ru-RU.rc
index 9ad368508bd..8d2360003a4 100644
--- a/dll/cpl/timedate/lang/ru-RU.rc
+++ b/dll/cpl/timedate/lang/ru-RU.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Следующая синхронизация через: %s в %s"
IDS_INETTIMESYNCING "Подождите, пока РеактОС синхронизирует время с %s"
IDS_INETTIMEERROR "Возникла ошибка во время синхронизации с %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/sk-SK.rc b/dll/cpl/timedate/lang/sk-SK.rc
index cd011f73803..64b9ead94f3 100644
--- a/dll/cpl/timedate/lang/sk-SK.rc
+++ b/dll/cpl/timedate/lang/sk-SK.rc
@@ -61,4 +61,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Ďalšia synchronizácia: %s o %s"
IDS_INETTIMESYNCING "Počkajte prosím, kým ReactOS zosynchronizuje čas s %s"
IDS_INETTIMEERROR "Počas synchronizácie systému ReactOS s %s sa vyskytla chyba."
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/sq-AL.rc b/dll/cpl/timedate/lang/sq-AL.rc
index 82ab28654cd..053a867ecd8 100644
--- a/dll/cpl/timedate/lang/sq-AL.rc
+++ b/dll/cpl/timedate/lang/sq-AL.rc
@@ -58,4 +58,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Sinkronizimi tjetër: %s në %s"
IDS_INETTIMESYNCING "Ju lutem prisni ndërkohë që ReactOS sinkronizon orën me %s"
IDS_INETTIMEERROR "Një gabim ndodhi gjatë sinkronizimit të ReactOS me %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/sv-SE.rc b/dll/cpl/timedate/lang/sv-SE.rc
index 129c4457e39..55d81eca4bf 100644
--- a/dll/cpl/timedate/lang/sv-SE.rc
+++ b/dll/cpl/timedate/lang/sv-SE.rc
@@ -56,4 +56,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Next synchronization: %s at %s"
IDS_INETTIMESYNCING "Please wait while ReactOS synchronizes the time with %s"
IDS_INETTIMEERROR "An error occured while ReactOS was synchronizing with %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/th-TH.rc b/dll/cpl/timedate/lang/th-TH.rc
index f3c8a210ea8..fc643b1e278 100644
--- a/dll/cpl/timedate/lang/th-TH.rc
+++ b/dll/cpl/timedate/lang/th-TH.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "การปรับเทียบต่อไป: %s ใน %s"
IDS_INETTIMESYNCING "โปรดรอ ReactOS กำลังปรับเทียบเวลาภายใน %s"
IDS_INETTIMEERROR "เกิดการผิดพลาดในขณะที่ ReactOS กำลังปรับเทียบเวลาภายใน %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/tr-TR.rc b/dll/cpl/timedate/lang/tr-TR.rc
index ebfcfee1461..1b04b964ebe 100644
--- a/dll/cpl/timedate/lang/tr-TR.rc
+++ b/dll/cpl/timedate/lang/tr-TR.rc
@@ -56,4 +56,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Bir Sonraki Eşleştirme: %s.%s"
IDS_INETTIMESYNCING "ReactOS, saati %s ile eşleştirirken lütfen bekleyiniz."
IDS_INETTIMEERROR "ReactOS, %s ile eşleştirirken bir yanlışlık oldu."
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/uk-UA.rc b/dll/cpl/timedate/lang/uk-UA.rc
index 454e68396b8..18bda28d237 100644
--- a/dll/cpl/timedate/lang/uk-UA.rc
+++ b/dll/cpl/timedate/lang/uk-UA.rc
@@ -62,4 +62,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "Наступна синхронізація: %s в %s"
IDS_INETTIMESYNCING "Будь ласка зачекайте, поки ReactOS синхронізує час з %s"
IDS_INETTIMEERROR "Помилка під час синхронізації з %s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/zh-CN.rc b/dll/cpl/timedate/lang/zh-CN.rc
index a83db551000..73e00ff8828 100644
--- a/dll/cpl/timedate/lang/zh-CN.rc
+++ b/dll/cpl/timedate/lang/zh-CN.rc
@@ -54,4 +54,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "下次同步:%s 在 %s"
IDS_INETTIMESYNCING "请稍候,ReactOS 正在同步 %s"
IDS_INETTIMEERROR "在 ReactOS 同步时发生了一个错误。%s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/lang/zh-TW.rc b/dll/cpl/timedate/lang/zh-TW.rc
index 7f06777504c..08d3b824afb 100644
--- a/dll/cpl/timedate/lang/zh-TW.rc
+++ b/dll/cpl/timedate/lang/zh-TW.rc
@@ -56,4 +56,6 @@ BEGIN
IDS_INETTIMENEXTSYNC "下次同步:%s 在 %s"
IDS_INETTIMESYNCING "請等待,ReactOS 正在同步 %s"
IDS_INETTIMEERROR "在 ReactOS 同步時發生了一個錯誤。%s"
+ IDS_INETTIMESUCFILL "Please type a NTP server name in order to synchronize the time"
+ IDS_INETTIMEWELCOME "Select a NTP server from the list or type a NTP server name to synchronize the computer's time"
END
diff --git a/dll/cpl/timedate/resource.h b/dll/cpl/timedate/resource.h
index c51bc0b084d..f23b9a4316a 100644
--- a/dll/cpl/timedate/resource.h
+++ b/dll/cpl/timedate/resource.h
@@ -36,3 +36,5 @@
#define IDS_INETTIMENEXTSYNC 1007
#define IDS_INETTIMESYNCING 1008
#define IDS_INETTIMEERROR 1009
+#define IDS_INETTIMESUCFILL 1010
+#define IDS_INETTIMEWELCOME 1011
diff --git a/dll/cpl/timedate/timedate.h b/dll/cpl/timedate/timedate.h
index 500421758b7..306889fe159 100644
--- a/dll/cpl/timedate/timedate.h
+++ b/dll/cpl/timedate/timedate.h
@@ -17,6 +17,7 @@
#include <commctrl.h>
#include <cpl.h>
#include <debug.h>
+#include <strsafe.h>
#include "resource.h"
@@ -34,6 +35,16 @@ typedef struct
APPLET_PROC AppletProc;
} APPLET, *PAPPLET;
+typedef struct
+{
+ WCHAR szSyncSuc[BUFSIZE];
+ WCHAR szSyncWait[BUFSIZE];
+ WCHAR szSyncErr[BUFSIZE];
+ WCHAR szSyncType[BUFSIZE];
+ WCHAR szSyncInit[BUFSIZE];
+ LPWSTR lpszSyncStatus;
+} SYNC_STATUS, *PSYNC_STATUS;
+
extern HINSTANCE hApplet;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=11ecf5c969bffb4f245bd…
commit 11ecf5c969bffb4f245bd84e86e25a6ec70509c9
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Mon Feb 24 10:48:24 2020 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Mon Feb 24 11:01:43 2020 +0100
[CMAKE] Enable C4101 (unreferenced local variable) for MSVC builds.
This is already an error in GCC builds, so will make it harder for the
MSVC crowd to accidentally break GCC build.
---
sdk/cmake/msvc.cmake | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sdk/cmake/msvc.cmake b/sdk/cmake/msvc.cmake
index 3b576cf867d..c1aad7a01fe 100644
--- a/sdk/cmake/msvc.cmake
+++ b/sdk/cmake/msvc.cmake
@@ -95,6 +95,7 @@ add_compile_flags("/wd4018")
# - TODO: C4090: different 'modifier' qualifiers (for C programs only;
# for C++ programs, the compiler error C2440 is issued)
# - C4098: void function returning a value
+# - C4101: unreferenced local variable
# - C4113: parameter lists differ
# - C4129: unrecognized escape sequence
# - C4133: incompatible types - from '<x> *' to '<y> *'
@@ -108,7 +109,7 @@ add_compile_flags("/wd4018")
# - C4700: uninitialized variable usage
# - C4715: 'function': not all control paths return a value
# - C4716: function must return a value
-add_compile_flags("/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4113 /we4129 /we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715 /we4716")
+add_compile_flags("/we4013 /we4020 /we4022 /we4028 /we4047 /we4098 /we4101 /we4113 /we4129 /we4133 /we4163 /we4229 /we4311 /we4312 /we4313 /we4477 /we4603 /we4700 /we4715 /we4716")
# - C4189: local variable initialized but not referenced
# Not in Release mode and not with MSVC 2010
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cdb6af05a7236ed45ee96…
commit cdb6af05a7236ed45ee96326a33511953469f529
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Mon Feb 24 10:12:30 2020 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Mon Feb 24 11:01:09 2020 +0100
[TRAVIS] Disable code format checker in CI.
The configuration is not final yet and we have a lot of files that don't
follow the suggested style. At this point, having it active in CI means
builds are essentially always red, and we miss actual compilation errors.
---
.travis.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 01e6d118601..d80547d7242 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,7 +19,6 @@ env:
- CLFORMAT_BINARY=clang-format-9
jobs:
- DO_BUILD=1
- - DO_CHECK=1
before_install:
- ln -s /usr/share/clang/clang-format-9/clang-format-diff.py ./sdk/tools/;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=309f7e94430f65e7270e8…
commit 309f7e94430f65e7270e82a1646804e9d610367a
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Sun Feb 23 22:36:03 2020 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Feb 23 22:36:03 2020 +0100
gcc is crying again
---
base/applications/rapps/gui.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp
index 182d1068665..0804b4a614f 100644
--- a/base/applications/rapps/gui.cpp
+++ b/base/applications/rapps/gui.cpp
@@ -1857,7 +1857,7 @@ public:
// When there is no control found, go to the first or last (depending on tab vs shift-tab)
int current = direction > 0 ? 0 : (_countof(Controls) - 1);
HWND hActive = ::GetFocus();
- for (int n = 0; n < _countof(Controls); ++n)
+ for (size_t n = 0; n < _countof(Controls); ++n)
{
if (hActive == Controls[n])
{