Commit 9b25a227 authored by Florian Müllner's avatar Florian Müllner

style: Don't exempt ternary expressions from indent rule

It turns out we can comply with gjs' coding style and still align the
branches if line breaks are required, so do that to reduce diversion
from the canonical GNOME style.

!57
parent 78580bc3
......@@ -470,12 +470,12 @@ class ApplicationsButton extends PanelMenu.Button {
this._tree.disconnect(this._treeChangedId);
this._tree = null;
let handler = Main.sessionMode.hasOverview ?
Main.overview.toggle.bind(Main.overview) : null;
Main.wm.setCustomKeybindingHandler('panel-main-menu',
Shell.ActionMode.NORMAL |
Shell.ActionMode.OVERVIEW,
Main.sessionMode.hasOverview ?
Main.overview.toggle.bind(Main.overview) :
null);
handler);
this._desktopTarget.destroy();
}
......@@ -491,8 +491,8 @@ class ApplicationsButton extends PanelMenu.Button {
_onMenuKeyPress(actor, event) {
let symbol = event.get_key_symbol();
if (symbol == Clutter.KEY_Left || symbol == Clutter.KEY_Right) {
let direction = symbol == Clutter.KEY_Left ? Gtk.DirectionType.LEFT
: Gtk.DirectionType.RIGHT;
let direction = symbol == Clutter.KEY_Left ?
Gtk.DirectionType.LEFT : Gtk.DirectionType.RIGHT;
if (this.menu.actor.navigate_focus(global.stage.key_focus, direction, false))
return true;
}
......
......@@ -116,15 +116,15 @@ class WindowContextMenu extends PopupMenu.PopupMenu {
}
_updateMinimizeItem() {
this._minimizeItem.label.text = this._metaWindow.minimized ? _("Unminimize")
: _("Minimize");
this._minimizeItem.label.text = this._metaWindow.minimized ?
_("Unminimize") : _("Minimize");
}
_updateMaximizeItem() {
let maximized = this._metaWindow.maximized_vertically &&
this._metaWindow.maximized_horizontally;
this._maximizeItem.label.text = maximized ? _("Unmaximize")
: _("Maximize");
this._maximizeItem.label.text = maximized ?
_("Unmaximize") : _("Maximize");
}
_onDestroy() {
......
......@@ -5,7 +5,6 @@
4,
{
"ignoredNodes": [
"ConditionalExpression",
"CallExpression > ArrowFunctionExpression",
"CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child"
],
......
......@@ -20,8 +20,7 @@
4,
{
"ignoredNodes": [
"CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child",
"ConditionalExpression"
"CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child"
],
"MemberExpression": "off"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment