[gnome-shell] cleanup: Use consistent brace style of blocks



commit 471165ca9b735577cfa457978fe13c69155faf1a
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Aug 20 02:51:42 2019 +0200

    cleanup: Use consistent brace style of blocks
    
    Our coding style has always been to either put braces around all
    blocks, or avoid them for all. Fix the couple of places that slipped
    through.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731

 js/extensionPrefs/main.js |  3 ++-
 js/ui/layout.js           | 11 ++++++-----
 js/ui/popupMenu.js        |  5 +++--
 js/ui/windowManager.js    |  4 ++--
 4 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js
index 5523600802..9c5e3ecc00 100644
--- a/js/extensionPrefs/main.js
+++ b/js/extensionPrefs/main.js
@@ -285,8 +285,9 @@ var Application = GObject.registerClass({
                     log(`Failed to connect to shell proxy: ${e}`);
                     this._mainStack.add_named(new NoShellPlaceholder(), 'noshell');
                     this._mainStack.visible_child_name = 'noshell';
-                } else
+                } else {
                     throw e;
+                }
                 return;
             }
 
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 17bda4778e..4708710f48 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -1075,16 +1075,17 @@ var LayoutManager = GObject.registerClass({
                         side = Meta.Side.RIGHT;
                     else
                         continue;
-                } else if (x1 <= monitor.x)
+                } else if (x1 <= monitor.x) {
                     side = Meta.Side.LEFT;
-                else if (y1 <= monitor.y)
+                } else if (y1 <= monitor.y) {
                     side = Meta.Side.TOP;
-                else if (x2 >= monitor.x + monitor.width)
+                } else if (x2 >= monitor.x + monitor.width) {
                     side = Meta.Side.RIGHT;
-                else if (y2 >= monitor.y + monitor.height)
+                } else if (y2 >= monitor.y + monitor.height) {
                     side = Meta.Side.BOTTOM;
-                else
+                } else {
                     continue;
+                }
 
                 let strutRect = new Meta.Rectangle({ x: x1, y: y1, width: x2 - x1, height: y2 - y1 });
                 let strut = new Meta.Strut({ rect: strutRect, side: side });
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index b66f3c5d1e..eb06167068 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -718,10 +718,11 @@ var PopupMenuBase = class {
                 this.disconnect(openStateChangeId);
                 menuItem.disconnect(destroyId);
             });
-        } else if (menuItem instanceof PopupBaseMenuItem)
+        } else if (menuItem instanceof PopupBaseMenuItem) {
             this._connectItemSignals(menuItem);
-        else
+        } else {
             throw TypeError("Invalid argument to PopupMenuBase.addMenuItem()");
+        }
 
         menuItem._setParent(this);
 
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 8d5db083bf..2972788491 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -630,9 +630,9 @@ var AppSwitchAction = GObject.registerClass({
         let nPoints = this.get_n_current_points();
         let event = this.get_last_event (nPoints - 1);
 
-        if (nPoints == 3)
+        if (nPoints == 3) {
             this._longPressStartTime = event.get_time();
-        else if (nPoints == 4) {
+        } else if (nPoints == 4) {
             // Check whether the 4th finger press happens after a 3-finger long press,
             // this only needs to be checked on the first 4th finger press
             if (this._longPressStartTime != null &&


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