GNOME Bugzilla – Bug 690351
Better empty state
Last modified: 2015-10-22 14:46:53 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.
(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?
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.
(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?
There you go: http://i.imgur.com/ALnU5W2.png
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"><span size="larger" weight="bold">No printers added</span></property> The translators won't like that, better to do it in code. I'm also not sure about the label itself. Allan?
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.
(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"><span > size="larger" weight="bold">No printers added</span></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"?
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.
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.
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.
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.
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.
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.
*** Bug 755060 has been marked as a duplicate of this bug. ***
Comment on attachment 310186 [details] [review] printers: polish empty state https://git.gnome.org/browse/gnome-control-center/commit/?id=e9413b4b6a2aab9e573db98c8337f8006dcd3329