| | 235 | |
| | 236 | // Get the color models. |
| | 237 | ppd_option_t *colorModelOption = |
| | 238 | ppdFindOption (printerPPD, "ColorModel"); |
| | 239 | view.clearColorModelList (); |
| | 240 | if ( NULL != colorModelOption ) |
| | 241 | { |
| | 242 | int colorModelToSelect = 0; |
| | 243 | ppd_choice_t *colorModelChoice = colorModelOption->choices; |
| | 244 | for ( int currentColor = 0 ; |
| | 245 | currentColor < colorModelOption->num_choices ; |
| | 246 | ++currentColor, ++colorModelChoice ) |
| | 247 | { |
| | 248 | const gchar *colorName = colorModelChoice->text; |
| | 249 | const gchar *colorValue = colorModelChoice->choice; |
| | 250 | |
| | 251 | view.addColorModel (_(colorName), colorValue); |
| | 252 | if ( colorModelChoice->marked ) |
| | 253 | { |
| | 254 | colorModelToSelect = currentColor; |
| | 255 | } |
| | 256 | } |
| | 257 | view.selectColorModel (colorModelToSelect); |
| | 258 | } |
| | 259 | else |
| | 260 | { |
| | 261 | view.addColorModel (_("Grayscale"), "Gray"); |
| | 262 | } |