Sat 17 Feb 2007
I just took the first step to really getting to the bottom of making the gtk print dialog work well in the presence of a huge number of printers. There has been some blustering (but strangely no bugs filed) about the print dialog falling flat when there are hundreds of printers in the list. I’m not sure if they are referring to the legacy GNOME print dialog which is known to have those issues or the GTK+ print dialog which really should only be confined by the speed of cups (or papi if you happen to be using that backend). To diagnose what is going on I created a test print backend which simulates a printer network where ppd requests can take an indeterminate amount of time to be transferred to the local machine. Other enhancements will include printers popping on and off the network at random times.

Using the test backend I played around with adding feedback to the icons in the dialog. Ignore the trash cans as I am just using them for the default printer icon to distinguish them from regular printers. The refresh icon shows a details (ppd) request in progress. Hopefully we can get an animated icon for that. The X icons show fetches that have failed. That patch is not quite done yet but it does illustrate how user feedback can make the experience a lot better. Right now if the fetch fails all you get is a grayed out print button.
The other thing I found while playing with the dialog and the 100 printers is that our search is dismal. Say I want to find printer 99. Typing in 99 does not find all of the printers with 99 in their name. Instead it is only searching for printers who’s name starts with 99. I’m not typing in “Print to Test Printer 99″ just to find printer 99. There are two things we can do here. Either make the search function more robust so it searches inside the text or override search so it acts as a filter blocking out all printers without 99 in their names. I like the latter but it does bring up some issues of needing to pop up a filter bar so one could revert to the normal view. I dislike having a filter bar visible at all times. The advantage of the filter however is that the list will not jump around as much when items are added or removed from the list.
The second usability improvement I want to make is to add a recently used printer list similar to the bookmark list in the file dialog. Only printers which have been seen will show up on the list ordered by last use. These printers will request their details in small batches when the dialog is opened as opposed to waiting for the user to click on them. The idea is one usually only uses a handful of printers even if there are hundreds available. We should therefore get those ready the fastest and only show a few of them. The cool thing about this is if you only have one printer at home, when you get there that is the only one you will see and then when you get to work the two printers you always use which are buried way down the list will now be readily available.
These improvements won’t solve every problem. There is still the issue of going into a fresh network and having to wait for printer lists to propagate. Improvements to cups could alleviate that by allowing clients to only have to speak to one server. I’m not sure if it is a configuration issue or just hasn’t been implemented issue but it is kind of a fun test to restart cups and watch as printers slowly trickle in as they are discovered. There are also some issues in the cups backend that can use some love.
Please file bugs and submit patches. I don’t have as much time to work on printing since printing is cost prohibitive and not a high priority for my current target audience. Feel free to ask question on how to get started hacking on Gtk and GtkPrint. It would make a great SOC project.
[read this post in: ar de es fr it ja ko pt ru zh-CN ]
February 17th, 2007 at 9:01 pm
Looking at the screenshot and seeing both “General” and “Other” (two uninformative labels if ever I saw them) maybe GTK needs to adopt the same uninformative but at least consistent convention of using “General” and “Advanced” when they cannot think of a decent lable.
February 18th, 2007 at 6:37 am
Great work! I love to see stuff like this happening.
February 18th, 2007 at 7:26 am
Using a dimmed color (gray instead of black, but this depends on the theme) for unavailable printers would improve the usability as well.
February 18th, 2007 at 8:01 am
> The X icons show fetches that have failed.
You don’t mean that the GET request returned 404 do you? (Because that means the printer is raw and has no PPD, and should not prevent printing — there’s a bug filed about that..)
> kind of a fun test to restart cups and watch as printers slowly trickle in as they are discovered.
Did you turn off remote caching or something? Or are you talking about CUPS 1.1.x?
February 18th, 2007 at 11:06 am
No map? Trash.
February 18th, 2007 at 7:35 pm
Suggestion: only show a search box if more than ~10 (or however many) printers are available? There’s no reason to subject everyone to a search box if it’s only useful for edge cases with lots of printers. (I’d also not make it appear or disappear dynamically in response to printer availability changes, for simplicity.)
By the way, I failed your captcha once, and hitting Back brought up a cleared form. I don’t know whether that’s me using an old version of Firefox (1.0.x, ugh, not my choice) or something wrong with the cache headers.
February 19th, 2007 at 3:17 am
(I know this is not really the topic here) Is there any way with this program to support multiple print servers without hacking the config file when you move your laptop from one network to another one (with a different print server) ?
February 19th, 2007 at 9:10 am
Should a optional button called “Add Print Queue/Find Printer…” be introduced in the print dialog.
The “Add Print Queue” caters for the case a newly install system has not any print queue be added yet, instead of wondering off to some other menu to launch the Create new print queue, the same program can be launched by the button.
“Find Printer…” does similar to your find here except that you don;t have to know about the GTK+ key binding to do so.
Which ever option will appear depends on whether there is print queue already existed or not.
“Add Print Queue” if there is no print queue exists.
“Find Printer…” if there is one mor more queues.
February 19th, 2007 at 10:52 am
Jeff,
I’m not too keen on having two modes that work differently. I think I will go the firefox route where they pop yellow bars at the top when things like a popup is blocked. So in the case of the filter, when someone starts typing in the list, it would become visible.
Brice,
Should just work if your print servers are setup to broadcast available printers. Other than that the only way to do what you want to do is will little hassle is setup print queues (system-config-printer on Fedora/Red Hat). They will always show up in the dialog if you configured them yourself so you would have to choose the correct one each time.
Ghee,
It is pretty confusing to add and remove buttons or have buttons which have dual use. In reality we should be fixing autodetection and supporting things like ZeroConfig for printers. In the meantime we might just want to have an Add Printer button. Not sure.
February 21st, 2007 at 10:47 am
John,
Good point about not having dual functions button. Find Print Queue to me would be a better option. Given that local printer can always be auto-detect when plugs in. A network print queue may be required to be found, while zeorconf may work with network printer. We are working a similar project in OpenSolaris, http://www.opensolaris.org/os/project/presto
at a fairly earlier stage. Comments are welcome.
-Ghee