Accepting request 1156193 from home:xiaoguang_wang:branches:GNOME:Factory

- Update gnome-shell-gdm-login-applet.patch: Clean up JS errors
  (bsc#1221100).

OBS-URL: https://build.opensuse.org/request/show/1156193
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=567
This commit is contained in:
Dominique Leuenberger 2024-03-08 08:00:31 +00:00 committed by Git OBS Bridge
parent 171c0b78ec
commit ace1a30793
2 changed files with 24 additions and 19 deletions

View File

@ -1,8 +1,8 @@
Index: gnome-shell-45.0/js/js-resources.gresource.xml Index: gnome-shell-45.3/js/js-resources.gresource.xml
=================================================================== ===================================================================
--- gnome-shell-45.0.orig/js/js-resources.gresource.xml --- gnome-shell-45.3.orig/js/js-resources.gresource.xml
+++ gnome-shell-45.0/js/js-resources.gresource.xml +++ gnome-shell-45.3/js/js-resources.gresource.xml
@@ -41,6 +41,7 @@ @@ -42,6 +42,7 @@
<file>misc/util.js</file> <file>misc/util.js</file>
<file>misc/weather.js</file> <file>misc/weather.js</file>
@ -10,10 +10,10 @@ Index: gnome-shell-45.0/js/js-resources.gresource.xml
<file>ui/accessDialog.js</file> <file>ui/accessDialog.js</file>
<file>ui/altTab.js</file> <file>ui/altTab.js</file>
<file>ui/animation.js</file> <file>ui/animation.js</file>
Index: gnome-shell-45.0/js/ui/panel.js Index: gnome-shell-45.3/js/ui/panel.js
=================================================================== ===================================================================
--- gnome-shell-45.0.orig/js/ui/panel.js --- gnome-shell-45.3.orig/js/ui/panel.js
+++ gnome-shell-45.0/js/ui/panel.js +++ gnome-shell-45.3/js/ui/panel.js
@@ -36,6 +36,7 @@ import * as ThunderboltStatus from './st @@ -36,6 +36,7 @@ import * as ThunderboltStatus from './st
import * as AutoRotateStatus from './status/autoRotate.js'; import * as AutoRotateStatus from './status/autoRotate.js';
import * as BackgroundAppsStatus from './status/backgroundApps.js'; import * as BackgroundAppsStatus from './status/backgroundApps.js';
@ -30,10 +30,10 @@ Index: gnome-shell-45.0/js/ui/panel.js
'activities': ActivitiesButton, 'activities': ActivitiesButton,
'appMenu': AppMenuButton, 'appMenu': AppMenuButton,
'quickSettings': QuickSettings, 'quickSettings': QuickSettings,
Index: gnome-shell-45.0/js/ui/sessionMode.js Index: gnome-shell-45.3/js/ui/sessionMode.js
=================================================================== ===================================================================
--- gnome-shell-45.0.orig/js/ui/sessionMode.js --- gnome-shell-45.3.orig/js/ui/sessionMode.js
+++ gnome-shell-45.0/js/ui/sessionMode.js +++ gnome-shell-45.3/js/ui/sessionMode.js
@@ -60,7 +60,7 @@ const _modes = { @@ -60,7 +60,7 @@ const _modes = {
? ['networkAgent', 'polkitAgent'] ? ['networkAgent', 'polkitAgent']
: ['polkitAgent'], : ['polkitAgent'],
@ -43,11 +43,11 @@ Index: gnome-shell-45.0/js/ui/sessionMode.js
center: ['dateMenu'], center: ['dateMenu'],
right: ['dwellClick', 'a11y', 'keyboard', 'quickSettings'], right: ['dwellClick', 'a11y', 'keyboard', 'quickSettings'],
}, },
Index: gnome-shell-45.0/js/ui/aboutMenu.js Index: gnome-shell-45.3/js/ui/aboutMenu.js
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ gnome-shell-45.0/js/ui/aboutMenu.js +++ gnome-shell-45.3/js/ui/aboutMenu.js
@@ -0,0 +1,145 @@ @@ -0,0 +1,144 @@
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- +// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+ +
+import GLib from 'gi://GLib'; +import GLib from 'gi://GLib';
@ -74,7 +74,7 @@ Index: gnome-shell-45.0/js/ui/aboutMenu.js
+ this.hostname_label = new St.Label({y_align: Clutter.ActorAlign.CENTER}); + this.hostname_label = new St.Label({y_align: Clutter.ActorAlign.CENTER});
+ this.about_hbox.add_child(this.hostname_label); + this.about_hbox.add_child(this.hostname_label);
+ +
+ this.actor.add_child(this.about_hbox); + this.add_child(this.about_hbox);
+ hbox = new St.BoxLayout({ name: 'aboutArea' }); + hbox = new St.BoxLayout({ name: 'aboutArea' });
+ this.menu.box.add_child(hbox); + this.menu.box.add_child(hbox);
+ +
@ -87,11 +87,10 @@ Index: gnome-shell-45.0/js/ui/aboutMenu.js
+ // let's use a "safer" option. + // let's use a "safer" option.
+ let sysinfo_text = 'SUSE Linux'; + let sysinfo_text = 'SUSE Linux';
+ try { + try {
+ let success, contents, tag;
+ let _os_release = Gio.File.new_for_path('/etc/os-release'); + let _os_release = Gio.File.new_for_path('/etc/os-release');
+ [success, contents, tag] = _os_release.load_contents(null); + let [success_, contents] = _os_release.load_contents(null);
+ +
+ let osReleaseContentStr = contents.toString(); + let osReleaseContentStr = new TextDecoder().decode(contents);
+ let prettyNameReg = /^PRETTY_NAME="(.+)"/; + let prettyNameReg = /^PRETTY_NAME="(.+)"/;
+ let match = null; + let match = null;
+ for (let line of osReleaseContentStr.split('\n')) { + for (let line of osReleaseContentStr.split('\n')) {
@ -108,7 +107,7 @@ Index: gnome-shell-45.0/js/ui/aboutMenu.js
+ +
+ this._sysinfo = new St.Label({ text: sysinfo_text, can_focus: true }); + this._sysinfo = new St.Label({ text: sysinfo_text, can_focus: true });
+ vbox.add(this._sysinfo); + vbox.add(this._sysinfo);
+ this.actor.hide(); + this.hide();
+ +
+ this._updateHostnameId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, + this._updateHostnameId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
+ this._ticket, + this._ticket,
@ -130,7 +129,7 @@ Index: gnome-shell-45.0/js/ui/aboutMenu.js
+ this._ticket = 1; + this._ticket = 1;
+ this._hostname = hostname_text; + this._hostname = hostname_text;
+ this.hostname_label.set_text(this._hostname); + this.hostname_label.set_text(this._hostname);
+ this.actor.show(); + this.show();
+ } + }
+ this._updateHostnameId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, + this._updateHostnameId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT,
+ this._ticket, + this._ticket,

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Mar 7 07:47:00 UTC 2024 - Xiaoguang Wang <xiaoguang.wang@suse.com>
- Update gnome-shell-gdm-login-applet.patch: Clean up JS errors
(bsc#1221100).
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 20 10:03:05 UTC 2024 - Alynx Zhou <alynx.zhou@suse.com> Tue Feb 20 10:03:05 UTC 2024 - Alynx Zhou <alynx.zhou@suse.com>