Make bits from my last commit are conditionally compiled only if cups 1.2

* modules/printbackends/cups/gtkprintbackendcups.c:
  Make bits from my last commit are conditionally compiled
  only if cups 1.2 is available.
This commit is contained in:
John Palmieri 2006-07-18 21:47:04 +00:00
parent 7d2ec5d007
commit 5713af241a
3 changed files with 24 additions and 6 deletions

View File

@ -1,4 +1,10 @@
2006-07-19 John (J5) Palmieri <johnp@redhat.com>
2006-07-18 John (J5) Palmieri <johnp@redhat.com>
* modules/printbackends/cups/gtkprintbackendcups.c:
Make bits from my last commit are conditionally compiled
only if cups 1.2 is available.
2006-07-18 John (J5) Palmieri <johnp@redhat.com>
* gtk/gtkprinteroption.h:
* gtk/gtkprinteroptionwidget.c:

View File

@ -1,4 +1,10 @@
2006-07-19 John (J5) Palmieri <johnp@redhat.com>
2006-07-18 John (J5) Palmieri <johnp@redhat.com>
* modules/printbackends/cups/gtkprintbackendcups.c:
Make bits from my last commit are conditionally compiled
only if cups 1.2 is available.
2006-07-18 John (J5) Palmieri <johnp@redhat.com>
* gtk/gtkprinteroption.h:
* gtk/gtkprinteroptionwidget.c:

View File

@ -1824,6 +1824,7 @@ available_choices (ppd_file_t *ppd,
return option->num_choices - num_conflicts + add_auto;
}
#if HAVE_CUPS_API_1_2
static GtkPrinterOption *
create_pickone_option_custom (ppd_file_t *ppd_file,
ppd_option_t *ppd_option,
@ -1923,6 +1924,7 @@ create_pickone_option_custom (ppd_file_t *ppd_file,
return option;
}
#endif /* HAVE_CUPS_API_1_2 */
static GtkPrinterOption *
create_pickone_option (ppd_file_t *ppd_file,
@ -2016,21 +2018,25 @@ handle_option (GtkPrinterOptionSet *set,
{
GtkPrinterOption *option;
char *name;
ppd_coption_t *coption;
#ifdef HAVE_CUPS_API_1_2
ppd_coption_t *coption = NULL;
coption = ppdFindCustomOption (ppd_file, ppd_option->keyword);
#endif
if (STRING_IN_TABLE (ppd_option->keyword, cups_option_blacklist))
return;
name = get_option_name (ppd_option->keyword);
coption = ppdFindCustomOption (ppd_file, ppd_option->keyword);
name = get_option_name (ppd_option->keyword);
option = NULL;
if (ppd_option->ui == PPD_UI_PICKONE)
{
#ifdef HAVE_CUPS_API_1_2
if (coption)
option = create_pickone_option_custom (ppd_file, ppd_option, coption, name);
else
#endif
option = create_pickone_option (ppd_file, ppd_option, name);
}
else if (ppd_option->ui == PPD_UI_BOOLEAN)