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 725551 - GTK FontChooserWidget should show a placeholder text in the empty preview text entry
GTK FontChooserWidget should show a placeholder text in the empty preview tex...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFontChooser
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-03-03 05:34 UTC by Jean-François Fortin Tam
Modified: 2015-07-19 20:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
attempt at fixing this (1.11 KB, patch)
2014-03-03 05:37 UTC, Jean-François Fortin Tam
committed Details | Review

Description Jean-François Fortin Tam 2014-03-03 05:34:01 UTC
Apps/API users can use gtk_font_chooser_set_preview_text to with an empty string, which has the following effects:

- No preview is shown for each font entry/row in the listview.
  Possibly a "workaround" for bug #725549.

- Nothing is shown in the preview text entry below the listview.
  The problem with that is that users have no idea that this GtkEntry
  is actually meant for them to type the text they want to preview.

Attaching an attempt to solve this using GtkEntry's native placeholder text.
Comment 1 Jean-François Fortin Tam 2014-03-03 05:37:22 UTC
Created attachment 270755 [details] [review]
attempt at fixing this

Beware of bugs in the code above, I expect it to work but I'm not in a position to test it. I used _("foo") to mark the string as translatable but I'm not sure if that's enough?
Comment 2 Matthias Clasen 2014-03-03 19:30:42 UTC
So, let me get this straight: You are calling
gtk_font_chooser_set_preview_text (x, ""), and the complaint is that the preview text is blank after this call ?!
Comment 3 Jean-François Fortin Tam 2014-03-03 20:49:30 UTC
I think there can be a distinction between the "text that is shown as a preview by default on every line" (in bug #725549) and "here's an area where you can input custom text instead".

I suspect that some application developers are working around bug #725549 (avoiding the "preview on every single listview row" phenomenon) by setting that string to be empty by default. At least that's what I saw in Gedit and Devhelp.

A placeholder text is, as you know, not the same as "real" text in a GtkEntry widget; it looks and behaves differently. I think in this case it would be helpful to users, having something else than an empty GtkEntry with no indication whatsoever what it's meant for. I see no harm in doing this, only increased discoverability for users.
Comment 4 Matthias Clasen 2014-03-03 20:55:45 UTC
(In reply to comment #3)

> A placeholder text is, as you know, not the same as "real" text in a GtkEntry
> widget; it looks and behaves differently.

Yeah, I personally hate placeholder texts - its a misfeature as far as I'm concerned.
Comment 5 Jean-François Fortin Tam 2014-03-04 16:54:05 UTC
> I personally hate placeholder texts - its a misfeature as far as I'm concerned

I found it to be a great usability (and implementation) improvement in Evolution, Pitivi, etc.

Anyhow, if you fix the core issue behind bug #725549, there is indeed not much need for a placeholder text here.