Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show conflicting option values in web UI #3440

Closed
michaelrsweet opened this issue Dec 4, 2009 · 4 comments
Closed

Show conflicting option values in web UI #3440

michaelrsweet opened this issue Dec 4, 2009 · 4 comments
Labels
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

@michaelrsweet michaelrsweet commented Dec 4, 2009

Version: 1.4.2
CUPS.org User: twaugh.redhat

The web interface will show conflicting PPD option names but not the values in conflict. This can often mean needing to switch to another tab to find out.

Here is a patch to just show what they are.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Dec 8, 2009

CUPS.org User: mike

OK, your patch isn't right - you need to show the currently marked values, not the default ones. Working on an updated patch...

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Dec 8, 2009

CUPS.org User: mike

Fixed in Subversion repository.

Updated patch attached.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Dec 8, 2009

"0001-Show-conflicting-option-values-in-web-UI.patch":

From 79d00b194bd69c5d53922636639051c1ece7a0d5 Mon Sep 17 00:00:00 2001
From: Tim Waugh twaugh@redhat.com
Date: Fri, 4 Dec 2009 16:05:00 +0000
Subject: [PATCH] Show conflicting option values in web UI.


cgi-bin/admin.c | 13 +++++++++++++
templates/option-conflict.tmpl | 2 +-
2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/cgi-bin/admin.c b/cgi-bin/admin.c
index d54dde0..ad4d1c8 100644
--- a/cgi-bin/admin.c
+++ b/cgi-bin/admin.c
@@ -3408,6 +3408,19 @@ do_set_options(http_t http, / I - HTTP connection */
{
cgiSetArray("ckeyword", k, option->keyword);
cgiSetArray("ckeytext", k, option->text);
+

  •     for (m = 0; m < option->num_choices; m ++)
    
  •     {
    
  •   if (!strcmp (option->choices[m].choice, option->defchoice))
    
  •   {
    
  •     cgiSetArray("cdefchoice", k, option->choices[m].text);
    
  •     break;
    
  •   }
    
  •     }
    
  •     if (m == option->num_choices)
    
  •   cgiSetArray("cdefchoice", k, option->defchoice);
    
    • k ++;
      
      }

diff --git a/templates/option-conflict.tmpl b/templates/option-conflict.tmpl
index 5086a64..b17e26f 100644
--- a/templates/option-conflict.tmpl
+++ b/templates/option-conflict.tmpl
@@ -1,7 +1,7 @@

Error: The following options are conflicting:

Please change one or more of the options to resolve the conflicts.

1.6.5.2

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Dec 8, 2009

"str3440.patch":

Index: templates/ja/option-conflict.tmpl

--- templates/ja/option-conflict.tmpl (revision 8900)
+++ templates/ja/option-conflict.tmpl (working copy)
@@ -1,7 +1,7 @@

���: 以��������競����:

競��解決������1 �以�����������������

Index: templates/option-conflict.tmpl

--- templates/option-conflict.tmpl (revision 8900)
+++ templates/option-conflict.tmpl (working copy)
@@ -1,7 +1,7 @@

Error: The following options are conflicting:

Please change one or more of the options to resolve the conflicts.

Index: templates/ru/option-conflict.tmpl

--- templates/ru/option-conflict.tmpl (revision 8900)
+++ templates/ru/option-conflict.tmpl (working copy)
@@ -1,7 +1,7 @@

��ибка: �лед���ие па�аме��� кон�лик����:

�змени�е один или не�кол�ко па�аме��ов дл� �ого, ��об� избежа�� кон�лик�а.

Index: templates/de/option-conflict.tmpl

--- templates/de/option-conflict.tmpl (revision 8900)
+++ templates/de/option-conflict.tmpl (working copy)
@@ -1,7 +1,7 @@

Error: The following options are conflicting:

Bitte ändern sie eine oder mehrere Einstellungen um die Konflikte zu lösen.

Index: templates/pl/option-conflict.tmpl

--- templates/pl/option-conflict.tmpl (revision 8900)
+++ templates/pl/option-conflict.tmpl (working copy)
@@ -1,7 +1,7 @@

B��d: nast�puj�ce opcje s� w konflikcie ze sob�:

Prosz� zmieni� jedn� lub wi�cej opcji, aby rozwi�za� konflikt.

Index: templates/id/option-conflict.tmpl

--- templates/id/option-conflict.tmpl (revision 8900)
+++ templates/id/option-conflict.tmpl (working copy)
@@ -1,7 +1,7 @@

Kesalahan: Opsi berikut ini konflik:

Silakan ubah satu atau lebih opsi yang ada untuk memperbaiki masalah ini.

Index: templates/es/option-conflict.tmpl

--- templates/es/option-conflict.tmpl (revision 8900)
+++ templates/es/option-conflict.tmpl (working copy)
@@ -1,7 +1,7 @@

Error: Las siguientes opciones están en conflicto:

Cambie una o más de las opciones para resolver el problema.

Index: templates/eu/option-conflict.tmpl

--- templates/eu/option-conflict.tmpl (revision 8900)
+++ templates/eu/option-conflict.tmpl (working copy)
@@ -1,7 +1,7 @@

Errorea: honako aukerak gatazkan daude:

Aldatu aukera bat edo gehiago gatazkak ebazteko.

Index: cgi-bin/admin.c

--- cgi-bin/admin.c (revision 8908)
+++ cgi-bin/admin.c (working copy)
@@ -3413,6 +3413,16 @@
{
cgiSetArray("ckeyword", k, option->keyword);
cgiSetArray("ckeytext", k, option->text);
+

  •     for (m = 0; m < option->num_choices; m ++)
    
  •     {
    
  •       if (option->choices[m].marked)
    
  •       {
    
  •         cgiSetArray("cchoice", k, option->choices[m].text);
    
  •         break;
    
  •       }
    
  •          }
    
    • k ++;
      
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.