GNOME Bugzilla – Bug 725551
GTK FontChooserWidget should show a placeholder text in the empty preview text entry
Last modified: 2015-07-19 20:58:16 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.
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?
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 ?!
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.
(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.
> 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.