[gnome-boxes] i-props-provider: Use entry for editable strings



commit ae4d4695c7bbb9297cfb8ed04dd66ff6051174b6
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Feb 18 14:10:23 2015 +0000

    i-props-provider: Use entry for editable strings
    
    Instead of using our custom EditableEntry that shows a button to edit,
    lets just use simple text entry.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720788

 src/i-properties-provider.vala |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/i-properties-provider.vala b/src/i-properties-provider.vala
index 0a3b1a4..1816548 100644
--- a/src/i-properties-provider.vala
+++ b/src/i-properties-provider.vala
@@ -162,21 +162,18 @@ private class Boxes.EditableStringProperty : Boxes.Property {
         set { entry.text = value; }
     }
 
-    private Boxes.EditableEntry entry;
+    private Gtk.Entry entry;
 
     public EditableStringProperty (string name, string value) {
-        var entry = new Boxes.EditableEntry ();
-        entry.editable = true;
+        var entry = new Gtk.Entry ();
 
         base (name, entry, null);
         this.entry = entry;
 
         entry.text = value;
-        entry.selectable = true;
 
-        entry.editing_done.connect (() => {
-            if (!changed (entry.text))
-                entry.start_editing ();
+        entry.notify["text"].connect (() => {
+            changed (entry.text);
         });
     }
 }


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