[gnome-shell] cleanup: Use consistent style for GObject property definitions
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] cleanup: Use consistent style for GObject property definitions
- Date: Tue, 2 Jul 2019 12:24:24 +0000 (UTC)
commit 6f8dd065a4f976119120bd6b1d594fb7a9338940
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jan 29 19:15:23 2019 +0100
cleanup: Use consistent style for GObject property definitions
Go with the style preferred by gjs.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/608
js/ui/layout.js | 26 ++++++++++++++------------
js/ui/messageList.js | 14 ++++++++------
js/ui/modalDialog.js | 12 +++++++-----
js/ui/padOsd.js | 32 +++++++++++++++++---------------
4 files changed, 46 insertions(+), 38 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 5ad126aed..775b5759c 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -32,18 +32,20 @@ function isPopupMetaWindow(actor) {
}
var MonitorConstraint = GObject.registerClass({
- Properties: {'primary': GObject.ParamSpec.boolean('primary',
- 'Primary', 'Track primary monitor',
- GObject.ParamFlags.READABLE |
GObject.ParamFlags.WRITABLE,
- false),
- 'index': GObject.ParamSpec.int('index',
- 'Monitor index', 'Track specific monitor',
- GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
- -1, 64, -1),
- 'work-area': GObject.ParamSpec.boolean('work-area',
- 'Work-area', 'Track monitor\'s work-area',
- GObject.ParamFlags.READABLE |
GObject.ParamFlags.WRITABLE,
- false)},
+ Properties: {
+ 'primary': GObject.ParamSpec.boolean('primary',
+ 'Primary', 'Track primary monitor',
+ GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
+ false),
+ 'index': GObject.ParamSpec.int('index',
+ 'Monitor index', 'Track specific monitor',
+ GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
+ -1, 64, -1),
+ 'work-area': GObject.ParamSpec.boolean('work-area',
+ 'Work-area', 'Track monitor\'s work-area',
+ GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
+ false)
+ },
}, class MonitorConstraint extends Clutter.Constraint {
_init(props) {
this._primary = false;
diff --git a/js/ui/messageList.js b/js/ui/messageList.js
index b912a782f..34a11066e 100644
--- a/js/ui/messageList.js
+++ b/js/ui/messageList.js
@@ -197,12 +197,14 @@ class ScaleLayout extends Clutter.BinLayout {
});
var LabelExpanderLayout = GObject.registerClass({
- Properties: { 'expansion': GObject.ParamSpec.double('expansion',
- 'Expansion',
- 'Expansion of the layout, between 0 (collapsed) ' +
- 'and 1 (fully expanded',
- GObject.ParamFlags.READABLE |
GObject.ParamFlags.WRITABLE,
- 0, 1, 0) },
+ Properties: {
+ 'expansion': GObject.ParamSpec.double('expansion',
+ 'Expansion',
+ 'Expansion of the layout, between 0 (collapsed) ' +
+ 'and 1 (fully expanded',
+ GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE,
+ 0, 1, 0)
+ },
}, class LabelExpanderLayout extends Clutter.LayoutManager {
_init(params) {
this._expansion = 0;
diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js
index fc702accd..06d3a3e82 100644
--- a/js/ui/modalDialog.js
+++ b/js/ui/modalDialog.js
@@ -21,11 +21,13 @@ var State = {
};
var ModalDialog = GObject.registerClass({
- Properties: { 'state': GObject.ParamSpec.int('state', 'Dialog state', 'state',
- GObject.ParamFlags.READABLE,
- Math.min(...Object.values(State)),
- Math.max(...Object.values(State)),
- State.CLOSED) },
+ Properties: {
+ 'state': GObject.ParamSpec.int('state', 'Dialog state', 'state',
+ GObject.ParamFlags.READABLE,
+ Math.min(...Object.values(State)),
+ Math.max(...Object.values(State)),
+ State.CLOSED)
+ },
Signals: { 'opened': {}, 'closed': {} }
}, class ModalDialog extends St.Widget {
_init(params) {
diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js
index c548e995d..64c992a02 100644
--- a/js/ui/padOsd.js
+++ b/js/ui/padOsd.js
@@ -275,21 +275,23 @@ var ActionEditor = class {
Signals.addSignalMethods(ActionEditor.prototype);
var PadDiagram = GObject.registerClass({
- Properties: { 'left-handed': GObject.ParamSpec.boolean('left-handed',
- 'left-handed', 'Left handed',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT_ONLY,
- false),
- 'image': GObject.ParamSpec.string('image', 'image', 'Image',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT_ONLY,
- null),
- 'editor-actor': GObject.ParamSpec.object('editor-actor',
- 'editor-actor',
- 'Editor actor',
- GObject.ParamFlags.READWRITE |
- GObject.ParamFlags.CONSTRUCT_ONLY,
- Clutter.Actor.$gtype) },
+ Properties: {
+ 'left-handed': GObject.ParamSpec.boolean('left-handed',
+ 'left-handed', 'Left handed',
+ GObject.ParamFlags.READWRITE |
+ GObject.ParamFlags.CONSTRUCT_ONLY,
+ false),
+ 'image': GObject.ParamSpec.string('image', 'image', 'Image',
+ GObject.ParamFlags.READWRITE |
+ GObject.ParamFlags.CONSTRUCT_ONLY,
+ null),
+ 'editor-actor': GObject.ParamSpec.object('editor-actor',
+ 'editor-actor',
+ 'Editor actor',
+ GObject.ParamFlags.READWRITE |
+ GObject.ParamFlags.CONSTRUCT_ONLY,
+ Clutter.Actor.$gtype)
+ },
}, class PadDiagram extends St.DrawingArea {
_init(params) {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/pad-osd.css');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]