Bug 1316 - editres: Fix for GetValues
Summary: editres: Fix for GetValues
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xt (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL: http://www.lug-bs.de/leute/v.gering/e...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2004-09-09 09:32 UTC by Alan Coopersmith
Modified: 2008-07-14 13:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Original patch against X11R6.0-patch5 from Peter Derr (20.78 KB, patch)
2004-09-09 09:33 UTC, Alan Coopersmith
no flags Details | Splinter Review

Description Alan Coopersmith 2004-09-09 09:32:15 UTC
[Importing from old X.Org bug database.  This was originally reported to X.Org
 on Wed, 08 Feb 95 by Peter Derr from DEC.   It was marked unresolved in the 
 old bug database - someone will need to confirm this is still an issue and if 
 the provided patch against X11R6.0-patch5 is still needed and how much it may
 need to be modified to integrate to the current tree.   -alan- ]

     VERSION:

R6, public-patch-5

     CLIENT MACHINE and OPERATING SYSTEM:

Digital Alpha DEC 3000/500, DEC OSF/1 V3.2

     DISPLAY TYPE:

8-bit framebuffer

     WINDOW MANAGER:

mwm

     COMPILER:

native ANSI cc

     AREA:

editres

     SYNOPSIS:

The GetValues feature of editres seems to be incomplete.  The UI instructs
the user that "mb2 gets a value" but it doesn't work because it is only
partially implemented.

     DESCRIPTION:

Here's what I did to make GetValues work in editres: 

    Fixed a bug in programs/editres/handler.c where the wrong widget id
    was being sent.

    Expanded on the partially implemented code for GetValues in
    lib/Xmu/EditresCom.c.  The code I added finds the resource in the
    widget, converts it to String using XtConvertAndStore() if
    possible, else falls back to representing the value as an integer.

    To convert resource values to string requires a collection of
    whatever-to-String converters.  I've added a few in a new module
    linked into libXt, lib/Xt/StringConverters.c.  The function
    _XtInitStringConverters() registers these converters and is called
    in XtCreateApplicationContext() in lib/Xt/Display.c.

    The lib/Xt/Imakefile is modified to link the new StringConverters.o
    module into libXt, as well as linking EditresCom.o from libXmu into
    libXt (EditresCom.o depends on Lower.o from Xmu so that's linked
    in, too).  This allows editres to work with all Xt-based
    applications, not just those that use Xaw, without having to link
    with libXmu.  (I've also modified our implementation of libXm so
    that the Motif vendor shell, which overwrites the Xt vendor shell,
    also adds the _XEditResCheckMessages() event handler.)  It's also
    possible to add an initialize routine it the Xt vendorShellClassRec
    that will add the _XEditResCheckMessages() event handler so that
    Xt-only applications will work with editres.



     REPEAT BY:

Using editres, display the resource box of a widget.  Use mb2 to try to
get a value.  No matter what widget or resource you choose, the string
"NoValue" always appears in the resource value text window.
Comment 1 Alan Coopersmith 2004-09-09 09:33:45 UTC
Created attachment 841 [details] [review]
Original patch against X11R6.0-patch5 from Peter Derr
Comment 2 Daniel Stone 2007-02-27 01:24:05 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 3 Paulo César Pereira de Andrade 2008-07-14 13:47:49 UTC
  This was corrected in XFree86 around 10 years ago.
I don't remember all the details, but I remember I
talked with the original author, before submitting
an adapted patch, so that only editres, libXmu and
libXaw were changed. The converters were added to
libXaw instead of libXt, so that would exist zero
chances of incompatibility with motif, that is based
on libXt (and motif doesn't support the editres
protocol anyway).
  See lib/libXaw/src/Converters.c for the biggest
chunk of the patch.


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.