Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/engine/Main.cpp

Issue 11612008: Bunch of tiny fixes (Closed)
Patch Set: Created Sept. 5, 2013, 10:38 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/plugin/PluginSettings.h » ('j') | src/plugin/PluginSettings.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
Oleksandr 2013/09/05 22:47:40 http://codereview.adblockplus.org/11276031/diff/30
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
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 }
OLDNEW
« no previous file with comments | « no previous file | src/plugin/PluginSettings.h » ('j') | src/plugin/PluginSettings.cpp » ('J')

Powered by Google App Engine
This is Rietveld