[gnome-shell-extensions] extensions: Stop setting GTypeName
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] extensions: Stop setting GTypeName
- Date: Thu, 21 Nov 2019 21:34:28 +0000 (UTC)
commit 30ad3d670f2d50649caa69d7c56153182b45ff8d
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Nov 21 22:11:17 2019 +0100
extensions: Stop setting GTypeName
The type name generated by gjs now includes the filename, so we
don't have to set it ourselves to make sure it's unique.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/95
extensions/auto-move-windows/prefs.js | 5 ++---
extensions/window-list/extension.js | 21 ++++++++-------------
extensions/window-list/windowPicker.js | 6 ++----
extensions/window-list/workspaceIndicator.js | 15 ++++++---------
extensions/windowsNavigator/extension.js | 15 ++++++---------
extensions/workspace-indicator/extension.js | 10 ++++------
6 files changed, 28 insertions(+), 44 deletions(-)
---
diff --git a/extensions/auto-move-windows/prefs.js b/extensions/auto-move-windows/prefs.js
index eed46be..84f98ae 100644
--- a/extensions/auto-move-windows/prefs.js
+++ b/extensions/auto-move-windows/prefs.js
@@ -22,9 +22,8 @@ const Columns = {
ADJUSTMENT: 4,
};
-const Widget = GObject.registerClass({
- GTypeName: 'AutoMoveWindowsPrefsWidget',
-}, class Widget extends Gtk.Grid {
+const Widget = GObject.registerClass(
+class Widget extends Gtk.Grid {
_init(params) {
super._init(params);
this.set_orientation(Gtk.Orientation.VERTICAL);
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 7223ef2..b36c9e8 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -132,9 +132,8 @@ class WindowContextMenu extends PopupMenu.PopupMenu {
}
}
-const WindowTitle = GObject.registerClass({
- GTypeName: 'WindowListWindowTitle',
-}, class WindowTitle extends St.BoxLayout {
+const WindowTitle = GObject.registerClass(
+class WindowTitle extends St.BoxLayout {
_init(metaWindow) {
this._metaWindow = metaWindow;
@@ -205,7 +204,6 @@ const WindowTitle = GObject.registerClass({
const BaseButton = GObject.registerClass({
- GTypeName: 'WindowListBaseButton',
GTypeFlags: GObject.TypeFlags.ABSTRACT,
Properties: {
'ignore-workspace': GObject.ParamSpec.boolean(
@@ -348,9 +346,8 @@ const BaseButton = GObject.registerClass({
});
-const WindowButton = GObject.registerClass({
- GTypeName: 'WindowListWindowButton',
-}, class WindowButton extends BaseButton {
+const WindowButton = GObject.registerClass(
+class WindowButton extends BaseButton {
_init(metaWindow, perMonitor, monitorIndex) {
super._init(perMonitor, monitorIndex);
@@ -480,9 +477,8 @@ class AppContextMenu extends PopupMenu.PopupMenu {
}
}
-const AppButton = GObject.registerClass({
- GTypeName: 'WindowListAppButton',
-}, class AppButton extends BaseButton {
+const AppButton = GObject.registerClass(
+class AppButton extends BaseButton {
_init(app, perMonitor, monitorIndex) {
super._init(perMonitor, monitorIndex);
@@ -672,9 +668,8 @@ const AppButton = GObject.registerClass({
});
-const WindowList = GObject.registerClass({
- GTypeName: 'WindowListWindowList',
-}, class WindowList extends St.Widget {
+const WindowList = GObject.registerClass(
+class WindowList extends St.Widget {
_init(perMonitor, monitor) {
this._perMonitor = perMonitor;
this._monitor = monitor;
diff --git a/extensions/window-list/windowPicker.js b/extensions/window-list/windowPicker.js
index 0e44fd5..0e3a59f 100644
--- a/extensions/window-list/windowPicker.js
+++ b/extensions/window-list/windowPicker.js
@@ -6,9 +6,8 @@ const Main = imports.ui.main;
const Overview = imports.ui.overview;
const { WorkspacesDisplay } = imports.ui.workspacesView;
-let MyWorkspacesDisplay = GObject.registerClass({
- GTypeName: 'WindowList_MyWorkspacesDisplay'
-}, class MyWorkspacesDisplay extends WorkspacesDisplay {
+let MyWorkspacesDisplay = GObject.registerClass(
+class MyWorkspacesDisplay extends WorkspacesDisplay {
_init() {
super._init();
@@ -65,7 +64,6 @@ let MyWorkspacesDisplay = GObject.registerClass({
});
var WindowPicker = GObject.registerClass({
- GTypeName: 'WindowListWindowPicker',
Signals: {
'open-state-changed': { param_types: [GObject.TYPE_BOOLEAN] },
},
diff --git a/extensions/window-list/workspaceIndicator.js b/extensions/window-list/workspaceIndicator.js
index b5cb8e3..8b4688d 100644
--- a/extensions/window-list/workspaceIndicator.js
+++ b/extensions/window-list/workspaceIndicator.js
@@ -9,9 +9,8 @@ const PopupMenu = imports.ui.popupMenu;
const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;
-let WindowPreview = GObject.registerClass({
- GTypeName: 'WindowListWindowPreview',
-}, class WindowPreview extends St.Button {
+let WindowPreview = GObject.registerClass(
+class WindowPreview extends St.Button {
_init(window) {
super._init({
style_class: 'window-list-window-preview',
@@ -97,9 +96,8 @@ let WindowPreview = GObject.registerClass({
}
});
-let WorkspaceThumbnail = GObject.registerClass({
- GTypeName: 'WindowListWorkspaceThumbnail',
-}, class WorkspaceThumbnail extends St.Button {
+let WorkspaceThumbnail = GObject.registerClass(
+class WorkspaceThumbnail extends St.Button {
_init(index) {
super._init({
style_class: 'workspace',
@@ -204,9 +202,8 @@ let WorkspaceThumbnail = GObject.registerClass({
}
});
-var WorkspaceIndicator = GObject.registerClass({
- GTypeName: 'WindowListWorkspaceIndicator',
-}, class WorkspaceIndicator extends PanelMenu.Button {
+var WorkspaceIndicator = GObject.registerClass(
+class WorkspaceIndicator extends PanelMenu.Button {
_init() {
super._init(0.0, _('Workspace Indicator'), true);
this.setMenu(new PopupMenu.PopupMenu(this, 0.0, St.Side.BOTTOM));
diff --git a/extensions/windowsNavigator/extension.js b/extensions/windowsNavigator/extension.js
index d927b67..8ec9437 100644
--- a/extensions/windowsNavigator/extension.js
+++ b/extensions/windowsNavigator/extension.js
@@ -6,9 +6,8 @@ const Main = imports.ui.main;
const Workspace = imports.ui.workspace;
const WorkspacesView = imports.ui.workspacesView;
-var MyWindowOverlay = GObject.registerClass({
- GTypeName: 'WindowsNavigator_MyWindowOverlay'
-}, class MyWindowOverlay extends Workspace.WindowOverlay {
+var MyWindowOverlay = GObject.registerClass(
+class MyWindowOverlay extends Workspace.WindowOverlay {
_init(windowClone, parentActor) {
super._init(windowClone, parentActor);
@@ -43,9 +42,8 @@ var MyWindowOverlay = GObject.registerClass({
}
});
-var MyWorkspace = GObject.registerClass({
- GTypeName: 'WindowsNavigator_MyWorkspace'
-}, class MyWorkspace extends Workspace.Workspace {
+var MyWorkspace = GObject.registerClass(
+class MyWorkspace extends Workspace.Workspace {
_init(metaWorkspace, monitorIndex) {
super._init(metaWorkspace, monitorIndex);
@@ -117,9 +115,8 @@ var MyWorkspace = GObject.registerClass({
}
});
-var MyWorkspacesView = GObject.registerClass({
- GTypeName: 'WindowsNavigator_MyWorkspacesView'
-}, class MyWorkspacesView extends WorkspacesView.WorkspacesView {
+var MyWorkspacesView = GObject.registerClass(
+class MyWorkspacesView extends WorkspacesView.WorkspacesView {
_init(width, height, x, y, workspaces) {
super._init(width, height, x, y, workspaces);
diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js
index 6ed5776..3b202c2 100644
--- a/extensions/workspace-indicator/extension.js
+++ b/extensions/workspace-indicator/extension.js
@@ -15,9 +15,8 @@ const _ = Gettext.gettext;
const WORKSPACE_SCHEMA = 'org.gnome.desktop.wm.preferences';
const WORKSPACE_KEY = 'workspace-names';
-let WindowPreview = GObject.registerClass({
- GTypeName: 'WorkspaceIndicatorWindowPreview',
-}, class WindowPreview extends St.Button {
+let WindowPreview = GObject.registerClass(
+class WindowPreview extends St.Button {
_init(window) {
super._init({
style_class: 'workspace-indicator-window-preview',
@@ -103,9 +102,8 @@ let WindowPreview = GObject.registerClass({
}
});
-let WorkspaceThumbnail = GObject.registerClass({
- GTypeName: 'WorkspaceIndicatorWorkspaceThumbnail',
-}, class WorkspaceThumbnail extends St.Button {
+let WorkspaceThumbnail = GObject.registerClass(
+class WorkspaceThumbnail extends St.Button {
_init(index) {
super._init({
style_class: 'workspace',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]