[the-board] [things] Remove unnecessary code to set initial text in TextThing



commit eb2441efc0bfcd5c4713827ce4c0c21ea28ade1f
Author: Lucas Rocha <lucasr gnome org>
Date:   Thu Mar 10 00:20:19 2011 -0500

    [things] Remove unnecessary code to set initial text in TextThing

 src/js/ui/things/text.js |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/js/ui/things/text.js b/src/js/ui/things/text.js
index 59db216..528d1d1 100644
--- a/src/js/ui/things/text.js
+++ b/src/js/ui/things/text.js
@@ -90,13 +90,8 @@ TextThing.prototype = {
 
         this._createScrollView();
 
-        let initialText = "";
-        if ('text' in args) {
-            initialText = args.text;
-        }
-
         this._createTextBox();
-        this._createText(initialText);
+        this._createText();
 
         Thing.Thing.prototype._init.apply(this, [args]);
     },
@@ -175,9 +170,8 @@ TextThing.prototype = {
         this._scrollView.add_actor(this._textBox);
     },
 
-    _createText : function(initialText) {
-        this._label =
-            new Mx.Label({ text: initialText });
+    _createText : function() {
+        this._label = new Mx.Label();
 
         if (this._style) {
             this._label.set_style(this._style);



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