After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 577642 - Selected Printer Does Not Stick Between Sessions
Selected Printer Does Not Stick Between Sessions
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Printing
2.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-04-01 20:01 UTC by Chenthill P
Modified: 2018-04-15 00:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes the bug (1.17 KB, patch)
2009-04-01 20:05 UTC, Chenthill P
committed Details | Review

Description Chenthill P 2009-04-01 20:01:37 UTC
The printer settings are not restored in the print dialog if there are a lot of printers configured.

A downstream bug was filed in evolution for the same. The description goes as follows,

Patch was applied to Evolution 2.6 and we need to get something similar into
2.24.  When the user prints, that same printer needs to be striped and selected
all future attempts to print.  We have over 50 printers, and the users cannot
be scrolling through the list each time.

https://bugzilla.novell.com/show_bug.cgi?id=479152 .
Comment 1 Chenthill P 2009-04-01 20:05:55 UTC
Created attachment 131864 [details] [review]
Fixes the bug
Comment 2 Akhil Laddha 2009-09-18 05:20:51 UTC
ping, anyone up for patch review ?
Comment 3 Matthias Clasen 2009-11-27 20:50:48 UTC
Marek, can you look at this ?
Comment 4 Gabriel Burt 2010-03-15 19:17:56 UTC
This makes sense to me, since that call to selected_printer_changed isn't user-initiated, it's triggered by the printer status changing.
Comment 5 Marek Kašík 2010-05-31 14:01:25 UTC
Hi chenthill,

I'm sorry about the long response.
Is the problem that the printer is not selected or that the printer is selected but the list of printers is not scrolled correctly to the selected printer or that settings values given to the print dialog are not shown in the print dialog?
Or, is it about selecting default printer?
Do you have number of the evolution bug?

Regards

Marek
Comment 6 Mike Gorse 2013-08-28 21:14:49 UTC
Could someone look at this patch? (I have no idea whether Marek is still the person to look at it.) The behavior is the same in 3.9.90.
Anyway, in gtk_print_unix_dialog_set_settings, we call set_active_printer(), passing it the printer returned by gtk_print_settings_get_printer(). Later, cups_request_printer_list_cb gets called (if the cups back end is being used). Printers are added, and then a printer-status-changed signal is sent for the new printer, calling printer_status_cb in gtkprintunixdialog.c. printer_status_cb calls selection_changed_cb, which has a comment saying that it stops looking for a default printer when the user changes the selection. But, as Gabriel commented earlier, this change isn't triggered by a user action--it is triggered by a reply from cups in response to a request for the list of printers--so the patch looks right to me.

I'm pretty sure the downstream bug being referred to is https://bugzilla.novell.com/show_bug.cgi?id=479152, which was filed against SLED and is unfortunately not public, but this bug's description contains the gist of it, and I can reproduce it with, say, gedit. Ie, with the patch, printing defaults to the last printer that was used.
Comment 7 Marek Kašík 2013-11-05 12:44:37 UTC
Comment on attachment 131864 [details] [review]
Fixes the bug

Hi,

thank you for the patch, it fixes the problem for me. I've just pushed it to master.

Btw, I'm investigating similar problem now. There is the same problem with printers which show after acquiring of details for default printer. These are mainly avahi printer for me. Similar fix, applied in printer_details_acquired(), works partially for this problem because a callback which returns information about color profile changes an option which is interpreted as a change initiated by user and hence the default printer is kept selected. Unfortunately, it seems to me that this problem will need an API change. I'll return to this later.

Regards

Marek
Comment 8 Mike Gorse 2014-02-07 18:22:40 UTC
Can we push this to gtk-2-24 as well? The bug was originally reported against gtk 2.
Comment 9 Matthias Clasen 2018-02-10 05:07:23 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 10 Matthias Clasen 2018-04-15 00:29:31 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new