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. https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/57
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user