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 690351 - Better empty state
Better empty state
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Printers
3.6.x
Other Linux
: Normal enhancement
: ---
Assigned To: Felipe Borges
Control-Center Maintainers
3.10
: 755060 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-12-17 14:37 UTC by Allan Day
Modified: 2015-10-22 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (11.75 KB, image/png)
2012-12-17 14:37 UTC, Allan Day
  Details
printers: polish empty state (5.10 KB, patch)
2015-08-28 12:09 UTC, Felipe Borges
none Details | Review
printers: polish empty state (5.03 KB, patch)
2015-08-28 12:18 UTC, Felipe Borges
none Details | Review
printers: polish empty state (5.62 KB, patch)
2015-08-28 13:28 UTC, Felipe Borges
none Details | Review
printers: polish empty state (5.67 KB, patch)
2015-08-28 13:46 UTC, Felipe Borges
none Details | Review
printers: polish empty state (6.04 KB, patch)
2015-08-28 14:01 UTC, Felipe Borges
committed Details | Review

Description Allan Day 2012-12-17 14:37:50 UTC
Created attachment 231723 [details]
screenshot

If you don't have any printers, the panel looks rather bare. There's also a "No printers available" label, which could be confusing, and the insensitive list might be hard to understand.

A screenshot is attached and a mockup is on its way.
Comment 1 Allan Day 2015-01-07 16:32:17 UTC
(In reply to comment #0)
...
> A screenshot is attached and a mockup is on its way.

Here you go: https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/printing/printers-empty-state.png

Not much of a delay, was it?
Comment 2 Felipe Borges 2015-08-28 12:09:38 UTC
Created attachment 310178 [details] [review]
printers: polish empty state

If you don't have any printers, the panel used to look rather bare.
There was also a "No printers available" label, which was confusing,
and the insensitive list might be hard to understand.
Comment 3 Bastien Nocera 2015-08-28 12:11:12 UTC
(In reply to Felipe Borges from comment #2)
> Created attachment 310178 [details] [review] [review]
> printers: polish empty state
> 
> If you don't have any printers, the panel used to look rather bare.
> There was also a "No printers available" label, which was confusing,
> and the insensitive list might be hard to understand.

Got a screenshot?
Comment 4 Felipe Borges 2015-08-28 12:15:12 UTC
There you go: http://i.imgur.com/ALnU5W2.png
Comment 5 Bastien Nocera 2015-08-28 12:17:48 UTC
Review of attachment 310178 [details] [review]:

::: panels/printers/cc-printers-panel.c
@@ +1115,2 @@
       gtk_list_store_append (store, &iter);
       gtk_list_store_set (store, &iter,

Should all that code be removed? It makes no sense to have an unlabeled non-iconed item in the treeview.

::: panels/printers/printers.ui
@@ +564,3 @@
+                  <object class="GtkLabel" id="no-printer-label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;span size="larger" weight="bold"&gt;No printers added&lt;/span&gt;</property>

The translators won't like that, better to do it in code. I'm also not sure about the label itself. Allan?
Comment 6 Felipe Borges 2015-08-28 12:18:28 UTC
Created attachment 310179 [details] [review]
printers: polish empty state

If you don't have any printers, the panel used to look rather bare.
There was also a "No printers available" label, which was confusing,
and the insensitive list might be hard to understand.
Comment 7 Allan Day 2015-08-28 12:34:42 UTC
(In reply to Bastien Nocera from comment #5)
...
> ::: panels/printers/printers.ui
> @@ +564,3 @@
> +                  <object class="GtkLabel" id="no-printer-label">
> +                    <property name="visible">True</property>
> +                    <property name="label" translatable="yes">&lt;span
> size="larger" weight="bold"&gt;No printers added&lt;/span&gt;</property>
> 
> The translators won't like that, better to do it in code. I'm also not sure
> about the label itself. Allan?

Kill the "added"?
Comment 8 Felipe Borges 2015-08-28 13:28:46 UTC
Created attachment 310182 [details] [review]
printers: polish empty state

If you don't have any printers, the panel used to look rather bare.
There was also a "No printers available" label, which was confusing,
and the insensitive list might be hard to understand.
Comment 9 Bastien Nocera 2015-08-28 13:31:26 UTC
Review of attachment 310182 [details] [review]:

Nearly there.

::: panels/printers/cc-printers-panel.c
@@ +2629,3 @@
 
+  widget = (GtkWidget*) gtk_builder_get_object (priv->builder, "no-printer-label");
+  gtk_label_set_markup (GTK_LABEL (widget), _("<span size=\"larger\" weight=\"bold\">No printers added</span>"));

This has the same problem as putting it directly in the GtkBuilder.

label = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>", _("No printers"));
gtk_label_set_markup (GTK_LABEL (widget), label);
g_free (label);

Use "No printers" as Allan mentioned as well.
Comment 10 Felipe Borges 2015-08-28 13:46:07 UTC
Created attachment 310184 [details] [review]
printers: polish empty state

If you don't have any printers, the panel used to look rather bare.
There was also a "No printers available" label, which was confusing,
and the insensitive list might be hard to understand.
Comment 11 Bastien Nocera 2015-08-28 13:51:34 UTC
Review of attachment 310184 [details] [review]:

::: panels/printers/cc-printers-panel.c
@@ +2630,3 @@
+  widget = (GtkWidget*) gtk_builder_get_object (priv->builder, "no-printer-label");
+  gtk_label_set_markup (GTK_LABEL (widget),
+                        g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>", _("No printers")));

You're leaking the label.
Comment 12 Felipe Borges 2015-08-28 14:01:35 UTC
Created attachment 310186 [details] [review]
printers: polish empty state

If you don't have any printers, the panel used to look rather bare.
There was also a "No printers available" label, which was confusing,
and the insensitive list might be hard to understand.
Comment 13 Bastien Nocera 2015-08-28 14:07:29 UTC
Review of attachment 310186 [details] [review]:

This just needs freeze break approval now.

::: panels/printers/cc-printers-panel.c
@@ +2547,3 @@
   GList                   *iter;
   gchar                   *current_printer_name = NULL;
+  gchar                   *no_printer_label = NULL;

the "= NULL" is not necessary, but you can fix that when committing.
Comment 14 Marek Kašík 2015-09-15 13:19:18 UTC
*** Bug 755060 has been marked as a duplicate of this bug. ***