forked from pool/gnome-shell-extensions
Accepting request 736561 from GNOME:Factory
Scripted push from {project} OBS-URL: https://build.opensuse.org/request/show/736561 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-shell-extensions?expand=0&rev=90
This commit is contained in:
commit
a4ca1e2a55
@ -1,15 +1,17 @@
|
|||||||
--- gnome-shell-extensions-3.32.0.orig/extensions/apps-menu/extension.js 2019-03-12 07:05:45.000000000 +0800
|
Index: gnome-shell-extensions-3.33.91/extensions/apps-menu/extension.js
|
||||||
+++ gnome-shell-extensions-3.32.0/extensions/apps-menu/extension.js 2019-03-20 15:52:39.830009264 +0800
|
===================================================================
|
||||||
@@ -4,6 +4,8 @@
|
--- gnome-shell-extensions-3.33.91.orig/extensions/apps-menu/extension.js
|
||||||
const {
|
+++ gnome-shell-extensions-3.33.91/extensions/apps-menu/extension.js
|
||||||
Atk, Clutter, Gio, GLib, GMenu, GObject, Gtk, Meta, Shell, St
|
@@ -5,6 +5,8 @@ const {
|
||||||
|
Atk, Clutter, Gio, GLib, GMenu, GObject, Gtk, Meta, Shell, St,
|
||||||
} = imports.gi;
|
} = imports.gi;
|
||||||
|
const Signals = imports.signals;
|
||||||
+const BoxPointer = imports.ui.boxpointer;
|
+const BoxPointer = imports.ui.boxpointer;
|
||||||
+const AppFavorites = imports.ui.appFavorites;
|
+const AppFavorites = imports.ui.appFavorites;
|
||||||
|
|
||||||
const DND = imports.ui.dnd;
|
const DND = imports.ui.dnd;
|
||||||
const Main = imports.ui.main;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
const PanelMenu = imports.ui.panelMenu;
|
@@ -46,8 +48,19 @@ class ApplicationMenuItem extends PopupM
|
||||||
@@ -59,8 +61,19 @@
|
|
||||||
let textureCache = St.TextureCache.get_default();
|
let textureCache = St.TextureCache.get_default();
|
||||||
let iconThemeChangedId = textureCache.connect('icon-theme-changed',
|
let iconThemeChangedId = textureCache.connect('icon-theme-changed',
|
||||||
this._updateIcon.bind(this));
|
this._updateIcon.bind(this));
|
||||||
@ -19,7 +21,7 @@
|
|||||||
+ this._menu = null;
|
+ this._menu = null;
|
||||||
+ this._menuManager = new PopupMenu.PopupMenuManager(this);
|
+ this._menuManager = new PopupMenu.PopupMenuManager(this);
|
||||||
+
|
+
|
||||||
this.actor.connect('destroy', () => {
|
this.connect('destroy', () => {
|
||||||
textureCache.disconnect(iconThemeChangedId);
|
textureCache.disconnect(iconThemeChangedId);
|
||||||
+ if (this._menu) {
|
+ if (this._menu) {
|
||||||
+ this._menu.destroy();
|
+ this._menu.destroy();
|
||||||
@ -29,7 +31,7 @@
|
|||||||
});
|
});
|
||||||
this._updateIcon();
|
this._updateIcon();
|
||||||
|
|
||||||
@@ -75,6 +88,106 @@
|
@@ -62,6 +75,106 @@ class ApplicationMenuItem extends PopupM
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:02b2b2fb477fcd8277ee3ce34ec156d97724011f2660dd2e14c412f18d5b911e
|
|
||||||
size 198320
|
|
3
gnome-shell-extensions-3.34.1.tar.xz
Normal file
3
gnome-shell-extensions-3.34.1.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b0ad51143b1bf40def4a10f8fd0ab0ffb47218304800794e62cadd29d0acc75b
|
||||||
|
size 204824
|
@ -1,3 +1,65 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 9 10:32:09 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
- Update to version 3.34.1:
|
||||||
|
+ Adjust to gnome-settings-daemon plugin removals.
|
||||||
|
+ Updated translations.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 8 04:35:27 UTC 2019 - Xiaoguang Wang <xwang@suse.com>
|
||||||
|
|
||||||
|
- Add requires gnome-shell-extension-desktop-icons for package
|
||||||
|
gnome-shell-classic, when start sle-classic session, enable
|
||||||
|
extension desktop-icons automatically (bsc#1148036).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 11 07:09:01 UTC 2019 - Xiaoguang Wang <xwang@suse.com>
|
||||||
|
|
||||||
|
- Update gse-sle-classic-ext.patch: Missing the solution for
|
||||||
|
boo#1094148, add it back.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 9 16:31:41 CDT 2019 - mgorse@suse.com
|
||||||
|
|
||||||
|
- Update to version 3.34.0:
|
||||||
|
+ Updated translations.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 6 01:04:26 UTC 2019 - Xiaoguang Wang <xwang@suse.com>
|
||||||
|
|
||||||
|
- Update to version 3.33.92:
|
||||||
|
+ Translators: Марко Костић [sr], Tim Sabsch [de],
|
||||||
|
Rūdolfs Mazurs [lv], Matej Urbančič [sl], Balázs Úr [hu],
|
||||||
|
Claude Paroz [fr], Fran Dieguez [gl], Changwoo Ryu [ko],
|
||||||
|
Ryuta Fujii [ja], Fabio Tomat [fur], Goran Vidović [hr].
|
||||||
|
- Adapt sle-classic to 3.33.92
|
||||||
|
+ Update file sle-classic.json
|
||||||
|
+ Update sle-classic@suse.com.tar.gz
|
||||||
|
+ Update gse-sle-classic-ext.patch
|
||||||
|
- Drop gnome-shell-favorites-menu-at-end.patch:
|
||||||
|
Merge this function to gse-sle-classic-ext.patch.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 4 02:17:34 UTC 2019 - Xiaoguang Wang <xwang@suse.com>
|
||||||
|
|
||||||
|
- Update to version 3.33.91:
|
||||||
|
+ window-list: Support showing windows from all workspaces.
|
||||||
|
+ Misc. bug fixes and cleanups.
|
||||||
|
+ Make GNOME Classic more classic:
|
||||||
|
- Disable GNOME 3 overview.
|
||||||
|
- Add window picker button to window list.
|
||||||
|
- Style improvements and fixes.
|
||||||
|
- Support horizontal workspace layout in window list.
|
||||||
|
- Add draggable previews to window list workspace switcher.
|
||||||
|
- Arrange workspaces horizontally.
|
||||||
|
+ workspace-indicator: Support horizontal workspace layout.
|
||||||
|
+ workspace-indicator: Add draggable previews.
|
||||||
|
- Drop gse-apps-menu-Add_missing_chain-up.patch: Fixed upstream.
|
||||||
|
- Rebase gnome-shell-add-app-to-desktop.patch
|
||||||
|
- Rebase gnome-shell-favorites-menu-at-end.patch
|
||||||
|
- Rebase gse-sle-classic-ext.patch
|
||||||
|
- Rebase sle-classic-lock-screen-background.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 2 18:08:38 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
|
Fri Aug 2 18:08:38 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
|
||||||
|
|
||||||
|
@ -19,13 +19,13 @@
|
|||||||
|
|
||||||
%global __requires_exclude typelib\\(Meta\\)
|
%global __requires_exclude typelib\\(Meta\\)
|
||||||
Name: gnome-shell-extensions
|
Name: gnome-shell-extensions
|
||||||
Version: 3.32.1
|
Version: 3.34.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A collection of extensions for GNOME Shell
|
Summary: A collection of extensions for GNOME Shell
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: System/GUI/GNOME
|
Group: System/GUI/GNOME
|
||||||
URL: https://wiki.gnome.org/Projects/GnomeShell/Extensions
|
URL: https://wiki.gnome.org/Projects/GnomeShell/Extensions
|
||||||
Source0: https://download.gnome.org/sources/gnome-shell-extensions/3.32/%{name}-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/gnome-shell-extensions/3.34/%{name}-%{version}.tar.xz
|
||||||
Source1: README.SUSE
|
Source1: README.SUSE
|
||||||
Source2: sle-classic.desktop
|
Source2: sle-classic.desktop
|
||||||
Source3: SLE-theme.tar.gz
|
Source3: SLE-theme.tar.gz
|
||||||
@ -35,12 +35,8 @@ Source6: sle-classic@suse.com.tar.gz
|
|||||||
Source7: 00_org.gnome.shell.extensions.sle-classic.gschema.override
|
Source7: 00_org.gnome.shell.extensions.sle-classic.gschema.override
|
||||||
# PATCH-FEATURE-OPENSUSE gnome-shell-add-app-to-desktop.patch bnc#870580 dliang@suse.com -- allow adding app shortcut to desktop easily.
|
# PATCH-FEATURE-OPENSUSE gnome-shell-add-app-to-desktop.patch bnc#870580 dliang@suse.com -- allow adding app shortcut to desktop easily.
|
||||||
Patch1: gnome-shell-add-app-to-desktop.patch
|
Patch1: gnome-shell-add-app-to-desktop.patch
|
||||||
# PATCH-FEATURE-OPENSUSE sle-classic-favorites-menu-at-end.patch bnc#890989 cxiong@suse.com -- put the favorites at the end of the app catogories for accessibility reason -- cxiong@suse.com bnc#890989
|
|
||||||
Patch2: gnome-shell-favorites-menu-at-end.patch
|
|
||||||
# PATCH-FIX-OPENSUSE gnome-classic-s390-not-require-g-s-d_wacom.patch bsc#1129412 yfjiang@suse.com -- Remove the runtime requirement of g-s-d Wacom plugin
|
# PATCH-FIX-OPENSUSE gnome-classic-s390-not-require-g-s-d_wacom.patch bsc#1129412 yfjiang@suse.com -- Remove the runtime requirement of g-s-d Wacom plugin
|
||||||
Patch3: gnome-classic-s390-not-require-g-s-d_wacom.patch
|
Patch2: gnome-classic-s390-not-require-g-s-d_wacom.patch
|
||||||
# PATCH-FIX-UPSTREAM gse-apps-menu-Add_missing_chain-up.patch -- apps-menu: Add missing chain-up
|
|
||||||
Patch4: gse-apps-menu-Add_missing_chain-up.patch
|
|
||||||
|
|
||||||
## NOTE keep SLE Classic patch at the bottom
|
## NOTE keep SLE Classic patch at the bottom
|
||||||
# PATCH-FIX-SLE gse-sle-classic-ext.patch Fate#318572 cxiong@suse.com -- add sle classic support
|
# PATCH-FIX-SLE gse-sle-classic-ext.patch Fate#318572 cxiong@suse.com -- add sle classic support
|
||||||
@ -90,6 +86,7 @@ This package provides files common to several GNOME Shell Extensions
|
|||||||
Summary: A collection of extensions for Gnome-shell classic
|
Summary: A collection of extensions for Gnome-shell classic
|
||||||
Group: System/GUI/GNOME
|
Group: System/GUI/GNOME
|
||||||
Requires: gnome-shell-classic-session
|
Requires: gnome-shell-classic-session
|
||||||
|
Requires: gnome-shell-extension-desktop-icons
|
||||||
Recommends: %{name}-common-lang
|
Recommends: %{name}-common-lang
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -113,11 +110,9 @@ gnome-shell classic.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
|
||||||
%ifarch s390 s390x
|
%ifarch s390 s390x
|
||||||
%patch3 -p1
|
%patch2 -p1
|
||||||
%endif
|
%endif
|
||||||
%patch4 -p1
|
|
||||||
translation-update-upstream po %{name}
|
translation-update-upstream po %{name}
|
||||||
gnome-patch-translation-prepare po %{name}
|
gnome-patch-translation-prepare po %{name}
|
||||||
|
|
||||||
@ -136,7 +131,7 @@ sed -i -e 's/openSUSE/SUSE Linux Enterprise/g' README.SUSE
|
|||||||
%meson \
|
%meson \
|
||||||
-D classic_mode=true \
|
-D classic_mode=true \
|
||||||
-D extension_set=classic \
|
-D extension_set=classic \
|
||||||
-D enable_extensions="apps-menu,places-menu,launch-new-instance,window-list,workspace-indicator"
|
-D enable_extensions="apps-menu,places-menu,launch-new-instance,window-list,workspace-indicator, horizontal-workspaces"
|
||||||
%meson_build
|
%meson_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -145,7 +140,7 @@ sed -i -e 's/openSUSE/SUSE Linux Enterprise/g' README.SUSE
|
|||||||
#Install SLE theme
|
#Install SLE theme
|
||||||
#Install sle-classic@suse.com extension
|
#Install sle-classic@suse.com extension
|
||||||
install -m0644 %{SOURCE2} %{buildroot}/%{_datadir}/xsessions/sle-classic.desktop
|
install -m0644 %{SOURCE2} %{buildroot}/%{_datadir}/xsessions/sle-classic.desktop
|
||||||
cp %{buildroot}/%{_datadir}/gnome-shell/extensions/window-list@gnome-shell-extensions.gcampax.github.com/classic.css \
|
cp %{_builddir}/%{name}-%{version}/extensions/window-list/sle-classic.css \
|
||||||
%{buildroot}/%{_datadir}/gnome-shell/extensions/window-list@gnome-shell-extensions.gcampax.github.com/sle-classic.css
|
%{buildroot}/%{_datadir}/gnome-shell/extensions/window-list@gnome-shell-extensions.gcampax.github.com/sle-classic.css
|
||||||
install -m0644 %{SOURCE5} %{buildroot}/%{_datadir}/gnome-shell/modes/sle-classic.json
|
install -m0644 %{SOURCE5} %{buildroot}/%{_datadir}/gnome-shell/modes/sle-classic.json
|
||||||
tar -xzvf %{SOURCE6}
|
tar -xzvf %{SOURCE6}
|
||||||
@ -198,6 +193,7 @@ ln -s %{_sysconfdir}/alternatives/default-waylandsession.desktop %{buildroot}%{_
|
|||||||
%{_datadir}/gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/
|
%{_datadir}/gnome-shell/extensions/places-menu@gnome-shell-extensions.gcampax.github.com/
|
||||||
%{_datadir}/gnome-shell/extensions/workspace-indicator@gnome-shell-extensions.gcampax.github.com/
|
%{_datadir}/gnome-shell/extensions/workspace-indicator@gnome-shell-extensions.gcampax.github.com/
|
||||||
%{_datadir}/gnome-shell/extensions/window-list@gnome-shell-extensions.gcampax.github.com/
|
%{_datadir}/gnome-shell/extensions/window-list@gnome-shell-extensions.gcampax.github.com/
|
||||||
|
%{_datadir}/gnome-shell/extensions/horizontal-workspaces@gnome-shell-extensions.gcampax.github.com/
|
||||||
%dir %{_datadir}/gnome-shell/modes
|
%dir %{_datadir}/gnome-shell/modes
|
||||||
%{_datadir}/gnome-shell/modes/classic.json
|
%{_datadir}/gnome-shell/modes/classic.json
|
||||||
%dir %{_datadir}/gnome-shell/theme/
|
%dir %{_datadir}/gnome-shell/theme/
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
--- gnome-shell-extensions-3.32.0.orig/extensions/apps-menu/extension.js 2019-03-20 16:13:13.614381612 +0800
|
|
||||||
+++ gnome-shell-extensions-3.32.0/extensions/apps-menu/extension.js 2019-03-20 16:07:47.238041280 +0800
|
|
||||||
@@ -27,6 +27,10 @@
|
|
||||||
Gio._promisify(Gio._LocalFilePrototype, 'query_info_async', 'query_info_finish');
|
|
||||||
Gio._promisify(Gio._LocalFilePrototype, 'set_attributes_async', 'set_attributes_finish');
|
|
||||||
|
|
||||||
+function isSLEClassicMode() {
|
|
||||||
+ return Main.sessionMode.currentMode == "sle-classic" ? true : false;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
class ActivitiesMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|
||||||
constructor(button) {
|
|
||||||
super();
|
|
||||||
@@ -775,8 +779,6 @@
|
|
||||||
this.applicationsByCategory = {};
|
|
||||||
this._tree.load_sync();
|
|
||||||
let root = this._tree.get_root_directory();
|
|
||||||
- let categoryMenuItem = new CategoryMenuItem(this, null);
|
|
||||||
- this.categoriesBox.add_actor(categoryMenuItem.actor);
|
|
||||||
let iter = root.iter();
|
|
||||||
let nextType;
|
|
||||||
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
|
|
||||||
@@ -796,6 +798,10 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ let categoryMenuItem = new CategoryMenuItem(this, null);
|
|
||||||
+ this.categoriesBox.insert_child_at_index(categoryMenuItem.actor,
|
|
||||||
+ isSLEClassicMode() ? -1 : 0);
|
|
||||||
+
|
|
||||||
//Load applications
|
|
||||||
this._displayButtons(this._listApplications(null));
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
|||||||
From 13372e7e121209aa329b9784432dff8673b01d3f Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
||||||
Date: Thu, 27 Jun 2019 01:57:53 +0000
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
(cherry picked from commit dfeb99fc0a37051c33980b97a86c16f2ccdfa2bc)
|
|
||||||
---
|
|
||||||
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 d7ba570..c657a7e 100644
|
|
||||||
--- a/extensions/apps-menu/extension.js
|
|
||||||
+++ b/extensions/apps-menu/extension.js
|
|
||||||
@@ -459,6 +459,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,515 +1,226 @@
|
|||||||
diff --git a/extensions/window-list/classic.css b/extensions/window-list/classic.css
|
Index: gnome-shell-extensions-3.34.0/extensions/window-list/extension.js
|
||||||
index f3c44a3..8096d27 100644
|
===================================================================
|
||||||
--- a/extensions/window-list/classic.css
|
--- gnome-shell-extensions-3.34.0.orig/extensions/window-list/extension.js
|
||||||
+++ b/extensions/window-list/classic.css
|
+++ gnome-shell-extensions-3.34.0/extensions/window-list/extension.js
|
||||||
@@ -6,7 +6,7 @@
|
@@ -23,6 +23,9 @@ const GroupingMode = {
|
||||||
height: 2.25em ;
|
ALWAYS: 2,
|
||||||
}
|
|
||||||
|
|
||||||
- .bottom-panel .window-button > StWidget {
|
|
||||||
+ .window-button > StWidget {
|
|
||||||
background-gradient-drection: vertical;
|
|
||||||
background-color: #fff;
|
|
||||||
background-gradient-start: #fff;
|
|
||||||
@@ -22,25 +22,25 @@
|
|
||||||
text-shadow: 0 0 transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
- .bottom-panel .window-button:hover > StWidget {
|
|
||||||
+ .window-button:hover > StWidget {
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
}
|
|
||||||
|
|
||||||
- .bottom-panel .window-button:active > StWidget,
|
|
||||||
- .bottom-panel .window-button:focus > StWidget {
|
|
||||||
+ .window-button:active > StWidget,
|
|
||||||
+ .window-button:focus > StWidget {
|
|
||||||
box-shadow: inset 1px 1px 2px rgba(0,0,0,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
- .bottom-panel .window-button.focused > StWidget {
|
|
||||||
+ .window-button.focused > StWidget {
|
|
||||||
background-color: #ddd;
|
|
||||||
box-shadow: inset 1px 1px 1px rgba(0,0,0,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
- .bottom-panel .window-button.focused:hover > StWidget {
|
|
||||||
+ .window-button.focused:hover > StWidget {
|
|
||||||
background-color: #e9e9e9;
|
|
||||||
}
|
|
||||||
|
|
||||||
- .bottom-panel .window-button.minimized > StWidget {
|
|
||||||
+ .window-button.minimized > StWidget {
|
|
||||||
color: #888;
|
|
||||||
box-shadow: inset -1px -1px 1px rgba(0,0,0,0.5);
|
|
||||||
}
|
|
||||||
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
|
|
||||||
index e1ea742..9764745 100644
|
|
||||||
--- a/extensions/window-list/extension.js
|
|
||||||
+++ b/extensions/window-list/extension.js
|
|
||||||
@@ -21,6 +21,398 @@ const GroupingMode = {
|
|
||||||
ALWAYS: 2
|
|
||||||
};
|
};
|
||||||
|
|
||||||
+function isSLEClassicMode() {
|
+function isSLEClassicMode() {
|
||||||
+ return Main.sessionMode.currentMode == "sle-classic" ? true : false;
|
+ return Main.sessionMode.currentMode == "sle-classic" ? true : false;
|
||||||
+}
|
+}
|
||||||
+
|
|
||||||
+// NOTE: call `initializeWindowList` explicitly to finish initialization.
|
|
||||||
+class PureWinList {
|
|
||||||
+ constructor(perMonitor, monitor, maxWidthFunc) {
|
|
||||||
+ // NOTE: in SLE Classic `PureWinList` will NOT use any multiple monitor
|
|
||||||
+ // support, the following is kept for use in GNOME Classic as we try to
|
|
||||||
+ // unify code for two sides.
|
|
||||||
+ this._perMonitor = perMonitor;
|
|
||||||
+ this._monitor = monitor;
|
|
||||||
+ // NOTE: callback function given by the employer of this PureWinList.
|
|
||||||
+ // Since PureWinList can be used various widgets hierarchy, we have to
|
|
||||||
+ // leave the calculation of max available width to the employer.
|
|
||||||
+ this._getMaxWindowListWidth = maxWidthFunc;
|
|
||||||
+
|
|
||||||
+ let layout = new Clutter.BoxLayout({ homogeneous: true });
|
|
||||||
+ this.actor = new St.Widget({ style_class: 'window-list',
|
|
||||||
+ reactive: true,
|
|
||||||
+ layout_manager: layout,
|
|
||||||
+ x_align: Clutter.ActorAlign.START,
|
|
||||||
+ x_expand: true,
|
|
||||||
+ y_expand: true });
|
|
||||||
+
|
|
||||||
+ this.actor.connect('style-changed', () => {
|
|
||||||
+ let node = this.actor.get_theme_node();
|
|
||||||
+ let spacing = node.get_length('spacing');
|
|
||||||
+ this.actor.layout_manager.spacing = spacing;
|
|
||||||
+ });
|
|
||||||
+ this.actor.connect('scroll-event', this._onScrollEvent.bind(this));
|
|
||||||
+ this.actor.connect('destroy', this._onDestroy.bind(this));
|
|
||||||
+
|
|
||||||
+ this._appSystem = Shell.AppSystem.get_default();
|
|
||||||
+ this._appStateChangedId =
|
|
||||||
+ this._appSystem.connect('app-state-changed',
|
|
||||||
+ this._onAppStateChanged.bind(this));
|
|
||||||
+
|
|
||||||
+ this._settings = ExtensionUtils.getSettings();
|
|
||||||
+
|
|
||||||
+ // Grouping
|
|
||||||
+ this._groupingModeChangedId =
|
|
||||||
+ this._settings.connect('changed::grouping-mode',
|
|
||||||
+ this._groupingModeChanged.bind(this));
|
|
||||||
+ this._grouped = undefined;
|
|
||||||
+ // NOTE: do NOT `_checkGrouping` here
|
|
||||||
+
|
|
||||||
+ let workspaceManager = global.workspace_manager;
|
|
||||||
+
|
|
||||||
+ // workspace related
|
|
||||||
+ this._workspaceSignals = new Map();
|
|
||||||
+ this._nWorkspacesChangedId =
|
|
||||||
+ workspaceManager.connect('notify::n-workspaces',
|
|
||||||
+ this._onWorkspacesChanged.bind(this));
|
|
||||||
+ this._onWorkspacesChanged();
|
|
||||||
+
|
|
||||||
+ this._switchWorkspaceId =
|
|
||||||
+ global.window_manager.connect('switch-workspace',
|
|
||||||
+ this._checkGrouping.bind(this));
|
|
||||||
+
|
|
||||||
+ // Hide and Show with Overview
|
|
||||||
+ this._overviewShowingId =
|
|
||||||
+ Main.overview.connect('showing', () => {
|
|
||||||
+ this.actor.hide();
|
|
||||||
+ });
|
|
||||||
+
|
|
||||||
+ this._overviewHidingId =
|
|
||||||
+ Main.overview.connect('hiding', () => {
|
|
||||||
+ this.actor.show();
|
|
||||||
+ });
|
|
||||||
+
|
|
||||||
+ this._groupingMode = this._settings.get_enum('grouping-mode');
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _getDynamicWorkspacesSettings() {
|
|
||||||
+ if (this._workspaceSettings.list_keys().indexOf('dynamic-workspaces') > -1)
|
|
||||||
+ return this._workspaceSettings;
|
|
||||||
+ return this._mutterSettings;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // NOTE: an API for parent panel to refresh the window list. This is
|
|
||||||
+ // necessary as window/app buttons require its parents having allocation and
|
|
||||||
+ // positioning *completed* before being properly allocated and positioned
|
|
||||||
+ initializeWindowList() {
|
|
||||||
+ this._groupingModeChanged();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // NOTE: support scrolling in window list s.t. scrolling activate window
|
|
||||||
+ // buttons sequentially.
|
|
||||||
+ //
|
|
||||||
+ // *Code is rewritten*.
|
|
||||||
+ _onScrollEvent(actor, event) {
|
|
||||||
+ let direction = event.get_scroll_direction();
|
|
||||||
+ let diff = 0;
|
|
||||||
+ if (direction === Clutter.ScrollDirection.DOWN)
|
|
||||||
+ diff = 1;
|
|
||||||
+ else if (direction === Clutter.ScrollDirection.UP)
|
|
||||||
+ diff = -1;
|
|
||||||
+ else
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ let buttons = this.actor.get_children().map(function(actor) {
|
|
||||||
+ return actor._delegate;
|
|
||||||
+ });
|
|
||||||
+ let totalBtnNum = buttons.length;
|
|
||||||
+
|
|
||||||
+ let activeBtnIdx = 0
|
|
||||||
+ for (let i = 0; i < totalBtnNum; i++) {
|
|
||||||
+ if (buttons[i].active) {
|
|
||||||
+ activeBtnIdx = i
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // NOTE: bound by `0` and `totalBtnNum - 1`, no wrapping for
|
|
||||||
+ // scrolling.
|
|
||||||
+ activeBtnIdx = activeBtnIdx + diff;
|
|
||||||
+ let noScrollActionNeeded = ( (activeBtnIdx < 0) || (activeBtnIdx >= totalBtnNum) );
|
|
||||||
+ if (noScrollActionNeeded)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ // TODO: no need to call `deactivate` for old `active button` ?
|
|
||||||
+ buttons[activeBtnIdx].activate();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _onAppStateChanged(appSys, app) {
|
|
||||||
+ if (!this._grouped)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ if (app.state == Shell.AppState.RUNNING)
|
|
||||||
+ this._addApp(app);
|
|
||||||
+ else if (app.state == Shell.AppState.STOPPED)
|
|
||||||
+ this._removeApp(app);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _addApp(app) {
|
|
||||||
+ let button = new AppButton(app, this._perMonitor, this._monitor.index);
|
|
||||||
+ this.actor.layout_manager.pack(button.actor,
|
|
||||||
+ true, true, true,
|
|
||||||
+ Clutter.BoxAlignment.START,
|
|
||||||
+ Clutter.BoxAlignment.START)
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _removeApp(app) {
|
|
||||||
+ let children = this.actor.get_children();
|
|
||||||
+ for (let i = 0; i < children.length; i++) {
|
|
||||||
+ if (children[i]._delegate.app === app) {
|
|
||||||
+ children[i].destroy();
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _groupingModeChanged() {
|
|
||||||
+ this._groupingMode = this._settings.get_enum('grouping-mode');
|
|
||||||
+
|
|
||||||
+ if (this._groupingMode == GroupingMode.AUTO) {
|
|
||||||
+ this._checkGrouping();
|
|
||||||
+ } else {
|
|
||||||
+ this._grouped = ( this._groupingMode === GroupingMode.ALWAYS );
|
|
||||||
+ this._populateWindowList();
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _checkGrouping() {
|
|
||||||
+ if (this._groupingMode != GroupingMode.AUTO)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ // TODO `_getMaxWindowListWidth` is known to depend on parent
|
|
||||||
+ // conditions. However the following call seems to get the right parent
|
|
||||||
+ // value. So an option to avoid timing issue is to use the following
|
|
||||||
+ // callback.
|
|
||||||
+ //
|
|
||||||
+ // this.actor.connect('allocation-changed', () => {
|
|
||||||
+ // log('parent width: ' + this.actor.get_parent().width);
|
|
||||||
+ // });
|
|
||||||
+ //
|
|
||||||
+ // The legitimacy can be explained in the (guessed) algorithm of
|
|
||||||
+ // allocation: Bubble up then propagate down (like DOM Events?). In
|
|
||||||
+ // details: changes that would alter the geometric properties of a
|
|
||||||
+ // widget would trigger a re-allocation to its parent AFTER some initial
|
|
||||||
+ // allocation calculation of its own (for queries like
|
|
||||||
+ // `_get_preferred_width` work for its parents). The `re-allocation`
|
|
||||||
+ // would bubble up the widget hierarchy till one widget stops it (e.g. a
|
|
||||||
+ // widget that has fixed size and absolute positioning and thus it does
|
|
||||||
+ // not need to send re-allocation request up.). Then the re-allocation
|
|
||||||
+ // signal is sent down to its origin. (downward propagation is necessary
|
|
||||||
+ // as much of the positioning and allocation depends on one's parent)
|
|
||||||
+ let maxWidth = this._getMaxWindowListWidth();
|
|
||||||
+ let natWidth = this._getPreferredUngroupedWindowListWidth();
|
|
||||||
+
|
|
||||||
+ let grouped = (maxWidth < natWidth);
|
|
||||||
+ if (this._grouped !== grouped) {
|
|
||||||
+ this._grouped = grouped;
|
|
||||||
+ this._populateWindowList();
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _populateWindowList() {
|
|
||||||
+ this.actor.destroy_all_children();
|
|
||||||
+
|
|
||||||
+ if (!this._grouped) {
|
|
||||||
+ let windows = global.get_window_actors().sort(
|
|
||||||
+ function(w1, w2) {
|
|
||||||
+ return w1.metaWindow.get_stable_sequence() -
|
|
||||||
+ w2.metaWindow.get_stable_sequence();
|
|
||||||
+ });
|
|
||||||
+ for (let i = 0; i < windows.length; i++)
|
|
||||||
+ this._onWindowAdded(null, windows[i].metaWindow);
|
|
||||||
+ } else {
|
|
||||||
+ let apps = this._appSystem.get_running().sort(
|
|
||||||
+ function(a1, a2) {
|
|
||||||
+ return _getAppStableSequence(a1) -
|
|
||||||
+ _getAppStableSequence(a2);
|
|
||||||
+ });
|
|
||||||
+ for (let i = 0; i < apps.length; i++)
|
|
||||||
+ this._addApp(apps[i]);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // NOTE the `ws` params in the following two are not used (necessarily be
|
|
||||||
+ // here as the event handler Interface dictates).
|
|
||||||
+ _onWindowAdded(ws, win) {
|
|
||||||
+ if (win.skip_taskbar)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ if (!this._grouped)
|
|
||||||
+ this._checkGrouping();
|
|
||||||
+
|
|
||||||
+ if (this._grouped)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ let children = this.actor.get_children();
|
|
||||||
+ for (let i = 0; i < children.length; i++) {
|
|
||||||
+ if (children[i]._delegate.metaWindow == win)
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ let button = new WindowButton(win, this._perMonitor, this._monitor.index);
|
|
||||||
+ this.actor.layout_manager.pack(button.actor,
|
|
||||||
+ true, true, true,
|
|
||||||
+ Clutter.BoxAlignment.START,
|
|
||||||
+ Clutter.BoxAlignment.START);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _onWindowRemoved(ws, win) {
|
|
||||||
+ if (this._grouped)
|
|
||||||
+ this._checkGrouping();
|
|
||||||
+
|
|
||||||
+ // NOTE: if it's still grouped after `checking`, do nothing, window
|
|
||||||
+ // removal is managed by `AppButton` anyway.
|
|
||||||
+ if (this._grouped)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ if (win.get_compositor_private())
|
|
||||||
+ return; // not actually removed, just moved to another workspace
|
|
||||||
+
|
|
||||||
+ let children = this.actor.get_children();
|
|
||||||
+ for (let i = 0; i < children.length; i++) {
|
|
||||||
+ if (children[i]._delegate.metaWindow == win) {
|
|
||||||
+ children[i].destroy();
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _getPreferredUngroupedWindowListWidth() {
|
|
||||||
+ if (this.actor.get_n_children() == 0)
|
|
||||||
+ return this.actor.get_preferred_width(-1)[1];
|
|
||||||
+
|
|
||||||
+ let children = this.actor.get_children();
|
|
||||||
+ let [, childWidth] = children[0].get_preferred_width(-1);
|
|
||||||
+ let spacing = this.actor.layout_manager.spacing;
|
|
||||||
+
|
|
||||||
+ let workspace = global.workspace_manager.get_active_workspace();
|
|
||||||
+ let windows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
|
|
||||||
+ if (this._perMonitor)
|
|
||||||
+ windows = windows.filter(w => w.get_monitor() == this._monitor.index);
|
|
||||||
+ let nWindows = windows.length;
|
|
||||||
+ if (nWindows == 0)
|
|
||||||
+ return this.actor.get_preferred_width(-1)[1];
|
|
||||||
+
|
|
||||||
+ return nWindows * childWidth + (nWindows - 1) * spacing;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _onWorkspacesChanged() {
|
|
||||||
+ let workspaceManager = global.workspace_manager;
|
|
||||||
+ let numWorkspaces = workspaceManager.n_workspaces;
|
|
||||||
+ for (let i = 0; i < numWorkspaces; i++) {
|
|
||||||
+ let workspace = workspaceManager.get_workspace_by_index(i);
|
|
||||||
+ if (this._workspaceSignals.has(workspace))
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ let signals = { windowAddedId: 0, windowRemovedId: 0 };
|
|
||||||
+ signals._windowAddedId =
|
|
||||||
+ workspace.connect_after('window-added',
|
|
||||||
+ this._onWindowAdded.bind(this));
|
|
||||||
+ signals._windowRemovedId =
|
|
||||||
+ workspace.connect('window-removed',
|
|
||||||
+ this._onWindowRemoved.bind(this));
|
|
||||||
+ this._workspaceSignals.set(workspace, signals);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _disconnectWorkspaceSignals() {
|
|
||||||
+ let numWorkspaces = global.workspace_manager.n_workspaces;
|
|
||||||
+ for (let i = 0; i < numWorkspaces; i++) {
|
|
||||||
+ let workspace = global.workspace_manager.get_workspace_by_index(i);
|
|
||||||
+ let signals = this._workspaceSignals.get(workspace);
|
|
||||||
+ this._workspaceSignals.delete(workspace);
|
|
||||||
+ workspace.disconnect(signals._windowAddedId);
|
|
||||||
+ workspace.disconnect(signals._windowRemovedId);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ _onDestroy() {
|
|
||||||
+ Main.overview.disconnect(this._overviewHidingId);
|
|
||||||
+ this._overviewHidingId = 0;
|
|
||||||
+ Main.overview.disconnect(this._overviewShowingId);
|
|
||||||
+ this._overviewShowingId = 0;
|
|
||||||
+
|
|
||||||
+ global.workspace_manager.disconnect(this._nWorkspacesChangedId);
|
|
||||||
+ this._nWorkspacesChangedId = 0;
|
|
||||||
+ global.window_manager.disconnect(this._switchWorkspaceId);
|
|
||||||
+ this._switchWorkspaceId = 0;
|
|
||||||
+ this._disconnectWorkspaceSignals();
|
|
||||||
+
|
|
||||||
+ this._settings.disconnect(this._groupingModeChangedId);
|
|
||||||
+ this._groupingModeChangedId = 0;
|
|
||||||
+
|
|
||||||
+ this._appSystem.disconnect(this._appStateChangedId);
|
|
||||||
+ this._appStateChangedId = 0;
|
|
||||||
+
|
|
||||||
+ let windows = global.get_window_actors();
|
|
||||||
+ for (let i = 0; i < windows.length; i++)
|
|
||||||
+ windows[i].metaWindow.set_icon_geometry(null);
|
|
||||||
+ }
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+class SCExtension {
|
|
||||||
+ constructor() {
|
|
||||||
+ this._pureWinList = null;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ enable() {
|
|
||||||
+ // NOTE For SLE Classic, a window list is shown on Main panel ONLY
|
|
||||||
+ let showOnAllMonitors = false;
|
|
||||||
+ // NOTE Use a guessed value passed to `PureWinList` as `checkGrouping`
|
|
||||||
+ // is run at a time the allocation of the panel boxes might not complete
|
|
||||||
+ // yet (and thus we get almost random width value). The other options
|
|
||||||
+ // are to duplicate the centerbox width calculation or change the order
|
|
||||||
+ // of grouping check code (way more complicated).
|
|
||||||
+ //
|
|
||||||
+ // This value is guessed *conservatively*. Further this value is used by
|
|
||||||
+ // AUTO grouping only.
|
|
||||||
+ //
|
|
||||||
+ // NOTE: no Promise is available
|
|
||||||
+ let panelCenterBoxWidth = Main.panel.actor.width * 0.8;
|
|
||||||
+
|
|
||||||
+ this._pureWinList = new PureWinList(showOnAllMonitors,
|
|
||||||
+ Main.layoutManager.primaryMonitor,
|
|
||||||
+ () => panelCenterBoxWidth );
|
|
||||||
+ Main.panel._centerBox.add(this._pureWinList.actor, {expand: true});
|
|
||||||
+ let _winListRefreshId = Main.panel._centerBox.connect(
|
|
||||||
+ 'allocation-changed',
|
|
||||||
+ () => {
|
|
||||||
+ if (this._pureWinList == null)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ this._pureWinList.initializeWindowList();
|
|
||||||
+ Main.panel._centerBox.disconnect(_winListRefreshId);
|
|
||||||
+ });
|
|
||||||
+ // NOTE: IMO, no need to rebuild `_pureWinList` when monitors changed.
|
|
||||||
+ // No need for `showOnAllMonitors` change either even this option
|
|
||||||
+ // changes.
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ disable() {
|
|
||||||
+ if (!this._pureWinList)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ this._pureWinList.actor.hide();
|
|
||||||
+ this._pureWinList.actor.destroy();
|
|
||||||
+
|
|
||||||
+ this._pureWinList = null;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // NOTE: this function is used for multiple window list situations, invalid for SCExtension case, let's return false.
|
|
||||||
+ someWindowListContains(actor) {
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+};
|
|
||||||
|
|
||||||
function _minimizeOrActivateWindow(window) {
|
function _minimizeOrActivateWindow(window) {
|
||||||
let focusWindow = global.display.focus_window;
|
let focusWindow = global.display.focus_window;
|
||||||
@@ -644,8 +1036,8 @@ class AppButton extends BaseButton {
|
@@ -1141,19 +1144,45 @@ class Extension {
|
||||||
}
|
this._hideOverviewOrig.call(Main.overview);
|
||||||
|
};
|
||||||
|
|
||||||
|
+ if (isSLEClassicMode()) {
|
||||||
-let WorkspaceIndicator = GObject.registerClass(
|
+ this.overviewShowingId = Main.overview.connect('showing', () => {
|
||||||
-class WorkspaceIndicator extends PanelMenu.Button {
|
+ Main.panel._centerBox.hide(); });
|
||||||
+let WorkspaceIndicatorWList = GObject.registerClass(
|
+ this.overviewHidingId = Main.overview.connect('hiding', () => {
|
||||||
+class WorkspaceIndicatorWList extends PanelMenu.Button {
|
+ Main.panel._centerBox.show(); });
|
||||||
_init() {
|
|
||||||
super._init(0.0, _('Workspace Indicator'), true);
|
|
||||||
this.setMenu(new PopupMenu.PopupMenu(this, 0.0, St.Side.BOTTOM));
|
|
||||||
@@ -808,7 +1200,7 @@ class WindowList {
|
|
||||||
let indicatorsBox = new St.BoxLayout({ x_align: Clutter.ActorAlign.END });
|
|
||||||
box.add(indicatorsBox);
|
|
||||||
|
|
||||||
- this._workspaceIndicator = new WorkspaceIndicator();
|
|
||||||
+ this._workspaceIndicator = new WorkspaceIndicatorWList();
|
|
||||||
indicatorsBox.add(this._workspaceIndicator.container, { expand: false, y_fill: true });
|
|
||||||
|
|
||||||
this._mutterSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
|
|
||||||
@@ -1259,5 +1651,10 @@ class Extension {
|
|
||||||
}
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
- return new Extension();
|
|
||||||
+ if ( isSLEClassicMode() ){
|
|
||||||
+ return new SCExtension();
|
|
||||||
+ }
|
+ }
|
||||||
+ else {
|
+
|
||||||
+ return new Extension();
|
this._buildWindowLists();
|
||||||
|
}
|
||||||
|
|
||||||
|
_buildWindowLists() {
|
||||||
|
- this._windowLists.forEach(list => list.destroy());
|
||||||
|
+ this._windowLists.forEach(list => {
|
||||||
|
+ if (isSLEClassicMode()) {
|
||||||
|
+ Main.panel._centerBox.remove_child(list._windowList);
|
||||||
|
+ let [box] = list.get_children();
|
||||||
|
+ box.add_child(list._windowList);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ list.destroy();
|
||||||
|
+ });
|
||||||
|
this._windowLists = [];
|
||||||
|
|
||||||
|
let showOnAllMonitors = this._settings.get_boolean('show-on-all-monitors');
|
||||||
|
|
||||||
|
- Main.layoutManager.monitors.forEach(monitor => {
|
||||||
|
- if (showOnAllMonitors || monitor === Main.layoutManager.primaryMonitor)
|
||||||
|
+ if (isSLEClassicMode()){
|
||||||
|
+ let list = new WindowList(false, Main.layoutManager.primaryMonitor);
|
||||||
|
+ Main.layoutManager.removeChrome(list);
|
||||||
|
+
|
||||||
|
+ let [box] = list.get_children();
|
||||||
|
+ box.remove_child(list._windowList);
|
||||||
|
+ Main.panel._centerBox.add(list._windowList, {expand: true, x_align: St.Align.START});
|
||||||
|
+
|
||||||
|
+ this._windowLists.push(list);
|
||||||
|
+ } else {
|
||||||
|
+ Main.layoutManager.monitors.forEach(monitor => {
|
||||||
|
+ if (showOnAllMonitors || monitor == Main.layoutManager.primaryMonitor)
|
||||||
|
this._windowLists.push(new WindowList(showOnAllMonitors, monitor));
|
||||||
|
- });
|
||||||
|
+ });
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/extensions/window-list/stylesheet.css b/extensions/window-list/stylesheet.css
|
|
||||||
index f5285cb..c207078 100644
|
disable() {
|
||||||
--- a/extensions/window-list/stylesheet.css
|
@@ -1167,6 +1196,7 @@ class Extension {
|
||||||
+++ b/extensions/window-list/stylesheet.css
|
this._monitorsChangedId = 0;
|
||||||
@@ -79,6 +79,10 @@
|
|
||||||
border: 1px solid #cccccc;
|
this._windowLists.forEach(windowList => {
|
||||||
|
+ Main.panel._centerBox.remove_child(windowList._windowList);
|
||||||
|
windowList.hide();
|
||||||
|
windowList.destroy();
|
||||||
|
});
|
||||||
|
@@ -1175,6 +1205,11 @@ class Extension {
|
||||||
|
Main.windowPicker.destroy();
|
||||||
|
delete Main.windowPicker;
|
||||||
|
|
||||||
|
+ if (isSLEClassicMode()) {
|
||||||
|
+ Main.overview.disconnect(this.overviewShowingId);
|
||||||
|
+ Main.overview.disconnect(this.overviewHidingId);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
Main.overview.hide = this._hideOverviewOrig;
|
||||||
}
|
}
|
||||||
|
|
||||||
+.bottom-panel-menu {
|
Index: gnome-shell-extensions-3.34.0/extensions/window-list/sle-classic.css
|
||||||
+ -boxpointer-gap: 4px;
|
===================================================================
|
||||||
|
--- /dev/null
|
||||||
|
+++ gnome-shell-extensions-3.34.0/extensions/window-list/sle-classic.css
|
||||||
|
@@ -0,0 +1,46 @@
|
||||||
|
+@import url("stylesheet.css");
|
||||||
|
+
|
||||||
|
+#panel.bottom-panel {
|
||||||
|
+ border-top-width: 1px;
|
||||||
|
+ border-bottom-width: 0px;
|
||||||
|
+ height: 2.25em ;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ .window-button > StWidget {
|
||||||
|
+ background-gradient-drection: vertical;
|
||||||
|
+ background-color: #fff;
|
||||||
|
+ background-gradient-start: #fff;
|
||||||
|
+ background-gradient-end: #eee;
|
||||||
|
+ color: #000;
|
||||||
|
+ -st-natural-width: 18.7em;
|
||||||
|
+ max-width: 18.75em;
|
||||||
|
+ color: #2e3436;
|
||||||
|
+ background-color: #eee;
|
||||||
|
+ border-radius: 2px;
|
||||||
|
+ padding: 0px 6px 0px;
|
||||||
|
+ box-shadow: inset -1px -1px 1px rgba(0,0,0,0.5);
|
||||||
|
+ text-shadow: 0 0 transparent;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ .window-button:hover > StWidget {
|
||||||
|
+ background-color: #f9f9f9;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ .window-button:active > StWidget,
|
||||||
|
+ .window-button:focus > StWidget {
|
||||||
|
+ box-shadow: inset 1px 1px 2px rgba(0,0,0,0.5);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ .window-button.focused > StWidget {
|
||||||
|
+ background-color: #ddd;
|
||||||
|
+ box-shadow: inset 1px 1px 1px rgba(0,0,0,0.5);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ .window-button.focused:hover > StWidget {
|
||||||
|
+ background-color: #e9e9e9;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ .window-button.minimized > StWidget {
|
||||||
|
+ color: #888;
|
||||||
|
+ box-shadow: inset -1px -1px 1px rgba(0,0,0,0.5);
|
||||||
|
+ }
|
||||||
|
Index: gnome-shell-extensions-3.34.0/extensions/places-menu/extension.js
|
||||||
|
===================================================================
|
||||||
|
--- gnome-shell-extensions-3.34.0.orig/extensions/places-menu/extension.js
|
||||||
|
+++ gnome-shell-extensions-3.34.0/extensions/places-menu/extension.js
|
||||||
|
@@ -133,13 +133,21 @@ function init() {
|
||||||
|
|
||||||
|
let _indicator;
|
||||||
|
|
||||||
|
+function isSLEClassicMode() {
|
||||||
|
+ return Main.sessionMode.currentMode == "sle-classic" ? true : false;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
.notification {
|
function enable() {
|
||||||
font-weight: normal;
|
_indicator = new PlacesMenu();
|
||||||
}
|
|
||||||
diff --git a/data/gnome-classic.scss b/data/gnome-classic.scss
|
let pos = Main.sessionMode.panel.left.indexOf('appMenu');
|
||||||
index 9e23506..be56527 100644
|
if ('apps-menu' in Main.panel.statusArea)
|
||||||
--- a/data/gnome-classic.scss
|
pos++;
|
||||||
+++ b/data/gnome-classic.scss
|
- Main.panel.addToStatusArea('places-menu', _indicator, pos, 'left');
|
||||||
@@ -103,3 +103,15 @@ $variant: 'light';
|
|
||||||
&:hover, &focus { background-color: darken($bg_color,2%); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
+
|
||||||
+.popup-menu {
|
+ if (isSLEClassicMode())
|
||||||
+ &.panel-menu {
|
+ Main.panel.addToStatusArea('places-menu', _indicator, 1, 'left');
|
||||||
+ -boxpointer-gap: 4px;
|
+ else
|
||||||
+ /* TODO was 1.75em, no idea of its use */
|
+ Main.panel.addToStatusArea('places-menu', _indicator, pos, 'left');
|
||||||
+ /* NOTE: the following creates an ugly gap between menu and its source actor
|
}
|
||||||
+ when the PanelMenu's source actor is at the bottom. Preferrably for
|
|
||||||
+ bottom menu, `margin-top` might be a better choice. However, since we
|
function disable() {
|
||||||
+ have no idea about its use so reset to 0 for now. */
|
Index: gnome-shell-extensions-3.34.0/extensions/apps-menu/extension.js
|
||||||
+ margin-bottom: 0em;
|
===================================================================
|
||||||
+ }
|
--- gnome-shell-extensions-3.34.0.orig/extensions/apps-menu/extension.js
|
||||||
|
+++ gnome-shell-extensions-3.34.0/extensions/apps-menu/extension.js
|
||||||
|
@@ -27,6 +27,10 @@ const NAVIGATION_REGION_OVERSHOOT = 50;
|
||||||
|
Gio._promisify(Gio._LocalFilePrototype, 'query_info_async', 'query_info_finish');
|
||||||
|
Gio._promisify(Gio._LocalFilePrototype, 'set_attributes_async', 'set_attributes_finish');
|
||||||
|
|
||||||
|
+function isSLEClassicMode() {
|
||||||
|
+ return Main.sessionMode.currentMode == "sle-classic" ? true : false;
|
||||||
+}
|
+}
|
||||||
|
+
|
||||||
|
var ApplicationMenuItem = GObject.registerClass(
|
||||||
|
class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||||
|
_init(button, app) {
|
||||||
|
@@ -728,8 +732,6 @@ class ApplicationsButton extends PanelMe
|
||||||
|
this.applicationsByCategory = {};
|
||||||
|
this._tree.load_sync();
|
||||||
|
let root = this._tree.get_root_directory();
|
||||||
|
- let categoryMenuItem = new CategoryMenuItem(this, null);
|
||||||
|
- this.categoriesBox.add_actor(categoryMenuItem);
|
||||||
|
let iter = root.iter();
|
||||||
|
let nextType;
|
||||||
|
while ((nextType = iter.next()) !== GMenu.TreeItemType.INVALID) {
|
||||||
|
@@ -744,11 +746,15 @@ class ApplicationsButton extends PanelMe
|
||||||
|
this.applicationsByCategory[categoryId] = [];
|
||||||
|
this._loadCategory(categoryId, dir);
|
||||||
|
if (this.applicationsByCategory[categoryId].length > 0) {
|
||||||
|
- categoryMenuItem = new CategoryMenuItem(this, dir);
|
||||||
|
+ let categoryMenuItem = new CategoryMenuItem(this, dir);
|
||||||
|
this.categoriesBox.add_actor(categoryMenuItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+ //put the favorites at the end of the app catogories
|
||||||
|
+ //bnc#890989
|
||||||
|
+ let categoryMenuItem = new CategoryMenuItem(this, null);
|
||||||
|
+ this.categoriesBox.insert_child_at_index(categoryMenuItem,
|
||||||
|
+ isSLEClassicMode() ? -1 : 0);
|
||||||
|
// Load applications
|
||||||
|
this._displayButtons(this._listApplications(null));
|
||||||
|
|
||||||
|
@@ -811,7 +817,10 @@ let appsMenuButton;
|
||||||
|
function enable() {
|
||||||
|
appsMenuButton = new ApplicationsButton();
|
||||||
|
let index = Main.sessionMode.panel.left.indexOf('activities') + 1;
|
||||||
|
- Main.panel.addToStatusArea('apps-menu', appsMenuButton, index, 'left');
|
||||||
|
+ if (isSLEClassicMode())
|
||||||
|
+ Main.panel.addToStatusArea('apps-menu', appsMenuButton, 0, 'left');
|
||||||
|
+ else
|
||||||
|
+ Main.panel.addToStatusArea('apps-menu', appsMenuButton, index, 'left');
|
||||||
|
}
|
||||||
|
|
||||||
|
function disable() {
|
||||||
|
Index: gnome-shell-extensions-3.34.0/data/gnome-classic.scss
|
||||||
|
===================================================================
|
||||||
|
--- gnome-shell-extensions-3.34.0.orig/data/gnome-classic.scss
|
||||||
|
+++ gnome-shell-extensions-3.34.0/data/gnome-classic.scss
|
||||||
|
@@ -93,3 +93,5 @@ $variant: 'light';
|
||||||
|
background-image: url("calendar-today.svg");
|
||||||
|
}
|
||||||
|
|
||||||
|
+.popup-menu.panel-menu {
|
||||||
|
+ margin-bottom: 0em; }
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
Index: gnome-shell-extensions-3.26.0/data/gnome-classic.css
|
Index: gnome-shell-extensions-3.33.91/data/gnome-shell-sass/_common.scss
|
||||||
===================================================================
|
===================================================================
|
||||||
--- gnome-shell-extensions-3.26.0.orig/data/gnome-classic.css
|
--- gnome-shell-extensions-3.33.91.orig/data/gnome-shell-sass/_common.scss
|
||||||
+++ gnome-shell-extensions-3.26.0/data/gnome-classic.css
|
+++ gnome-shell-extensions-3.33.91/data/gnome-shell-sass/_common.scss
|
||||||
@@ -1602,7 +1602,8 @@ StScrollBar {
|
@@ -1916,6 +1916,7 @@ StScrollBar {
|
||||||
|
//reset
|
||||||
.login-dialog {
|
|
||||||
border: none;
|
border: none;
|
||||||
- background-color: transparent; }
|
background-color: transparent;
|
||||||
+ background-color: transparent;
|
+ background: #2e3436 url(sle-background.png);
|
||||||
+ background: #2e3436 url(sle-background.png); }
|
|
||||||
.login-dialog .modal-dialog-button-box {
|
$_gdm_fg: #f6f5f4;
|
||||||
spacing: 3px; }
|
$_gdm_bg: lighten(#2e3436, 19%);
|
||||||
.login-dialog .modal-dialog-button {
|
|
||||||
|
@ -8,10 +8,11 @@
|
|||||||
"launch-new-instance@gnome-shell-extensions.gcampax.github.com",
|
"launch-new-instance@gnome-shell-extensions.gcampax.github.com",
|
||||||
"window-list@gnome-shell-extensions.gcampax.github.com",
|
"window-list@gnome-shell-extensions.gcampax.github.com",
|
||||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com",
|
"workspace-indicator@gnome-shell-extensions.gcampax.github.com",
|
||||||
|
"desktop-icons@csoriano",
|
||||||
"sle-classic@suse.com"
|
"sle-classic@suse.com"
|
||||||
],
|
],
|
||||||
"panel": {
|
"panel": {
|
||||||
"left": ["activities"],
|
"left": [],
|
||||||
"center": [],
|
"center": [],
|
||||||
"right": ["a11y", "keyboard", "dateMenu", "aggregateMenu"]
|
"right": ["a11y", "keyboard", "dateMenu", "aggregateMenu"]
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:054dd31d07c0870e93e1ba0f7d0e9933c85f3bd2632009934dc847a217238d7b
|
oid sha256:b0f1f6b94ceb6671ec8ae1a23c0b40bdb0aaed07b59be5e618f7d8276385f1c2
|
||||||
size 4515
|
size 4533
|
||||||
|
Loading…
Reference in New Issue
Block a user