Compare commits
No commits in common. 'c9' and 'c8' have entirely different histories.
@ -1 +1 @@
|
|||||||
SOURCES/gnome-shell-extensions-40.7.tar.xz
|
SOURCES/gnome-shell-extensions-3.32.1.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
a905a152407590d18e8dc14bb4133fbde0e03abb SOURCES/gnome-shell-extensions-40.7.tar.xz
|
51c1c16bcd0dc9125834b32d7c539c38fa9c4f52 SOURCES/gnome-shell-extensions-3.32.1.tar.xz
|
||||||
|
@ -0,0 +1,83 @@
|
|||||||
|
From f5e47cd8ca32ae433f6906b01a509c5a304894d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Sat, 24 Oct 2020 01:14:44 +0200
|
||||||
|
Subject: [PATCH] Update desktop-icons gettext domain
|
||||||
|
|
||||||
|
---
|
||||||
|
extensions/desktop-icons/createFolderDialog.js | 2 +-
|
||||||
|
extensions/desktop-icons/desktopGrid.js | 2 +-
|
||||||
|
extensions/desktop-icons/fileItem.js | 2 +-
|
||||||
|
extensions/desktop-icons/prefs.js | 8 +++++---
|
||||||
|
4 files changed, 8 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/createFolderDialog.js b/extensions/desktop-icons/createFolderDialog.js
|
||||||
|
index f3e40e9..5038762 100644
|
||||||
|
--- a/extensions/desktop-icons/createFolderDialog.js
|
||||||
|
+++ b/extensions/desktop-icons/createFolderDialog.js
|
||||||
|
@@ -21,7 +21,7 @@ const { Clutter, GObject, GLib, Gio, St } = imports.gi;
|
||||||
|
const Signals = imports.signals;
|
||||||
|
|
||||||
|
const Dialog = imports.ui.dialog;
|
||||||
|
-const Gettext = imports.gettext.domain('desktop-icons');
|
||||||
|
+const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
||||||
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
|
const ShellEntry = imports.ui.shellEntry;
|
||||||
|
const Tweener = imports.ui.tweener;
|
||||||
|
diff --git a/extensions/desktop-icons/desktopGrid.js b/extensions/desktop-icons/desktopGrid.js
|
||||||
|
index a2d1f12..94d2dfd 100644
|
||||||
|
--- a/extensions/desktop-icons/desktopGrid.js
|
||||||
|
+++ b/extensions/desktop-icons/desktopGrid.js
|
||||||
|
@@ -44,7 +44,7 @@ const Util = imports.misc.util;
|
||||||
|
|
||||||
|
const Clipboard = St.Clipboard.get_default();
|
||||||
|
const CLIPBOARD_TYPE = St.ClipboardType.CLIPBOARD;
|
||||||
|
-const Gettext = imports.gettext.domain('desktop-icons');
|
||||||
|
+const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
||||||
|
|
||||||
|
const _ = Gettext.gettext;
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/fileItem.js b/extensions/desktop-icons/fileItem.js
|
||||||
|
index 0c6a54d..d6d43c9 100644
|
||||||
|
--- a/extensions/desktop-icons/fileItem.js
|
||||||
|
+++ b/extensions/desktop-icons/fileItem.js
|
||||||
|
@@ -42,7 +42,7 @@ const Prefs = Me.imports.prefs;
|
||||||
|
const DBusUtils = Me.imports.dbusUtils;
|
||||||
|
const DesktopIconsUtil = Me.imports.desktopIconsUtil;
|
||||||
|
|
||||||
|
-const Gettext = imports.gettext.domain('desktop-icons');
|
||||||
|
+const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
||||||
|
|
||||||
|
const _ = Gettext.gettext;
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/prefs.js b/extensions/desktop-icons/prefs.js
|
||||||
|
index 4b8d986..51daf15 100644
|
||||||
|
--- a/extensions/desktop-icons/prefs.js
|
||||||
|
+++ b/extensions/desktop-icons/prefs.js
|
||||||
|
@@ -26,7 +26,7 @@ const Gettext = imports.gettext;
|
||||||
|
|
||||||
|
const Config = imports.misc.config;
|
||||||
|
|
||||||
|
-var _ = Gettext.domain('desktop-icons').gettext;
|
||||||
|
+var _ = Gettext.domain('gnome-shell-extensions').gettext;
|
||||||
|
|
||||||
|
const SCHEMA_NAUTILUS = 'org.gnome.nautilus.preferences';
|
||||||
|
const SCHEMA_GTK = 'org.gtk.Settings.FileChooser';
|
||||||
|
@@ -51,11 +51,13 @@ var CLICK_POLICY_SINGLE = false;
|
||||||
|
function initTranslations() {
|
||||||
|
let extension = ExtensionUtils.getCurrentExtension();
|
||||||
|
|
||||||
|
+ let domain = extension.metadata['gettext-domain'] || 'desktop-icons';
|
||||||
|
+
|
||||||
|
let localedir = extension.dir.get_child('locale');
|
||||||
|
if (localedir.query_exists(null))
|
||||||
|
- Gettext.bindtextdomain('desktop-icons', localedir.get_path());
|
||||||
|
+ Gettext.bindtextdomain(domain, localedir.get_path());
|
||||||
|
else
|
||||||
|
- Gettext.bindtextdomain('desktop-icons', Config.LOCALEDIR);
|
||||||
|
+ Gettext.bindtextdomain(domain, Config.LOCALEDIR);
|
||||||
|
}
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
--
|
||||||
|
2.21.1
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
From 0bbeadadc41128b2be1f2b56c60b5a7a671d40da Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Thu, 27 Jun 2019 03:57:53 +0200
|
||||||
|
Subject: [PATCH] apps-menu: Add missing chain-up
|
||||||
|
|
||||||
|
PanelMenu.Button is a bit weird in that it also "contains" its parent
|
||||||
|
actor. That container is supposed to be destroyed with the button, but
|
||||||
|
as we currently don't chain up to the parent class' _onDestroy(), we
|
||||||
|
leave behind an empty container every time the extension is disabled.
|
||||||
|
|
||||||
|
Fix this by adding the missing chain-up.
|
||||||
|
|
||||||
|
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/75
|
||||||
|
---
|
||||||
|
extensions/apps-menu/extension.js | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
|
||||||
|
index b9e7111..9803cc1 100644
|
||||||
|
--- a/extensions/apps-menu/extension.js
|
||||||
|
+++ b/extensions/apps-menu/extension.js
|
||||||
|
@@ -433,6 +433,8 @@ class ApplicationsButton extends PanelMenu.Button {
|
||||||
|
}
|
||||||
|
|
||||||
|
_onDestroy() {
|
||||||
|
+ super._onDestroy();
|
||||||
|
+
|
||||||
|
Main.overview.disconnect(this._showingId);
|
||||||
|
Main.overview.disconnect(this._hidingId);
|
||||||
|
appSys.disconnect(this._installedChangedId);
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -1,66 +1,32 @@
|
|||||||
From 08e720c793baa0cb12ed99c4333c75df46e3a9ed Mon Sep 17 00:00:00 2001
|
From 3e3634b59455da0cbae1de4af0ce5cf97be8b80d Mon Sep 17 00:00:00 2001
|
||||||
From: Ray Strode <rstrode@redhat.com>
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
Date: Tue, 21 Jan 2014 16:48:17 -0500
|
Date: Tue, 21 Jan 2014 16:48:17 -0500
|
||||||
Subject: [PATCH] apps-menu: add logo icon to Applications menu
|
Subject: [PATCH] apps-menu: add logo icon to Applications menu
|
||||||
|
|
||||||
Brand requested it.
|
Brand requested it.
|
||||||
---
|
---
|
||||||
extensions/apps-menu/extension.js | 22 +++++++++++++++++++++-
|
extensions/apps-menu/extension.js | 8 ++++++++
|
||||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
|
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
|
||||||
index e36b0fe..983a4e7 100644
|
index d7ba570..d62e3d7 100644
|
||||||
--- a/extensions/apps-menu/extension.js
|
--- a/extensions/apps-menu/extension.js
|
||||||
+++ b/extensions/apps-menu/extension.js
|
+++ b/extensions/apps-menu/extension.js
|
||||||
@@ -364,13 +364,24 @@ class ApplicationsButton extends PanelMenu.Button {
|
@@ -390,6 +390,14 @@ class ApplicationsButton extends PanelMenu.Button {
|
||||||
// role ATK_ROLE_MENU like other elements of the panel.
|
|
||||||
this.accessible_role = Atk.Role.LABEL;
|
|
||||||
|
|
||||||
+ const hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
||||||
+
|
|
||||||
+ const iconFile = Gio.File.new_for_path(
|
+ let iconFile = Gio.File.new_for_path(
|
||||||
+ '/usr/share/icons/hicolor/scalable/apps/start-here.svg');
|
+ '/usr/share/icons/hicolor/scalable/apps/start-here.svg');
|
||||||
+ this._icon = new St.Icon({
|
+ this._icon = new St.Icon({
|
||||||
+ gicon: new Gio.FileIcon({ file: iconFile }),
|
+ gicon: new Gio.FileIcon({ file: iconFile }),
|
||||||
+ style_class: 'panel-logo-icon',
|
+ style_class: 'panel-logo-icon'
|
||||||
+ });
|
+ });
|
||||||
+ hbox.add_actor(this._icon);
|
+ hbox.add_actor(this._icon);
|
||||||
+
|
+
|
||||||
this._label = new St.Label({
|
this._label = new St.Label({
|
||||||
text: _('Applications'),
|
text: _('Applications'),
|
||||||
y_expand: true,
|
y_expand: true,
|
||||||
y_align: Clutter.ActorAlign.CENTER,
|
|
||||||
});
|
|
||||||
+ hbox.add_actor(this._label);
|
|
||||||
|
|
||||||
- this.add_actor(this._label);
|
|
||||||
+ this.add_actor(hbox);
|
|
||||||
this.name = 'panelApplications';
|
|
||||||
this.label_actor = this._label;
|
|
||||||
|
|
||||||
@@ -404,6 +415,14 @@ class ApplicationsButton extends PanelMenu.Button {
|
|
||||||
this._display();
|
|
||||||
this._installedChangedId = appSys.connect('installed-changed',
|
|
||||||
this._onTreeChanged.bind(this));
|
|
||||||
+ this._sessionUpdatedId = Main.sessionMode.connect('updated',
|
|
||||||
+ this._sessionUpdated.bind(this));
|
|
||||||
+ this._sessionUpdated();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _sessionUpdated() {
|
|
||||||
+ this._icon.visible =
|
|
||||||
+ !Main.sessionMode.panel.left.includes('activities');
|
|
||||||
}
|
|
||||||
|
|
||||||
_onTreeChanged() {
|
|
||||||
@@ -429,6 +448,7 @@ class ApplicationsButton extends PanelMenu.Button {
|
|
||||||
|
|
||||||
Main.overview.disconnect(this._showingId);
|
|
||||||
Main.overview.disconnect(this._hidingId);
|
|
||||||
+ Main.sessionMode.disconnect(this._sessionUpdatedId);
|
|
||||||
appSys.disconnect(this._installedChangedId);
|
|
||||||
this._tree.disconnect(this._treeChangedId);
|
|
||||||
this._tree = null;
|
|
||||||
--
|
--
|
||||||
2.32.0
|
2.21.0
|
||||||
|
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
From 8a5e793b3d984f3acc378cf8914410311e9dde0e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Daniel van Vugt <daniel.van.vugt@canonical.com>
|
||||||
|
Date: Thu, 28 Jan 2021 16:33:50 +0800
|
||||||
|
Subject: [PATCH] auto-move-windows: Don't move windows already on all
|
||||||
|
workspaces
|
||||||
|
|
||||||
|
This fixes a particular case of mutter#992.
|
||||||
|
|
||||||
|
Although gnome-shell will also be softened to not crash in future, it's
|
||||||
|
also a good idea for the extension to explicitly decide how it wants to
|
||||||
|
handle windows that are already on all workspaces.
|
||||||
|
|
||||||
|
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/157>
|
||||||
|
---
|
||||||
|
extensions/auto-move-windows/extension.js | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/auto-move-windows/extension.js b/extensions/auto-move-windows/extension.js
|
||||||
|
index b9bc3a0..3859809 100644
|
||||||
|
--- a/extensions/auto-move-windows/extension.js
|
||||||
|
+++ b/extensions/auto-move-windows/extension.js
|
||||||
|
@@ -72,7 +72,7 @@ class WindowMover {
|
||||||
|
}
|
||||||
|
|
||||||
|
_moveWindow(window, workspaceNum) {
|
||||||
|
- if (window.skip_taskbar)
|
||||||
|
+ if (window.skip_taskbar || window.is_on_all_workspaces())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// ensure we have the required number of workspaces
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
@ -0,0 +1,208 @@
|
|||||||
|
From 3c62051c0a154ae987bb0126e8adb6cd86aa69a2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Mon, 24 Feb 2020 16:17:05 +0100
|
||||||
|
Subject: [PATCH] dashToDock: Handle no-overview case
|
||||||
|
|
||||||
|
There is no longer an overview in GNOME Classic, so in order to be
|
||||||
|
used in that environment, the extension must deal with that case.
|
||||||
|
---
|
||||||
|
extensions/dash-to-dock/docking.js | 122 ++++++++++++++++-------------
|
||||||
|
1 file changed, 68 insertions(+), 54 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/dash-to-dock/docking.js b/extensions/dash-to-dock/docking.js
|
||||||
|
index d35094b..2b8353a 100644
|
||||||
|
--- a/extensions/dash-to-dock/docking.js
|
||||||
|
+++ b/extensions/dash-to-dock/docking.js
|
||||||
|
@@ -233,7 +233,7 @@ var DockedDash = class DashToDock {
|
||||||
|
// Create a new dash object
|
||||||
|
this.dash = new MyDash.MyDash(this._settings, this._remoteModel, this._monitorIndex);
|
||||||
|
|
||||||
|
- if (!this._settings.get_boolean('show-show-apps-button'))
|
||||||
|
+ if (Main.overview.isDummy || !this._settings.get_boolean('show-show-apps-button'))
|
||||||
|
this.dash.hideShowAppsButton();
|
||||||
|
|
||||||
|
// Create the main actor and the containers for sliding in and out and
|
||||||
|
@@ -272,45 +272,11 @@ var DockedDash = class DashToDock {
|
||||||
|
this.dash.actor.add_constraint(this.constrainSize);
|
||||||
|
|
||||||
|
this._signalsHandler.add([
|
||||||
|
- Main.overview,
|
||||||
|
- 'item-drag-begin',
|
||||||
|
- this._onDragStart.bind(this)
|
||||||
|
- ], [
|
||||||
|
- Main.overview,
|
||||||
|
- 'item-drag-end',
|
||||||
|
- this._onDragEnd.bind(this)
|
||||||
|
- ], [
|
||||||
|
- Main.overview,
|
||||||
|
- 'item-drag-cancelled',
|
||||||
|
- this._onDragEnd.bind(this)
|
||||||
|
- ], [
|
||||||
|
// update when workarea changes, for instance if other extensions modify the struts
|
||||||
|
//(like moving th panel at the bottom)
|
||||||
|
global.display,
|
||||||
|
'workareas-changed',
|
||||||
|
this._resetPosition.bind(this)
|
||||||
|
- ], [
|
||||||
|
- Main.overview,
|
||||||
|
- 'showing',
|
||||||
|
- this._onOverviewShowing.bind(this)
|
||||||
|
- ], [
|
||||||
|
- Main.overview,
|
||||||
|
- 'hiding',
|
||||||
|
- this._onOverviewHiding.bind(this)
|
||||||
|
- ], [
|
||||||
|
- // Hide on appview
|
||||||
|
- Main.overview.viewSelector,
|
||||||
|
- 'page-changed',
|
||||||
|
- this._pageChanged.bind(this)
|
||||||
|
- ], [
|
||||||
|
- Main.overview.viewSelector,
|
||||||
|
- 'page-empty',
|
||||||
|
- this._onPageEmpty.bind(this)
|
||||||
|
- ], [
|
||||||
|
- // Ensure the ShowAppsButton status is kept in sync
|
||||||
|
- Main.overview.viewSelector._showAppsButton,
|
||||||
|
- 'notify::checked',
|
||||||
|
- this._syncShowAppsButtonToggled.bind(this)
|
||||||
|
], [
|
||||||
|
global.display,
|
||||||
|
'in-fullscreen-changed',
|
||||||
|
@@ -325,15 +291,6 @@ var DockedDash = class DashToDock {
|
||||||
|
this.dash,
|
||||||
|
'icon-size-changed',
|
||||||
|
() => { Main.overview.dashIconSize = this.dash.iconSize; }
|
||||||
|
- ], [
|
||||||
|
- // This duplicate the similar signal which is in owerview.js.
|
||||||
|
- // Being connected and thus executed later this effectively
|
||||||
|
- // overwrite any attempt to use the size of the default dash
|
||||||
|
- //which given the customization is usually much smaller.
|
||||||
|
- // I can't easily disconnect the original signal
|
||||||
|
- Main.overview._controls.dash,
|
||||||
|
- 'icon-size-changed',
|
||||||
|
- () => { Main.overview.dashIconSize = this.dash.iconSize; }
|
||||||
|
], [
|
||||||
|
// sync hover after a popupmenu is closed
|
||||||
|
this.dash,
|
||||||
|
@@ -341,6 +298,53 @@ var DockedDash = class DashToDock {
|
||||||
|
() => { this._box.sync_hover() }
|
||||||
|
]);
|
||||||
|
|
||||||
|
+ if (!Main.overview.isDummy) {
|
||||||
|
+ this._signalsHandler.add([
|
||||||
|
+ Main.overview,
|
||||||
|
+ 'item-drag-begin',
|
||||||
|
+ this._onDragStart.bind(this)
|
||||||
|
+ ], [
|
||||||
|
+ Main.overview,
|
||||||
|
+ 'item-drag-end',
|
||||||
|
+ this._onDragEnd.bind(this)
|
||||||
|
+ ], [
|
||||||
|
+ Main.overview,
|
||||||
|
+ 'item-drag-cancelled',
|
||||||
|
+ this._onDragEnd.bind(this)
|
||||||
|
+ ], [
|
||||||
|
+ Main.overview,
|
||||||
|
+ 'showing',
|
||||||
|
+ this._onOverviewShowing.bind(this)
|
||||||
|
+ ], [
|
||||||
|
+ Main.overview,
|
||||||
|
+ 'hiding',
|
||||||
|
+ this._onOverviewHiding.bind(this)
|
||||||
|
+ ], [
|
||||||
|
+ // Hide on appview
|
||||||
|
+ Main.overview.viewSelector,
|
||||||
|
+ 'page-changed',
|
||||||
|
+ this._pageChanged.bind(this)
|
||||||
|
+ ], [
|
||||||
|
+ Main.overview.viewSelector,
|
||||||
|
+ 'page-empty',
|
||||||
|
+ this._onPageEmpty.bind(this)
|
||||||
|
+ ], [
|
||||||
|
+ // Ensure the ShowAppsButton status is kept in sync
|
||||||
|
+ Main.overview.viewSelector._showAppsButton,
|
||||||
|
+ 'notify::checked',
|
||||||
|
+ this._syncShowAppsButtonToggled.bind(this)
|
||||||
|
+ ], [
|
||||||
|
+ // This duplicate the similar signal which is in owerview.js.
|
||||||
|
+ // Being connected and thus executed later this effectively
|
||||||
|
+ // overwrite any attempt to use the size of the default dash
|
||||||
|
+ //which given the customization is usually much smaller.
|
||||||
|
+ // I can't easily disconnect the original signal
|
||||||
|
+ Main.overview._controls.dash,
|
||||||
|
+ 'icon-size-changed',
|
||||||
|
+ () => { Main.overview.dashIconSize = this.dash.iconSize; }
|
||||||
|
+ ]);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
this._injectionsHandler = new Utils.InjectionsHandler();
|
||||||
|
this._themeManager = new Theming.ThemeManager(this._settings, this);
|
||||||
|
|
||||||
|
@@ -370,14 +374,17 @@ var DockedDash = class DashToDock {
|
||||||
|
this._dashSpacer = new OverviewControls.DashSpacer();
|
||||||
|
this._dashSpacer.setDashActor(this._box);
|
||||||
|
|
||||||
|
- if (this._position == St.Side.LEFT)
|
||||||
|
- Main.overview._controls._group.insert_child_at_index(this._dashSpacer, this._rtl ? -1 : 0); // insert on first
|
||||||
|
- else if (this._position == St.Side.RIGHT)
|
||||||
|
- Main.overview._controls._group.insert_child_at_index(this._dashSpacer, this._rtl ? 0 : -1); // insert on last
|
||||||
|
- else if (this._position == St.Side.TOP)
|
||||||
|
- Main.overview._overview.insert_child_at_index(this._dashSpacer, 0);
|
||||||
|
- else if (this._position == St.Side.BOTTOM)
|
||||||
|
- Main.overview._overview.insert_child_at_index(this._dashSpacer, -1);
|
||||||
|
+ if (!Main.overview.isDummy) {
|
||||||
|
+ const { _controls, _overview } = Main.overview;
|
||||||
|
+ if (this._position == St.Side.LEFT)
|
||||||
|
+ _controls._group.insert_child_at_index(this._dashSpacer, this._rtl ? -1 : 0); // insert on first
|
||||||
|
+ else if (this._position == St.Side.RIGHT)
|
||||||
|
+ _controls._group.insert_child_at_index(this._dashSpacer, this._rtl ? 0 : -1); // insert on last
|
||||||
|
+ else if (this._position == St.Side.TOP)
|
||||||
|
+ _overview.insert_child_at_index(this._dashSpacer, 0);
|
||||||
|
+ else if (this._position == St.Side.BOTTOM)
|
||||||
|
+ _overview.insert_child_at_index(this._dashSpacer, -1);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
// Add dash container actor and the container to the Chrome.
|
||||||
|
this.actor.set_child(this._slider);
|
||||||
|
@@ -412,7 +419,7 @@ var DockedDash = class DashToDock {
|
||||||
|
|
||||||
|
// Since Gnome 3.8 dragging an app without having opened the overview before cause the attemp to
|
||||||
|
//animate a null target since some variables are not initialized when the viewSelector is created
|
||||||
|
- if (Main.overview.viewSelector._activePage == null)
|
||||||
|
+ if (!Main.overview.isDummy && Main.overview.viewSelector._activePage == null)
|
||||||
|
Main.overview.viewSelector._activePage = Main.overview.viewSelector._workspacesPage;
|
||||||
|
|
||||||
|
this._updateVisibilityMode();
|
||||||
|
@@ -493,7 +500,8 @@ var DockedDash = class DashToDock {
|
||||||
|
this._settings,
|
||||||
|
'changed::show-show-apps-button',
|
||||||
|
() => {
|
||||||
|
- if (this._settings.get_boolean('show-show-apps-button'))
|
||||||
|
+ if (!Main.overview.isDummy &&
|
||||||
|
+ this._settings.get_boolean('show-show-apps-button'))
|
||||||
|
this.dash.showShowAppsButton();
|
||||||
|
else
|
||||||
|
this.dash.hideShowAppsButton();
|
||||||
|
@@ -1681,6 +1689,9 @@ var DockManager = class DashToDock_DockManager {
|
||||||
|
// set stored icon size to the new dash
|
||||||
|
Main.overview.dashIconSize = this._allDocks[0].dash.iconSize;
|
||||||
|
|
||||||
|
+ if (Main.overview.isDummy)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
// Hide usual Dash
|
||||||
|
Main.overview._controls.dash.actor.hide();
|
||||||
|
|
||||||
|
@@ -1707,6 +1718,9 @@ var DockManager = class DashToDock_DockManager {
|
||||||
|
}
|
||||||
|
|
||||||
|
_restoreDash() {
|
||||||
|
+ if (Main.overview.isDummy)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
Main.overview._controls.dash.actor.show();
|
||||||
|
Main.overview._controls.dash.actor.set_width(-1); //reset default dash size
|
||||||
|
// This force the recalculation of the icon size
|
||||||
|
--
|
||||||
|
2.25.0
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
From 8bea7c892c24694efda753ad1d76ab470032c6fe Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
||||||
Date: Thu, 15 Dec 2022 17:09:45 +0100
|
|
||||||
Subject: [PATCH] desktop-icons: Don't grab focus on click
|
|
||||||
|
|
||||||
We will move keyboard focus away immediately, either when opening
|
|
||||||
the context menu or when starting the rubberband.
|
|
||||||
|
|
||||||
In theory the grab is still useful, because it will move keyboard
|
|
||||||
focus to the grid when restoring focus after ending the rubberband
|
|
||||||
or closing the menu, however as keyboard navigation support is
|
|
||||||
lacking, all it does is preventing the focus to return to the
|
|
||||||
focus window after the operation.
|
|
||||||
---
|
|
||||||
extensions/desktop-icons/desktopGrid.js | 2 --
|
|
||||||
1 file changed, 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/extensions/desktop-icons/desktopGrid.js b/extensions/desktop-icons/desktopGrid.js
|
|
||||||
index 002803c7..9a89d5a3 100644
|
|
||||||
--- a/extensions/desktop-icons/desktopGrid.js
|
|
||||||
+++ b/extensions/desktop-icons/desktopGrid.js
|
|
||||||
@@ -559,8 +559,6 @@ var DesktopGrid = GObject.registerClass({
|
|
||||||
let button = event.get_button();
|
|
||||||
let [x, y] = event.get_coords();
|
|
||||||
|
|
||||||
- this._grid.grab_key_focus();
|
|
||||||
-
|
|
||||||
if (button == 1) {
|
|
||||||
let shiftPressed = !!(event.get_state() & Clutter.ModifierType.SHIFT_MASK);
|
|
||||||
let controlPressed = !!(event.get_state() & Clutter.ModifierType.CONTROL_MASK);
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 81b5163b43b7d45ca8bc9205476ef67789e283a4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Mon, 29 Nov 2021 16:48:53 +0100
|
||||||
|
Subject: [PATCH] desktop-icons: Use a single unique name to access nautilus
|
||||||
|
|
||||||
|
... otherwise dbus-daemon will assume that activating one of the
|
||||||
|
services failed, because its executable exits early (after activating
|
||||||
|
the primary instance).
|
||||||
|
---
|
||||||
|
extensions/desktop-icons/dbusUtils.js | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/dbusUtils.js b/extensions/desktop-icons/dbusUtils.js
|
||||||
|
index 19fe9878..b44ffa59 100644
|
||||||
|
--- a/extensions/desktop-icons/dbusUtils.js
|
||||||
|
+++ b/extensions/desktop-icons/dbusUtils.js
|
||||||
|
@@ -64,7 +64,7 @@ function init() {
|
||||||
|
|
||||||
|
FreeDesktopFileManagerProxy = new FreeDesktopFileManagerProxyInterface(
|
||||||
|
Gio.DBus.session,
|
||||||
|
- 'org.freedesktop.FileManager1',
|
||||||
|
+ 'org.gnome.Nautilus',
|
||||||
|
'/org/freedesktop/FileManager1',
|
||||||
|
(proxy, error) => {
|
||||||
|
if (error) {
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,60 +0,0 @@
|
|||||||
From 62289dff5cb2e615a277b72f034fa42f45aad639 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
||||||
Date: Thu, 15 Dec 2022 15:14:08 +0100
|
|
||||||
Subject: [PATCH] desktopManager: Hook into LayoutManager to create grids
|
|
||||||
|
|
||||||
Right now we track the `monitors-changed` signal to recreate the
|
|
||||||
per-monitor grids. Usually that's enough, but if something else
|
|
||||||
causes backgrounds to update, we'll end up without desktop icons
|
|
||||||
until some other change (settings, mounts, monitor/resolution
|
|
||||||
changes, ...) results in a reload of the grid.
|
|
||||||
|
|
||||||
To address this, hook into LayoutManager to always create the grid
|
|
||||||
when backgrounds are updated.
|
|
||||||
---
|
|
||||||
extensions/desktop-icons/desktopManager.js | 15 +++++++++++----
|
|
||||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/extensions/desktop-icons/desktopManager.js b/extensions/desktop-icons/desktopManager.js
|
|
||||||
index 08bc82b7..74d0e6bd 100644
|
|
||||||
--- a/extensions/desktop-icons/desktopManager.js
|
|
||||||
+++ b/extensions/desktop-icons/desktopManager.js
|
|
||||||
@@ -83,7 +83,6 @@ var DesktopManager = GObject.registerClass({
|
|
||||||
this._discreteGpuAvailable = false;
|
|
||||||
this._rubberBandActive = false;
|
|
||||||
|
|
||||||
- this._monitorsChangedId = Main.layoutManager.connect('monitors-changed', () => this._recreateDesktopIcons());
|
|
||||||
this._rubberBand = new St.Widget({ style_class: 'rubber-band' });
|
|
||||||
this._rubberBand.hide();
|
|
||||||
Main.layoutManager._backgroundGroup.add_child(this._rubberBand);
|
|
||||||
@@ -109,6 +108,13 @@ var DesktopManager = GObject.registerClass({
|
|
||||||
return origCapturedEvent.bind(this._grabHelper)(event);
|
|
||||||
};
|
|
||||||
|
|
||||||
+ this._origUpdateBackgrounds =
|
|
||||||
+ Main.layoutManager._updateBackgrounds;
|
|
||||||
+ Main.layoutManager._updateBackgrounds = () => {
|
|
||||||
+ this._origUpdateBackgrounds.call(Main.layoutManager);
|
|
||||||
+ this._recreateDesktopIcons();
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
this._addDesktopIcons();
|
|
||||||
this._monitorDesktopFolder();
|
|
||||||
|
|
||||||
@@ -843,9 +849,10 @@ var DesktopManager = GObject.registerClass({
|
|
||||||
GLib.source_remove(this._deleteChildrenId);
|
|
||||||
this._deleteChildrenId = 0;
|
|
||||||
|
|
||||||
- if (this._monitorsChangedId)
|
|
||||||
- Main.layoutManager.disconnect(this._monitorsChangedId);
|
|
||||||
- this._monitorsChangedId = 0;
|
|
||||||
+ if (this._origUpdateBackgrounds)
|
|
||||||
+ Main.layoutManager._updateBackgrounds = this._origUpdateBackgrounds;
|
|
||||||
+ delete this._origUpdateBackgrounds;
|
|
||||||
+
|
|
||||||
if (this._stageReleaseEventId)
|
|
||||||
global.stage.disconnect(this._stageReleaseEventId);
|
|
||||||
this._stageReleaseEventId = 0;
|
|
||||||
--
|
|
||||||
2.38.1
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From 3edf3c0be7638bf9161c0d192dd3c2de1e3b9845 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
||||||
Date: Thu, 14 Dec 2023 14:41:04 +0100
|
|
||||||
Subject: [PATCH] docking: Only remove spacer if necessary
|
|
||||||
|
|
||||||
There may not be a main dock at the time when restoring the dash.
|
|
||||||
|
|
||||||
Handle that case by not removing a non-existent spacer, instead of
|
|
||||||
triggering an error.
|
|
||||||
---
|
|
||||||
extensions/dash-to-dock/docking.js | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/extensions/dash-to-dock/docking.js b/extensions/dash-to-dock/docking.js
|
|
||||||
index daa9de59..14e2ced6 100644
|
|
||||||
--- a/extensions/dash-to-dock/docking.js
|
|
||||||
+++ b/extensions/dash-to-dock/docking.js
|
|
||||||
@@ -1796,7 +1796,7 @@ var DockManager = class DashToDock_DockManager {
|
|
||||||
|
|
||||||
let overviewControls = Main.overview._overview._controls;
|
|
||||||
Main.overview._overview._controls.layout_manager._dash = this._oldDash;
|
|
||||||
- if (this.mainDock._dashSpacer) {
|
|
||||||
+ if (this.mainDock?._dashSpacer) {
|
|
||||||
Main.overview._overview._controls.remove_child(this.mainDock._dashSpacer);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
|||||||
|
From f78b19068654412ca9e73a229e1537d080759c47 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carlos Garnacho <carlosg@gnome.org>
|
||||||
|
Date: Wed, 27 Jan 2021 16:55:10 +0100
|
||||||
|
Subject: [PATCH] fileItem: Ignore double click distance clicking on items
|
||||||
|
|
||||||
|
Imitate the behavior of Nautilus canvas WRT double clicks being
|
||||||
|
handled on all of the icon(s) without accounting for the double
|
||||||
|
click distance. As the extension does already lean on Nautilus
|
||||||
|
look & feel, it seems to make sense doing this.
|
||||||
|
|
||||||
|
This is not as crucial for mice as it is for touchscreens, where
|
||||||
|
the default 5px limit may be a bit on the short side depending
|
||||||
|
on device sensitivity.
|
||||||
|
---
|
||||||
|
extensions/desktop-icons/fileItem.js | 26 +++++++++++++++++++++++---
|
||||||
|
1 file changed, 23 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/fileItem.js b/extensions/desktop-icons/fileItem.js
|
||||||
|
index d6d43c9..5d3195f 100644
|
||||||
|
--- a/extensions/desktop-icons/fileItem.js
|
||||||
|
+++ b/extensions/desktop-icons/fileItem.js
|
||||||
|
@@ -65,6 +65,9 @@ var FileItem = class {
|
||||||
|
this._setMetadataCancellable = null;
|
||||||
|
this._queryFileInfoCancellable = null;
|
||||||
|
this._isSpecial = this._fileExtra != Prefs.FileType.NONE;
|
||||||
|
+ this._lastClickTime = 0;
|
||||||
|
+ this._lastClickButton = 0;
|
||||||
|
+ this._clickCount = 0;
|
||||||
|
|
||||||
|
this._file = file;
|
||||||
|
|
||||||
|
@@ -642,7 +645,24 @@ var FileItem = class {
|
||||||
|
DesktopIconsUtil.launchTerminal(this.file.get_path());
|
||||||
|
}
|
||||||
|
|
||||||
|
+ _updateClickState(event) {
|
||||||
|
+ let settings = Clutter.Settings.get_default();
|
||||||
|
+ if ((event.get_button() == this._lastClickButton) &&
|
||||||
|
+ ((event.get_time() - this._lastClickTime) < settings.double_click_time))
|
||||||
|
+ this._clickCount++;
|
||||||
|
+ else
|
||||||
|
+ this._clickCount = 1;
|
||||||
|
+
|
||||||
|
+ this._lastClickTime = event.get_time();
|
||||||
|
+ this._lastClickButton = event.get_button();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ _getClickCount() {
|
||||||
|
+ return this._clickCount;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
_onPressButton(actor, event) {
|
||||||
|
+ this._updateClickState(event);
|
||||||
|
let button = event.get_button();
|
||||||
|
if (button == 3) {
|
||||||
|
if (!this.isSelected)
|
||||||
|
@@ -661,7 +681,7 @@ var FileItem = class {
|
||||||
|
this._actionTrash.setSensitive(!specialFilesSelected);
|
||||||
|
return Clutter.EVENT_STOP;
|
||||||
|
} else if (button == 1) {
|
||||||
|
- if (event.get_click_count() == 1) {
|
||||||
|
+ if (this._getClickCount() == 1) {
|
||||||
|
let [x, y] = event.get_coords();
|
||||||
|
this._primaryButtonPressed = true;
|
||||||
|
this._buttonPressInitialX = x;
|
||||||
|
@@ -710,12 +730,12 @@ var FileItem = class {
|
||||||
|
this._primaryButtonPressed = false;
|
||||||
|
let shiftPressed = !!(event.get_state() & Clutter.ModifierType.SHIFT_MASK);
|
||||||
|
let controlPressed = !!(event.get_state() & Clutter.ModifierType.CONTROL_MASK);
|
||||||
|
- if ((event.get_click_count() == 1) && Prefs.CLICK_POLICY_SINGLE && !shiftPressed && !controlPressed)
|
||||||
|
+ if ((this._getClickCount() == 1) && Prefs.CLICK_POLICY_SINGLE && !shiftPressed && !controlPressed)
|
||||||
|
this.doOpen();
|
||||||
|
this.emit('selected', shiftPressed || controlPressed, false, true);
|
||||||
|
return Clutter.EVENT_STOP;
|
||||||
|
}
|
||||||
|
- if ((event.get_click_count() == 2) && (!Prefs.CLICK_POLICY_SINGLE))
|
||||||
|
+ if ((this._getClickCount() == 2) && (!Prefs.CLICK_POLICY_SINGLE))
|
||||||
|
this.doOpen();
|
||||||
|
}
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From 506c6d69eaa5e056d9580a28e9c200586b0e1fb0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Fri, 2 Dec 2022 15:20:40 +0100
|
||||||
|
Subject: [PATCH] fileItem: Just destroy menus
|
||||||
|
|
||||||
|
The menu manager is smart enough to remove the menu automatically,
|
||||||
|
and the actor will be destroyed alongside the menu. Not doing those
|
||||||
|
actions explicitly allows the automatic handling to proceed without
|
||||||
|
confusing the grab state.
|
||||||
|
---
|
||||||
|
extensions/desktop-icons/fileItem.js | 4 ----
|
||||||
|
1 file changed, 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/fileItem.js b/extensions/desktop-icons/fileItem.js
|
||||||
|
index 44a93352..f2f03440 100644
|
||||||
|
--- a/extensions/desktop-icons/fileItem.js
|
||||||
|
+++ b/extensions/desktop-icons/fileItem.js
|
||||||
|
@@ -575,10 +575,6 @@ var FileItem = class {
|
||||||
|
|
||||||
|
_removeMenu() {
|
||||||
|
if (this._menu != null) {
|
||||||
|
- if (this._menuManager != null)
|
||||||
|
- this._menuManager.removeMenu(this._menu);
|
||||||
|
-
|
||||||
|
- Main.layoutManager.uiGroup.remove_child(this._menu.actor);
|
||||||
|
this._menu.destroy();
|
||||||
|
this._menu = null;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
@ -0,0 +1,45 @@
|
|||||||
|
From ee89a91a9ac235b69ff3c47af14d702c0309e892 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergio Costas <raster@rastersoft.com>
|
||||||
|
Date: Thu, 25 Jul 2019 00:12:09 +0200
|
||||||
|
Subject: [PATCH] general: launch only executable files
|
||||||
|
|
||||||
|
Until now, if a file has the "execute" flag, clicking on it will try
|
||||||
|
to execute it, no matter if it is really an executable. This means
|
||||||
|
that a non-executable file (like a JPEG picture, or a text file)
|
||||||
|
won't be opened with its desired application if it has set the
|
||||||
|
executable flag.
|
||||||
|
|
||||||
|
This patch fixes this, by ensuring that the only files that can be
|
||||||
|
executed when the "execute" flag is set, are the ones that makes
|
||||||
|
sense to execute.
|
||||||
|
|
||||||
|
Fixes https://gitlab.gnome.org/World/ShellExtensions/desktop-icons/issues/144
|
||||||
|
---
|
||||||
|
extensions/desktop-icons/fileItem.js | 11 +++++++----
|
||||||
|
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/fileItem.js b/extensions/desktop-icons/fileItem.js
|
||||||
|
index d6d43c9f..44a93352 100644
|
||||||
|
--- a/extensions/desktop-icons/fileItem.js
|
||||||
|
+++ b/extensions/desktop-icons/fileItem.js
|
||||||
|
@@ -440,10 +440,13 @@ var FileItem = class {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (this._attributeCanExecute && !this._isDirectory && !this._isValidDesktopFile) {
|
||||||
|
- if (this._execLine)
|
||||||
|
- Util.spawnCommandLine(this._execLine);
|
||||||
|
- return;
|
||||||
|
+ if (this._attributeCanExecute &&
|
||||||
|
+ !this._isDirectory &&
|
||||||
|
+ !this._isValidDesktopFile &&
|
||||||
|
+ Gio.content_type_can_be_executable(this._attributeContentType)) {
|
||||||
|
+ if (this._execLine)
|
||||||
|
+ Util.spawnCommandLine(this._execLine);
|
||||||
|
+ return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Gio.AppInfo.launch_default_for_uri_async(this.file.get_uri(),
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
From dfdd10b46d670674d5e0e38f7adcd007f5884822 Mon Sep 17 00:00:00 2001
|
||||||
|
From: rpm-build <rpm-build>
|
||||||
|
Date: Wed, 29 Sep 2021 14:33:25 +0200
|
||||||
|
Subject: [PATCH] gesture-inhibitor: Put a foot down with self-enabling
|
||||||
|
gestures
|
||||||
|
|
||||||
|
If a gesture (unfullscreen, I'm looking at you) controls its 'enabled'
|
||||||
|
property, it will bypass the will of this extension. Make it sure that
|
||||||
|
gestures are forced-off if the extension says so.
|
||||||
|
---
|
||||||
|
extensions/gesture-inhibitor/extension.js | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/gesture-inhibitor/extension.js b/extensions/gesture-inhibitor/extension.js
|
||||||
|
index e74ede2..66c706e 100644
|
||||||
|
--- a/extensions/gesture-inhibitor/extension.js
|
||||||
|
+++ b/extensions/gesture-inhibitor/extension.js
|
||||||
|
@@ -59,13 +59,19 @@ class Extension {
|
||||||
|
enable() {
|
||||||
|
this._map.forEach(m => {
|
||||||
|
this._settings.bind(m.setting, m.action, 'enabled',
|
||||||
|
- Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
+ Gio.SettingsBindFlags.GET);
|
||||||
|
+ m.handler = m.action.connect('notify::enabled', () => {
|
||||||
|
+ if (m.action.enabled && !this._settings.get_boolean(m.setting))
|
||||||
|
+ m.action.enabled = this._settings.get_boolean(m.setting);
|
||||||
|
+ });
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
disable() {
|
||||||
|
this._map.forEach(m => {
|
||||||
|
m.action.enabled = true;
|
||||||
|
+ if (m.handler > 0)
|
||||||
|
+ m.action.disconnect(m.handler);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,46 +0,0 @@
|
|||||||
From a31f4b6ca703faab25c306dc33056763642a83cb Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
||||||
Date: Fri, 30 Sep 2022 18:16:16 +0200
|
|
||||||
Subject: [PATCH] window-list: Explicitly dispose settings on destroy
|
|
||||||
|
|
||||||
This will not only disconnect the signal handler, but also remove
|
|
||||||
any bindings. This works around a crash that happens if a setting
|
|
||||||
that triggers the binding changes at the same time as a setting
|
|
||||||
that rebuilds the window list; in that case, the binding handler
|
|
||||||
runs after gjs has dropped its wrapper object, but before the
|
|
||||||
binding is removed automaticalled when the object is finalized.
|
|
||||||
|
|
||||||
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/416
|
|
||||||
|
|
||||||
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/243>
|
|
||||||
---
|
|
||||||
extensions/window-list/extension.js | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
|
|
||||||
index 89413818..91ee3e6b 100644
|
|
||||||
--- a/extensions/window-list/extension.js
|
|
||||||
+++ b/extensions/window-list/extension.js
|
|
||||||
@@ -842,8 +842,8 @@ class WindowList extends St.Widget {
|
|
||||||
this._dndWindow = null;
|
|
||||||
|
|
||||||
this._settings = ExtensionUtils.getSettings();
|
|
||||||
- this._groupingModeChangedId = this._settings.connect(
|
|
||||||
- 'changed::grouping-mode', this._groupingModeChanged.bind(this));
|
|
||||||
+ this._settings.connect('changed::grouping-mode',
|
|
||||||
+ () => this._groupingModeChanged());
|
|
||||||
this._grouped = undefined;
|
|
||||||
this._groupingModeChanged();
|
|
||||||
}
|
|
||||||
@@ -1112,7 +1112,7 @@ class WindowList extends St.Widget {
|
|
||||||
Main.xdndHandler.disconnect(this._dragBeginId);
|
|
||||||
Main.xdndHandler.disconnect(this._dragEndId);
|
|
||||||
|
|
||||||
- this._settings.disconnect(this._groupingModeChangedId);
|
|
||||||
+ this._settings.run_dispose();
|
|
||||||
|
|
||||||
let windows = global.get_window_actors();
|
|
||||||
for (let i = 0; i < windows.length; i++)
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
|||||||
|
From b4eeaf7ea12fa7d9713e80371490d8060396b3cb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Milan Crha <mcrha@redhat.com>
|
||||||
|
Date: Fri, 17 Apr 2020 09:21:42 +0200
|
||||||
|
Subject: [PATCH] window-list: Invalid current mode selected in Preferences
|
||||||
|
|
||||||
|
It seems that gtk+ resets the active radio whenever a new radio button
|
||||||
|
is added into the group, thus rather restore the current mode after
|
||||||
|
the group is fully populated.
|
||||||
|
|
||||||
|
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/119
|
||||||
|
---
|
||||||
|
extensions/window-list/prefs.js | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/window-list/prefs.js b/extensions/window-list/prefs.js
|
||||||
|
index 78792b5..17e9799 100644
|
||||||
|
--- a/extensions/window-list/prefs.js
|
||||||
|
+++ b/extensions/window-list/prefs.js
|
||||||
|
@@ -50,6 +50,7 @@ class WindowListPrefsWidget extends Gtk.Grid {
|
||||||
|
};
|
||||||
|
|
||||||
|
let radio = null;
|
||||||
|
+ let currentRadio = null;
|
||||||
|
for (let i = 0; i < modes.length; i++) {
|
||||||
|
let mode = modes[i];
|
||||||
|
let label = modeLabels[mode];
|
||||||
|
@@ -59,18 +60,24 @@ class WindowListPrefsWidget extends Gtk.Grid {
|
||||||
|
}
|
||||||
|
|
||||||
|
radio = new Gtk.RadioButton({
|
||||||
|
- active: currentMode == mode,
|
||||||
|
+ active: !i,
|
||||||
|
label: label,
|
||||||
|
group: radio
|
||||||
|
});
|
||||||
|
grid.add(radio);
|
||||||
|
|
||||||
|
+ if (currentMode === mode)
|
||||||
|
+ currentRadio = radio;
|
||||||
|
+
|
||||||
|
radio.connect('toggled', button => {
|
||||||
|
if (button.active)
|
||||||
|
this._settings.set_string('grouping-mode', mode);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (currentRadio)
|
||||||
|
+ currentRadio.active = true;
|
||||||
|
+
|
||||||
|
let check = new Gtk.CheckButton({
|
||||||
|
label: _('Show on all monitors'),
|
||||||
|
margin_top: 6
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From ee25c2aac70b86f31c91f6491dad4c67a59bc261 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Tue, 26 Jan 2021 21:14:47 +0100
|
||||||
|
Subject: [PATCH] window-list: Leave "fake overview" when destroyed
|
||||||
|
|
||||||
|
Otherwise we leave an incomplete overview-like state around, which
|
||||||
|
can cause issues later when the extension is re-enabled (for example
|
||||||
|
when coming back from screen lock).
|
||||||
|
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1904371
|
||||||
|
---
|
||||||
|
extensions/window-list/windowPicker.js | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/extensions/window-list/windowPicker.js b/extensions/window-list/windowPicker.js
|
||||||
|
index 12a7627..afb5d27 100644
|
||||||
|
--- a/extensions/window-list/windowPicker.js
|
||||||
|
+++ b/extensions/window-list/windowPicker.js
|
||||||
|
@@ -210,6 +210,8 @@ var WindowPicker = class {
|
||||||
|
}
|
||||||
|
|
||||||
|
_onDestroy() {
|
||||||
|
+ this._fakeOverviewVisible(false);
|
||||||
|
+
|
||||||
|
if (this._monitorsChangedId)
|
||||||
|
Main.layoutManager.disconnect(this._monitorsChangedId);
|
||||||
|
this._monitorsChangedId = 0;
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,176 @@
|
|||||||
|
From b87a0085342b9828e7e57e8db892b79e345bfbc3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Wed, 20 Jan 2021 20:18:39 +0100
|
||||||
|
Subject: [PATCH 1/2] workspace-indicator: Add tooltips to workspace thumbnails
|
||||||
|
|
||||||
|
When showing previews instead of the menu, the workspace names from
|
||||||
|
our preferences don't appear anywhere. Some users care strongly about
|
||||||
|
those, so expose them as tooltip on hover.
|
||||||
|
---
|
||||||
|
extensions/workspace-indicator/extension.js | 40 +++++++++++++++++++++
|
||||||
|
1 file changed, 40 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js
|
||||||
|
index 69eef88c..d377f288 100644
|
||||||
|
--- a/extensions/workspace-indicator/extension.js
|
||||||
|
+++ b/extensions/workspace-indicator/extension.js
|
||||||
|
@@ -8,6 +8,7 @@ const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
|
const Main = imports.ui.main;
|
||||||
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
|
+const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
|
const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
||||||
|
const _ = Gettext.gettext;
|
||||||
|
@@ -15,6 +16,9 @@ const _ = Gettext.gettext;
|
||||||
|
const WORKSPACE_SCHEMA = 'org.gnome.desktop.wm.preferences';
|
||||||
|
const WORKSPACE_KEY = 'workspace-names';
|
||||||
|
|
||||||
|
+const TOOLTIP_OFFSET = 6;
|
||||||
|
+const TOOLTIP_ANIMATION_TIME = 150;
|
||||||
|
+
|
||||||
|
let WindowPreview = GObject.registerClass({
|
||||||
|
GTypeName: 'WorkspaceIndicatorWindowPreview'
|
||||||
|
}, class WindowPreview extends St.Button {
|
||||||
|
@@ -117,7 +121,14 @@ let WorkspaceThumbnail = GObject.registerClass({
|
||||||
|
y_fill: true
|
||||||
|
});
|
||||||
|
|
||||||
|
+ this._tooltip = new St.Label({
|
||||||
|
+ style_class: 'dash-label',
|
||||||
|
+ visible: false,
|
||||||
|
+ });
|
||||||
|
+ Main.uiGroup.add_child(this._tooltip);
|
||||||
|
+
|
||||||
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
+ this.connect('notify::hover', this._syncTooltip.bind(this));
|
||||||
|
|
||||||
|
this._index = index;
|
||||||
|
this._delegate = this; // needed for DND
|
||||||
|
@@ -204,7 +215,36 @@ let WorkspaceThumbnail = GObject.registerClass({
|
||||||
|
ws.activate(global.get_current_time());
|
||||||
|
}
|
||||||
|
|
||||||
|
+ _syncTooltip() {
|
||||||
|
+ if (this.hover) {
|
||||||
|
+ this._tooltip.text = Meta.prefs_get_workspace_name(this._index);
|
||||||
|
+ this._tooltip.opacity = 0;
|
||||||
|
+ this._tooltip.show();
|
||||||
|
+
|
||||||
|
+ const [stageX, stageY] = this.get_transformed_position();
|
||||||
|
+ const thumbWidth = this.allocation.get_width();
|
||||||
|
+ const thumbHeight = this.allocation.get_height();
|
||||||
|
+ const tipWidth = this._tooltip.width;
|
||||||
|
+ const xOffset = Math.floor((thumbWidth - tipWidth) / 2);
|
||||||
|
+ const monitor = Main.layoutManager.findMonitorForActor(this);
|
||||||
|
+ const x = Math.min(
|
||||||
|
+ Math.max(stageX + xOffset, monitor.x),
|
||||||
|
+ monitor.x + monitor.width - tipWidth);
|
||||||
|
+ const y = stageY + thumbHeight + TOOLTIP_OFFSET;
|
||||||
|
+ this._tooltip.set_position(x, y);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ Tweener.addTween(this._tooltip, {
|
||||||
|
+ opacity: this.hover ? 255 : 0,
|
||||||
|
+ time: TOOLTIP_ANIMATION_TIME / 1000,
|
||||||
|
+ transition: 'easeOutQuad',
|
||||||
|
+ onComplete: () => (this._tooltip.visible = this.hover),
|
||||||
|
+ });
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
_onDestroy() {
|
||||||
|
+ this._tooltip.destroy();
|
||||||
|
+
|
||||||
|
this._workspace.disconnect(this._windowAddedId);
|
||||||
|
this._workspace.disconnect(this._windowRemovedId);
|
||||||
|
global.display.disconnect(this._restackedId);
|
||||||
|
--
|
||||||
|
2.44.0
|
||||||
|
|
||||||
|
|
||||||
|
From 36f2762c8c6cda512f164ea22b62d10d03a369b6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||||
|
Date: Wed, 20 Jan 2021 20:29:01 +0100
|
||||||
|
Subject: [PATCH 2/2] window-list: Add tooltips to workspace thumbnails
|
||||||
|
|
||||||
|
When showing previews instead of the menu, the workspace names
|
||||||
|
don't appear anywhere. Some users care strongly about those, so
|
||||||
|
expose them as tooltip on hover.
|
||||||
|
---
|
||||||
|
extensions/window-list/workspaceIndicator.js | 40 ++++++++++++++++++++
|
||||||
|
1 file changed, 40 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/extensions/window-list/workspaceIndicator.js b/extensions/window-list/workspaceIndicator.js
|
||||||
|
index ca476111..8ae9b288 100644
|
||||||
|
--- a/extensions/window-list/workspaceIndicator.js
|
||||||
|
+++ b/extensions/window-list/workspaceIndicator.js
|
||||||
|
@@ -5,10 +5,14 @@ const DND = imports.ui.dnd;
|
||||||
|
const Main = imports.ui.main;
|
||||||
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
|
+const Tweener = imports.ui.tweener;
|
||||||
|
|
||||||
|
const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
||||||
|
const _ = Gettext.gettext;
|
||||||
|
|
||||||
|
+const TOOLTIP_OFFSET = 6;
|
||||||
|
+const TOOLTIP_ANIMATION_TIME = 150;
|
||||||
|
+
|
||||||
|
let WindowPreview = GObject.registerClass({
|
||||||
|
GTypeName: 'WindowListWindowPreview'
|
||||||
|
}, class WindowPreview extends St.Button {
|
||||||
|
@@ -111,7 +115,14 @@ let WorkspaceThumbnail = GObject.registerClass({
|
||||||
|
y_fill: true
|
||||||
|
});
|
||||||
|
|
||||||
|
+ this._tooltip = new St.Label({
|
||||||
|
+ style_class: 'dash-label',
|
||||||
|
+ visible: false,
|
||||||
|
+ });
|
||||||
|
+ Main.uiGroup.add_child(this._tooltip);
|
||||||
|
+
|
||||||
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
+ this.connect('notify::hover', this._syncTooltip.bind(this));
|
||||||
|
|
||||||
|
this._index = index;
|
||||||
|
this._delegate = this; // needed for DND
|
||||||
|
@@ -198,7 +209,36 @@ let WorkspaceThumbnail = GObject.registerClass({
|
||||||
|
ws.activate(global.get_current_time());
|
||||||
|
}
|
||||||
|
|
||||||
|
+ _syncTooltip() {
|
||||||
|
+ if (this.hover) {
|
||||||
|
+ this._tooltip.text = Meta.prefs_get_workspace_name(this._index);
|
||||||
|
+ this._tooltip.opacity = 0;
|
||||||
|
+ this._tooltip.show();
|
||||||
|
+
|
||||||
|
+ const [stageX, stageY] = this.get_transformed_position();
|
||||||
|
+ const thumbWidth = this.allocation.get_width();
|
||||||
|
+ const tipWidth = this._tooltip.width;
|
||||||
|
+ const tipHeight = this._tooltip.height;
|
||||||
|
+ const xOffset = Math.floor((thumbWidth - tipWidth) / 2);
|
||||||
|
+ const monitor = Main.layoutManager.findMonitorForActor(this);
|
||||||
|
+ const x = Math.min(
|
||||||
|
+ Math.max(stageX + xOffset, monitor.x),
|
||||||
|
+ monitor.x + monitor.width - tipWidth);
|
||||||
|
+ const y = stageY - tipHeight - TOOLTIP_OFFSET;
|
||||||
|
+ this._tooltip.set_position(x, y);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ Tweener.addTween(this._tooltip, {
|
||||||
|
+ opacity: this.hover ? 255 : 0,
|
||||||
|
+ time: TOOLTIP_ANIMATION_TIME / 1000,
|
||||||
|
+ transition: 'easeOutQuad',
|
||||||
|
+ onComplete: () => (this._tooltip.visible = this.hover),
|
||||||
|
+ });
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
_onDestroy() {
|
||||||
|
+ this._tooltip.destroy();
|
||||||
|
+
|
||||||
|
this._workspace.disconnect(this._windowAddedId);
|
||||||
|
this._workspace.disconnect(this._windowRemovedId);
|
||||||
|
global.display.disconnect(this._restackedId);
|
||||||
|
--
|
||||||
|
2.44.0
|
||||||
|
|
@ -1,231 +0,0 @@
|
|||||||
From afa394114c57197e96f18e7942729634ece5d3c4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
||||||
Date: Wed, 19 May 2021 16:46:59 +0200
|
|
||||||
Subject: [PATCH 1/2] desktop-icons: Revert "Use GTK-Theme CSS for selected
|
|
||||||
file-item and rubberband"
|
|
||||||
|
|
||||||
GtkStyleContext requires a (X11) display connection, which may not
|
|
||||||
be available with xwayland-on-demand. Better use some hardcoded
|
|
||||||
colors than crashing the session.
|
|
||||||
|
|
||||||
This reverts commit 8dc524aa4efd6a3fbad67480bd6c904b0c0c99d6.
|
|
||||||
---
|
|
||||||
extensions/desktop-icons/desktopIconsUtil.js | 11 ----------
|
|
||||||
extensions/desktop-icons/desktopManager.js | 12 -----------
|
|
||||||
extensions/desktop-icons/fileItem.js | 22 ++++----------------
|
|
||||||
extensions/desktop-icons/stylesheet.css | 9 ++++++++
|
|
||||||
4 files changed, 13 insertions(+), 41 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/extensions/desktop-icons/desktopIconsUtil.js b/extensions/desktop-icons/desktopIconsUtil.js
|
|
||||||
index 696c945..57bedc1 100644
|
|
||||||
--- a/extensions/desktop-icons/desktopIconsUtil.js
|
|
||||||
+++ b/extensions/desktop-icons/desktopIconsUtil.js
|
|
||||||
@@ -16,7 +16,6 @@
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
-const Gtk = imports.gi.Gtk;
|
|
||||||
const Gio = imports.gi.Gio;
|
|
||||||
const GLib = imports.gi.GLib;
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
|
||||||
@@ -114,16 +113,6 @@ function getFileExtensionOffset(filename, isDirectory) {
|
|
||||||
return offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
-function getGtkClassBackgroundColor(classname, state) {
|
|
||||||
- let widget = new Gtk.WidgetPath();
|
|
||||||
- widget.append_type(Gtk.Widget);
|
|
||||||
-
|
|
||||||
- let context = new Gtk.StyleContext();
|
|
||||||
- context.set_path(widget);
|
|
||||||
- context.add_class(classname);
|
|
||||||
- return context.get_background_color(state);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
// Reference the extension org.gnome.shell.extensions.drive-menu
|
|
||||||
function eject(mount) {
|
|
||||||
let unmountArgs = [
|
|
||||||
diff --git a/extensions/desktop-icons/desktopManager.js b/extensions/desktop-icons/desktopManager.js
|
|
||||||
index 1aad8c6..10e3ce0 100644
|
|
||||||
--- a/extensions/desktop-icons/desktopManager.js
|
|
||||||
+++ b/extensions/desktop-icons/desktopManager.js
|
|
||||||
@@ -16,7 +16,6 @@
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
-const Gtk = imports.gi.Gtk;
|
|
||||||
const Clutter = imports.gi.Clutter;
|
|
||||||
const GObject = imports.gi.GObject;
|
|
||||||
const Gio = imports.gi.Gio;
|
|
||||||
@@ -132,7 +131,6 @@ var DesktopManager = GObject.registerClass({
|
|
||||||
startRubberBand(x, y) {
|
|
||||||
this._rubberBandInitialX = x;
|
|
||||||
this._rubberBandInitialY = y;
|
|
||||||
- this._initRubberBandColor();
|
|
||||||
this._updateRubberBand(x, y);
|
|
||||||
this._rubberBand.show();
|
|
||||||
this._grabHelper.grab({ actor: global.stage });
|
|
||||||
@@ -235,16 +233,6 @@ var DesktopManager = GObject.registerClass({
|
|
||||||
this._desktopGrids = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
- /**
|
|
||||||
- * Initialize rubberband color from the GTK rubberband class
|
|
||||||
- * */
|
|
||||||
- _initRubberBandColor() {
|
|
||||||
- let rgba = DesktopIconsUtil.getGtkClassBackgroundColor('rubberband', Gtk.StateFlags.NORMAL);
|
|
||||||
- let background_color =
|
|
||||||
- 'rgba(' + rgba.red * 255 + ', ' + rgba.green * 255 + ', ' + rgba.blue * 255 + ', 0.4)';
|
|
||||||
- this._rubberBand.set_style('background-color: ' + background_color);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
async _scanFiles() {
|
|
||||||
for (let [fileItem, fileItemHandler] of this._fileItemHandlers)
|
|
||||||
Object.values(fileItemHandler).forEach(id => fileItem.disconnect(id));
|
|
||||||
diff --git a/extensions/desktop-icons/fileItem.js b/extensions/desktop-icons/fileItem.js
|
|
||||||
index 9987e7f..1e8ea89 100644
|
|
||||||
--- a/extensions/desktop-icons/fileItem.js
|
|
||||||
+++ b/extensions/desktop-icons/fileItem.js
|
|
||||||
@@ -16,7 +16,6 @@
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
-const Gtk = imports.gi.Gtk;
|
|
||||||
const Clutter = imports.gi.Clutter;
|
|
||||||
const Gio = imports.gi.Gio;
|
|
||||||
const GLib = imports.gi.GLib;
|
|
||||||
@@ -649,17 +648,6 @@ var FileItem = GObject.registerClass({
|
|
||||||
DBusUtils.openFileWithOtherApplication(this.file.get_path());
|
|
||||||
}
|
|
||||||
|
|
||||||
- _getSelectionStyle() {
|
|
||||||
- let rgba = DesktopIconsUtil.getGtkClassBackgroundColor('view', Gtk.StateFlags.SELECTED);
|
|
||||||
- let background_color =
|
|
||||||
- 'rgba(' + rgba.red * 255 + ', ' + rgba.green * 255 + ', ' + rgba.blue * 255 + ', 0.6)';
|
|
||||||
- let border_color =
|
|
||||||
- 'rgba(' + rgba.red * 255 + ', ' + rgba.green * 255 + ', ' + rgba.blue * 255 + ', 0.8)';
|
|
||||||
-
|
|
||||||
- return 'background-color: ' + background_color + ';' +
|
|
||||||
- 'border-color: ' + border_color + ';';
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
get menu() {
|
|
||||||
return this._menu;
|
|
||||||
}
|
|
||||||
@@ -901,12 +889,10 @@ var FileItem = GObject.registerClass({
|
|
||||||
if (isSelected == this._isSelected)
|
|
||||||
return;
|
|
||||||
|
|
||||||
- if (isSelected) {
|
|
||||||
- this._container.set_style(this._getSelectionStyle());
|
|
||||||
- } else {
|
|
||||||
- this._container.set_style('background-color: transparent');
|
|
||||||
- this._container.set_style('border-color: transparent');
|
|
||||||
- }
|
|
||||||
+ if (isSelected)
|
|
||||||
+ this._container.add_style_pseudo_class('selected');
|
|
||||||
+ else
|
|
||||||
+ this._container.remove_style_pseudo_class('selected');
|
|
||||||
|
|
||||||
this._isSelected = isSelected;
|
|
||||||
}
|
|
||||||
diff --git a/extensions/desktop-icons/stylesheet.css b/extensions/desktop-icons/stylesheet.css
|
|
||||||
index 61b4ce8..4fd31c3 100644
|
|
||||||
--- a/extensions/desktop-icons/stylesheet.css
|
|
||||||
+++ b/extensions/desktop-icons/stylesheet.css
|
|
||||||
@@ -8,6 +8,15 @@
|
|
||||||
background-color: rgba(238, 238, 238, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
+.file-item:selected {
|
|
||||||
+ background-color: rgba(74, 144, 217, 0.6);
|
|
||||||
+ border-color: rgba(74, 144, 217, 0.8);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+.rubber-band {
|
|
||||||
+ background-color: rgba(74, 144, 238, 0.4);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
.name-label {
|
|
||||||
text-shadow: 1px 1px black;
|
|
||||||
color: white;
|
|
||||||
--
|
|
||||||
2.32.0
|
|
||||||
|
|
||||||
|
|
||||||
From ca050d098240b3e757f172d2012f7d1b91db3ff6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
||||||
Date: Fri, 21 May 2021 00:50:52 +0200
|
|
||||||
Subject: [PATCH 2/2] desktop-icons: Port prefs to GTK4
|
|
||||||
|
|
||||||
... for compatibility with GNOME 40.
|
|
||||||
---
|
|
||||||
extensions/desktop-icons/prefs.js | 32 ++++++++++++++++++-------------
|
|
||||||
1 file changed, 19 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/extensions/desktop-icons/prefs.js b/extensions/desktop-icons/prefs.js
|
|
||||||
index 890bcdb..c390aa8 100644
|
|
||||||
--- a/extensions/desktop-icons/prefs.js
|
|
||||||
+++ b/extensions/desktop-icons/prefs.js
|
|
||||||
@@ -98,23 +98,29 @@ function get_schema(schema) {
|
|
||||||
|
|
||||||
function buildPrefsWidget() {
|
|
||||||
initTranslations();
|
|
||||||
- let frame = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL, border_width: 10, spacing: 10 });
|
|
||||||
-
|
|
||||||
- frame.add(buildSelector('icon-size', _("Size for the desktop icons"), { 'small': _("Small"), 'standard': _("Standard"), 'large': _("Large") }));
|
|
||||||
- frame.add(buildSwitcher('show-home', _("Show the personal folder in the desktop")));
|
|
||||||
- frame.add(buildSwitcher('show-trash', _("Show the trash icon in the desktop")));
|
|
||||||
- frame.add(buildSwitcher('show-mount', _("Show mounted drives in the desktop")));
|
|
||||||
- frame.show_all();
|
|
||||||
+ let frame = new Gtk.Box({
|
|
||||||
+ orientation: Gtk.Orientation.VERTICAL,
|
|
||||||
+ margin_top: 10,
|
|
||||||
+ margin_bottom: 10,
|
|
||||||
+ margin_start: 10,
|
|
||||||
+ margin_end: 10,
|
|
||||||
+ spacing: 10,
|
|
||||||
+ });
|
|
||||||
+
|
|
||||||
+ frame.append(buildSelector('icon-size', _("Size for the desktop icons"), { 'small': _("Small"), 'standard': _("Standard"), 'large': _("Large") }));
|
|
||||||
+ frame.append(buildSwitcher('show-home', _("Show the personal folder in the desktop")));
|
|
||||||
+ frame.append(buildSwitcher('show-trash', _("Show the trash icon in the desktop")));
|
|
||||||
+ frame.append(buildSwitcher('show-mount', _("Show mounted drives in the desktop")));
|
|
||||||
return frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildSwitcher(key, labelText) {
|
|
||||||
let hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10 });
|
|
||||||
- let label = new Gtk.Label({ label: labelText, xalign: 0 });
|
|
||||||
+ let label = new Gtk.Label({ label: labelText, xalign: 0, hexpand: true });
|
|
||||||
let switcher = new Gtk.Switch({ active: settings.get_boolean(key) });
|
|
||||||
settings.bind(key, switcher, 'active', 3);
|
|
||||||
- hbox.pack_start(label, true, true, 0);
|
|
||||||
- hbox.add(switcher);
|
|
||||||
+ hbox.append(label);
|
|
||||||
+ hbox.append(switcher);
|
|
||||||
return hbox;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -131,15 +137,15 @@ function buildSelector(key, labelText, elements) {
|
|
||||||
listStore.set (iter, [0, 1], [visibleText, val]);
|
|
||||||
}
|
|
||||||
let hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL, spacing: 10 });
|
|
||||||
- let label = new Gtk.Label({ label: labelText, xalign: 0 });
|
|
||||||
+ let label = new Gtk.Label({ label: labelText, xalign: 0, hexpand: true });
|
|
||||||
let combo = new Gtk.ComboBox({model: listStore});
|
|
||||||
let rendererText = new Gtk.CellRendererText();
|
|
||||||
combo.pack_start (rendererText, false);
|
|
||||||
combo.add_attribute (rendererText, 'text', 0);
|
|
||||||
combo.set_id_column(1);
|
|
||||||
settings.bind(key, combo, 'active-id', 3);
|
|
||||||
- hbox.pack_start(label, true, true, 0);
|
|
||||||
- hbox.add(combo);
|
|
||||||
+ hbox.append(label);
|
|
||||||
+ hbox.append(combo);
|
|
||||||
return hbox;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.32.0
|
|
||||||
|
|
@ -0,0 +1,267 @@
|
|||||||
|
From bcbf9709802e7644c5911615dabdee7d8ca07719 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carlos Garnacho <carlosg@gnome.org>
|
||||||
|
Date: Mon, 31 May 2021 19:29:34 +0200
|
||||||
|
Subject: [PATCH 1/3] desktopManager: Handle TOUCH_UPDATE/END events explicitly
|
||||||
|
for rubberband
|
||||||
|
|
||||||
|
These events need specific handling for Wayland, as we do not get emulated
|
||||||
|
pointer events in that platform. Handle these for rubberband selection.
|
||||||
|
---
|
||||||
|
extensions/desktop-icons/desktopManager.js | 67 ++++++++++++++++------
|
||||||
|
1 file changed, 48 insertions(+), 19 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/desktopManager.js b/extensions/desktop-icons/desktopManager.js
|
||||||
|
index 399aee0..a70cd98 100644
|
||||||
|
--- a/extensions/desktop-icons/desktopManager.js
|
||||||
|
+++ b/extensions/desktop-icons/desktopManager.js
|
||||||
|
@@ -130,26 +130,49 @@ var DesktopManager = GObject.registerClass({
|
||||||
|
}
|
||||||
|
[x, y] = event.get_coords();
|
||||||
|
this._updateRubberBand(x, y);
|
||||||
|
- let x0, y0, x1, y1;
|
||||||
|
- if (x >= this._rubberBandInitialX) {
|
||||||
|
- x0 = this._rubberBandInitialX;
|
||||||
|
- x1 = x;
|
||||||
|
- } else {
|
||||||
|
- x1 = this._rubberBandInitialX;
|
||||||
|
- x0 = x;
|
||||||
|
- }
|
||||||
|
- if (y >= this._rubberBandInitialY) {
|
||||||
|
- y0 = this._rubberBandInitialY;
|
||||||
|
- y1 = y;
|
||||||
|
- } else {
|
||||||
|
- y1 = this._rubberBandInitialY;
|
||||||
|
- y0 = y;
|
||||||
|
- }
|
||||||
|
- for (let [fileUri, fileItem] of this._fileItems) {
|
||||||
|
- fileItem.emit('selected', true, true,
|
||||||
|
- fileItem.intersectsWith(x0, y0, x1 - x0, y1 - y0));
|
||||||
|
- }
|
||||||
|
+ this._updateSelection(x, y);
|
||||||
|
});
|
||||||
|
+ this._rubberBandTouchId = global.stage.connect('touch-event', (actor, event) => {
|
||||||
|
+ // Let x11 pointer emulation do the job on X11
|
||||||
|
+ if (!Meta.is_wayland_compositor())
|
||||||
|
+ return Clutter.EVENT_PROPAGATE;
|
||||||
|
+ if (!global.display.is_pointer_emulating_sequence(event.get_event_sequence()))
|
||||||
|
+ return Clutter.EVENT_PROPAGATE;
|
||||||
|
+
|
||||||
|
+ if (event.type() == Clutter.EventType.TOUCH_END) {
|
||||||
|
+ this.endRubberBand();
|
||||||
|
+ return Clutter.EVENT_STOP;
|
||||||
|
+ } else if (event.type() == Clutter.EventType.TOUCH_UPDATE) {
|
||||||
|
+ [x, y] = event.get_coords();
|
||||||
|
+ this._updateRubberBand(x, y);
|
||||||
|
+ this._updateSelection(x, y);
|
||||||
|
+ return Clutter.EVENT_STOP;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return Clutter.EVENT_PROPAGATE;
|
||||||
|
+ });
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ _updateSelection(x, y) {
|
||||||
|
+ let x0, y0, x1, y1;
|
||||||
|
+ if (x >= this._rubberBandInitialX) {
|
||||||
|
+ x0 = this._rubberBandInitialX;
|
||||||
|
+ x1 = x;
|
||||||
|
+ } else {
|
||||||
|
+ x1 = this._rubberBandInitialX;
|
||||||
|
+ x0 = x;
|
||||||
|
+ }
|
||||||
|
+ if (y >= this._rubberBandInitialY) {
|
||||||
|
+ y0 = this._rubberBandInitialY;
|
||||||
|
+ y1 = y;
|
||||||
|
+ } else {
|
||||||
|
+ y1 = this._rubberBandInitialY;
|
||||||
|
+ y0 = y;
|
||||||
|
+ }
|
||||||
|
+ for (let [fileUri, fileItem] of this._fileItems) {
|
||||||
|
+ fileItem.emit('selected', true, true,
|
||||||
|
+ fileItem.intersectsWith(x0, y0, x1 - x0, y1 - y0));
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
endRubberBand() {
|
||||||
|
@@ -157,8 +180,10 @@ var DesktopManager = GObject.registerClass({
|
||||||
|
Extension.lockActivitiesButton = false;
|
||||||
|
this._grabHelper.ungrab();
|
||||||
|
global.stage.disconnect(this._rubberBandId);
|
||||||
|
+ global.stage.disconnect(this._rubberBandTouchId);
|
||||||
|
global.stage.disconnect(this._stageReleaseEventId);
|
||||||
|
this._rubberBandId = 0;
|
||||||
|
+ this._rubberBandTouchId = 0;
|
||||||
|
this._stageReleaseEventId = 0;
|
||||||
|
|
||||||
|
this._selection = new Set([...this._selection, ...this._currentSelection]);
|
||||||
|
@@ -739,6 +764,10 @@ var DesktopManager = GObject.registerClass({
|
||||||
|
global.stage.disconnect(this._rubberBandId);
|
||||||
|
this._rubberBandId = 0;
|
||||||
|
|
||||||
|
+ if (this._rubberBandTouchId)
|
||||||
|
+ global.stage.disconnect(this._rubberBandTouchId);
|
||||||
|
+ this._rubberBandTouchId = 0;
|
||||||
|
+
|
||||||
|
this._rubberBand.destroy();
|
||||||
|
|
||||||
|
if (this._queryFileInfoCancellable)
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
||||||
|
|
||||||
|
From 0733004ffeb517f7a80ff41e7181027e8b92b17e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carlos Garnacho <carlosg@gnome.org>
|
||||||
|
Date: Mon, 31 May 2021 19:31:03 +0200
|
||||||
|
Subject: [PATCH 2/3] desktopGrid: Handle TOUCH_BEGIN events explicitly
|
||||||
|
|
||||||
|
We do not get pointer emulated events on Wayland, so touch events should
|
||||||
|
be handled explicitly there. Handle starting rubberband selection via
|
||||||
|
touch.
|
||||||
|
---
|
||||||
|
extensions/desktop-icons/desktopGrid.js | 19 +++++++++++++++++++
|
||||||
|
1 file changed, 19 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/desktopGrid.js b/extensions/desktop-icons/desktopGrid.js
|
||||||
|
index 94d2dfd..602fa7f 100644
|
||||||
|
--- a/extensions/desktop-icons/desktopGrid.js
|
||||||
|
+++ b/extensions/desktop-icons/desktopGrid.js
|
||||||
|
@@ -21,6 +21,7 @@ const Clutter = imports.gi.Clutter;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
|
+const Meta = imports.gi.Meta;
|
||||||
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
|
const Signals = imports.signals;
|
||||||
|
@@ -123,6 +124,7 @@ var DesktopGrid = class {
|
||||||
|
() => this._backgroundDestroyed());
|
||||||
|
|
||||||
|
this._grid.connect('button-press-event', (actor, event) => this._onPressButton(actor, event));
|
||||||
|
+ this._grid.connect('touch-event', (actor, event) => this._onTouchEvent(actor, event));
|
||||||
|
|
||||||
|
this._grid.connect('key-press-event', this._onKeyPress.bind(this));
|
||||||
|
|
||||||
|
@@ -506,6 +508,23 @@ var DesktopGrid = class {
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ _onTouchEvent(actor, event) {
|
||||||
|
+ // Let x11 pointer emulation do the job on X11
|
||||||
|
+ if (!Meta.is_wayland_compositor())
|
||||||
|
+ return Clutter.EVENT_PROPAGATE;
|
||||||
|
+
|
||||||
|
+ if (event.type() == Clutter.EventType.TOUCH_BEGIN &&
|
||||||
|
+ global.display.is_pointer_emulating_sequence(event.get_event_sequence())) {
|
||||||
|
+ Extension.desktopManager.clearSelection();
|
||||||
|
+ let [x, y] = event.get_coords();
|
||||||
|
+ let [gridX, gridY] = this._grid.get_transformed_position();
|
||||||
|
+ Extension.desktopManager.startRubberBand(x, y, gridX, gridY);
|
||||||
|
+ return Clutter.EVENT_STOP;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return Clutter.EVENT_PROPAGATE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
_addDesktopBackgroundMenu() {
|
||||||
|
this.actor._desktopBackgroundMenu = this._createDesktopBackgroundMenu();
|
||||||
|
this.actor._desktopBackgroundManager = new PopupMenu.PopupMenuManager({ actor: this.actor });
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
||||||
|
|
||||||
|
From 2d978ffc58562c4f4d00b1afb03da58be3102e29 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Carlos Garnacho <carlosg@gnome.org>
|
||||||
|
Date: Mon, 31 May 2021 19:31:50 +0200
|
||||||
|
Subject: [PATCH 3/3] fileItem: Handle (multi) touch explicitly via touch
|
||||||
|
events
|
||||||
|
|
||||||
|
Wayland does not get pointer emulated events, so we must handle TOUCH_BEGIN/
|
||||||
|
END here for file clicking/tapping to work there.
|
||||||
|
---
|
||||||
|
extensions/desktop-icons/fileItem.js | 34 ++++++++++++++++++++++++----
|
||||||
|
1 file changed, 30 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/extensions/desktop-icons/fileItem.js b/extensions/desktop-icons/fileItem.js
|
||||||
|
index 143cb9b..1cb47e8 100644
|
||||||
|
--- a/extensions/desktop-icons/fileItem.js
|
||||||
|
+++ b/extensions/desktop-icons/fileItem.js
|
||||||
|
@@ -117,6 +117,7 @@ var FileItem = class {
|
||||||
|
this._container.connect('motion-event', (actor, event) => this._onMotion(actor, event));
|
||||||
|
this._container.connect('leave-event', (actor, event) => this._onLeave(actor, event));
|
||||||
|
this._container.connect('button-release-event', (actor, event) => this._onReleaseButton(actor, event));
|
||||||
|
+ this._container.connect('touch-event', (actor, event) => this._onTouchEvent(actor, event));
|
||||||
|
|
||||||
|
/* Set the metadata and update relevant UI */
|
||||||
|
this._updateMetadataFromFileInfo(fileInfo);
|
||||||
|
@@ -648,16 +649,26 @@ var FileItem = class {
|
||||||
|
DesktopIconsUtil.launchTerminal(this.file.get_path());
|
||||||
|
}
|
||||||
|
|
||||||
|
+ _eventButton(event) {
|
||||||
|
+ // Emulate button1 press on touch events
|
||||||
|
+ if (event.type() == Clutter.EventType.TOUCH_BEGIN ||
|
||||||
|
+ event.type() == Clutter.EventType.TOUCH_END ||
|
||||||
|
+ event.type() == Clutter.EventType.TOUCH_UPDATE)
|
||||||
|
+ return 1;
|
||||||
|
+
|
||||||
|
+ return event.get_button();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
_updateClickState(event) {
|
||||||
|
let settings = Clutter.Settings.get_default();
|
||||||
|
- if ((event.get_button() == this._lastClickButton) &&
|
||||||
|
+ if ((this._eventButton(event) == this._lastClickButton) &&
|
||||||
|
((event.get_time() - this._lastClickTime) < settings.double_click_time))
|
||||||
|
this._clickCount++;
|
||||||
|
else
|
||||||
|
this._clickCount = 1;
|
||||||
|
|
||||||
|
this._lastClickTime = event.get_time();
|
||||||
|
- this._lastClickButton = event.get_button();
|
||||||
|
+ this._lastClickButton = this._eventButton(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
_getClickCount() {
|
||||||
|
@@ -666,7 +677,7 @@ var FileItem = class {
|
||||||
|
|
||||||
|
_onPressButton(actor, event) {
|
||||||
|
this._updateClickState(event);
|
||||||
|
- let button = event.get_button();
|
||||||
|
+ let button = this._eventButton(event);
|
||||||
|
if (button == 3) {
|
||||||
|
if (!this.isSelected)
|
||||||
|
this.emit('selected', false, false, true);
|
||||||
|
@@ -725,7 +736,7 @@ var FileItem = class {
|
||||||
|
}
|
||||||
|
|
||||||
|
_onReleaseButton(actor, event) {
|
||||||
|
- let button = event.get_button();
|
||||||
|
+ let button = this._eventButton(event);
|
||||||
|
if (button == 1) {
|
||||||
|
// primaryButtonPressed is TRUE only if the user has pressed the button
|
||||||
|
// over an icon, and if (s)he has not started a drag&drop operation
|
||||||
|
@@ -744,6 +755,21 @@ var FileItem = class {
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ _onTouchEvent(actor, event) {
|
||||||
|
+ // Let x11 pointer emulation do the job on X11
|
||||||
|
+ if (!Meta.is_wayland_compositor())
|
||||||
|
+ return Clutter.EVENT_PROPAGATE;
|
||||||
|
+ if (!global.display.is_pointer_emulating_sequence(event.get_event_sequence()))
|
||||||
|
+ return Clutter.EVENT_PROPAGATE;
|
||||||
|
+
|
||||||
|
+ if (event.type() == Clutter.EventType.TOUCH_BEGIN)
|
||||||
|
+ this._onPressButton(actor, event);
|
||||||
|
+ else if (event.type() == Clutter.EventType.TOUCH_UPDATE)
|
||||||
|
+ this._onMotion(actor, event);
|
||||||
|
+ else if (event.type() == Clutter.EventType.TOUCH_END)
|
||||||
|
+ this._onReleaseButton(actor, event);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
get savedCoordinates() {
|
||||||
|
return this._savedCoordinates;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -1,158 +0,0 @@
|
|||||||
From 1692d4a91d95fecd5642b0c92bc2c5b0dbcb4184 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Neal Gompa <ngompa@fedoraproject.org>
|
|
||||||
Date: Fri, 29 Oct 2021 09:37:33 -0400
|
|
||||||
Subject: [PATCH] classic: Install the session for Wayland and ship override
|
|
||||||
sessions
|
|
||||||
|
|
||||||
The regular GNOME session ships with three options:
|
|
||||||
|
|
||||||
* GNOME
|
|
||||||
* GNOME on Wayland (available when GDM starts in X11)
|
|
||||||
* GNOME on Xorg (available when GDM starts in Wayland)
|
|
||||||
|
|
||||||
The main GNOME session is set up so it works to match how GDM starts,
|
|
||||||
so GNOME is on Wayland if GDM is (or GNOME is on X11 if GDM is).
|
|
||||||
|
|
||||||
For GNOME Classic, we are missing this setup, so port this behavior
|
|
||||||
over from the GNOME session setup.
|
|
||||||
|
|
||||||
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/195>
|
|
||||||
---
|
|
||||||
data/gnome-classic-wayland.desktop.in | 8 ++++++
|
|
||||||
data/gnome-classic-xorg.desktop.in | 8 ++++++
|
|
||||||
data/meson.build | 40 +++++++++++++++++++++------
|
|
||||||
meson.build | 5 ++++
|
|
||||||
meson/session-post-install.py | 20 ++++++++++++++
|
|
||||||
5 files changed, 72 insertions(+), 9 deletions(-)
|
|
||||||
create mode 100644 data/gnome-classic-wayland.desktop.in
|
|
||||||
create mode 100644 data/gnome-classic-xorg.desktop.in
|
|
||||||
create mode 100755 meson/session-post-install.py
|
|
||||||
|
|
||||||
diff --git a/data/gnome-classic-wayland.desktop.in b/data/gnome-classic-wayland.desktop.in
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..7287c689
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/data/gnome-classic-wayland.desktop.in
|
|
||||||
@@ -0,0 +1,8 @@
|
|
||||||
+[Desktop Entry]
|
|
||||||
+Name=GNOME Classic on Wayland
|
|
||||||
+Comment=This session logs you into GNOME Classic
|
|
||||||
+Exec=env GNOME_SHELL_SESSION_MODE=classic gnome-session
|
|
||||||
+TryExec=gnome-session
|
|
||||||
+Type=Application
|
|
||||||
+DesktopNames=GNOME-Classic;GNOME;
|
|
||||||
+X-GDM-SessionRegisters=true
|
|
||||||
diff --git a/data/gnome-classic-xorg.desktop.in b/data/gnome-classic-xorg.desktop.in
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..5fb338a1
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/data/gnome-classic-xorg.desktop.in
|
|
||||||
@@ -0,0 +1,8 @@
|
|
||||||
+[Desktop Entry]
|
|
||||||
+Name=GNOME Classic on Xorg
|
|
||||||
+Comment=This session logs you into GNOME Classic
|
|
||||||
+Exec=env GNOME_SHELL_SESSION_MODE=classic gnome-session
|
|
||||||
+TryExec=gnome-session
|
|
||||||
+Type=Application
|
|
||||||
+DesktopNames=GNOME-Classic;GNOME;
|
|
||||||
+X-GDM-SessionRegisters=true
|
|
||||||
diff --git a/data/meson.build b/data/meson.build
|
|
||||||
index 27f42872..47fe798e 100644
|
|
||||||
--- a/data/meson.build
|
|
||||||
+++ b/data/meson.build
|
|
||||||
@@ -1,12 +1,34 @@
|
|
||||||
-session_desktop = 'gnome-classic.desktop'
|
|
||||||
-i18n.merge_file('',
|
|
||||||
- input: session_desktop + '.in',
|
|
||||||
- output: session_desktop,
|
|
||||||
- po_dir: '../po',
|
|
||||||
- install: true,
|
|
||||||
- install_dir: xsessiondir,
|
|
||||||
- type: 'desktop'
|
|
||||||
-)
|
|
||||||
+session_desktop_base = 'gnome-classic'
|
|
||||||
+
|
|
||||||
+session_desktops = [
|
|
||||||
+ session_desktop_base,
|
|
||||||
+ session_desktop_base + '-xorg',
|
|
||||||
+ session_desktop_base + '-wayland',
|
|
||||||
+]
|
|
||||||
+
|
|
||||||
+foreach name: session_desktops
|
|
||||||
+ session_desktop = name + '.desktop'
|
|
||||||
+ if name.endswith('-xorg')
|
|
||||||
+ session_instdir = xsessiondir
|
|
||||||
+ elif name.endswith('-wayland')
|
|
||||||
+ session_instdir = wlsessiondir
|
|
||||||
+ else
|
|
||||||
+ # FIXME: The same target can not be copied into two directories.
|
|
||||||
+ # There is a workaround in meson/session-post-install.py until proper
|
|
||||||
+ # solution arises:
|
|
||||||
+ # https://github.com/mesonbuild/meson/issues/2416
|
|
||||||
+ session_instdir = xsessiondir
|
|
||||||
+ #session_instdir = [ xesssiondir, wlsessiondir ]
|
|
||||||
+ endif
|
|
||||||
+ i18n.merge_file('',
|
|
||||||
+ input: session_desktop + '.in',
|
|
||||||
+ output: session_desktop,
|
|
||||||
+ po_dir: '../po',
|
|
||||||
+ install: true,
|
|
||||||
+ install_dir: session_instdir,
|
|
||||||
+ type: 'desktop'
|
|
||||||
+ )
|
|
||||||
+endforeach
|
|
||||||
|
|
||||||
classic_uuids = []
|
|
||||||
foreach e : classic_extensions
|
|
||||||
diff --git a/meson.build b/meson.build
|
|
||||||
index dda3ddac..ea8a859d 100644
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -20,6 +20,7 @@ themedir = join_paths(shelldir, 'theme')
|
|
||||||
schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
|
|
||||||
sessiondir = join_paths(datadir, 'gnome-session', 'sessions')
|
|
||||||
xsessiondir = join_paths(datadir, 'xsessions')
|
|
||||||
+wlsessiondir = join_paths(datadir, 'wayland-sessions')
|
|
||||||
|
|
||||||
ver_arr = meson.project_version().split('.')
|
|
||||||
shell_version = ver_arr[0]
|
|
||||||
@@ -90,6 +91,10 @@ endforeach
|
|
||||||
|
|
||||||
if classic_mode_enabled
|
|
||||||
subdir('data')
|
|
||||||
+ meson.add_install_script(
|
|
||||||
+ 'meson/session-post-install.py',
|
|
||||||
+ join_paths(get_option('prefix'), datadir)
|
|
||||||
+ )
|
|
||||||
endif
|
|
||||||
|
|
||||||
subdir('extensions')
|
|
||||||
diff --git a/meson/session-post-install.py b/meson/session-post-install.py
|
|
||||||
new file mode 100755
|
|
||||||
index 00000000..36abe5e4
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/meson/session-post-install.py
|
|
||||||
@@ -0,0 +1,20 @@
|
|
||||||
+#!/usr/bin/env python3
|
|
||||||
+
|
|
||||||
+import os
|
|
||||||
+import shutil
|
|
||||||
+import sys
|
|
||||||
+
|
|
||||||
+if os.environ.get('DESTDIR'):
|
|
||||||
+ install_root = os.environ.get('DESTDIR') + os.path.abspath(sys.argv[1])
|
|
||||||
+else:
|
|
||||||
+ install_root = sys.argv[1]
|
|
||||||
+
|
|
||||||
+# FIXME: Meson is unable to copy a generated target file:
|
|
||||||
+# https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0
|
|
||||||
+dst_dir = os.path.join(install_root, 'wayland-sessions')
|
|
||||||
+if not os.path.exists(dst_dir):
|
|
||||||
+ os.makedirs(dst_dir)
|
|
||||||
+
|
|
||||||
+src = os.path.join(install_root, 'xsessions', 'gnome-classic.desktop')
|
|
||||||
+dst = os.path.join(dst_dir, 'gnome-classic.desktop')
|
|
||||||
+shutil.copyfile(src, dst)
|
|
||||||
--
|
|
||||||
2.33.1
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,70 +0,0 @@
|
|||||||
From 34d8854677513b016a08a04cdd9973b165146215 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
||||||
Date: Tue, 19 Mar 2024 13:16:50 +0100
|
|
||||||
Subject: [PATCH 1/2] window-list: Use more appropriate fallback icon
|
|
||||||
|
|
||||||
'icon-missing' is not an actual icon name. It somewhat works
|
|
||||||
because an invalid icon name will fallback to the correct
|
|
||||||
'image-missing', however for apps the generic app icon is
|
|
||||||
a better fallback.
|
|
||||||
---
|
|
||||||
extensions/window-list/extension.js | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
|
|
||||||
index 91ee3e6b..1f112548 100644
|
|
||||||
--- a/extensions/window-list/extension.js
|
|
||||||
+++ b/extensions/window-list/extension.js
|
|
||||||
@@ -188,7 +188,7 @@ class WindowTitle extends St.BoxLayout {
|
|
||||||
this._icon.child = app.create_icon_texture(ICON_TEXTURE_SIZE);
|
|
||||||
} else {
|
|
||||||
this._icon.child = new St.Icon({
|
|
||||||
- icon_name: 'icon-missing',
|
|
||||||
+ icon_name: 'application-x-executable',
|
|
||||||
icon_size: ICON_TEXTURE_SIZE,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.44.0
|
|
||||||
|
|
||||||
|
|
||||||
From 032cfb3593651c8344a59828a9c674f148329889 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
||||||
Date: Tue, 19 Mar 2024 14:07:12 +0100
|
|
||||||
Subject: [PATCH 2/2] window-list: Override with window icon if available
|
|
||||||
|
|
||||||
---
|
|
||||||
extensions/window-list/extension.js | 17 +++++++++++++++++
|
|
||||||
1 file changed, 17 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
|
|
||||||
index 1f112548..0c28692d 100644
|
|
||||||
--- a/extensions/window-list/extension.js
|
|
||||||
+++ b/extensions/window-list/extension.js
|
|
||||||
@@ -192,6 +192,23 @@ class WindowTitle extends St.BoxLayout {
|
|
||||||
icon_size: ICON_TEXTURE_SIZE,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // Override with window icon if available
|
|
||||||
+ if (this._hasWindowIcon()) {
|
|
||||||
+ const textureCache = St.TextureCache.get_default();
|
|
||||||
+ this._icon.child.gicon = textureCache.bind_cairo_surface_property(
|
|
||||||
+ this._metaWindow, 'icon');
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _hasWindowIcon() {
|
|
||||||
+ // HACK: GI cannot handle CairoSurface, so this
|
|
||||||
+ // will throw if the icon property is null
|
|
||||||
+ try {
|
|
||||||
+ return this._metaWindow.icon !== null;
|
|
||||||
+ } catch (e) {
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
_onDestroy() {
|
|
||||||
--
|
|
||||||
2.44.0
|
|
||||||
|
|
Loading…
Reference in new issue