Commit d2e9bb1b authored by Markus Steinborn's avatar Markus Steinborn Committed by Bernhard Link

Fix bug-gv] Problem after saving gv-settings

Reference: http://lists.gnu.org/archive/html/bug-gv/2012-12/msg00000.html

Suddenly gv had problems with the page size. Forcing A3 rather than A4.
I'm using Linux Mint Maya, based upon Ubuntu 12.04
and gv 1:3.7.3-1, locale LANG = de_DE.UTF-8 (Germany)

The problem is caused when the options 'gv settings' are saved;
then the ~/.gv file contains the lines:

GV.orientation:   Automatik
GV.pageMedia:     Automatik

'Automatik' with a 'k' is german
parent eb1098ba
......@@ -370,6 +370,15 @@ static char* orientation2extern(String l)
for (i=0; orientations[i]; i++)
if (!strcmp(l, orientations[i]))
return orientationsExtern[i];
if (!strcmp(l, automaticLabel))
return "Automatic";
return l;
}
static char* pagemedia2extern(String l)
{
if (!strcmp(l, automaticLabel))
return "Automatic";
return l;
}
......@@ -410,10 +419,10 @@ void options_gv_cb_save(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, X
n=0;
XtSetArg(args[n], XtNlabel, &l); n++;
XtGetValues(mediaButton, args, n);
options_setArg(&(argi[argn]),&(argv[argn]),s_pageMedia ,gv_class ,l);
options_setArg(&(argi[argn]),&(argv[argn]),s_pageMedia ,gv_class ,pagemedia2extern(l));
++argn;
XtGetValues(fmediaButton, args, n);
options_setArg(&(argi[argn]),&(argv[argn]),s_fallbackPageMedia ,gv_class ,l);
options_setArg(&(argi[argn]),&(argv[argn]),s_fallbackPageMedia ,gv_class ,pagemedia2extern(l));
++argn;
XtGetValues(orientButton, args, n);
options_setArg(&(argi[argn]),&(argv[argn]),s_orientation ,gv_class ,orientation2extern(l));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment