OLD | NEW |
1 #include <AdblockPlus.h> | 1 #include <AdblockPlus.h> |
2 #include <functional> | 2 #include <functional> |
3 #include <vector> | 3 #include <vector> |
4 #include <Windows.h> | 4 #include <Windows.h> |
5 | 5 |
6 #include "../shared/AutoHandle.h" | 6 #include "../shared/AutoHandle.h" |
7 #include "../shared/Communication.h" | 7 #include "../shared/Communication.h" |
8 #include "../shared/Dictionary.h" | 8 #include "../shared/Dictionary.h" |
9 #include "../shared/Utils.h" | 9 #include "../shared/Utils.h" |
10 #include "../shared/Version.h" | 10 #include "../shared/Version.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 bool updateAvailable; | 46 bool updateAvailable; |
47 void UpdateCallback(const std::string res) | 47 void UpdateCallback(const std::string res) |
48 { | 48 { |
49 if (updateAvailable) | 49 if (updateAvailable) |
50 return; | 50 return; |
51 Dictionary* dictionary = Dictionary::GetInstance(); | 51 Dictionary* dictionary = Dictionary::GetInstance(); |
52 if (res.length() == 0) | 52 if (res.length() == 0) |
53 { | 53 { |
54 std::wstring upToDateText = dictionary->Lookup("updater", "update-already-
up-to-date-text"); | 54 std::wstring upToDateText = dictionary->Lookup("updater", "update-already-
up-to-date-text"); |
55 std::wstring upToDateTitle = dictionary->Lookup("updater", "update-already
-up-to-date-title"); | 55 std::wstring upToDateTitle = dictionary->Lookup("updater", "update-already
-up-to-date-title"); |
56 MessageBox(NULL, upToDateText.c_str(), upToDateTitle.c_str(), MB_OK); | 56 MessageBoxW(NULL, upToDateText.c_str(), upToDateTitle.c_str(), MB_OK); |
57 } | 57 } |
58 else | 58 else |
59 { | 59 { |
60 std::wstring errorText = dictionary->Lookup("updater", "update-error-text"
); | 60 std::wstring errorText = dictionary->Lookup("updater", "update-error-text"
); |
61 std::wstring errorTitle = dictionary->Lookup("updater", "update-error-titl
e"); | 61 std::wstring errorTitle = dictionary->Lookup("updater", "update-error-titl
e"); |
62 ReplaceString(errorText, L"?1?", ToUtf16String(res)); | 62 ReplaceString(errorText, L"?1?", ToUtf16String(res)); |
63 MessageBox(NULL, errorText.c_str(), errorTitle.c_str(), MB_OK); | 63 MessageBoxW(NULL, errorText.c_str(), errorTitle.c_str(), MB_OK); |
64 } | 64 } |
65 return; | 65 return; |
66 } | 66 } |
67 | 67 |
68 | 68 |
69 CriticalSection firstRunLock; | 69 CriticalSection firstRunLock; |
70 bool firstRunActionExecuted = false; | 70 bool firstRunActionExecuted = false; |
71 Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request) | 71 Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request) |
72 { | 72 { |
73 Communication::OutputBuffer response; | 73 Communication::OutputBuffer response; |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 } | 406 } |
407 catch (std::runtime_error e) | 407 catch (std::runtime_error e) |
408 { | 408 { |
409 DebugException(e); | 409 DebugException(e); |
410 return 1; | 410 return 1; |
411 } | 411 } |
412 } | 412 } |
413 | 413 |
414 return 0; | 414 return 0; |
415 } | 415 } |
OLD | NEW |