Accepting request 426125 from home:cxiong:branches:GNOME:Factory

sle sync

OBS-URL: https://build.opensuse.org/request/show/426125
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=272
This commit is contained in:
Dominique Leuenberger 2016-09-09 10:41:46 +00:00 committed by Git OBS Bridge
parent d87c11dc3d
commit 05c90a7486
2 changed files with 41 additions and 25 deletions

View File

@ -4,11 +4,11 @@
js/ui/sessionMode.js | 2 - js/ui/sessionMode.js | 2 -
3 files changed, 74 insertions(+), 1 deletion(-) 3 files changed, 74 insertions(+), 1 deletion(-)
Index: gnome-shell-3.20.1/js/ui/aboutMenu.js Index: gnome-shell-3.20.4/js/ui/aboutMenu.js
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ gnome-shell-3.20.1/js/ui/aboutMenu.js +++ gnome-shell-3.20.4/js/ui/aboutMenu.js
@@ -0,0 +1,106 @@ @@ -0,0 +1,115 @@
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- +// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+ +
+const GLib = imports.gi.GLib; +const GLib = imports.gi.GLib;
@ -46,23 +46,32 @@ Index: gnome-shell-3.20.1/js/ui/aboutMenu.js
+ vbox = new St.BoxLayout({vertical: true}); + vbox = new St.BoxLayout({vertical: true});
+ hbox.add(vbox); + hbox.add(vbox);
+ +
+ this._os_release = Gio.File.new_for_path('/etc/os-release'); + ///// Section: read '/etc/os-release' to get pretty name
+ let success, contents, tag; + //
+ // Note: previously this is defaulted to 'SUSE Linux Enterprise', now
+ // let's use a "safer" option.
+ let sysinfo_text = 'SUSE Linux';
+ try { + try {
+ [success, contents, tag] = this._os_release.load_contents(null); + let success, contents, tag;
+ } catch (e) { + let _os_release = Gio.File.new_for_path('/etc/os-release');
+ contents = 'SUSE Linux Enterprise'; + [success, contents, tag] = _os_release.load_contents(null);
+
+ let osReleaseContentStr = contents.toString();
+ let prettyNameReg = /^PRETTY_NAME="(.+)"/;
+ let match = null;
+ for (let line of osReleaseContentStr.split('\n')) {
+ match = prettyNameReg.exec(line);
+ if (match) {
+ sysinfo_text = match[1];
+ } + }
+ let match = new RegExp('(.+)PRETTY_NAME=(.+)ID(.+)').exec(contents.toString().replace(/\n/g, ' ')); + }
+ let sysinfo_text; + }
+ if (!match) { + catch (e) {
+ sysinfo_text = 'SUSE Linux Enterprise'; + // NOTE soft fail, 'sysinfo_text' is the default
+ } else { + warn('ERROR: fail to read /etc/os-release');
+ sysinfo_text = match[2].toString().replace(/"/g, ' ');
+ } + }
+ +
+ this._sysinfo = new St.Label({ text: sysinfo_text, + this._sysinfo = new St.Label({ text: sysinfo_text, can_focus: true });
+ can_focus: true });
+ vbox.add(this._sysinfo); + vbox.add(this._sysinfo);
+ this.actor.hide(); + this.actor.hide();
+ +
@ -115,10 +124,10 @@ Index: gnome-shell-3.20.1/js/ui/aboutMenu.js
+ }, + },
+ +
+}); +});
Index: gnome-shell-3.20.1/js/ui/panel.js Index: gnome-shell-3.20.4/js/ui/panel.js
=================================================================== ===================================================================
--- gnome-shell-3.20.1.orig/js/ui/panel.js --- gnome-shell-3.20.4.orig/js/ui/panel.js
+++ gnome-shell-3.20.1/js/ui/panel.js +++ gnome-shell-3.20.4/js/ui/panel.js
@@ -755,6 +755,7 @@ const AggregateMenu = new Lang.Class({ @@ -755,6 +755,7 @@ const AggregateMenu = new Lang.Class({
}); });
@ -127,10 +136,10 @@ Index: gnome-shell-3.20.1/js/ui/panel.js
'activities': ActivitiesButton, 'activities': ActivitiesButton,
'aggregateMenu': AggregateMenu, 'aggregateMenu': AggregateMenu,
'appMenu': AppMenuButton, 'appMenu': AppMenuButton,
Index: gnome-shell-3.20.1/js/ui/sessionMode.js Index: gnome-shell-3.20.4/js/ui/sessionMode.js
=================================================================== ===================================================================
--- gnome-shell-3.20.1.orig/js/ui/sessionMode.js --- gnome-shell-3.20.4.orig/js/ui/sessionMode.js
+++ gnome-shell-3.20.1/js/ui/sessionMode.js +++ gnome-shell-3.20.4/js/ui/sessionMode.js
@@ -48,7 +48,7 @@ const _modes = { @@ -48,7 +48,7 @@ const _modes = {
unlockDialog: imports.gdm.loginDialog.LoginDialog, unlockDialog: imports.gdm.loginDialog.LoginDialog,
components: ['polkitAgent'], components: ['polkitAgent'],
@ -140,10 +149,10 @@ Index: gnome-shell-3.20.1/js/ui/sessionMode.js
center: ['dateMenu'], center: ['dateMenu'],
right: ['a11yGreeter', 'keyboard', 'aggregateMenu'], right: ['a11yGreeter', 'keyboard', 'aggregateMenu'],
}, },
Index: gnome-shell-3.20.1/js/js-resources.gresource.xml Index: gnome-shell-3.20.4/js/js-resources.gresource.xml
=================================================================== ===================================================================
--- gnome-shell-3.20.1.orig/js/js-resources.gresource.xml --- gnome-shell-3.20.4.orig/js/js-resources.gresource.xml
+++ gnome-shell-3.20.1/js/js-resources.gresource.xml +++ gnome-shell-3.20.4/js/js-resources.gresource.xml
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
<file>misc/params.js</file> <file>misc/params.js</file>
<file>misc/smartcardManager.js</file> <file>misc/smartcardManager.js</file>

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Sep 9 16:41:00 CST 2016 - cxiong@suse.com
- Fix gnome-shell-gdm-login-applet.patch (boo#995296)
+ Fix aboutMenu's distribution name to be more general, like openSUSE Leap
support.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Aug 30 11:28:02 UTC 2016 - zaitor@opensuse.org Tue Aug 30 11:28:02 UTC 2016 - zaitor@opensuse.org