Changeset 62

Show
Ignore:
Timestamp:
04/14/06 13:42:25 (2 years ago)
Author:
jordi
Message:

The main presenter now sets the sensitiveness of a "Reload" action, still to implement, thought.

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/IMainView.h

    r49 r62  
    133133 
    134134            /// 
     135            /// @brief Changes the sensitivity of the "Reload" action. 
     136            /// 
     137            /// The view must change the sensitivity (it's called enabled or 
     138            /// disabled on some toolkits) of the "Reload" action 
     139            /// (both on the menu and the toolbar or any other place). 
     140            /// 
     141            /// @param sensitive Set to TRUE if need to make sensitive (enable) 
     142            ///                  the action (enable) or FALSE to  
     143            ///                  insensitive (disable) it. 
     144            /// 
     145            virtual void sensitiveReload (gboolean sensitive) = 0; 
     146             
     147            /// 
    135148            /// @brief Changes the sensitivity of the "Rotate Left" action. 
    136149            /// 
  • trunk/src/MainPter.cxx

    r58 r62  
    8282        } 
    8383        view.sensitiveGoToPage (TRUE); 
     84        view.sensitiveReload (TRUE); 
    8485        view.sensitiveRotateRight (TRUE); 
    8586        view.sensitiveRotateLeft (TRUE); 
     
    99100        view.sensitiveGoToPage (FALSE); 
    100101        view.sensitiveGoToPreviousPage (FALSE); 
     102        view.sensitiveReload (FALSE); 
    101103        view.sensitiveRotateRight (FALSE); 
    102104        view.sensitiveRotateLeft (FALSE); 
  • trunk/tests/DumbMainView.cxx

    r36 r62  
    3838    m_SensitiveGoToPage = TRUE; 
    3939    m_SensitiveGoToPreviousPage = TRUE; 
     40    m_SensitiveReload = TRUE; 
    4041    m_SensitiveRotateLeft = TRUE; 
    4142    m_SensitiveRotateRight = TRUE; 
     
    102103} 
    103104 
     105void 
     106DumbMainView::sensitiveReload (gboolean sensitive) 
     107{ 
     108    m_SensitiveReload = sensitive; 
     109} 
     110 
    104111void  
    105112DumbMainView::sensitiveRotateLeft (gboolean sensitive) 
     
    262269{ 
    263270    return m_SensitiveGoToPreviousPage; 
     271} 
     272 
     273gboolean 
     274DumbMainView::isSensitiveReload () 
     275{ 
     276    return m_SensitiveReload; 
    264277} 
    265278 
  • trunk/tests/DumbMainView.h

    r36 r62  
    3535            void sensitiveGoToPage (gboolean sensitive); 
    3636            void sensitiveGoToPreviousPage (gboolean sensitive); 
     37            void sensitiveReload (gboolean sensitive); 
    3738            void sensitiveRotateLeft (gboolean sensitive); 
    3839            void sensitiveRotateRight (gboolean sensitive); 
     
    6263            gboolean isSensitiveGoToPage (void); 
    6364            gboolean isSensitiveGoToPreviousPage (void); 
     65            gboolean isSensitiveReload (void); 
    6466            gboolean isSensitiveRotateLeft (void); 
    6567            gboolean isSensitiveRotateRight (void); 
     
    8385            gboolean m_SensitiveGoToPage; 
    8486            gboolean m_SensitiveGoToPreviousPage; 
     87            gboolean m_SensitiveReload; 
    8588            gboolean m_SensitiveRotateLeft; 
    8689            gboolean m_SensitiveRotateRight; 
  • trunk/tests/MainPterTest.cxx

    r58 r62  
    6969    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPage ()); 
    7070    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPreviousPage ()); 
     71    CPPUNIT_ASSERT (!m_View->isSensitiveReload ()); 
    7172    CPPUNIT_ASSERT (!m_View->isSensitiveRotateLeft ()); 
    7273    CPPUNIT_ASSERT (!m_View->isSensitiveRotateRight ()); 
     
    9899    CPPUNIT_ASSERT (m_View->isSensitiveGoToPage ()); 
    99100    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPreviousPage ()); 
     101    CPPUNIT_ASSERT (m_View->isSensitiveReload ()); 
    100102    CPPUNIT_ASSERT (m_View->isSensitiveRotateLeft ()); 
    101103    CPPUNIT_ASSERT (m_View->isSensitiveRotateRight ()); 
     
    116118    CPPUNIT_ASSERT (m_View->isSensitiveGoToPage ()); 
    117119    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPreviousPage ()); 
     120    CPPUNIT_ASSERT (m_View->isSensitiveReload ()); 
    118121    CPPUNIT_ASSERT (m_View->isSensitiveRotateLeft ()); 
    119122    CPPUNIT_ASSERT (m_View->isSensitiveRotateRight ()); 
     
    143146    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPage ()); 
    144147    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPreviousPage ()); 
     148    CPPUNIT_ASSERT (!m_View->isSensitiveReload ()); 
    145149    CPPUNIT_ASSERT (!m_View->isSensitiveRotateLeft ()); 
    146150    CPPUNIT_ASSERT (!m_View->isSensitiveRotateRight ()); 
     
    173177    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPage ()); 
    174178    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPreviousPage ()); 
     179    CPPUNIT_ASSERT (!m_View->isSensitiveReload ()); 
    175180    CPPUNIT_ASSERT (!m_View->isSensitiveRotateLeft ()); 
    176181    CPPUNIT_ASSERT (!m_View->isSensitiveRotateRight ()); 
     
    205210    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPage ()); 
    206211    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPreviousPage ()); 
     212    CPPUNIT_ASSERT (!m_View->isSensitiveReload ()); 
    207213    CPPUNIT_ASSERT (!m_View->isSensitiveRotateLeft ()); 
    208214    CPPUNIT_ASSERT (!m_View->isSensitiveRotateRight ()); 
     
    237243    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPage ()); 
    238244    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPreviousPage ()); 
     245    CPPUNIT_ASSERT (!m_View->isSensitiveReload ()); 
    239246    CPPUNIT_ASSERT (!m_View->isSensitiveRotateLeft ()); 
    240247    CPPUNIT_ASSERT (!m_View->isSensitiveRotateRight ()); 
     
    269276    CPPUNIT_ASSERT (m_View->isSensitiveGoToPage ()); 
    270277    CPPUNIT_ASSERT (!m_View->isSensitiveGoToPreviousPage ()); 
     278    CPPUNIT_ASSERT (m_View->isSensitiveReload ()); 
    271279    CPPUNIT_ASSERT (m_View->isSensitiveRotateLeft ()); 
    272280    CPPUNIT_ASSERT (m_View->isSensitiveRotateRight ());