Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginClass.cpp

Issue 11557015: Tooltip notification. Check for update fixes. (Closed)
Patch Set: Evem more comments addressing Created Sept. 25, 2013, 2:30 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 { 588 {
589 m_isInitializedOk = true; 589 m_isInitializedOk = true;
590 if (!InitObject(true)) 590 if (!InitObject(true))
591 { 591 {
592 // Unadvice(); 592 // Unadvice();
593 } 593 }
594 UpdateStatusBar(); 594 UpdateStatusBar();
595 } 595 }
596 } 596 }
597 } 597 }
598 if (notificationMessage.IsVisible()) 598 notificationMessage.Hide();
599 {
600 notificationMessage.Hide();
601 }
602 DEBUG_GENERAL("Tab change end"); 599 DEBUG_GENERAL("Tab change end");
603 return VARIANT_TRUE; 600 return VARIANT_TRUE;
604 } 601 }
605 602
606 // This gets called whenever there's a browser event 603 // This gets called whenever there's a browser event
607 STDMETHODIMP CPluginClass::Invoke(DISPID dispidMember, REFIID riid, LCID lcid, W ORD wFlags, DISPPARAMS* pDispParams, VARIANT* pvarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr) 604 STDMETHODIMP CPluginClass::Invoke(DISPID dispidMember, REFIID riid, LCID lcid, W ORD wFlags, DISPPARAMS* pDispParams, VARIANT* pvarResult, EXCEPINFO* pExcepInfo, UINT* puArgErr)
608 { 605 {
609 WCHAR tmp[256]; 606 WCHAR tmp[256];
610 wsprintf(tmp, L"Invoke: %d\n", dispidMember); 607 wsprintf(tmp, L"Invoke: %d\n", dispidMember);
611 DEBUG_GENERAL(tmp); 608 DEBUG_GENERAL(tmp);
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 case WM_WINDOWPOSCHANGING: 1796 case WM_WINDOWPOSCHANGING:
1800 { 1797 {
1801 RECT rect; 1798 RECT rect;
1802 GetWindowRect(pClass->m_hPaneWnd, &rect); 1799 GetWindowRect(pClass->m_hPaneWnd, &rect);
1803 if (pClass->notificationMessage.IsVisible()) 1800 if (pClass->notificationMessage.IsVisible())
1804 { 1801 {
1805 pClass->notificationMessage.Move(rect.left + (rect.right - rect.left) / 2, rect.top + (rect.bottom - rect.top) / 2); 1802 pClass->notificationMessage.Move(rect.left + (rect.right - rect.left) / 2, rect.top + (rect.bottom - rect.top) / 2);
1806 } 1803 }
1807 } 1804 }
1808 break; 1805 break;
1806 case WM_WINDOWPOSCHANGED:
1807 {
1808 WINDOWPOS* wndPos = reinterpret_cast<WINDOWPOS*>(lParam);
1809 if (wndPos->flags & SWP_HIDEWINDOW)
1810 {
1811 pClass->notificationMessage.Hide();
1812 }
1813 }
1814 break;
1809 case WM_ALREADY_UP_TO_DATE: 1815 case WM_ALREADY_UP_TO_DATE:
1810 { 1816 {
1811 Dictionary* dictionary = Dictionary::GetInstance(); 1817 Dictionary* dictionary = Dictionary::GetInstance();
1812 std::wstring upToDateText = dictionary->Lookup("updater", "update-already- up-to-date-text"); 1818 std::wstring upToDateText = dictionary->Lookup("updater", "update-already- up-to-date-text");
1813 std::wstring upToDateTitle = dictionary->Lookup("updater", "update-already -up-to-date-title"); 1819 std::wstring upToDateTitle = dictionary->Lookup("updater", "update-already -up-to-date-title");
1814 pClass->notificationMessage.SetTextAndIcon(upToDateText, upToDateTitle, TT I_INFO); 1820 pClass->notificationMessage.SetTextAndIcon(upToDateText, upToDateTitle, TT I_INFO);
1815 } 1821 }
1816 break; 1822 break;
1817 case WM_UPDATE_CHECK_ERROR: 1823 case WM_UPDATE_CHECK_ERROR:
1818 { 1824 {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 } 1968 }
1963 } 1969 }
1964 } 1970 }
1965 1971
1966 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); 1972 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT);
1967 } 1973 }
1968 1974
1969 return hTabWnd; 1975 return hTabWnd;
1970 1976
1971 } 1977 }
OLDNEW
« src/plugin/NotificationMessage.cpp ('K') | « src/plugin/NotificationMessage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld