Show
Ignore:
Timestamp:
04/12/06 14:01:14 (3 years ago)
Author:
jordi
Message:

Now when the "Go To Page" is unsensitived, ALL the tool item is sensitived otherwise the label would focus the attention.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gtk/MainView.cxx

    r43 r44  
    138138    gtk_box_pack_start (GTK_BOX (m_MainBox), toolBar, FALSE, FALSE, 0); 
    139139    // Add the current page tool item. 
    140     GtkToolItem *currentPage = createCurrentPage (); 
    141     gtk_toolbar_insert (GTK_TOOLBAR (toolBar), currentPage, CURRENT_PAGE_POS); 
     140    createCurrentPage (); 
     141    gtk_toolbar_insert (GTK_TOOLBAR (toolBar), m_CurrentPageToolItem, 
     142                        CURRENT_PAGE_POS); 
    142143    gtk_toolbar_insert (GTK_TOOLBAR (toolBar), gtk_separator_tool_item_new (), 
    143144                        CURRENT_PAGE_POS + 1); 
     
    254255MainView::sensitiveGoToPage (gboolean sensitive) 
    255256{ 
    256     gtk_widget_set_sensitive (m_CurrentPage, sensitive); 
     257    gtk_widget_set_sensitive (GTK_WIDGET (m_CurrentPageToolItem), sensitive); 
    257258} 
    258259 
     
    389390/// @return The tool item to add to the toolbar. 
    390391/// 
    391 GtkToolItem * 
     392void 
    392393MainView::createCurrentPage () 
    393394{ 
    394     GtkWidget *hbox = gtk_hbox_new (0, FALSE); 
     395    GtkWidget *hbox = gtk_hbox_new (FALSE, 3); 
    395396     
    396397    GtkWidget *pageLabel= gtk_label_new (_("Page")); 
     
    404405    gtk_box_pack_start (GTK_BOX (hbox), m_CurrentPage, TRUE, TRUE, 0); 
    405406     
    406     GtkToolItem *toolItem = gtk_tool_item_new (); 
    407     gtk_container_add (GTK_CONTAINER (toolItem), hbox); 
    408  
    409     return toolItem; 
     407    m_CurrentPageToolItem = gtk_tool_item_new (); 
     408    gtk_container_add (GTK_CONTAINER (m_CurrentPageToolItem), hbox); 
    410409} 
    411410