[gnome-documents/wip/split-view: 5/14] windowMode: Mark two methods as private



commit 16008d96e1de1bfc6e8ac752eccb299a228d51b7
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Oct 15 14:58:57 2014 +0200

    windowMode: Mark two methods as private
    
    Neither setCanFullscreen nor setFullscreen needs to be public. We are
    not using them outside this class, and the rest of the application
    should only toggle the fullscreen state or get the current state.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686461

 src/windowMode.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/windowMode.js b/src/windowMode.js
index a8b5a02..c9e2b8f 100644
--- a/src/windowMode.js
+++ b/src/windowMode.js
@@ -53,7 +53,7 @@ const ModeController = new Lang.Class({
             return;
 
         let policy = this._canFullscreenPolicy(oldMode);
-        this.setCanFullscreen(policy);
+        this._setCanFullscreen(policy);
 
         // Swap the old and current modes.
         let tmp = oldMode;
@@ -70,7 +70,7 @@ const ModeController = new Lang.Class({
             return;
 
         let policy = this._canFullscreenPolicy(mode);
-        this.setCanFullscreen(policy);
+        this._setCanFullscreen(policy);
 
         this._history.push(oldMode);
         this._mode = mode;
@@ -82,16 +82,16 @@ const ModeController = new Lang.Class({
         return this._mode;
     },
 
-    setCanFullscreen: function(canFullscreen) {
+    _setCanFullscreen: function(canFullscreen) {
         this._canFullscreen = canFullscreen;
 
         if (!this._canFullscreen && this._fullscreen)
-            this.setFullscreen(false);
+            this._setFullscreen(false);
 
         this.emit('can-fullscreen-changed');
     },
 
-    setFullscreen: function(fullscreen) {
+    _setFullscreen: function(fullscreen) {
         if (!this._canFullscreenPolicy(this._mode))
             return;
 
@@ -106,7 +106,7 @@ const ModeController = new Lang.Class({
     },
 
     toggleFullscreen: function() {
-        this.setFullscreen(!this._fullscreen);
+        this._setFullscreen(!this._fullscreen);
     },
 
     getFullscreen: function() {


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