| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
| 2 | 2 |
| 3 #include "PluginClass.h" | 3 #include "PluginClass.h" |
| 4 #include "PluginSettings.h" | 4 #include "PluginSettings.h" |
| 5 #include "PluginSystem.h" | 5 #include "PluginSystem.h" |
| 6 #ifdef SUPPORT_FILTER | 6 #ifdef SUPPORT_FILTER |
| 7 #include "PluginFilter.h" | 7 #include "PluginFilter.h" |
| 8 #endif | 8 #endif |
| 9 #include "PluginMimeFilterClient.h" | 9 #include "PluginMimeFilterClient.h" |
| 10 #include "PluginClient.h" | 10 #include "PluginClient.h" |
| (...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 847 int ieVersion = CPluginClient::GetInstance()->GetIEVersion(); | 847 int ieVersion = CPluginClient::GetInstance()->GetIEVersion(); |
| 848 // Create status pane | 848 // Create status pane |
| 849 if (bBHO && ieVersion > 6 && !CreateStatusBarPane()) | 849 if (bBHO && ieVersion > 6 && !CreateStatusBarPane()) |
| 850 { | 850 { |
| 851 return false; | 851 return false; |
| 852 } | 852 } |
| 853 | 853 |
| 854 s_criticalSectionLocal.Lock(); | 854 s_criticalSectionLocal.Lock(); |
| 855 int versionCompRes = CPluginClient::GetInstance()->CompareVersions(CPluginClie nt::GetInstance()->GetPref(L"currentVersion", L"0.0"), L"1.2"); | 855 int versionCompRes = CPluginClient::GetInstance()->CompareVersions(CPluginClie nt::GetInstance()->GetPref(L"currentVersion", L"0.0"), L"1.2"); |
| 856 | 856 |
| 857 bool isFirstRun = CPluginClient::GetInstance()->IsFirstRun(); | |
| 858 CPluginClient::GetInstance()->SetPref(L"currentVersion", std::wstring(IEPLUGIN _VERSION)); | |
| 857 // This is the first time ABP was installed | 859 // This is the first time ABP was installed |
| 858 // Or ABP was updated from the version that did not support Acceptable Ads (<1 .2) | 860 // Or ABP was updated from the version that did not support Acceptable Ads (<1 .2) |
| 859 if (CPluginClient::GetInstance()->IsFirstRun() || versionCompRes < 0) | 861 if (isFirstRun || versionCompRes < 0) |
| 860 { | 862 { |
| 861 CPluginClient::GetInstance()->SetPref(L"currentVersion", std::wstring(IEPLUG IN_VERSION)); | 863 if (!isFirstRun) |
|
Felix Dahlke
2014/08/01 13:07:57
I think we should also update currentVersion when
| |
| 864 { | |
| 865 CPluginClient::GetInstance()->SetPref(L"displayUpdatePage", true); | |
| 866 } | |
| 862 | 867 |
| 863 // IE6 can't be accessed from another thread, execute in current thread | 868 // IE6 can't be accessed from another thread, execute in current thread |
| 864 if (ieVersion < 7) | 869 if (ieVersion < 7) |
|
Felix Dahlke
2014/08/01 13:07:57
Should we really run these first run actions again
| |
| 865 { | 870 { |
| 866 FirstRunThread(); | 871 FirstRunThread(); |
| 867 } | 872 } |
| 868 else | 873 else |
| 869 { | 874 { |
| 870 CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)CPluginClass::FirstRunThr ead, NULL, NULL, NULL); | 875 CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)CPluginClass::FirstRunThr ead, NULL, NULL, NULL); |
| 871 } | 876 } |
| 872 if ((m_hPaneWnd == NULL) || (!IsStatusBarEnabled())) | 877 if (((m_hPaneWnd == NULL) || !IsStatusBarEnabled()) && isFirstRun) |
| 873 { | 878 { |
| 874 ShowStatusBar(); | 879 ShowStatusBar(); |
| 875 } | 880 } |
| 876 | 881 |
| 877 // Enable acceptable ads by default | 882 // Enable acceptable ads by default |
| 878 std::wstring aaUrl = CPluginClient::GetInstance()->GetPref(L"subscriptions_e xceptionsurl", L""); | 883 std::wstring aaUrl = CPluginClient::GetInstance()->GetPref(L"subscriptions_e xceptionsurl", L""); |
| 879 CPluginClient::GetInstance()->AddSubscription(aaUrl); | 884 CPluginClient::GetInstance()->AddSubscription(aaUrl); |
| 880 } | 885 } |
| 881 s_criticalSectionLocal.Unlock(); | 886 s_criticalSectionLocal.Unlock(); |
| 882 return true; | 887 return true; |
| (...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2006 } | 2011 } |
| 2007 } | 2012 } |
| 2008 } | 2013 } |
| 2009 | 2014 |
| 2010 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); | 2015 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); |
| 2011 } | 2016 } |
| 2012 | 2017 |
| 2013 return hTabWnd; | 2018 return hTabWnd; |
| 2014 | 2019 |
| 2015 } | 2020 } |
| LEFT | RIGHT |