[vinagre] Do not set empty text on the credential entry



commit 735c1e8ed823a561c1c4e7ef58fde4b53b88c0ec
Author: David King <amigadave amigadave com>
Date:   Wed Aug 17 19:08:52 2011 +0200

    Do not set empty text on the credential entry
    
    The credential request dialog was setting the text of the username and
    password entries to the value of the out parameters, which were NULL.
    This fixes a critical warning from gtk_entry_set_text().

 vinagre/vinagre-utils.vala |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/vinagre/vinagre-utils.vala b/vinagre/vinagre-utils.vala
index ea128b1..afa79e6 100644
--- a/vinagre/vinagre-utils.vala
+++ b/vinagre/vinagre-utils.vala
@@ -126,6 +126,7 @@ namespace Vinagre.Utils {
 
         var username_entry = xml.get_object ("username_entry") as Entry;
         var password_entry = xml.get_object ("password_entry") as Entry;
+
         username_entry.changed.connect (() => {
             var enabled = true;
 
@@ -138,9 +139,7 @@ namespace Vinagre.Utils {
             ok_button.sensitive = enabled;
         });
 
-        if (need_username)
-            username_entry.text = username;
-        else {
+        if (!need_username) {
             username_label.hide ();
             username_entry.hide ();
         }
@@ -156,9 +155,9 @@ namespace Vinagre.Utils {
 
             ok_button.sensitive = enabled;
         });
+
         if (need_password) {
             password_entry.max_length = password_limit;
-            password_entry.text = password;
         } else {
             password_label.hide ();
             password_entry.hide ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]