Show
Ignore:
Timestamp:
06/12/06 17:33:31 (2 years ago)
Author:
jordi
Message:

The page size's name are now "human readable" instead of the name to give when used as options.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/PrintPter.cxx

    r228 r229  
    192192                                 destination->options); 
    193193 
    194                 // Get the default page size. 
    195                 ppd_option_t *pageSizeOption = ppdFindOption (printerPPD, 
    196                                                              "PageSize"); 
    197                 gchar *defaultPageSize = NULL; 
    198                 if ( NULL != pageSizeOption ) 
    199                 { 
    200                     defaultPageSize = pageSizeOption->defchoice; 
    201                 } 
    202  
     194                // Get the page sizes. 
     195                ppd_option_t *pageSizeOption = 
     196                    ppdFindOption (printerPPD, "PageSize"); 
    203197                view.clearPageSizeList (); 
    204198                int pageSizeToSelect = 0; 
     199                ppd_choice_t *pageSizeChoice = pageSizeOption->choices; 
    205200                for ( int currentSize = 0 ; 
    206                       currentSize < printerPPD->num_sizes ; 
    207                       ++currentSize ) 
     201                      currentSize < pageSizeOption->num_choices ; 
     202                      ++currentSize, ++pageSizeChoice ) 
    208203                { 
    209                     const gchar *sizeName = printerPPD->sizes[currentSize].name; 
    210                     view.addPageSize (_(sizeName), sizeName); 
    211                     if ( NULL != defaultPageSize && 
    212                          0 == g_ascii_strcasecmp (defaultPageSize, sizeName) ) 
     204                    const gchar *sizeName = pageSizeChoice->text; 
     205                    const gchar *sizeValue = pageSizeChoice->choice; 
     206 
     207                    view.addPageSize (_(sizeName), sizeValue); 
     208                    if ( pageSizeChoice->marked ) 
    213209                    { 
    214210                        pageSizeToSelect = currentSize;