[gnome-shell] Bug 587955 - Small cleanups to iconButton



commit 177edc5444b7ae8cd83224ec614261a9ab6b2213
Author: Milan Bouchet-Valat <nalimilan club fr>
Date:   Sat Jul 11 18:44:21 2009 +0200

    Bug 587955 - Small cleanups to iconButton
    
    Missing trailing ; after "this._fadeOut()". A few missing spaces after "if". Parameter inconsistently named "icon" instead of "texture".

 js/ui/button.js |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/button.js b/js/ui/button.js
index 1247aee..4ce88ad 100644
--- a/js/ui/button.js
+++ b/js/ui/button.js
@@ -128,14 +128,14 @@ const ANIMATION_TIME = 0.25;
  * size -- size in pixels of  both the button and the icon it contains
  * texture -- optional, must be used if the texture for the icon is already created (else, use setIconFromName)
  */
-function iconButton(parent, size, icon) {
-    this._init(parent, size, icon);
+function iconButton(parent, size, texture) {
+    this._init(parent, size, texture);
 }
 
 iconButton.prototype = {
     _init : function(parent, size, texture) {
         this._size = size;
-        if(texture)
+        if (texture)
             this.actor = texture;
         else
             this.actor = new Clutter.Texture({ width: this._size, height: this._size });
@@ -145,23 +145,23 @@ iconButton.prototype = {
             this._shouldHide = false;
 
             // Nothing to do if the cursor has come back from a child of the parent actor
-            if(actor.get_children().indexOf(Shell.get_event_related(event)) != -1)
+            if (actor.get_children().indexOf(Shell.get_event_related(event)) != -1)
                 return;
 
             this._fadeIn();
         }));
         parent.connect("leave-event", Lang.bind(this, function(actor, event) {
             // Nothing to do if the cursor has merely entered a child of the parent actor
-            if(actor.get_children().indexOf(Shell.get_event_related(event)) != -1)
+            if (actor.get_children().indexOf(Shell.get_event_related(event)) != -1)
                 return;
 
             // Remember that we should not be visible to hide the button if forceShow is unset
-            if(this._forceShow) {
+            if (this._forceShow) {
                 this._shouldHide = true;
                 return;
             }
 
-            this._fadeOut()
+            this._fadeOut();
         }));
     },
 
@@ -187,7 +187,7 @@ iconButton.prototype = {
     forceShow : function(show) {
         this._forceShow = show;
         // Hide the button if it should have been hidden under normal conditions
-        if(!this._forceShow && this._shouldHide) {
+        if (!this._forceShow && this._shouldHide) {
            this._fadeOut();
         }
     },



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