Show
Ignore:
Timestamp:
04/11/06 11:10:26 (3 years ago)
Author:
jordi
Message:

The main presenter now can open files and changes the window's title to show the file name or the document's title, if it has title. Also changes the the control's sensitiveness.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/DumbMainView.cxx

    r23 r24  
    2929    // This won't be deleted because it's presenter responsability. 
    3030    m_DocumentPage = NULL; 
     31    m_OpenFileName = g_strdup (""); 
    3132    m_SensitiveGoToFirstPage = TRUE; 
    3233    m_SensitiveGoToLastPage = TRUE; 
     
    4445DumbMainView::~DumbMainView () 
    4546{ 
     47    g_free (m_OpenFileName); 
    4648    g_free (m_Title); 
    4749} 
     50             
     51gchar * 
     52DumbMainView::openFileDialog (void) 
     53{ 
     54    return g_strdup (m_OpenFileName); 
     55} 
    4856 
    4957void 
     
    105113{ 
    106114    m_Shown = TRUE; 
     115} 
     116 
     117void 
     118DumbMainView::showPage (DocumentPage *page) 
     119{ 
     120    m_DocumentPage = page; 
    107121} 
    108122 
     
    120134 
    121135gboolean 
     136DumbMainView::hasImagePageView () 
     137{ 
     138    return NULL != m_DocumentPage; 
     139} 
     140 
     141gboolean 
    122142DumbMainView::isShown () 
    123143{ 
     
    185205} 
    186206 
    187 gboolean 
    188 DumbMainView::hasImagePageView () 
    189 { 
    190     return NULL != m_DocumentPage; 
    191 } 
     207void 
     208DumbMainView::setOpenFileName (const gchar *fileName) 
     209{ 
     210    g_free (m_OpenFileName); 
     211    m_OpenFileName = g_strdup (fileName); 
     212}