Changeset 198

Show
Ignore:
Timestamp:
05/28/06 13:58:35 (2 years ago)
Author:
jordi
Message:

Added the PreferencesPter? and IPreferencesView classes as well as they test suite PreferencesPterTest? and DumbPreferencesView? classes. The first test, that tests that setting the browser command line changes the configuration, works.

Location:
trunk
Files:
7 added
7 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/FindPter.cxx

    r191 r198  
    4444/// 
    4545FindPter::~FindPter () 
    46 {     
     46{ 
    4747    m_Document = NULL; 
    4848    // This also deletes the find results. 
     
    9292        m_Document->goToPage (m_FindPage); 
    9393    } 
    94     else         
     94    else 
    9595    { 
    9696        G_LOCK (cancelJob); 
     
    247247{ 
    248248    g_assert ( NULL != view && "Tried to set a NULL view."); 
    249      
     249 
    250250    m_View = view; 
    251251    m_View->setPresenter (this); 
  • trunk/src/IFindView.h

    r172 r198  
    3838            /// @brief Destroys all allocated memory for IFindView. 
    3939            /// 
    40             virtual ~IFindView (void)  
    41             {  
     40            virtual ~IFindView (void) 
     41            { 
    4242            } 
    4343 
     
    4747            /// @return The presenter that is controlling the view. 
    4848            /// 
    49             FindPter *getPresenter (void)  
    50             {  
    51                 return m_Pter;  
     49            FindPter *getPresenter (void) 
     50            { 
     51                return m_Pter; 
    5252            } 
    5353 
    54             ///  
     54            /// 
    5555            /// @brief Sets the view's presenter. 
    5656            /// 
     
    6060            /// @param pter The presenter that will control the view. 
    6161            /// 
    62             virtual void setPresenter (FindPter *pter)  
    63             {  
    64                 m_Pter = pter;  
     62            virtual void setPresenter (FindPter *pter) 
     63            { 
     64                m_Pter = pter; 
    6565            } 
    6666 
     
    9191            /// 
    9292            virtual void sensitiveFindNext (gboolean sensitive) = 0; 
    93              
     93 
    9494            /// 
    9595            /// @brief Sensitives the Find Next button. 
     
    118118            /// @brief Constructs a new IFindView object. 
    119119            /// 
    120             IFindView (void)  
    121             {  
    122                 m_Pter = NULL;  
     120            IFindView (void) 
     121            { 
     122                m_Pter = NULL; 
    123123            } 
    124124    }; 
  • trunk/src/Makefile.am

    r196 r198  
    3131    IMainView.h \ 
    3232    IPageView.h \ 
     33    IPreferencesView.h  \ 
    3334    JobFind.cxx \ 
    3435    JobFind.h   \ 
     
    4243    PagePter.h  \ 
    4344    PDFDocument.cxx \ 
    44     PDFDocument.h 
     45    PDFDocument.h   \ 
     46    PreferencesPter.cxx \ 
     47    PreferencesPter.h 
    4548 
    4649libepdfview_a_CXXFLAGS =    \ 
  • trunk/src/epdfview.h

    r196 r198  
    4242#include <IFindView.h> 
    4343#include <IPageView.h> 
     44#include <IPreferencesView.h> 
    4445#include <IMainView.h> 
    4546#include <FindPter.h> 
    4647#include <PagePter.h> 
     48#include <PreferencesPter.h> 
    4749#include <MainPter.h> 
    4850 
  • trunk/tests/DumbFindView.h

    r173 r198  
    2626            DumbFindView (void); 
    2727            ~DumbFindView (void); 
    28              
     28 
    2929            const gchar *getTextToFind (void); 
    3030            void hide (void); 
     
    3232            void sensitiveFindPrevious (gboolean sensitive); 
    3333            void setInformationText (const gchar *text); 
    34              
     34 
    3535            // Methods for test only purposes. 
    3636            const gchar *getInformationText (void); 
    3737            gboolean isFindNextSensitive (void); 
    38             gboolean isFindPreviousSensitive (void);             
     38            gboolean isFindPreviousSensitive (void); 
    3939            void setTextToFind (const gchar *text); 
    4040 
    41         protected:             
     41        protected: 
    4242            gboolean m_FindNextSensitive; 
    4343            gboolean m_FindPreviousSensitive; 
  • trunk/tests/FindPterTest.cxx

    r194 r198  
    4444    m_View = new DumbFindView (); 
    4545    m_FindPter->setView (m_View); 
    46      
     46 
    4747    G_LOCK (JobRender); 
    4848    JobRender::m_CanProcessJobs = TRUE; 
  • trunk/tests/Makefile.am

    r182 r198  
    2222    DumbPageView.cxx    \ 
    2323    DumbPageView.h  \ 
     24    DumbPreferencesView.cxx \ 
     25    DumbPreferencesView.h   \ 
    2426    FindPterTest.cxx    \ 
    2527    FindPterTest.h  \ 
     
    3133    PDFDocumentTest.cxx \ 
    3234    PDFDocumentTest.h   \ 
     35    PreferencesPterTest.cxx \ 
     36    PreferencesPterTest.h   \ 
    3337    Utils.cxx   \ 
    3438    Utils.h 
    3539 
    3640 
    37 test_epdfview_CXXFLAGS =                        \ 
    38     -DTEST_DIR='"$(top_srcdir)/tests/"'         \ 
    39     -I$(top_srcdir)/src                         \ 
    40     $(GLIB_CFLAGS)                              \ 
     41test_epdfview_CXXFLAGS =    \ 
     42    -DTEST_DIR='"$(top_srcdir)/tests/"' \ 
     43    -I$(top_srcdir)/src \ 
     44    $(GLIB_CFLAGS)  \ 
    4145    $(CPPUNIT_CFLAGS) 
    4246