| 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" |
| 11 #include "PluginClientFactory.h" | 11 #include "PluginClientFactory.h" |
| 12 #include "PluginMutex.h" | 12 #include "PluginMutex.h" |
| 13 #include "sddl.h" | 13 #include "sddl.h" |
| 14 #include "PluginUtil.h" | 14 #include "PluginUtil.h" |
| 15 #include "PluginUserSettings.h" | 15 #include "PluginUserSettings.h" |
| 16 #include "../shared/Utils.h" | 16 #include "../shared/Utils.h" |
| 17 #include "../shared/Dictionary.h" | 17 #include "../shared/Dictionary.h" |
| 18 | 18 |
| 19 #ifdef DEBUG_HIDE_EL | 19 #ifdef DEBUG_HIDE_EL |
| 20 DWORD profileTime = 0; | 20 DWORD profileTime = 0; |
| 21 #endif | 21 #endif |
| 22 | |
|
Felix Dahlke
2014/06/30 17:24:04
I liked it better with just one line of whitespace
| |
| 23 | 22 |
| 24 typedef HANDLE (WINAPI *OPENTHEMEDATA)(HWND, LPCWSTR); | 23 typedef HANDLE (WINAPI *OPENTHEMEDATA)(HWND, LPCWSTR); |
| 25 typedef HRESULT (WINAPI *DRAWTHEMEBACKGROUND)(HANDLE, HDC, INT, INT, LPRECT, LPR ECT); | 24 typedef HRESULT (WINAPI *DRAWTHEMEBACKGROUND)(HANDLE, HDC, INT, INT, LPRECT, LPR ECT); |
| 26 typedef HRESULT (WINAPI *CLOSETHEMEDATA)(HANDLE); | 25 typedef HRESULT (WINAPI *CLOSETHEMEDATA)(HANDLE); |
| 27 | 26 |
| 28 HICON CPluginClass::s_hIcons[ICON_MAX] = { NULL, NULL, NULL }; | 27 HICON CPluginClass::s_hIcons[ICON_MAX] = { NULL, NULL, NULL }; |
| 29 DWORD CPluginClass::s_hIconTypes[ICON_MAX] = { IDI_ICON_DISABLED, IDI_ICON_ENABL ED, IDI_ICON_DEACTIVATED }; | 28 DWORD CPluginClass::s_hIconTypes[ICON_MAX] = { IDI_ICON_DISABLED, IDI_ICON_ENABL ED, IDI_ICON_DEACTIVATED }; |
| 30 | 29 |
| 31 CPluginMimeFilterClient* CPluginClass::s_mimeFilter = NULL; | 30 CPluginMimeFilterClient* CPluginClass::s_mimeFilter = NULL; |
| 32 | 31 |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1336 settings->RemoveWhiteListedDomain(ExtractDomain(urlString)); | 1335 settings->RemoveWhiteListedDomain(ExtractDomain(urlString)); |
| 1337 } | 1336 } |
| 1338 else | 1337 else |
| 1339 { | 1338 { |
| 1340 settings->AddWhiteListedDomain(ExtractDomain(urlString)); | 1339 settings->AddWhiteListedDomain(ExtractDomain(urlString)); |
| 1341 } | 1340 } |
| 1342 GetBrowser()->Refresh(); | 1341 GetBrowser()->Refresh(); |
| 1343 } | 1342 } |
| 1344 case ID_MENU_ACCEPTABLE_ADS: | 1343 case ID_MENU_ACCEPTABLE_ADS: |
| 1345 { | 1344 { |
| 1346 if (client->AcceptableAdsStatus()) | 1345 if (client->IsAcceptableAdsEnabled()) |
| 1347 { | 1346 { |
| 1348 client->RemoveSubscription(client->GetPref(L"subscriptions_exceptionsurl ", L"")); | 1347 client->RemoveSubscription(client->GetPref(L"subscriptions_exceptionsurl ", L"")); |
| 1349 } | 1348 } |
| 1350 else | 1349 else |
| 1351 { | 1350 { |
| 1352 client->AddSubscription(client->GetPref(L"subscriptions_exceptionsurl", L"")); | 1351 client->AddSubscription(client->GetPref(L"subscriptions_exceptionsurl", L"")); |
| 1353 } | 1352 } |
| 1354 } | 1353 } |
| 1355 default: | 1354 default: |
| 1356 break; | 1355 break; |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1443 | 1442 |
| 1444 // Settings | 1443 // Settings |
| 1445 ctext = dictionary->Lookup("menu", "menu-settings"); | 1444 ctext = dictionary->Lookup("menu", "menu-settings"); |
| 1446 fmii.fMask = MIIM_STATE | MIIM_STRING; | 1445 fmii.fMask = MIIM_STATE | MIIM_STRING; |
| 1447 fmii.fState = MFS_ENABLED; | 1446 fmii.fState = MFS_ENABLED; |
| 1448 fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str()); | 1447 fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str()); |
| 1449 fmii.cch = static_cast<UINT>(ctext.size()); | 1448 fmii.cch = static_cast<UINT>(ctext.size()); |
| 1450 ::SetMenuItemInfoW(hMenu, ID_MENU_SETTINGS, FALSE, &fmii); | 1449 ::SetMenuItemInfoW(hMenu, ID_MENU_SETTINGS, FALSE, &fmii); |
| 1451 | 1450 |
| 1452 ctext = dictionary->Lookup("menu", "menu-acceptable-ads"); | 1451 ctext = dictionary->Lookup("menu", "menu-acceptable-ads"); |
| 1453 // Are Acceptable Ads enabled? | 1452 if (client->IsAcceptableAdsEnabled()) |
|
Felix Dahlke
2014/06/30 17:24:04
This comment can also go if the function is called
| |
| 1454 if (client->AcceptableAdsStatus()) | |
| 1455 { | 1453 { |
| 1456 fmii.fState = MFS_CHECKED | MFS_ENABLED; | 1454 fmii.fState = MFS_CHECKED | MFS_ENABLED; |
| 1457 } | 1455 } |
| 1458 else | 1456 else |
| 1459 { | 1457 { |
| 1460 fmii.fState = MFS_UNCHECKED | MFS_ENABLED; | 1458 fmii.fState = MFS_UNCHECKED | MFS_ENABLED; |
| 1461 } | 1459 } |
| 1462 fmii.fMask = MIIM_STRING | MIIM_STATE; | 1460 fmii.fMask = MIIM_STRING | MIIM_STATE; |
| 1463 fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str()); | 1461 fmii.dwTypeData = const_cast<LPWSTR>(ctext.c_str()); |
| 1464 fmii.cch = static_cast<UINT>(ctext.size()); | 1462 fmii.cch = static_cast<UINT>(ctext.size()); |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1997 } | 1995 } |
| 1998 } | 1996 } |
| 1999 } | 1997 } |
| 2000 | 1998 |
| 2001 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); | 1999 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); |
| 2002 } | 2000 } |
| 2003 | 2001 |
| 2004 return hTabWnd; | 2002 return hTabWnd; |
| 2005 | 2003 |
| 2006 } | 2004 } |
| LEFT | RIGHT |