OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include "PluginClass.h" | 3 #include "PluginClass.h" |
4 #include "PluginDictionary.h" | 4 #include "PluginDictionary.h" |
5 #include "PluginSettings.h" | 5 #include "PluginSettings.h" |
6 #include "PluginSystem.h" | 6 #include "PluginSystem.h" |
7 #ifdef SUPPORT_FILTER | 7 #ifdef SUPPORT_FILTER |
8 #include "PluginFilter.h" | 8 #include "PluginFilter.h" |
9 #endif | 9 #endif |
10 #include "PluginMimeFilterClient.h" | 10 #include "PluginMimeFilterClient.h" |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 { | 559 { |
560 if (!isVisible) | 560 if (!isVisible) |
561 { | 561 { |
562 if (!settings->GetBool("statusbarasked", false)) | 562 if (!settings->GetBool("statusbarasked", false)) |
563 { | 563 { |
564 SHANDLE_PTR pBrowserHWnd; | 564 SHANDLE_PTR pBrowserHWnd; |
565 browser->get_HWND((SHANDLE_PTR*)&pBrowserHWnd); | 565 browser->get_HWND((SHANDLE_PTR*)&pBrowserHWnd); |
566 CPluginDictionary* dictionary = CPluginDictionary::GetInstance(false); | 566 CPluginDictionary* dictionary = CPluginDictionary::GetInstance(false); |
567 settings->SetBool("statusbarasked", true); | 567 settings->SetBool("statusbarasked", true); |
568 settings->Write(); | 568 settings->Write(); |
569 | 569 |
570 HKEY pHkey; | 570 HKEY pHkey; |
571 HKEY pHkeySub; | 571 HKEY pHkeySub; |
572 LSTATUS regRes = 0; | 572 LSTATUS regRes = 0; |
573 regRes = RegOpenCurrentUser(KEY_WRITE, &pHkey); | 573 regRes = RegOpenCurrentUser(KEY_WRITE, &pHkey); |
574 | 574 |
575 // Do we have enough rights to enable a status bar? | 575 // Do we have enough rights to enable a status bar? |
576 if (regRes != 0) | 576 if (regRes != 0) |
577 { | 577 { |
578 // We use the tab window here and in the next few calls, since the b
rowser window may still not be available | 578 // We use the tab window here and in the next few calls, since the b
rowser window may still not be available |
579 LRESULT res = MessageBox((HWND)m_hTabWnd, dictionary->Lookup("ERROR_
CAN_NOT_ENABLE_STATUS_BAR"), | 579 LRESULT res = MessageBox((HWND)m_hTabWnd, dictionary->Lookup("ERROR_
CAN_NOT_ENABLE_STATUS_BAR"), |
580 dictionary->Lookup("ERROR_CAN_NOT_ENABLE_S
TATUS_BAR_TITLE"), MB_OK); | 580 dictionary->Lookup("ERROR_CAN_NOT_ENABLE_STATUS_BAR_TITLE"), MB_OK
); |
581 return; | 581 return; |
582 } | 582 } |
583 // Ask if a user wants to enable a status bar automatically | 583 // Ask if a user wants to enable a status bar automatically |
584 LRESULT res = MessageBox((HWND)m_hTabWnd, dictionary->Lookup("ERROR_ST
ATUS_BAR_DISABLED"), | 584 LRESULT res = MessageBox((HWND)m_hTabWnd, dictionary->Lookup("ERROR_ST
ATUS_BAR_DISABLED"), |
585 dictionary->Lookup("ERROR_STATUS_BAR_DISABLE
D_TITLE"), MB_YESNO); | 585 dictionary->Lookup("ERROR_STATUS_BAR_DISABLED_TITLE"), MB_YESNO); |
586 if (res == IDYES) | 586 if (res == IDYES) |
587 { | 587 { |
588 DWORD trueth = 1; | 588 DWORD trueth = 1; |
589 regRes = RegOpenKey(pHkey, L"Software\\Microsoft\\Internet Explorer\
\MINIE", &pHkeySub); | 589 regRes = RegOpenKey(pHkey, L"Software\\Microsoft\\Internet Explorer\
\MINIE", &pHkeySub); |
590 regRes = RegSetValueEx(pHkeySub, L"ShowStatusBar", 0, REG_DWORD, (BY
TE*)&trueth, sizeof(DWORD)); | 590 regRes = RegSetValueEx(pHkeySub, L"ShowStatusBar", 0, REG_DWORD, (BY
TE*)&trueth, sizeof(DWORD)); |
591 regRes = RegCloseKey(pHkeySub); | 591 regRes = RegCloseKey(pHkeySub); |
592 regRes = RegOpenKey(pHkey, L"Software\\Microsoft\\Internet Explorer\
\Main", &pHkeySub); | 592 regRes = RegOpenKey(pHkey, L"Software\\Microsoft\\Internet Explorer\
\Main", &pHkeySub); |
593 regRes = RegSetValueEx(pHkeySub, L"StatusBarWeb", 0, REG_DWORD, (BYT
E*)&trueth, sizeof(DWORD)); | 593 regRes = RegSetValueEx(pHkeySub, L"StatusBarWeb", 0, REG_DWORD, (BYT
E*)&trueth, sizeof(DWORD)); |
594 regRes = RegCloseKey(pHkeySub); | 594 regRes = RegCloseKey(pHkeySub); |
595 hr = browser->put_StatusBar(TRUE); | 595 hr = browser->put_StatusBar(TRUE); |
(...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2110 if (browser) | 2110 if (browser) |
2111 { | 2111 { |
2112 HRESULT hr = S_OK; | 2112 HRESULT hr = S_OK; |
2113 | 2113 |
2114 hr = browser->get_StatusBar(&isVisible); | 2114 hr = browser->get_StatusBar(&isVisible); |
2115 if (SUCCEEDED(hr)) | 2115 if (SUCCEEDED(hr)) |
2116 { | 2116 { |
2117 if (!isVisible) | 2117 if (!isVisible) |
2118 { | 2118 { |
2119 CPluginDictionary* dictionary = CPluginDictionary::GetInstance(); | 2119 CPluginDictionary* dictionary = CPluginDictionary::GetInstance(); |
2120 | 2120 |
2121 LRESULT res = MessageBox(NULL, dictionary->Lookup("ERROR_STATUS_BA
R_DISABLED"), dictionary->Lookup("ERROR_STATUS_BAR_DISABLED_TITLE"), MB_YESNO); | 2121 LRESULT res = MessageBox(NULL, dictionary->Lookup("ERROR_STATUS_BA
R_DISABLED"), dictionary->Lookup("ERROR_STATUS_BAR_DISABLED_TITLE"), MB_YESNO); |
2122 if (res == IDYES) | 2122 if (res == IDYES) |
2123 { | 2123 { |
2124 hr = browser->put_StatusBar(TRUE); | 2124 hr = browser->put_StatusBar(TRUE); |
2125 if (FAILED(hr)) | 2125 if (FAILED(hr)) |
2126 { | 2126 { |
2127 DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_UI, PLUGIN_ERROR_UI_PUT_STATU
SBAR, "Class::Enable statusbar"); | 2127 DEBUG_ERROR_LOG(hr, PLUGIN_ERROR_UI, PLUGIN_ERROR_UI_PUT_STATU
SBAR, "Class::Enable statusbar"); |
2128 } | 2128 } |
2129 } | 2129 } |
2130 } | 2130 } |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2332 } | 2332 } |
2333 } | 2333 } |
2334 } | 2334 } |
2335 | 2335 |
2336 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); | 2336 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); |
2337 } | 2337 } |
2338 | 2338 |
2339 return hTabWnd; | 2339 return hTabWnd; |
2340 | 2340 |
2341 } | 2341 } |
OLD | NEW |