Update to 46.alpha

This commit is contained in:
Florian Müllner 2024-01-07 11:35:29 +01:00
parent d27495e69e
commit 4293386a9d
6 changed files with 26 additions and 345 deletions

1
.gitignore vendored
View File

@ -221,3 +221,4 @@ gnome-shell-2.31.5.tar.bz2
/gnome-shell-45.0.tar.xz
/gnome-shell-45.1.tar.xz
/gnome-shell-45.2.tar.xz
/gnome-shell-46.alpha.tar.xz

View File

@ -1,4 +1,4 @@
From 01b465beae325c88fe6539303ddbdf1cc1cb80a7 Mon Sep 17 00:00:00 2001
From e34033a9b9dca9bba9162f29e67d97e20843eff7 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 16 Aug 2023 18:46:54 -0400
Subject: [PATCH 1/3] status/keyboard: Add a catch around reload call
@ -16,37 +16,10 @@ This commit adds the catch it's asking for.
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 8d98e16de..7277c6d09 100644
index 8d98e16de9..7277c6d099 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -171,61 +171,63 @@ class InputSourceSettings extends Signals.EventEmitter {
get mruSources() {
return [];
}
set mruSources(sourcesList) {
// do nothing
}
get keyboardOptions() {
return [];
}
get perWindow() {
return false;
}
}
class InputSourceSystemSettings extends InputSourceSettings {
constructor() {
super();
this._BUS_NAME = 'org.freedesktop.locale1';
this._BUS_PATH = '/org/freedesktop/locale1';
this._BUS_IFACE = 'org.freedesktop.locale1';
this._BUS_PROPS_IFACE = 'org.freedesktop.DBus.Properties';
this._layouts = '';
@@ -198,7 +198,9 @@ class InputSourceSystemSettings extends InputSourceSettings {
this._variants = '';
this._options = '';
@ -57,33 +30,6 @@ index 8d98e16de..7277c6d09 100644
Gio.DBus.system.signal_subscribe(this._BUS_NAME,
this._BUS_PROPS_IFACE,
'PropertiesChanged',
this._BUS_PATH,
null,
Gio.DBusSignalFlags.NONE,
this._reload.bind(this));
}
async _reload() {
let props;
try {
const result = await Gio.DBus.system.call(
this._BUS_NAME,
this._BUS_PATH,
this._BUS_PROPS_IFACE,
'GetAll',
new GLib.Variant('(s)', [this._BUS_IFACE]),
null, Gio.DBusCallFlags.NONE, -1, null);
[props] = result.deepUnpack();
} catch (e) {
log(`Could not get properties from ${this._BUS_NAME}`);
return;
}
const layouts = props['X11Layout'].unpack();
const variants = props['X11Variant'].unpack();
const options = props['X11Options'].unpack();
--
2.41.0.rc2
2.43.0

View File

@ -1,4 +1,4 @@
From 455526804beab00adc7b96d01b7e53355123c3d7 Mon Sep 17 00:00:00 2001
From 2298cfa0c9083fef432b9c51341f5ee75e7ebacb Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 16 Aug 2023 11:13:39 -0400
Subject: [PATCH 2/3] status/keyboard: Load keyboard from system settings if
@ -14,31 +14,10 @@ default (as configured by localed).
1 file changed, 45 insertions(+), 13 deletions(-)
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 7277c6d09..97e35d482 100644
index 7277c6d099..97e35d482c 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -1,54 +1,57 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
import IBus from 'gi://IBus';
import Meta from 'gi://Meta';
import Shell from 'gi://Shell';
import St from 'gi://St';
import * as Gettext from 'gettext';
import * as Signals from '../../misc/signals.js';
import * as IBusManager from '../../misc/ibusManager.js';
import * as KeyboardManager from '../../misc/keyboardManager.js';
import * as Main from '../main.js';
import * as PopupMenu from '../popupMenu.js';
import * as PanelMenu from '../panelMenu.js';
import * as SwitcherPopup from '../switcherPopup.js';
import * as Util from '../../misc/util.js';
@@ -22,6 +22,9 @@ import * as Util from '../../misc/util.js';
export const INPUT_SOURCE_TYPE_XKB = 'xkb';
export const INPUT_SOURCE_TYPE_IBUS = 'ibus';
@ -48,61 +27,7 @@ index 7277c6d09..97e35d482 100644
export const LayoutMenuItem = GObject.registerClass(
class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem {
_init(displayName, shortName) {
super._init();
this.setOrnament(PopupMenu.Ornament.NONE);
this.label = new St.Label({
text: displayName,
x_expand: true,
});
this.indicator = new St.Label({text: shortName});
this.add_child(this.label);
this.add(this.indicator);
this.label_actor = this.label;
}
});
export class InputSource extends Signals.EventEmitter {
constructor(type, id, displayName, shortName, index) {
super();
this.type = type;
this.id = id;
this.displayName = displayName;
this._shortName = shortName;
this.index = index;
this.properties = null;
@@ -236,166 +239,195 @@ class InputSourceSystemSettings extends InputSourceSettings {
this._layouts = layouts;
this._variants = variants;
this._emitInputSourcesChanged();
}
if (options !== this._options) {
this._options = options;
this._emitKeyboardOptionsChanged();
}
}
get inputSources() {
let sourcesList = [];
let layouts = this._layouts.split(',');
let variants = this._variants.split(',');
for (let i = 0; i < layouts.length && !!layouts[i]; i++) {
let id = layouts[i];
if (variants[i])
id += `+${variants[i]}`;
sourcesList.push({type: INPUT_SOURCE_TYPE_XKB, id});
}
return sourcesList;
}
get keyboardOptions() {
return this._options.split(',');
}
@@ -263,17 +266,15 @@ class InputSourceSystemSettings extends InputSourceSettings {
}
class InputSourceSessionSettings extends InputSourceSettings {
@ -123,17 +48,7 @@ index 7277c6d09..97e35d482 100644
this._settings.connect(`changed::${this._KEY_KEYBOARD_OPTIONS}`, this._emitKeyboardOptionsChanged.bind(this));
this._settings.connect(`changed::${this._KEY_PER_WINDOW}`, this._emitPerWindowChanged.bind(this));
}
_getSourcesList(key) {
let sourcesList = [];
let sources = this._settings.get_value(key);
let nSources = sources.n_children();
for (let i = 0; i < nSources; i++) {
let [type, id] = sources.get_child_value(i).deepUnpack();
sourcesList.push({type, id});
}
return sourcesList;
@@ -291,7 +292,7 @@ class InputSourceSessionSettings extends InputSourceSettings {
}
get inputSources() {
@ -142,50 +57,7 @@ index 7277c6d09..97e35d482 100644
}
get mruSources() {
return this._getSourcesList(this._KEY_MRU_SOURCES);
}
set mruSources(sourcesList) {
let sources = GLib.Variant.new('a(ss)', sourcesList);
this._settings.set_value(this._KEY_MRU_SOURCES, sources);
}
get keyboardOptions() {
return this._settings.get_strv(this._KEY_KEYBOARD_OPTIONS);
}
get perWindow() {
return this._settings.get_boolean(this._KEY_PER_WINDOW);
}
}
export class InputSourceManager extends Signals.EventEmitter {
constructor() {
super();
// All valid input sources currently in the gsettings
// KEY_INPUT_SOURCES list indexed by their index there
this._inputSources = {};
// All valid input sources currently in the gsettings
// KEY_INPUT_SOURCES list of type INPUT_SOURCE_TYPE_IBUS
// indexed by the IBus ID
this._ibusSources = {};
this._currentSource = null;
// All valid input sources currently in the gsettings
// KEY_INPUT_SOURCES list ordered by most recently used
this._mruSources = [];
this._mruSourcesBackup = null;
this._keybindingAction =
Main.wm.addKeybinding('switch-input-source',
new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}),
Meta.KeyBindingFlags.NONE,
Shell.ActionMode.ALL,
this._switchInputSource.bind(this));
this._keybindingActionBackward =
Main.wm.addKeybinding('switch-input-source-backward',
new Gio.Settings({schema_id: 'org.gnome.desktop.wm.keybindings'}),
@@ -342,12 +343,6 @@ export class InputSourceManager extends Signals.EventEmitter {
Meta.KeyBindingFlags.IS_REVERSED,
Shell.ActionMode.ALL,
this._switchInputSource.bind(this));
@ -198,11 +70,7 @@ index 7277c6d09..97e35d482 100644
this._xkbInfo = KeyboardManager.getXkbInfo();
this._keyboardManager = KeyboardManager.getKeyboardManager();
this._ibusReady = false;
this._ibusManager = IBusManager.getIBusManager();
this._ibusManager.connect('ready', this._ibusReadyCallback.bind(this));
this._ibusManager.connect('properties-registered', this._ibusPropertiesRegistered.bind(this));
@@ -359,16 +354,53 @@ export class InputSourceManager extends Signals.EventEmitter {
this._ibusManager.connect('property-updated', this._ibusPropertyUpdated.bind(this));
this._ibusManager.connect('set-content-type', this._ibusSetContentType.bind(this));
@ -257,33 +125,6 @@ index 7277c6d09..97e35d482 100644
reload() {
this._reloading = true;
this._keyboardManager.setKeyboardOptions(this._settings.keyboardOptions);
this._inputSourcesChanged();
this._reloading = false;
}
_ibusReadyCallback(im, ready) {
if (this._ibusReady === ready)
return;
this._ibusReady = ready;
this._mruSources = [];
this._inputSourcesChanged();
}
_modifiersSwitcher() {
let sourceIndexes = Object.keys(this._inputSources);
if (sourceIndexes.length === 0) {
KeyboardManager.releaseKeyboard();
return true;
}
let is = this._currentSource;
if (!is)
is = this._inputSources[sourceIndexes[0]];
let nextIndex = is.index + 1;
if (nextIndex > sourceIndexes[sourceIndexes.length - 1])
nextIndex = 0;
--
2.41.0.rc2
2.43.0

View File

@ -1,4 +1,4 @@
From a2684644e0799fe44180201fa96c4f77137f886f Mon Sep 17 00:00:00 2001
From 42355d8e9fc41b011a69e739ba536871483d41c6 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 16 Aug 2023 14:09:50 -0400
Subject: [PATCH 3/3] status/keyboard: Use gnome-desktop API for getting
@ -16,12 +16,10 @@ lifting itself, instead.
1 file changed, 25 insertions(+), 31 deletions(-)
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 97e35d482..8a2f1d2f7 100644
index 97e35d482c..8a2f1d2f7d 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -1,57 +1,60 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
@@ -3,6 +3,7 @@
import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
@ -29,22 +27,7 @@ index 97e35d482..8a2f1d2f7 100644
import GObject from 'gi://GObject';
import IBus from 'gi://IBus';
import Meta from 'gi://Meta';
import Shell from 'gi://Shell';
import St from 'gi://St';
import * as Gettext from 'gettext';
import * as Signals from '../../misc/signals.js';
import * as IBusManager from '../../misc/ibusManager.js';
import * as KeyboardManager from '../../misc/keyboardManager.js';
import * as Main from '../main.js';
import * as PopupMenu from '../popupMenu.js';
import * as PanelMenu from '../panelMenu.js';
import * as SwitcherPopup from '../switcherPopup.js';
import * as Util from '../../misc/util.js';
export const INPUT_SOURCE_TYPE_XKB = 'xkb';
export const INPUT_SOURCE_TYPE_IBUS = 'ibus';
@@ -25,6 +26,8 @@ export const INPUT_SOURCE_TYPE_IBUS = 'ibus';
const DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources';
const KEY_INPUT_SOURCES = 'sources';
@ -53,61 +36,7 @@ index 97e35d482..8a2f1d2f7 100644
export const LayoutMenuItem = GObject.registerClass(
class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem {
_init(displayName, shortName) {
super._init();
this.setOrnament(PopupMenu.Ornament.NONE);
this.label = new St.Label({
text: displayName,
x_expand: true,
});
this.indicator = new St.Label({text: shortName});
this.add_child(this.label);
this.add(this.indicator);
this.label_actor = this.label;
}
});
export class InputSource extends Signals.EventEmitter {
constructor(type, id, displayName, shortName, index) {
super();
this.type = type;
this.id = id;
this.displayName = displayName;
this._shortName = shortName;
this.index = index;
this.properties = null;
@@ -170,125 +173,116 @@ class InputSourceSettings extends Signals.EventEmitter {
get inputSources() {
return [];
}
get mruSources() {
return [];
}
set mruSources(sourcesList) {
// do nothing
}
get keyboardOptions() {
return [];
}
get perWindow() {
return false;
}
}
class InputSourceSystemSettings extends InputSourceSettings {
constructor() {
super();
this._BUS_NAME = 'org.freedesktop.locale1';
this._BUS_PATH = '/org/freedesktop/locale1';
@@ -197,9 +200,9 @@ class InputSourceSystemSettings extends InputSourceSettings {
this._BUS_IFACE = 'org.freedesktop.locale1';
this._BUS_PROPS_IFACE = 'org.freedesktop.DBus.Properties';
@ -120,15 +49,7 @@ index 97e35d482..8a2f1d2f7 100644
this._reload().catch(error => {
logError(error, 'Could not reload system input settings');
});
Gio.DBus.system.signal_subscribe(this._BUS_NAME,
this._BUS_PROPS_IFACE,
'PropertiesChanged',
this._BUS_PATH,
null,
Gio.DBusSignalFlags.NONE,
this._reload.bind(this));
@@ -215,29 +218,20 @@ class InputSourceSystemSettings extends InputSourceSettings {
}
async _reload() {
@ -167,9 +88,7 @@ index 97e35d482..8a2f1d2f7 100644
this._emitInputSourcesChanged();
}
if (options !== this._options) {
this._options = options;
this._emitKeyboardOptionsChanged();
}
@@ -247,21 +241,21 @@ class InputSourceSystemSettings extends InputSourceSettings {
}
get inputSources() {
@ -201,33 +120,6 @@ index 97e35d482..8a2f1d2f7 100644
}
}
class InputSourceSessionSettings extends InputSourceSettings {
constructor(settings) {
super();
this._KEY_MRU_SOURCES = 'mru-sources';
this._KEY_KEYBOARD_OPTIONS = 'xkb-options';
this._KEY_PER_WINDOW = 'per-window';
this._settings = settings;
this._settings.connect(`changed::${KEY_INPUT_SOURCES}`, this._emitInputSourcesChanged.bind(this));
this._settings.connect(`changed::${this._KEY_KEYBOARD_OPTIONS}`, this._emitKeyboardOptionsChanged.bind(this));
this._settings.connect(`changed::${this._KEY_PER_WINDOW}`, this._emitPerWindowChanged.bind(this));
}
_getSourcesList(key) {
let sourcesList = [];
let sources = this._settings.get_value(key);
let nSources = sources.n_children();
for (let i = 0; i < nSources; i++) {
let [type, id] = sources.get_child_value(i).deepUnpack();
sourcesList.push({type, id});
}
return sourcesList;
}
get inputSources() {
--
2.41.0.rc2
2.43.0

View File

@ -1,13 +1,14 @@
%global tarball_version %%(echo %{version} | tr '~' '.')
%global major_version %%(cut -d "." -f 1 <<<%{tarball_version})
Name: gnome-shell
Version: 45.2
Version: 46~alpha
Release: %autorelease
Summary: Window management and application launching for GNOME
License: GPL-2.0-or-later
URL: https://wiki.gnome.org/Projects/GnomeShell
Source0: https://download.gnome.org/sources/gnome-shell/45/%{name}-%{tarball_version}.tar.xz
Source0: https://download.gnome.org/sources/gnome-shell/%{major_version}/%{name}-%{tarball_version}.tar.xz
# Replace Epiphany with Firefox in the default favourite apps list
Patch: gnome-shell-favourite-apps-firefox.patch
@ -30,7 +31,7 @@ Patch: 0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch
%define gjs_version 1.73.1
%define gtk4_version 4.0.0
%define adwaita_version 1.0.0
%define mutter_version 45.0
%define mutter_version 46~alpha
%define polkit_version 0.100
%define gsettings_desktop_schemas_version 42~beta
%define ibus_version 1.5.2

View File

@ -1 +1 @@
SHA512 (gnome-shell-45.2.tar.xz) = d88cb7e385f69416863a5b1299fdd18f228a6f951ee084e0ae79ed668c856e50f19c537d7b40eaf93b9166fa5ef7797b9babc3b8d4f80941e15d53d862734aec
SHA512 (gnome-shell-46.alpha.tar.xz) = 41b6a2c8cc857d304ac1aade16b539d8ae2b0acef90f3cf3baeb965aa96d4cd5cd9286bd1e3244e503441d1372e0418bbbca76c734653e6311586d0544b98af1