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 649511 - Allow editing printer name and location
Allow editing printer name and location
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Printers
3.0.x
Other Linux
: Normal enhancement
: ---
Assigned To: Marek Kašík
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-05 20:47 UTC by Jean-François Fortin Tam
Modified: 2011-05-27 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
allow editing of printer's name and its location (70.25 KB, patch)
2011-05-13 11:02 UTC, Marek Kašík
none Details | Review
the promised modification (it renames classes now as well) (70.21 KB, patch)
2011-05-13 12:15 UTC, Marek Kašík
none Details | Review
the patch using CcEditableEntry (50.47 KB, patch)
2011-05-13 13:27 UTC, Marek Kašík
none Details | Review
modified patch (53.11 KB, patch)
2011-05-16 10:30 UTC, Marek Kašík
committed Details | Review

Description Jean-François Fortin Tam 2011-05-05 20:47:52 UTC
Being able to correct the printer name and location would be a useful feature. 

Maybe this could be in the options, or simply use gtk text entry widgets instead of labels (for the name and location) in the pane on the right. Or perhaps the name can be edited by clicking the listview item (to toggle editing mode) like many apps do (that way you could keep the fancy label/text size).
Comment 1 Matthias Clasen 2011-05-06 11:00:10 UTC
The user-accounts panel has a cheap 'editable label' implementation that can be used here.
Comment 2 Marek Kašík 2011-05-06 11:02:34 UTC
Yeah, I was thinking about this one too, since it would be consistent then.
Comment 3 Marek Kašík 2011-05-13 11:02:26 UTC
Created attachment 187759 [details] [review]
allow editing of printer's name and its location

Hi,

this patch allows users to edit printer's name and its location. It uses UmEditableEntry for it. I had to use it also for all other fields in the panel since it adds some padding in front of the text. This also causes a little bigger spaces between those fields in vertical direction.
However there are still 2 other problems.
These are due to the fact that we need to create new printer with the new name and copy all properties of the original printer to the new one (that's why the patch is so big).
The first problem is that current version of cups-pk-helper doesn't allow us to create a printer without a PPD and thus we can not add a raw printer.
The second problem is that it can not add new classes (unless I overlooked it somewhere).
I have patches for the two cups-pk-helper problems and I'll file bugs for them in appropriate bugzilla today.

Regards

Marek
Comment 4 Marek Kašík 2011-05-13 12:02:10 UTC
(In reply to comment #3)
> The second problem is that it can not add new classes (unless I overlooked it
> somewhere).

Funny, I overlooked one small detail. New classes are created by adding members to them. I'll attach modified patch soon.
Comment 5 Marek Kašík 2011-05-13 12:15:26 UTC
Created attachment 187763 [details] [review]
the promised modification (it renames classes now as well)
Comment 6 Matthias Clasen 2011-05-13 12:22:08 UTC
I think we are going to move the editable entry to libcontrol-center soon anyway. Might as well wait for that.
Comment 7 Bastien Nocera 2011-05-13 12:46:15 UTC
You can remove your copy of UmEditableEntry, it's now CcEditableEntry in libgnome-control-center.
Comment 8 Marek Kašík 2011-05-13 13:27:39 UTC
Created attachment 187768 [details] [review]
the patch using CcEditableEntry

I've modified it so that it uses the CcEditableEntry now.
Comment 9 Matthias Clasen 2011-05-13 15:13:54 UTC
Seems to work fine in quick testing here. But I wonder what it actually does, just rename the queue locally ? Because I was allowed to change the names of remote printers here in the office, which had me somewhat concerned.
Comment 10 Marek Kašík 2011-05-16 10:30:03 UTC
Created attachment 187896 [details] [review]
modified patch

It could rename the queue because it created new queue with the new name and deleted the old one. But it can not delete the remote queue so it should appear in few minutes again. And it can create only local queues so the new queue is local copy of the original queue.
I've added test for whether the given queue is discovered and also whether actual CUPS server is remote so the widget is insensitive in such case (+ similar thing for add queue, remove queue, pause, ...).

Marek