Bug 1601

Summary: xedit prints wrong number of pages
Product: xorg Reporter: Felix Schulte <felix.schulte>
Component: App/otherAssignee: Roland Mainz <roland.mainz>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: 6.8.1   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
[FIXED_X11R68x] Patch for 2004-10-12-trunk roland.mainz: 6.8-branch+

Description Felix Schulte 2004-10-11 00:05:33 UTC
The new Print feature in xedit prints the wrong number of pages.

Example:
Do a
# man ls | head >foo.txt
# xedit
Print the page
The printer prints 5 pages instead of one, all with the same content.

Looking at the code it seems that xedit gets confused due the geometry resource
in Xedit.ad - the value is always "*geometry: 590x440" - even for the print shell.

A quick fix is to superset the resource like this:
--- xc/programs/xmore/print.c
+++ xc/programs/xmore/print.c
@@ -289,40 +289,41 @@
     n = 0;
     XtSetArg(args[n], XawNlayoutMode, XawPrintLAYOUTMODE_DRAWABLEAREA); n++;
+    XtSetArg(args[n], XtNgeometry,    "+0+0");                          n++;
     apd->printshell = CreatePrintShell(toplevel, apd->pscreen, "printshell",
args, n);
Comment 1 Roland Mainz 2004-10-12 14:05:43 UTC
Mhhh... the XawPrintShell-internal geometry management gets overridden by the
resource. No wonder this doesn't work....

Taking myself...
Comment 2 Roland Mainz 2004-10-12 15:43:31 UTC
Created attachment 1088 [details] [review]
[FIXED_X11R68x] Patch for 2004-10-12-trunk
Comment 3 Roland Mainz 2004-10-12 16:11:24 UTC
Patch checked-in...

/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.455; previous revision: 1.454
/cvs/xorg/xc/programs/xman/print.c,v  <--  print.c
new revision: 1.2; previous revision: 1.1
/cvs/xorg/xc/programs/xmore/print.c,v  <--  print.c
new revision: 1.5; previous revision: 1.4
/cvs/xorg/xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c,v  <-- 
xpawhelloworld.c
new revision: 1.3; previous revision: 1.2
Mailing the commit message to xorg-commit@pdx.freedesktop.org...

.. marking bug as FIXED.
Comment 4 Roland Mainz 2004-11-04 23:15:00 UTC
Comment on attachment 1088 [details] [review]
[FIXED_X11R68x] Patch for 2004-10-12-trunk

Requesting approval for X11R6.8.2, simple problem with a resource (which
overrides a value which should be calculated dynamically at runtime) with an
obvious patch.
Comment 5 Roland Mainz 2004-11-12 08:30:47 UTC
Comment on attachment 1088 [details] [review]
[FIXED_X11R68x] Patch for 2004-10-12-trunk

Approved for checkin into X11R6.8.x in the 2004-11-12 release-wranglers call.
Comment 6 Roland Mainz 2004-12-12 23:16:20 UTC
Comment on attachment 1088 [details] [review]
[FIXED_X11R68x] Patch for 2004-10-12-trunk

Patch checked-in into X11R6.8.x stable branch:

/cvs/xorg/xc/ChangeLog,v  <--  ChangeLog
new revision: 1.365.2.52; previous revision: 1.365.2.51
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/programs/xman/print.c,v  <--  print.c
new revision: 1.1.4.1; previous revision: 1.1
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/programs/xmore/print.c,v  <--  print.c
new revision: 1.4.4.1; previous revision: 1.4
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c,v  <-- 
xpawhelloworld.c
new revision: 1.2.6.1; previous revision: 1.2
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
Mailing the commit message to xorg-commit@lists.freedesktop.org...

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.