]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
The web interface did not allow setting of a default custom page size
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 3 Jan 2011 23:09:51 +0000 (23:09 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 3 Jan 2011 23:09:51 +0000 (23:09 +0000)
(STR #3707)

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9417 7a7537e8-13f0-0310-91df-b6672ffda945

13 files changed:
CHANGES-1.4.txt
README.txt
cups/custom.c
cups/ppd.c
templates/de/option-pickone.tmpl
templates/es/option-pickone.tmpl
templates/eu/option-pickone.tmpl
templates/id/option-pickone.tmpl
templates/it/option-pickone.tmpl
templates/ja/option-pickone.tmpl
templates/option-pickone.tmpl
templates/pl/option-pickone.tmpl
templates/ru/option-pickone.tmpl

index e287ad0b7943c765dada56c9d3f7bd9b2398cda5..0c1fa6523d95221e7c83a4c3c874c2946e52a3a3 100644 (file)
@@ -3,6 +3,8 @@ CHANGES-1.4.txt
 
 CHANGES IN CUPS V1.4.7
 
+       - The web interface did not allow setting of a default custom page size
+         (STR #3707)
        - The scheduler could crash if a browsed printer times out while a job
          is printing (STR #3754)
        - The scheduler incorrectly mapped custom page sizes to standard sizes
index d0a8957b53cd0c376aef83de05826f0cc9af18b4..8bfcbd4dc3318aaca812a54879df7adae6c5a5da 100644 (file)
@@ -1,4 +1,4 @@
-README - CUPS v1.5svn - 2010-04-07
+README - CUPS v1.5svn - 2011-01-03
 ----------------------------------
 
 Looking for compile instructions?  Read the file "INSTALL.txt"
@@ -150,7 +150,7 @@ PRINTING FILES
 
 LEGAL STUFF
 
-    CUPS is Copyright 2007-2010 by Apple Inc.  CUPS and the CUPS logo are
+    CUPS is Copyright 2007-2011 by Apple Inc.  CUPS and the CUPS logo are
     trademarks of Apple Inc.
 
     The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
index 31b46035cd8a5fb8915641886458b155e1a149ad..00eac42751d2ccac3a93927c7aa1eb0320e4c1a1 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   PPD custom option routines for CUPS.
  *
- *   Copyright 2007-2010 by Apple Inc.
+ *   Copyright 2007-2011 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -69,14 +69,19 @@ ppd_cparam_t *                              /* O - Custom parameter or NULL */
 ppdFindCustomParam(ppd_coption_t *opt, /* I - Custom option */
                    const char    *name)        /* I - Parameter name */
 {
-  ppd_cparam_t key;                    /* Custom parameter search key */
+  ppd_cparam_t *param;                 /* Current custom parameter */
 
 
   if (!opt)
     return (NULL);
 
-  strlcpy(key.name, name, sizeof(key.name));
-  return ((ppd_cparam_t *)cupsArrayFind(opt->params, &key));
+  for (param = (ppd_cparam_t *)cupsArrayFirst(opt->params);
+       param;
+       param = (ppd_cparam_t *)cupsArrayNext(opt->params))
+    if (!strcasecmp(param->name, name))
+      break;
+
+  return (param);
 }
 
 
index 360c949d7607713974dce7ad9b7d1a9e85d76326..4da685327e13dad95ab806dcaff57eeee6e47d7a 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   PPD file routines for CUPS.
  *
- *   Copyright 2007-2010 by Apple Inc.
+ *   Copyright 2007-2011 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -41,7 +41,6 @@
  *   ppd_compare_attrs()    - Compare two attributes.
  *   ppd_compare_choices()  - Compare two choices...
  *   ppd_compare_coptions() - Compare two custom options.
- *   ppd_compare_cparams()  - Compare two custom parameters.
  *   ppd_compare_options()  - Compare two options.
  *   ppd_decode()           - Decode a string value...
  *   ppd_free_group()       - Free a single UI group.
@@ -109,7 +108,6 @@ static int          ppd_compare_attrs(ppd_attr_t *a, ppd_attr_t *b);
 static int             ppd_compare_choices(ppd_choice_t *a, ppd_choice_t *b);
 static int             ppd_compare_coptions(ppd_coption_t *a,
                                             ppd_coption_t *b);
-static int             ppd_compare_cparams(ppd_cparam_t *a, ppd_cparam_t *b);
 static int             ppd_compare_options(ppd_option_t *a, ppd_option_t *b);
 static int             ppd_decode(char *string);
 static void            ppd_free_group(ppd_group_t *group);
@@ -2309,18 +2307,6 @@ ppd_compare_coptions(ppd_coption_t *a,   /* I - First option */
 }
 
 
-/*
- * 'ppd_compare_cparams()' - Compare two custom parameters.
- */
-
-static int                             /* O - Result of comparison */
-ppd_compare_cparams(ppd_cparam_t *a,   /* I - First parameter */
-                    ppd_cparam_t *b)   /* I - Second parameter */
-{
-  return (strcasecmp(a->name, b->name));
-}
-
-
 /*
  * 'ppd_compare_options()' - Compare two options.
  */
@@ -2476,7 +2462,7 @@ ppd_get_coption(ppd_file_t *ppd,  /* I - PPD file */
 
   strlcpy(copt->keyword, name, sizeof(copt->keyword));
 
-  copt->params = cupsArrayNew((cups_array_func_t)ppd_compare_cparams, NULL);
+  copt->params = cupsArrayNew((cups_array_func_t)NULL, NULL);
 
   cupsArrayAdd(ppd->coptions, copt);
 
index c88fe059936ba36902902fafe51c11862b601568..111397ce9d5492ccf8be8f1c2a85a5ae52c77d22 100644 (file)
@@ -5,14 +5,14 @@
 </SELECT>
 {iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
 <TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
 <OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Punkte</OPTION>
 <OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Millimeter</OPTION>
 <OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Zentimeter</OPTION>
 <OPTION VALUE="in"{paramvalue=in? SELECTED:}>Zoll</OPTION>
 <OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Fu&szlig;</OPTION>
 <OPTION VALUE="m"{paramvalue=m? SELECTED:}>Meter</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
 }</TABLE>
 </TD>:}
 </TR>
index 8690af0545d480e149345c3ecc8921788a1c222c..40fd124c4e561eed37d8a8dada1fe9b7864fcc62 100755 (executable)
@@ -5,14 +5,14 @@
 </SELECT>
 {iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
 <TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
 <OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Puntos</OPTION>
 <OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Mil&iacute;metros</OPTION>
 <OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Cent&iacute;metros</OPTION>
 <OPTION VALUE="in"{paramvalue=in? SELECTED:}>Pulgadas</OPTION>
 <OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Pies</OPTION>
 <OPTION VALUE="m"{paramvalue=m? SELECTED:}>Metros</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
 }</TABLE>
 </TD>:}
 </TR>
index bec16df29b9f1c0009c37d401a9fec5405e4ce19..70866dfb5146ba6aac02d4ebcf14021b699cc31e 100644 (file)
@@ -5,14 +5,14 @@
 </SELECT>
 {iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
 <TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
 <OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Puntuak</OPTION>
 <OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Milimetroak</OPTION>
 <OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Zentimetroak</OPTION>
 <OPTION VALUE="in"{paramvalue=in? SELECTED:}>Hatzak</OPTION>
 <OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Oinak</OPTION>
 <OPTION VALUE="m"{paramvalue=m? SELECTED:}>Metroak</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
 }</TABLE>
 </TD>:}
 </TR>
index 33fca8ab6d927aae128ab1e263058958e4a924d5..8ee71b31602c60f12812a4451df54cdeb5c928fd 100644 (file)
@@ -5,14 +5,14 @@
 </SELECT>
 {iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
 <TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
 <OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Poin</OPTION>
 <OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Milimeter</OPTION>
 <OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Sentimeter</OPTION>
 <OPTION VALUE="in"{paramvalue=in? SELECTED:}>Inci</OPTION>
 <OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Kaki</OPTION>
 <OPTION VALUE="m"{paramvalue=m? SELECTED:}>Meter</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
 }</TABLE>
 </TD>:}
 </TR>
index 528ef7c898777e8e66e605280c66e4f4f1ccd484..c21fc71ba2b618f4f9d095392859c93494af20b0 100755 (executable)
@@ -5,14 +5,14 @@
 </SELECT>
 {iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
 <TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
 <OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Punti</OPTION>
 <OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Millimetri</OPTION>
 <OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Centimetri</OPTION>
 <OPTION VALUE="in"{paramvalue=in? SELECTED:}>Pollici</OPTION>
 <OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Piedi</OPTION>
 <OPTION VALUE="m"{paramvalue=m? SELECTED:}>Metri</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
 }</TABLE>
 </TD>:}
 </TR>
