Left: | ||
Right: |
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 22 matching lines...) Expand all Loading... | |
33 for (int32_t i = 0; i < count; i++) | 33 for (int32_t i = 0; i < count; i++) |
34 { | 34 { |
35 AdblockPlus::SubscriptionPtr subscription = subscriptions[i]; | 35 AdblockPlus::SubscriptionPtr subscription = subscriptions[i]; |
36 response << subscription->GetProperty("url")->AsString() | 36 response << subscription->GetProperty("url")->AsString() |
37 << subscription->GetProperty("title")->AsString() | 37 << subscription->GetProperty("title")->AsString() |
38 << subscription->GetProperty("specialization")->AsString() | 38 << subscription->GetProperty("specialization")->AsString() |
39 << subscription->IsListed(); | 39 << subscription->IsListed(); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 bool updateAvailable; | 43 bool updateAvailable = false; |
44 void UpdateCallback(const std::string res) | 44 void UpdateCallback(const std::string res) |
45 { | 45 { |
46 if (updateAvailable) | 46 if (updateAvailable) |
47 return; | 47 return; |
48 Dictionary* dictionary = Dictionary::GetInstance(); | 48 Dictionary* dictionary = Dictionary::GetInstance(); |
49 if (res.length() == 0) | 49 if (res.length() == 0) |
50 { | 50 { |
51 std::wstring upToDateText = dictionary->Lookup("updater", "update-already- up-to-date-text"); | 51 std::wstring upToDateText = dictionary->Lookup("updater", "update-already- up-to-date-text"); |
52 std::wstring upToDateTitle = dictionary->Lookup("updater", "update-already -up-to-date-title"); | 52 std::wstring upToDateTitle = dictionary->Lookup("updater", "update-already -up-to-date-title"); |
53 MessageBox(NULL, upToDateText.c_str(), upToDateTitle.c_str(), MB_OK); | 53 MessageBox(NULL, upToDateText.c_str(), upToDateTitle.c_str(), MB_ICONINFOR MATION); |
Wladimir Palant
2013/08/13 09:19:51
Not sure why but this change isn't present in the
| |
54 } | 54 } |
55 else | 55 else |
56 { | 56 { |
57 std::wstring errorText = dictionary->Lookup("updater", "update-error-text" ); | 57 std::wstring errorText = dictionary->Lookup("updater", "update-error-text" ); |
58 std::wstring errorTitle = dictionary->Lookup("updater", "update-error-titl e"); | 58 std::wstring errorTitle = dictionary->Lookup("updater", "update-error-titl e"); |
59 ReplaceString(errorText, L"?1?", ToUtf16String(res)); | 59 ReplaceString(errorText, L"?1?", ToUtf16String(res)); |
60 MessageBox(NULL, errorText.c_str(), errorTitle.c_str(), MB_OK); | 60 MessageBox(NULL, errorText.c_str(), errorTitle.c_str(), MB_ICONEXCLAMATION ); |
Wladimir Palant
2013/08/13 09:19:51
Not sure why but this change isn't present in the
| |
61 } | 61 } |
62 return; | |
Wladimir Palant
2013/08/13 09:19:51
This change isn't present in the current code.
| |
63 } | 62 } |
64 | 63 |
65 | 64 |
66 CriticalSection firstRunLock; | 65 CriticalSection firstRunLock; |
67 bool firstRunActionExecuted = false; | 66 bool firstRunActionExecuted = false; |
68 Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request) | 67 Communication::OutputBuffer HandleRequest(Communication::InputBuffer& request) |
69 { | 68 { |
70 Communication::OutputBuffer response; | 69 Communication::OutputBuffer response; |
71 | 70 |
72 Communication::ProcType procedure; | 71 Communication::ProcType procedure; |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
377 } | 376 } |
378 catch (std::runtime_error e) | 377 catch (std::runtime_error e) |
379 { | 378 { |
380 DebugException(e); | 379 DebugException(e); |
381 return 1; | 380 return 1; |
382 } | 381 } |
383 } | 382 } |
384 | 383 |
385 return 0; | 384 return 0; |
386 } | 385 } |
OLD | NEW |