Changeset 66 for trunk/src/MainPter.cxx
- Timestamp:
- 04/15/06 06:57:59 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/MainPter.cxx (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MainPter.cxx
r65 r66 76 76 77 77 IMainView &view = getView (); 78 gboolean showSidebar = FALSE; 78 79 if ( m_Document->isLoaded () ) 79 80 { … … 97 98 view.setTotalPages (m_Document->getNumPages ()); 98 99 100 // Check if we should see the outlines. 101 showSidebar = (NULL != m_Document->getOutline () && 102 0 < m_Document->getOutline ()->getNumChildren () && 103 PageModeOutlines != m_Document->getPageMode ()); 104 99 105 if ( canShowPage ) 100 106 { … … 117 123 view.sensitiveZoomFit (FALSE); 118 124 view.sensitiveZoomWidth (FALSE); 125 showSidebar = FALSE; 119 126 } 120 127 128 view.setOutline (m_Document->getOutline ()); 129 view.showSidebar (showSidebar); 121 130 view.show (); 122 131 } … … 247 256 openDocument (fileName, NULL, TRUE); 248 257 g_free (fileName); 258 } 259 260 /// 261 /// @brief The user activated an outline. 262 /// 263 /// When the sidebar is shown and the user clicks on a outline, the view 264 /// should send to the presenter which outline has been activated, so the 265 /// presenter can change the page to the pointed by the outline. 266 /// 267 /// @param outline The outline that has been activated. 268 void 269 MainPter::outlineActivated (DocumentOutline *outline) 270 { 271 g_assert (NULL != outline && "The outline activated is NULL."); 272 273 m_Document->goToPage (outline->getDestinationPage ()); 274 showPage (); 249 275 } 250 276