index 58b267a9c03d5d36c09ff03dfc739acf434cfe1c..514e2abc2050f00cb4d0a2c4aadbb33ad0119faf 100644 (file)
@@ -5,14 +5,14 @@
 </SELECT>
 {iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
 <TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
 <OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>ポイント</OPTION>
 <OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>ミリメートル</OPTION>
 <OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>センチメートル</OPTION>
 <OPTION VALUE="in"{paramvalue=in? SELECTED:}>インチ</OPTION>
 <OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>フィート</OPTION>
 <OPTION VALUE="m"{paramvalue=m? SELECTED:}>メートル</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
 }</TABLE>
 </TD>:}
 </TR>
index 5030c46379812f72b5a98ca0984d7574e6a98082..890ef4e7d3b79652e7342d409a0115a773f05a01 100644 (file)
@@ -5,14 +5,14 @@
 </SELECT>
 {iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
 <TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
 <OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Points</OPTION>
 <OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Millimeters</OPTION>
 <OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Centimeters</OPTION>
 <OPTION VALUE="in"{paramvalue=in? SELECTED:}>Inches</OPTION>
 <OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Feet</OPTION>
 <OPTION VALUE="m"{paramvalue=m? SELECTED:}>Meters</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
 }</TABLE>
 </TD>:}
 </TR>
