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 690443 - Printer list gets wider when a default printer is selected
Printer list gets wider when a default printer is selected
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Printers
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: Marek Kašík
Control-Center Maintainers
3.10
Depends on:
Blocks:
 
 
Reported: 2012-12-18 18:54 UTC by Allan Day
Modified: 2013-04-23 11:40 UTC
See Also:
GNOME target: ---
GNOME version: 3.5/3.6


Attachments
screenshots (364.38 KB, image/png)
2012-12-18 18:54 UTC, Allan Day
  Details
preserve width of list of printers when setting default printer (1.46 KB, patch)
2013-04-22 11:45 UTC, Marek Kašík
committed Details | Review

Description Allan Day 2012-12-18 18:54:17 UTC
Created attachment 231826 [details]
screenshots

If you select a printer as default, a symbolic icon is added to the list, and this causes the list to grow wider and to move the content of the panel (see the attached screenshot).

The list should have a fixed width - adding the icon should not affect the width.

The list should also be wider by default.
Comment 1 Marek Kašík 2013-04-22 11:45:28 UTC
Created attachment 242124 [details] [review]
preserve width of list of printers when setting default printer

Hi,

attached is a patch which allocates fixed space for cell renderer showing the icon of default printer.

Marek
Comment 2 Bastien Nocera 2013-04-22 16:22:46 UTC
Review of attachment 242124 [details] [review]:

::: panels/printers/cc-printers-panel.c
@@ +1393,3 @@
                                                      "icon-name", PRINTER_DEFAULT_ICON_COLUMN, NULL);
+  gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &icon_width, NULL);
+  gtk_cell_renderer_set_fixed_size (icon_renderer2, icon_width, -1);

I don't really like that. You could always add the "check" icon and always show, but change the opacity to 0 when you don't want to use it.

That's how it was fixed in the region & language dialogues. See 7c341ed630116b7d0bbd1146acb9ea7b65f58731
Comment 3 Marek Kašík 2013-04-23 11:14:23 UTC
(In reply to comment #2)
> Review of attachment 242124 [details] [review]:
> 
> ::: panels/printers/cc-printers-panel.c
> @@ +1393,3 @@
>                                                       "icon-name",
> PRINTER_DEFAULT_ICON_COLUMN, NULL);
> +  gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &icon_width, NULL);
> +  gtk_cell_renderer_set_fixed_size (icon_renderer2, icon_width, -1);
> 
> I don't really like that. You could always add the "check" icon and always
> show, but change the opacity to 0 when you don't want to use it.
> 
> That's how it was fixed in the region & language dialogues. See
> 7c341ed630116b7d0bbd1146acb9ea7b65f58731

This assumes that I have the icon widget accessible but I don't.
Comment 4 Bastien Nocera 2013-04-23 11:25:04 UTC
Of course, you still use a treeview... I guess it will have to do for now then.
Comment 5 Bastien Nocera 2013-04-23 11:26:24 UTC
Comment on attachment 242124 [details] [review]
preserve width of list of printers when setting default printer

Use an int though, not a gint.
Comment 6 Marek Kašík 2013-04-23 11:40:02 UTC
Comment on attachment 242124 [details] [review]
preserve width of list of printers when setting default printer

Thank you for the review. I've committed the patch to master.