Show
Ignore:
Timestamp:
06/13/06 15:50:59 (2 years ago)
Author:
jordi
Message:

Added the Color Model options to the print view.

Files:
1 modified

Legend:

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

    r231 r232  
    122122 
    123123void 
     124PrintView::addColorModel (const gchar *name, const gchar *value) 
     125{ 
     126    addOptionToList (m_ColorModel, name, value); 
     127} 
     128 
     129void 
    124130PrintView::addPageSize (const gchar *name, const gchar *value) 
    125131{ 
     
    148154 
    149155void 
     156PrintView::clearColorModelList () 
     157{ 
     158    gtk_list_store_clear (m_ColorModel); 
     159} 
     160 
     161void 
    150162PrintView::clearPageSizeList () 
    151163{ 
     
    236248{ 
    237249    return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (m_OddPageSet)); 
     250} 
     251 
     252void 
     253PrintView::selectColorModel (guint colorModelIndex) 
     254{ 
     255    gtk_combo_box_set_active (GTK_COMBO_BOX (m_ColorModelView), 
     256                              colorModelIndex); 
    238257} 
    239258 
     
    551570    gtk_misc_set_alignment (GTK_MISC (colorModeLabel), 1.0, 0.5); 
    552571    gtk_label_set_use_underline (GTK_LABEL (colorModeLabel), TRUE); 
    553 //    createColorModeListModel (); 
    554     GtkWidget *colorModeView = gtk_combo_box_new (); //_with_model (GTK_TREE_MODEL (m_ColorMode)); 
    555     gtk_label_set_mnemonic_widget (GTK_LABEL (colorModeLabel), colorModeView); 
    556     { 
    557         GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); 
    558         gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (colorModeView), 
     572    createColorModelListModel (); 
     573    m_ColorModelView = 
     574        gtk_combo_box_new_with_model (GTK_TREE_MODEL (m_ColorModel)); 
     575    gtk_label_set_mnemonic_widget (GTK_LABEL (colorModeLabel), 
     576                                   m_ColorModelView); 
     577    { 
     578        GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); 
     579        gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (m_ColorModelView), 
    559580                                    renderer, TRUE); 
    560         gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (colorModeView), 
     581        gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (m_ColorModelView), 
    561582                                        renderer, 
    562583                                        "text", 
     
    568589                      (GtkAttachOptions)(GTK_SHRINK), 
    569590                      0, 0); 
    570     gtk_table_attach (GTK_TABLE (outputTable), colorModeView, 
     591    gtk_table_attach (GTK_TABLE (outputTable), m_ColorModelView, 
    571592                      1, 2, 0, 1, 
    572593                      (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 
     
    661682 
    662683void 
     684PrintView::createColorModelListModel () 
     685{ 
     686    m_ColorModel = gtk_list_store_new (printOptionNumColumn, 
     687                                       G_TYPE_STRING,  // Label 
     688                                       G_TYPE_INT);    // Value 
     689} 
     690 
     691void 
    663692PrintView::createLayoutListModel () 
    664693{