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 677177 - Use gtk+ password character in Summary
Use gtk+ password character in Summary
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-05-31 10:02 UTC by Christophe Fergeau
Modified: 2016-03-31 13:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use gtk+ password character in Summary (1.53 KB, patch)
2012-05-31 10:02 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2012-05-31 10:02:28 UTC
Currently, we're using '*' to hide the password on the Summary page.
This does not match the character used by gtk+ for passwords. Use
the GtkEntry::invisible_char property as the password character for
more consistency.
Comment 1 Christophe Fergeau 2012-05-31 10:02:29 UTC
Created attachment 215317 [details] [review]
Use gtk+ password character in Summary
Comment 2 Zeeshan Ali 2012-06-02 04:33:18 UTC
Review of attachment 215317 [details] [review]:

I recall that there was a reason I didn't go the gtk way but probably it was because it doesn't match the design mockup so not a a good one. :)

::: src/unattended-installer.vala
@@ -23,3 +32,3 @@
         owned get {
             return password_entry.text.length > 0 ?
-                   string.nfill (password_entry.text_length, '*') : _("no password");
+                   utf8_nfill (password_entry.text_length, password_entry.invisible_char) : _("no password");

Can't you simply convert the unichar to a char somehow so that rest of the code remains the same/simpler?
Comment 3 Christophe Fergeau 2012-06-04 08:03:05 UTC
(In reply to comment #2)
> Can't you simply convert the unichar to a char somehow so that rest of the code
> remains the same/simpler?

You cannot losslessly convert an unichar to a char (sizeof (gunichar2) > sizeof (char)), especially with non-ASCII character as this • character. A char *g_utf8_strnfill(gunichar2) function would be needed if we want to do that more easily, but I've been lazy ;)
Comment 4 Zeeshan Ali 2012-06-05 17:33:31 UTC
Committed with some changes.