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/gtk/MainView.cxx

    r225 r227  
    3535// Constants. 
    3636static gint CURRENT_PAGE_POS = 5; 
    37 static gint CURRENT_PAGE_WIDTH = 14; 
     37static gint CURRENT_PAGE_WIDTH = 5; 
    3838static gint CURRENT_ZOOM_POS = 8; 
    3939static gint CURRENT_ZOOM_WIDTH = 6; 
    4040 
    4141// Enumerations. 
    42 static enum 
     42enum indexColumns 
    4343{ 
    4444    outlineTitleColumn, 
     
    4646    outlineDataColumn, 
    4747    outlineNumColumns 
    48 } indexColumns; 
     48}; 
    4949 
    5050// Forward declarations. 
     
    625625} 
    626626 
    627 void  
    628 MainView::setTotalPages (gint pages) 
    629 { 
    630     m_TotalPages = pages; 
    631 } 
    632  
    633 void  
     627void 
     628MainView::setNumberOfPagesText (const gchar *text) 
     629{ 
     630    gtk_label_set_text (GTK_LABEL (m_NumberOfPages), text); 
     631} 
     632 
     633void 
    634634MainView::setGoToPageText (const gchar *text) 
    635635{ 
     
    756756    GtkWidget *hbox = gtk_hbox_new (FALSE, 3); 
    757757 
    758     GtkWidget *pageLabel= gtk_label_new (_("Page")); 
     758    GtkWidget *pageLabel = gtk_label_new (_("Page")); 
    759759    gtk_box_pack_start (GTK_BOX (hbox), pageLabel, FALSE, FALSE, 0); 
    760760 
    761761    m_CurrentPage = gtk_entry_new (); 
    762     gtk_entry_set_text (GTK_ENTRY (m_CurrentPage), _("0 of 0")); 
     762    gtk_entry_set_text (GTK_ENTRY (m_CurrentPage), "0"); 
    763763    gtk_entry_set_alignment (GTK_ENTRY (m_CurrentPage), 1.0f); 
    764764    gtk_entry_set_width_chars (GTK_ENTRY (m_CurrentPage), CURRENT_PAGE_WIDTH); 
     
    766766                      G_CALLBACK (main_window_go_to_page_cb), m_Pter); 
    767767    gtk_box_pack_start (GTK_BOX (hbox), m_CurrentPage, TRUE, TRUE, 0); 
     768    m_NumberOfPages = gtk_label_new (_("of 0")); 
     769    gtk_misc_set_alignment (GTK_MISC (m_NumberOfPages), 0.0f, 0.5f); 
     770    gtk_box_pack_start (GTK_BOX (hbox), m_NumberOfPages, FALSE, FALSE, 0); 
    768771 
    769772    m_CurrentPageToolItem = gtk_tool_item_new ();