index db40015ea902639a649bbc6ba436db71917bd29f..598fe1007f899bc81e73d6246632ff98dbeeee04 100644 (file)
@@ -5,14 +5,14 @@
 </SELECT>
 {iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
 <TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
 <OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Punkty</OPTION>
 <OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Milimetry</OPTION>
 <OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Centymetry</OPTION>
 <OPTION VALUE="in"{paramvalue=in? SELECTED:}>Cale</OPTION>
 <OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Stopy</OPTION>
 <OPTION VALUE="m"{paramvalue=m? SELECTED:}>Metry</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
 }</TABLE>
 </TD>:}
 </TR>
index f2dbb5eb796ab9eed7d8bc5c1876d394c138b6a2..49a9929ae77faa876699b84c832e9e2310b94d60 100644 (file)
@@ -5,14 +5,14 @@
 </SELECT>
 {iscustom=1?<TABLE NAME="paramtable" id="{keyword}-params">{[params]
 <TR><TH CLASS="sublabel">{paramtext}:</TH>
-<TD>{params=Units?<SELECT NAME="{keyword}.{params}">
+<TD>{params=Units?<SELECT NAME="{keyword-1}.{params}">
 <OPTION VALUE="pt"{paramvalue=pt? SELECTED:}>Пункты</OPTION>
 <OPTION VALUE="mm"{paramvalue=mm? SELECTED:}>Миллиметры</OPTION>
 <OPTION VALUE="cm"{paramvalue=cm? SELECTED:}>Сантиметры</OPTION>
 <OPTION VALUE="in"{paramvalue=in? SELECTED:}>Дюймы</OPTION>
 <OPTION VALUE="ft"{paramvalue=ft? SELECTED:}>Футы</OPTION>
 <OPTION VALUE="m"{paramvalue=m? SELECTED:}>Метры</OPTION>
-</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword}.{params}" VALUE="{paramvalue}">}</TD></TR>
+</SELECT>:<INPUT TYPE="{inputtype}" NAME="{keyword-1}.{params}" VALUE="{paramvalue}">}</TD></TR>
 }</TABLE>
 </TD>:}
 </TR>