Changeset 227 for trunk/src/MainPter.cxx

Show
Ignore:
Timestamp:
06/12/06 16:40:59 (2 years ago)
Author:
jordi
Message:

The MainView? now has a separate widget for the current page number and the total page number, as requested in bug #37 closed in this revision.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/MainPter.cxx

    r225 r227  
    137137        view.activeZoomFit (config.zoomToFit ()); 
    138138        view.activeZoomWidth (config.zoomToWidth ()); 
    139         view.setTotalPages (m_Document->getNumPages ()); 
    140139#if defined (HAVE_CUPS) 
    141140        view.sensitivePrint (TRUE); 
     
    376375        gint newPageNum = m_Document->getCurrentPageNum (); 
    377376        gint totalPages = m_Document->getNumPages (); 
    378         gchar *goToPageText = g_strdup_printf (_("%d of %d"),  
    379                                                newPageNum, totalPages); 
     377        gchar *goToPageText = g_strdup_printf ("%d", newPageNum); 
    380378        getView ().setGoToPageText (goToPageText); 
    381379        g_free (goToPageText); 
     380        gchar *totalPagesText = g_strdup_printf (_("of %d"), totalPages); 
     381        getView ().setNumberOfPagesText (totalPagesText); 
     382        g_free (totalPagesText); 
    382383    } 
    383384} 
     
    845846    // Set the text for the current page. 
    846847    gint totalPages = m_Document->getNumPages (); 
    847     gchar *goToPageText = g_strdup_printf (_("%d of %d"), pageNum, totalPages); 
     848    gchar *goToPageText = g_strdup_printf ("%d", pageNum); 
    848849    view.setGoToPageText (goToPageText); 
    849850    g_free (goToPageText); 
     851    gchar *totalPagesText = g_strdup_printf(_("of %d"), totalPages); 
     852    view.setNumberOfPagesText (totalPagesText); 
     853    g_free (totalPagesText); 
    850854 
    851855    // Set the page navigation sensitivity.