Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
730 } | 730 } |
731 | 731 |
732 int ieVersion = AdblockPlus::IE::InstalledMajorVersion(); | 732 int ieVersion = AdblockPlus::IE::InstalledMajorVersion(); |
733 // Create status pane | 733 // Create status pane |
734 if (bBHO && ieVersion > 6 && !CreateStatusBarPane()) | 734 if (bBHO && ieVersion > 6 && !CreateStatusBarPane()) |
735 { | 735 { |
736 return false; | 736 return false; |
737 } | 737 } |
738 | 738 |
739 s_criticalSectionLocal.Lock(); | 739 s_criticalSectionLocal.Lock(); |
740 if (CPluginClient::GetInstance()->GetPref(L"currentVersion", L"0.0").find(L"si mpleadblock") != std::wstring::npos) | |
741 { | |
742 CPluginClient::GetInstance()->SetPref(L"isFromSimpleAdblock", true); | |
743 CPluginClient::GetInstance()->SetPref(L"currentVersion", std::wstring(IEPLUG IN_VERSION)); | |
Eric
2015/03/27 12:51:45
Instead of overloading "currentVersion", is it imp
Oleksandr
2015/04/16 09:58:09
We can only use one of the default prefs
| |
744 } | |
740 int versionCompRes = CPluginClient::GetInstance()->CompareVersions(CPluginClie nt::GetInstance()->GetPref(L"currentVersion", L"0.0"), L"1.2"); | 745 int versionCompRes = CPluginClient::GetInstance()->CompareVersions(CPluginClie nt::GetInstance()->GetPref(L"currentVersion", L"0.0"), L"1.2"); |
741 | 746 |
742 bool isFirstRun = CPluginClient::GetInstance()->IsFirstRun(); | 747 bool isFirstRun = CPluginClient::GetInstance()->IsFirstRun(); |
743 CPluginClient::GetInstance()->SetPref(L"currentVersion", std::wstring(IEPLUGIN _VERSION)); | 748 CPluginClient::GetInstance()->SetPref(L"currentVersion", std::wstring(IEPLUGIN _VERSION)); |
744 // This is the first time ABP was installed | 749 // This is the first time ABP was installed |
745 // Or ABP was updated from the version that did not support Acceptable Ads (<1 .2) | 750 // Or ABP was updated from the version that did not support Acceptable Ads (<1 .2) |
746 if (isFirstRun || versionCompRes < 0) | 751 if (isFirstRun || versionCompRes < 0) |
747 { | 752 { |
748 if (!isFirstRun) | 753 if (!isFirstRun) |
749 { | 754 { |
750 CPluginClient::GetInstance()->SetPref(L"displayUpdatePage", true); | 755 if (!CPluginClient::GetInstance()->GetPref(std::wstring(L"isFromSimpleAdbl ock"), false)) |
756 { | |
757 CPluginClient::GetInstance()->SetPref(L"displayUpdatePage", true); | |
758 } | |
751 } | 759 } |
752 | 760 |
753 // IE6 can't be accessed from another thread, execute in current thread | 761 // IE6 can't be accessed from another thread, execute in current thread |
754 if (ieVersion < 7) | 762 if (ieVersion < 7) |
755 { | 763 { |
756 FirstRunThread(); | 764 FirstRunThread(); |
757 } | 765 } |
758 else | 766 else |
759 { | 767 { |
760 CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)CPluginClass::FirstRunThr ead, NULL, NULL, NULL); | 768 CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)CPluginClass::FirstRunThr ead, NULL, NULL, NULL); |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1758 s_criticalSectionLocal.Unlock(); | 1766 s_criticalSectionLocal.Unlock(); |
1759 | 1767 |
1760 } | 1768 } |
1761 } | 1769 } |
1762 } | 1770 } |
1763 | 1771 |
1764 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); | 1772 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); |
1765 } | 1773 } |
1766 return hTabWnd; | 1774 return hTabWnd; |
1767 } | 1775 } |
OLD | NEW |