[gnome-boxes] Use gtk+ password character in Summary
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Use gtk+ password character in Summary
- Date: Tue, 5 Jun 2012 17:18:01 +0000 (UTC)
commit 3b36a83b5f903ec2b8d0c013444883a03dce3b32
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu May 31 12:00:32 2012 +0200
Use gtk+ password character in Summary
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.
https://bugzilla.gnome.org/show_bug.cgi?id=677177
src/unattended-installer.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index f6d2e02..70149c8 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -21,8 +21,14 @@ private abstract class Boxes.UnattendedInstaller: InstallerMedia {
public string hidden_password {
owned get {
- return password_entry.text.length > 0 ?
- string.nfill (password_entry.text_length, '*') : _("no password");
+ if (password_entry.text.length > 0) {
+ var str = "";
+ for (var i = 0; i < password_entry.text_length; i++)
+ str += password_entry.get_invisible_char ().to_string ();
+
+ return str;
+ } else
+ return _("no password");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]