Re: Gtk+ print support - request for feedback
- From: Michael Sweet <mike easysw com>
- To: Alexander Larsson <alexl redhat com>
- Cc: till kamppeter gmx net, "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Re: Gtk+ print support - request for feedback
- Date: Mon, 06 Mar 2006 08:14:25 -0500
Alexander Larsson wrote:
On Sat, 2006-03-04 at 12:27 -0500, Michael Sweet wrote:
ppd_text_to_utf8() leaks memory for UTF-8 encoded text - you can
set encoding to a constant string there, too!
I don't see the leak. It just returns a strdup of the passed in text
(which is supposed to be freed by callers).
OK, so then you'll crash when the caller tries to free the constant
strings you are returning?!?
I think you'll find the hardcoded option list approach to be a dead-end.
It works for basic/common options that you want on the main page, but
the "advanced" properties need to use something that isn't compiled in,
such as the UI group from the PPD file.
What I do is:
Some really common settings (like number of copies, collation, paper
source, etc) are in the main pages. Then I put the rest of the settings
into generated tabs. There are "Color", "Image Quality" and "Finishing"
tabs, where we put setttings that we whitelist on the option name or
group name (using well known names from existing ppds, and gtk-specific
group names: "ColorPage", "ImageQualityPage", "FinishingPage"). The rest
of the settings are put in an advanced tab that shows the settings
grouped and indented by Group.
We (will) also try to use our own translations for common Option names
This way we hope to get a slightly more consistent and easier to
navigate UI, while still allowing all sorts of PPD options.
Don't limit the number of choices based on conflicts/constraints -
otherwise you WILL end up dead-locking users so they have no way to
access a particular option.
The approach to conflicts is: Remove all choices that conflict with the
default settings in the InstallableOptions group, since we don't show
these options (that is up to the system configuration tool). For
conflicts between normal settings we show a warning icon next to the
conflicting settings and a warning text about conflicts in the dialog.
OK, sounds reasonable, but I predict that users will be asking why
they can't see those options... :)
Michael Sweet, Easy Software Products mike at easysw dot com
Internet Printing and Publishing Software http://www.easysw.com
] [Thread Prev