[Amis-vcs] SF.net SVN: amis: [2427] branches/amis3/AmisGuiMFC2
Brought to you by:
julienq,
marisademeglio
From: <mar...@us...> - 2008-03-18 05:01:51
|
Revision: 2427 http://amis.svn.sourceforge.net/amis/?rev=2427&view=rev Author: marisademeglio Date: 2008-03-17 22:01:55 -0700 (Mon, 17 Mar 2008) Log Message: ----------- Fixed bug where recent books list wasn't recent enough Sidebar list views no longer cut off text Modified Paths: -------------- branches/amis3/AmisGuiMFC2/AmisGuiMFC2.aps branches/amis3/AmisGuiMFC2/AmisGuiMFC2.rc branches/amis3/AmisGuiMFC2/include/gui/sidebar/NavListControl.h branches/amis3/AmisGuiMFC2/src/gui/HtmlView.cpp branches/amis3/AmisGuiMFC2/src/gui/MenuManip.cpp branches/amis3/AmisGuiMFC2/src/gui/sidebar/AmisSidebar.cpp branches/amis3/AmisGuiMFC2/src/gui/sidebar/NavListControl.cpp Modified: branches/amis3/AmisGuiMFC2/AmisGuiMFC2.aps =================================================================== (Binary files differ) Modified: branches/amis3/AmisGuiMFC2/AmisGuiMFC2.rc =================================================================== --- branches/amis3/AmisGuiMFC2/AmisGuiMFC2.rc 2008-03-18 03:42:12 UTC (rev 2426) +++ branches/amis3/AmisGuiMFC2/AmisGuiMFC2.rc 2008-03-18 05:01:55 UTC (rev 2427) @@ -77,6 +77,7 @@ IDD_SIDEBAR, DIALOG BEGIN + RIGHTMARGIN, 86 BOTTOMMARGIN, 181 END Modified: branches/amis3/AmisGuiMFC2/include/gui/sidebar/NavListControl.h =================================================================== --- branches/amis3/AmisGuiMFC2/include/gui/sidebar/NavListControl.h 2008-03-18 03:42:12 UTC (rev 2426) +++ branches/amis3/AmisGuiMFC2/include/gui/sidebar/NavListControl.h 2008-03-18 05:01:55 UTC (rev 2427) @@ -54,6 +54,7 @@ DECLARE_MESSAGE_MAP() public: afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSize(UINT nType, int cx, int cy); }; } } Modified: branches/amis3/AmisGuiMFC2/src/gui/HtmlView.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/HtmlView.cpp 2008-03-18 03:42:12 UTC (rev 2426) +++ branches/amis3/AmisGuiMFC2/src/gui/HtmlView.cpp 2008-03-18 05:01:55 UTC (rev 2427) @@ -477,8 +477,8 @@ HRESULT CAmisHtmlView::OnShowContextMenu(DWORD dwID, LPPOINT ppt,LPUNKNOWN pcmdtReserved, LPDISPATCH pdispReserved) { - return S_FALSE; // Enable the HtmlView popup menu - //return S_OK; // Disable the standard HtmlView popup menu + //return S_FALSE; // Enable the HtmlView popup menu + return S_OK; // Disable the standard HtmlView popup menu } void CAmisHtmlView::OnEditCopy() Modified: branches/amis3/AmisGuiMFC2/src/gui/MenuManip.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/MenuManip.cpp 2008-03-18 03:42:12 UTC (rev 2426) +++ branches/amis3/AmisGuiMFC2/src/gui/MenuManip.cpp 2008-03-18 05:01:55 UTC (rev 2427) @@ -90,7 +90,7 @@ int max = AMIS_MAX_RECENT_BOOKS; if (num_entries < max) max = num_entries; //get the last X entries - for (i=max-1; i>=0; i--) + for (i=num_entries-1; i>=num_entries-max; i--) { p_entry = theApp.getHistory()->getEntry(i); string filepath = p_entry->mPath.get_url(); Modified: branches/amis3/AmisGuiMFC2/src/gui/sidebar/AmisSidebar.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/sidebar/AmisSidebar.cpp 2008-03-18 03:42:12 UTC (rev 2426) +++ branches/amis3/AmisGuiMFC2/src/gui/sidebar/AmisSidebar.cpp 2008-03-18 05:01:55 UTC (rev 2427) @@ -270,6 +270,7 @@ mTree.GetWindowRect(mInitialRect); this->GetWindowRect(mInitialParentRect); + mNumTabs = 0; mIsShiftDown = false; mIsControlDown = false; Modified: branches/amis3/AmisGuiMFC2/src/gui/sidebar/NavListControl.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/sidebar/NavListControl.cpp 2008-03-18 03:42:12 UTC (rev 2426) +++ branches/amis3/AmisGuiMFC2/src/gui/sidebar/NavListControl.cpp 2008-03-18 05:01:55 UTC (rev 2427) @@ -57,6 +57,7 @@ ON_NOTIFY_REFLECT(LVN_KEYDOWN, OnKeyDown) //}}AFX_MSG_MAP ON_WM_CREATE() + ON_WM_SIZE() END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -121,5 +122,21 @@ { if (CListCtrl::OnCreate(lpCreateStruct) == -1) return -1; + CWnd* p_parent = this->GetParent(); + CRect rect; + p_parent->GetClientRect(&rect); + int w = rect.Width(); + this->SetColumnWidth(0, w); return 0; } + +void amis::gui::sidebar::CNavListControl::OnSize(UINT nType, int cx, int cy) +{ + CListCtrl::OnSize(nType, cx, cy); + + CWnd* p_parent = this->GetParent(); + CRect rect; + p_parent->GetClientRect(&rect); + int w = rect.Width(); + this->SetColumnWidth(0, w); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |