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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 if (it != s_threadInstances.end()) | 996 if (it != s_threadInstances.end()) |
997 { | 997 { |
998 tab = it->second->m_tab; | 998 tab = it->second->m_tab; |
999 } | 999 } |
1000 } | 1000 } |
1001 s_criticalSectionLocal.Unlock(); | 1001 s_criticalSectionLocal.Unlock(); |
1002 | 1002 |
1003 return tab; | 1003 return tab; |
1004 } | 1004 } |
1005 | 1005 |
| 1006 bool CPluginClass::HasTabs() |
| 1007 { |
| 1008 ATL::CComCritSecLock<CComAutoCriticalSection> lock(s_criticalSectionLocal); |
| 1009 return !s_threadInstances.empty(); |
| 1010 } |
1006 | 1011 |
1007 STDMETHODIMP CPluginClass::QueryStatus(const GUID* pguidCmdGroup, ULONG cCmds, O
LECMD prgCmds[], OLECMDTEXT* pCmdText) | 1012 STDMETHODIMP CPluginClass::QueryStatus(const GUID* pguidCmdGroup, ULONG cCmds, O
LECMD prgCmds[], OLECMDTEXT* pCmdText) |
1008 { | 1013 { |
1009 if (cCmds == 0) return E_INVALIDARG; | 1014 if (cCmds == 0) return E_INVALIDARG; |
1010 if (prgCmds == 0) return E_POINTER; | 1015 if (prgCmds == 0) return E_POINTER; |
1011 | 1016 |
1012 prgCmds[0].cmdf = OLECMDF_ENABLED; | 1017 prgCmds[0].cmdf = OLECMDF_ENABLED; |
1013 | 1018 |
1014 return S_OK; | 1019 return S_OK; |
1015 } | 1020 } |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1728 s_criticalSectionLocal.Unlock(); | 1733 s_criticalSectionLocal.Unlock(); |
1729 | 1734 |
1730 } | 1735 } |
1731 } | 1736 } |
1732 } | 1737 } |
1733 | 1738 |
1734 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); | 1739 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); |
1735 } | 1740 } |
1736 return hTabWnd; | 1741 return hTabWnd; |
1737 } | 1742 } |
OLD | NEW |