Browse Source

gnome-shell-extensions package update

Signed-off-by: guibuilder_pel7x64builder0 <guibuilder@powerel.org>
master
guibuilder_pel7x64builder0 6 years ago
parent
commit
9e158e4e3c
  1. 111
      SOURCES/0001-Include-top-icons-in-classic-session.patch
  2. 22
      SOURCES/0001-Revert-data-Remove-nautilus-classic.patch
  3. 89
      SOURCES/0001-Update-style.patch
  4. 130
      SOURCES/0001-apps-menu-Explicitly-set-label_actor.patch
  5. 34
      SOURCES/0001-classic-Shade-panel-in-overview.patch
  6. 162
      SOURCES/0001-data-drop-app-icon-styling.patch
  7. 10511
      SOURCES/add-extra-extensions.patch
  8. 518
      SOURCES/resurrect-system-monitor.patch
  9. 66
      SPECS/gnome-shell-extensions.spec

111
SOURCES/0001-Include-top-icons-in-classic-session.patch

@ -1,28 +1,99 @@
From d5e0f26fc59216da2b2f129d4395a9da0c63e974 Mon Sep 17 00:00:00 2001 From bf91d6c08f471ab729507d1ebd4c46b336ca2cef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Fri, 23 Feb 2018 16:56:46 +0100 Date: Fri, 23 Feb 2018 16:56:46 +0100
Subject: [PATCH] Include top-icons in classic session Subject: [PATCH] Include top-icons in classic session


--- ---
configure.ac | 4 ++-- meson.build | 2 +-
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/configure.ac b/configure.ac diff --git a/meson.build b/meson.build
index ddb6422..378783f 100644 index cde2d34..7a4c0d6 100644
--- a/configure.ac --- a/meson.build
+++ b/configure.ac +++ b/meson.build
@@ -29,9 +29,9 @@ fi @@ -11,81 +11,81 @@ i18n = import('i18n')
AC_SUBST([SHELL_VERSION])
datadir = get_option('datadir')
dnl keep this in alphabetic order
-CLASSIC_EXTENSIONS="apps-menu places-menu alternate-tab launch-new-instance window-list" shelldir = join_paths(datadir, 'gnome-shell')
+CLASSIC_EXTENSIONS="apps-menu places-menu alternate-tab launch-new-instance top-icons window-list" extensiondir = join_paths(shelldir, 'extensions')
DEFAULT_EXTENSIONS="$CLASSIC_EXTENSIONS drive-menu screenshot-window-sizer windowsNavigator workspace-indicator" modedir = join_paths(shelldir, 'modes')
-ALL_EXTENSIONS="$DEFAULT_EXTENSIONS auto-move-windows dash-to-dock example native-window-placement no-hot-corner panel-favorites systemMonitor top-icons updates-dialog user-theme" themedir = join_paths(shelldir, 'theme')
+ALL_EXTENSIONS="$DEFAULT_EXTENSIONS auto-move-windows dash-to-dock example native-window-placement no-hot-corner panel-favorites systemMonitor updates-dialog user-theme"
AC_SUBST(CLASSIC_EXTENSIONS, [$CLASSIC_EXTENSIONS]) schemadir = join_paths(datadir, 'glib-2.0', 'schemas')
AC_SUBST(ALL_EXTENSIONS, [$ALL_EXTENSIONS]) sessiondir = join_paths(datadir, 'gnome-session', 'sessions')
AC_ARG_ENABLE([extensions], xsessiondir = join_paths(datadir, 'xsessions')
extensionlib = files('lib/convenience.js')
js52 = find_program('js52', required: false)
ver_arr = meson.project_version().split('.')
if ver_arr[1].to_int().is_even()
shell_version = '@0@.@1@'.format(ver_arr[0], ver_arr[1])
else
shell_version = '.'.join(ver_arr)
endif
uuid_suffix = '@gnome-shell-extensions.gcampax.github.com'
classic_extensions = [
'alternate-tab',
'apps-menu',
'places-menu',
'launch-new-instance',
+ 'top-icons',
'window-list'
]
default_extensions = classic_extensions
default_extensions += [
'drive-menu',
'screenshot-window-sizer',
'windowsNavigator',
'workspace-indicator'
]
all_extensions = default_extensions
all_extensions += [
'auto-move-windows',
'dash-to-dock',
'example',
'native-window-placement',
'no-hot-corner',
'panel-favorites',
'systemMonitor',
- 'top-icons',
'updates-dialog',
'user-theme'
]
enabled_extensions = get_option('enable_extensions')
if enabled_extensions.length() == 0
set = get_option('extension_set')
if set == 'classic'
enabled_extensions += classic_extensions
elif set == 'default'
enabled_extensions += default_extensions
elif set == 'all'
enabled_extensions += all_extensions
endif
endif
classic_mode_enabled = get_option('classic_mode')
if classic_mode_enabled
# Sanity check: Make sure all classic extensions are enabled
foreach e : classic_extensions
if not enabled_extensions.contains(e)
error('Classic mode is enabled, ' +
'but the required extension @0@ is not.'.format(e))
endif
endforeach
endif
-- --
2.14.3 2.17.1



22
SOURCES/0001-Revert-data-Remove-nautilus-classic.patch

@ -0,0 +1,22 @@
From de72f146aa090957352e1bfb431e5965e20a9127 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Tue, 31 Jul 2018 14:34:22 -0400
Subject: [PATCH] Revert "data: Remove nautilus classic"

This reverts commit 0e625bedbadbf28d23cf0e0f1a53512785016789.
---
data/gnome-classic.session.desktop.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/gnome-classic.session.desktop.in b/data/gnome-classic.session.desktop.in
index f359a77..c26a887 100644
--- a/data/gnome-classic.session.desktop.in
+++ b/data/gnome-classic.session.desktop.in
@@ -1,3 +1,3 @@
[GNOME Session]
Name=GNOME Classic
-RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Clipboard;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Mouse;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;
+RequiredComponents=org.gnome.Shell;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Clipboard;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Mouse;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;nautilus-classic;
--
2.17.1

89
SOURCES/0001-Update-style.patch

@ -1,36 +1,65 @@
From 47d0b2071b07fe70537dde46dc90635e869291f4 Mon Sep 17 00:00:00 2001 From bddab939dedf770220f59394b4d4d5534063f0f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> From: rpm-build <rpm-build>
Date: Fri, 6 Oct 2017 19:41:06 +0200 Date: Mon, 11 Jun 2018 16:40:34 -0400
Subject: [PATCH] Update style Subject: [PATCH] Update style


--- ---
data/gnome-classic.css | 6 ++++++ data/gnome-shell-sass/_common.scss | 19 +++++++++++++++++--
1 file changed, 6 insertions(+) 1 file changed, 17 insertions(+), 2 deletions(-)


diff --git a/data/gnome-classic.css b/data/gnome-classic.css diff --git a/data/gnome-shell-sass/_common.scss b/data/gnome-shell-sass/_common.scss
index 086fa12..888b695 100644 index 2f05098df..de3a9cdbc 100644
--- a/data/gnome-classic.css --- a/data/gnome-shell-sass/_common.scss
+++ b/data/gnome-classic.css +++ b/data/gnome-shell-sass/_common.scss
@@ -689,6 +689,9 @@ StScrollBar { @@ -776,6 +776,11 @@ StScrollBar {
-st-icon-style: symbolic; //dimensions of the icon are hardcoded
margin-left: 4px; }
margin-right: 4px; }
+ #panel .panel-button .panel-logo-icon { + .panel-logo-icon {
+ padding-right: .4em; + padding-right: .4em;
+ icon-size: 1em; } + icon-size: 1em;
#panel .panel-button .system-status-icon, + }
#panel .panel-button .app-menu-icon > StIcon, +
#panel .panel-button .popup-menu-arrow { .system-status-icon,
@@ -1714,6 +1717,9 @@ StScrollBar { .app-menu-icon > StIcon,
padding-bottom: 12px; .popup-menu-arrow {
spacing: 8px; @@ -1397,6 +1402,14 @@ StScrollBar {
width: 23em; }
+ .login-dialog-prompt-layout .login-dialog-timed-login-indicator {
+ height: 2px;
+ background-color: #8b8b8b; }
.login-dialog-prompt-label { }
color: #bebeb6;
-- + .app-well-hover-text {
2.14.2 + text-align: center;

+ color: $osd_fg_color;
+ background-color: $osd_bg_color;
+ border-radius: 5px;
+ padding: 3px;
+ }
+
.app-well-app-running-dot { //running apps indicator
width: 10px; height: 3px;
background-color: $selected_bg_color;
@@ -1769,7 +1782,12 @@ StScrollBar {
.login-dialog-banner { color: darken($osd_fg_color,10%); }
.login-dialog-button-box { spacing: 5px; }
.login-dialog-message-warning { color: $warning_color; }
- .login-dialog-message-hint { padding-top: 0; padding-bottom: 20px; }
+ .login-dialog-message-hint, .login-dialog-message {
+ color: darken($osd_fg_color, 20%);
+ padding-top: 0;
+ padding-bottom: 20px;
+ min-height: 2.75em;
+ }
.login-dialog-user-selection-box { padding: 100px 0px; }
.login-dialog-not-listed-label {
padding-left: 2px;
@@ -1825,6 +1843,10 @@ StScrollBar {
padding-bottom: 12px;
spacing: 8px;
width: 23em;
+ .login-dialog-timed-login-indicator {
+ height: 2px;
+ background-color: darken($fg_color,40%);
+ }
}
.login-dialog-prompt-label {

130
SOURCES/0001-apps-menu-Explicitly-set-label_actor.patch

@ -1,4 +1,4 @@
From d04e66f692f5022a476c4ad8a9caeb0b5952b7b0 Mon Sep 17 00:00:00 2001 From c6d579383b1e3f092cc289291d8f701011d37a67 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Thu, 17 Mar 2016 17:15:38 +0100 Date: Thu, 17 Mar 2016 17:15:38 +0100
Subject: [PATCH] apps-menu: Explicitly set label_actor Subject: [PATCH] apps-menu: Explicitly set label_actor
@ -10,21 +10,102 @@ so set the label_actor explicitly as workaround.
1 file changed, 6 insertions(+), 2 deletions(-) 1 file changed, 6 insertions(+), 2 deletions(-)


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 41d1faf..03000bf 100644 index 5067b63..49a05c7 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
@@ -38,7 +38,9 @@ const ActivitiesMenuItem = new Lang.Class({ @@ -7,61 +7,63 @@ const Shell = imports.gi.Shell;
_init: function(button) { const St = imports.gi.St;
this.parent(); const Clutter = imports.gi.Clutter;
const Main = imports.ui.main;
const Meta = imports.gi.Meta;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Gtk = imports.gi.Gtk;
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const Signals = imports.signals;
const Pango = imports.gi.Pango;
const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
const appSys = Shell.AppSystem.get_default();
const APPLICATION_ICON_SIZE = 32;
const HORIZ_FACTOR = 5;
const MENU_HEIGHT_OFFSET = 132;
const NAVIGATION_REGION_OVERSHOOT = 50;
class ActivitiesMenuItem extends PopupMenu.PopupBaseMenuItem {
constructor(button) {
super();
this._button = button; this._button = button;
- this.actor.add_child(new St.Label({ text: _("Activities Overview") })); - this.actor.add_child(new St.Label({ text: _("Activities Overview") }));
+ let label = new St.Label({ text: _("Activities Overview") }); + let label = new St.Label({ text: _("Activities Overview") });
+ this.actor.add_child(label); + this.actor.add_child(label);
+ this.actor.label_actor = label; + this.actor.label_actor = label;
}, }
activate(event) {
this._button.menu.toggle();
Main.overview.toggle();
super.activate(event);
}
};
class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem {
constructor(button, app) {
super();
this._app = app;
this._button = button;
this._iconBin = new St.Bin();
this.actor.add_child(this._iconBin);
let appLabel = new St.Label({ text: app.get_name(), y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
this.actor.add_child(appLabel);
this.actor.label_actor = appLabel;
let textureCache = St.TextureCache.get_default();
let iconThemeChangedId = textureCache.connect('icon-theme-changed',
this._updateIcon.bind(this));
this.actor.connect('destroy', () => {
textureCache.disconnect(iconThemeChangedId);
});
this._updateIcon();
@@ -102,61 +104,63 @@ class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem {
}
getDragActor() {
return this._app.create_icon_texture(APPLICATION_ICON_SIZE);
}
activate: function(event) { getDragActorSource() {
@@ -140,7 +142,9 @@ const CategoryMenuItem = new Lang.Class({ return this._iconBin;
}
_updateIcon() {
this._iconBin.set_child(this.getDragActor());
}
};
class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
constructor(button, category) {
super();
this._category = category;
this._button = button;
this._oldX = -1;
this._oldY = -1;
let name;
if (this._category)
name = this._category.get_name();
else else
name = _("Favorites"); name = _("Favorites");
@ -32,9 +113,36 @@ index 41d1faf..03000bf 100644
+ let label = new St.Label({ text: name }); + let label = new St.Label({ text: name });
+ this.actor.add_child(label); + this.actor.add_child(label);
+ this.actor.label_actor = label; + this.actor.label_actor = label;
this.actor.connect('motion-event', Lang.bind(this, this._onMotionEvent)); this.actor.connect('motion-event', this._onMotionEvent.bind(this));
}, }
activate(event) {
this._button.selectCategory(this._category, this);
this._button.scrollToCatButton(this);
super.activate(event);
}
_isNavigatingSubmenu([x, y]) {
let [posX, posY] = this.actor.get_transformed_position();
if (this._oldX == -1) {
this._oldX = x;
this._oldY = y;
return true;
}
let deltaX = Math.abs(x - this._oldX);
let deltaY = Math.abs(y - this._oldY);
this._oldX = x;
this._oldY = y;
// If it lies outside the x-coordinates then it is definitely outside.
if (posX > x || posX + this.actor.width < x)
return false;
// If it lies inside the menu item then it is definitely inside.
if (posY <= y && posY + this.actor.height >= y)
-- --
2.14.2 2.17.1



34
SOURCES/0001-classic-Shade-panel-in-overview.patch

@ -0,0 +1,34 @@
From 91ed30147a69d53d7c170b65602be5f90851666e Mon Sep 17 00:00:00 2001
From: Jakub Steiner <jimmac@gmail.com>
Date: Tue, 14 Jan 2014 17:00:23 +0100
Subject: [PATCH] classic: Shade panel in overview

... rather than using the top bar styling (negative space),
base the overview panel on the classic grey and "darken"
for overview.
---
data/gnome-classic.scss | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/data/gnome-classic.scss b/data/gnome-classic.scss
index 9e23506..e8f4803 100644
--- a/data/gnome-classic.scss
+++ b/data/gnome-classic.scss
@@ -19,11 +19,9 @@ $variant: 'light';
border-bottom: 1px solid #666;
app-icon-bottom-clip: 0px;
&:overview {
- background-color: #000;
- background-gradient-end: #000;
- border-top-color: #000;
- border-bottom: 1px solid #000;
- .panel-button { color: #fff; }
+ background-color: darken($bg_color,5%);
+ background-gradient-end: darken($bg_color,10%);
+ .panel-button { color: darken($fg_color,5%); }
}
.panel-button {
--
2.17.1

162
SOURCES/0001-data-drop-app-icon-styling.patch

@ -0,0 +1,162 @@
From 524bc0710f6dbbbb6b8135253f03ce5e0059da02 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 4 Sep 2018 09:58:57 -0400
Subject: [PATCH] data: drop app icon styling

classic session doesn't show an app icon in the app menu, so
putting a drop shadow around where it would be creates screen
artifacts.

This commit drops the styling of the app icon that doesn't exist.
---
data/gnome-shell-sass/_common.scss | 10 ----------
1 file changed, 10 deletions(-)

diff --git a/data/gnome-shell-sass/_common.scss b/data/gnome-shell-sass/_common.scss
index 1ceadf4..3cce6c1 100644
--- a/data/gnome-shell-sass/_common.scss
+++ b/data/gnome-shell-sass/_common.scss
@@ -742,140 +742,130 @@ StScrollBar {
#panelLeft, #panelCenter { // spacing between activities<>app menu and such
spacing: 4px;
}
.panel-corner {
-panel-corner-radius: $panel-corner-radius;
-panel-corner-background-color: rgba(0, 0, 0, 0.35);
-panel-corner-border-width: 2px;
-panel-corner-border-color: transparent;
&:active, &:overview, &:focus {
-panel-corner-border-color: lighten($selected_bg_color,5%);
}
&.lock-screen, &.login-screen, &.unlock-screen {
-panel-corner-radius: 0;
-panel-corner-background-color: transparent;
-panel-corner-border-color: transparent;
}
}
.panel-button {
-natural-hpadding: 12px;
-minimum-hpadding: 6px;
font-weight: bold;
color: #eee;
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9);
transition-duration: 100ms;
- .app-menu-icon {
- -st-icon-style: symbolic;
- margin-left: 4px;
- margin-right: 4px;
- //dimensions of the icon are hardcoded
- }
-
.panel-logo-icon {
padding-right: .4em;
icon-size: 1em;
}
.system-status-icon,
- .app-menu-icon > StIcon,
.popup-menu-arrow {
icon-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9);
}
&:hover {
color: lighten($fg_color, 10%);
text-shadow: 0px 1px 6px rgba(0, 0, 0, 1);
.system-status-icon,
- .app-menu-icon > StIcon,
.popup-menu-arrow {
icon-shadow: 0px 1px 6px rgba(0, 0, 0, 1);
}
}
&:active, &:overview, &:focus, &:checked {
// Trick due to St limitations. It needs a background to draw
// a box-shadow
background-color: rgba(0, 0, 0, 0.01);
box-shadow: inset 0 -2px 0px lighten($selected_bg_color,5%);
color: lighten($fg_color,10%);
& > .system-status-icon { icon-shadow: black 0 2px 2px; }
}
.system-status-icon { icon-size: 1.09em; padding: 0 5px; }
.unlock-screen &,
.login-screen &,
.lock-screen & {
color: lighten($fg_color, 10%);
&:focus, &:hover, &:active { color: lighten($fg_color, 10%); }
}
}
.panel-status-indicators-box,
.panel-status-menu-box {
spacing: 2px;
}
// spacing between power icon and (optional) percentage label
.power-status.panel-status-indicators-box {
spacing: 0;
}
.screencast-indicator { color: $warning_color; }
&.solid {
background-color: black;
/* transition from transparent to solid */
transition-duration: 300ms;
.panel-corner {
-panel-corner-background-color: black;
}
.panel-button {
color: #ccc;
text-shadow: none;
&:hover, &:active, &:overview, &:focus, &:checked {
color: lighten($fg_color, 10%);
}
}
.system-status-icon,
- .app-menu-icon > StIcon,
.popup-menu-arrow {
icon-shadow: none;
}
}
}
// calendar popover
#calendarArea {
padding: 0.75em 1.0em;
}
.calendar {
margin-bottom: 1em;
}
.calendar,
.datemenu-today-button,
.datemenu-displays-box,
.message-list-sections {
margin: 0 1.5em;
}
.datemenu-calendar-column { spacing: 0.5em; }
.datemenu-displays-section { padding-bottom: 3em; }
.datemenu-displays-box { spacing: 1em; }
.datemenu-calendar-column {
border: 0 solid lighten($bg_color,5%);
&:ltr { border-left-width: 1px; }
&:rtl { border-right-width: 1px; }
--
2.17.1

10511
SOURCES/add-extra-extensions.patch

File diff suppressed because it is too large Load Diff

518
SOURCES/resurrect-system-monitor.patch

@ -1,4 +1,4 @@
From 5b4f81b1b510cc254221cac762dd282408c18a8c Mon Sep 17 00:00:00 2001 From 57bb099db30703a474a023122f1106e199ff79ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 17 May 2017 19:13:50 +0200 Date: Wed, 17 May 2017 19:13:50 +0200
Subject: [PATCH 1/4] extensions: Resurrect systemMonitor extension Subject: [PATCH 1/4] extensions: Resurrect systemMonitor extension
@ -13,78 +13,20 @@ as well though, so we need to bring it back ...


This reverts commit c9a6421f362cd156cf731289eadc11f44f6970ac. This reverts commit c9a6421f362cd156cf731289eadc11f44f6970ac.
--- ---
README | 4 + extensions/systemMonitor/extension.js | 376 ++++++++++++++++++++++
configure.ac | 8 +- extensions/systemMonitor/meson.build | 5 +
extensions/systemMonitor/Makefile.am | 3 +
extensions/systemMonitor/extension.js | 376 ++++++++++++++++++++++++++++++
extensions/systemMonitor/metadata.json.in | 11 + extensions/systemMonitor/metadata.json.in | 11 +
extensions/systemMonitor/stylesheet.css | 35 +++ extensions/systemMonitor/stylesheet.css | 35 ++
6 files changed, 436 insertions(+), 1 deletion(-) meson.build | 1 +
create mode 100644 extensions/systemMonitor/Makefile.am 5 files changed, 428 insertions(+)
create mode 100644 extensions/systemMonitor/extension.js create mode 100644 extensions/systemMonitor/extension.js
create mode 100644 extensions/systemMonitor/meson.build
create mode 100644 extensions/systemMonitor/metadata.json.in create mode 100644 extensions/systemMonitor/metadata.json.in
create mode 100644 extensions/systemMonitor/stylesheet.css create mode 100644 extensions/systemMonitor/stylesheet.css


diff --git a/README b/README
index cc53a8d..e2bea7a 100644
--- a/README
+++ b/README
@@ -57,6 +57,10 @@ places-menu
Shows a status Indicator for navigating to Places.
+systemMonitor
+
+ An message tray indicator showing CPU and memory loads.
+
user-theme
Loads a shell theme from ~/.themes/<name>/gnome-shell.
diff --git a/configure.ac b/configure.ac
index 34b2171..2c0036c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ AC_SUBST([SHELL_VERSION])
dnl keep this in alphabetic order
CLASSIC_EXTENSIONS="apps-menu places-menu alternate-tab launch-new-instance window-list"
DEFAULT_EXTENSIONS="$CLASSIC_EXTENSIONS drive-menu screenshot-window-sizer windowsNavigator workspace-indicator"
-ALL_EXTENSIONS="$DEFAULT_EXTENSIONS auto-move-windows dash-to-dock example native-window-placement no-hot-corner panel-favorites top-icons updates-dialog user-theme"
+ALL_EXTENSIONS="$DEFAULT_EXTENSIONS auto-move-windows dash-to-dock example native-window-placement no-hot-corner panel-favorites systemMonitor top-icons updates-dialog user-theme"
AC_SUBST(CLASSIC_EXTENSIONS, [$CLASSIC_EXTENSIONS])
AC_SUBST(ALL_EXTENSIONS, [$ALL_EXTENSIONS])
AC_ARG_ENABLE([extensions],
@@ -62,6 +62,11 @@ AM_CONDITIONAL([CLASSIC_MODE], [test x"$enable_classic_mode" != xno])
ENABLED_EXTENSIONS=
for e in $enable_extensions; do
case $e in
+ systemMonitor)
+ PKG_CHECK_MODULES(GTOP, libgtop-2.0 >= 2.28.3,
+ [ENABLED_EXTENSIONS="$ENABLED_EXTENSIONS $e"],
+ [AC_MSG_WARN([libgtop-2.0 not found, disabling systemMonitor])])
+ ;;
dnl keep this in alphabetic order
alternate-tab|apps-menu|auto-move-windows|dash-to-dock|drive-menu|example|launch-new-instance|native-window-placement|no-hot-corner|panel-favorites|places-menu|screenshot-window-sizer|top-icons|updates-dialog|user-theme|window-list|windowsNavigator|workspace-indicator)
ENABLED_EXTENSIONS="$ENABLED_EXTENSIONS $e"
@@ -90,6 +95,7 @@ AC_CONFIG_FILES([
extensions/panel-favorites/Makefile
extensions/places-menu/Makefile
extensions/screenshot-window-sizer/Makefile
+ extensions/systemMonitor/Makefile
extensions/top-icons/Makefile
extensions/updates-dialog/Makefile
extensions/user-theme/Makefile
diff --git a/extensions/systemMonitor/Makefile.am b/extensions/systemMonitor/Makefile.am
new file mode 100644
index 0000000..50ce6d2
--- /dev/null
+++ b/extensions/systemMonitor/Makefile.am
@@ -0,0 +1,3 @@
+EXTENSION_ID = systemMonitor
+
+include ../../extension.mk
diff --git a/extensions/systemMonitor/extension.js b/extensions/systemMonitor/extension.js diff --git a/extensions/systemMonitor/extension.js b/extensions/systemMonitor/extension.js
new file mode 100644 new file mode 100644
index 0000000..58a2f57 index 0000000..7b09df0
--- /dev/null --- /dev/null
+++ b/extensions/systemMonitor/extension.js +++ b/extensions/systemMonitor/extension.js
@@ -0,0 +1,376 @@ @@ -0,0 +1,376 @@
@ -220,7 +162,7 @@ index 0000000..58a2f57
+ cr.setLineWidth(1); + cr.setLineWidth(1);
+ cr.setDash([4,1], 0); + cr.setDash([4,1], 0);
+ cr.stroke(); + cr.stroke();
+ +
+ //draw the foreground + //draw the foreground
+ +
+ function makePath(values, reverse, nudge) { + function makePath(values, reverse, nudge) {
@ -241,7 +183,7 @@ index 0000000..58a2f57
+ +
+ } + }
+ } + }
+ +
+ let renderStats = this.renderStats; + let renderStats = this.renderStats;
+ +
+ // Make sure we don't have more sample points than pixels + // Make sure we don't have more sample points than pixels
@ -258,10 +200,10 @@ index 0000000..58a2f57
+ let outlineColor = themeNode.get_color(stat.color); + let outlineColor = themeNode.get_color(stat.color);
+ let color = new Clutter.Color(outlineColor); + let color = new Clutter.Color(outlineColor);
+ color.alpha = color.alpha * .4; + color.alpha = color.alpha * .4;
+ +
+ // Render the background between us and the next level + // Render the background between us and the next level
+ makePath(stat.values, false); + makePath(stat.values, false);
+ // If there is a process below us, render the cpu between us and it, otherwise, + // If there is a process below us, render the cpu between us and it, otherwise,
+ // render to the bottom of the chart + // render to the bottom of the chart
+ if (i == renderStats.length - 1) { + if (i == renderStats.length - 1) {
+ cr.lineTo(stat.values.length - 1, height); + cr.lineTo(stat.values.length - 1, height);
@ -274,7 +216,7 @@ index 0000000..58a2f57
+ cr.closePath() + cr.closePath()
+ Clutter.cairo_set_source_color(cr, color); + Clutter.cairo_set_source_color(cr, color);
+ cr.fill(); + cr.fill();
+ +
+ // Render the outline of this level + // Render the outline of this level
+ makePath(stat.values, false, .5); + makePath(stat.values, false, .5);
+ Clutter.cairo_set_source_color(cr, outlineColor); + Clutter.cairo_set_source_color(cr, outlineColor);
@ -294,7 +236,7 @@ index 0000000..58a2f57
+ +
+ this.gridColor = '-grid-color'; + this.gridColor = '-grid-color';
+ this.renderStats = [ 'cpu-user', 'cpu-sys', 'cpu-iowait' ]; + this.renderStats = [ 'cpu-user', 'cpu-sys', 'cpu-iowait' ];
+ +
+ // Make sure renderStats is sorted as necessary for rendering + // Make sure renderStats is sorted as necessary for rendering
+ let renderStatOrder = {'cpu-total': 0, 'cpu-user': 1, 'cpu-sys': 2, 'cpu-iowait': 3}; + let renderStatOrder = {'cpu-total': 0, 'cpu-user': 1, 'cpu-sys': 2, 'cpu-iowait': 3};
+ this.renderStats = this.renderStats.sort(function(a,b) { + this.renderStats = this.renderStats.sort(function(a,b) {
@ -308,11 +250,11 @@ index 0000000..58a2f57
+ this._prev = new GTop.glibtop_cpu; + this._prev = new GTop.glibtop_cpu;
+ GTop.glibtop_get_cpu(this._prev); + GTop.glibtop_get_cpu(this._prev);
+ +
+ this.stats = { + this.stats = {
+ 'cpu-user': {color: '-cpu-user-color', values: []}, + 'cpu-user': {color: '-cpu-user-color', values: []},
+ 'cpu-sys': {color: '-cpu-sys-color', values: []}, + 'cpu-sys': {color: '-cpu-sys-color', values: []},
+ 'cpu-iowait': {color: '-cpu-iowait-color', values: []}, + 'cpu-iowait': {color: '-cpu-iowait-color', values: []},
+ 'cpu-total': {color: '-cpu-total-color', values: []} + 'cpu-total': {color: '-cpu-total-color', values: []}
+ }; + };
+ }, + },
+ +
@ -333,7 +275,7 @@ index 0000000..58a2f57
+ t += user / total; + t += user / total;
+ this.stats['cpu-user'].values.push(t); + this.stats['cpu-user'].values.push(t);
+ this.stats['cpu-total'].values.push(1 - idle / total); + this.stats['cpu-total'].values.push(1 - idle / total);
+ +
+ this._prev = cpu; + this._prev = cpu;
+ } + }
+}); +});
@ -341,13 +283,13 @@ index 0000000..58a2f57
+const MemoryIndicator = new Lang.Class({ +const MemoryIndicator = new Lang.Class({
+ Name: 'SystemMonitor.MemoryIndicator', + Name: 'SystemMonitor.MemoryIndicator',
+ Extends: Indicator, + Extends: Indicator,
+ +
+ _init: function() { + _init: function() {
+ this.parent(); + this.parent();
+ +
+ this.gridColor = '-grid-color'; + this.gridColor = '-grid-color';
+ this.renderStats = [ 'mem-user', 'mem-other', 'mem-cached' ]; + this.renderStats = [ 'mem-user', 'mem-other', 'mem-cached' ];
+ +
+ // Make sure renderStats is sorted as necessary for rendering + // Make sure renderStats is sorted as necessary for rendering
+ let renderStatOrder = { 'mem-cached': 0, 'mem-other': 1, 'mem-user': 2 }; + let renderStatOrder = { 'mem-cached': 0, 'mem-other': 1, 'mem-user': 2 };
+ this.renderStats = this.renderStats.sort(function(a,b) { + this.renderStats = this.renderStats.sort(function(a,b) {
@ -464,6 +406,17 @@ index 0000000..58a2f57
+function init() { +function init() {
+ return new Extension(); + return new Extension();
+} +}
diff --git a/extensions/systemMonitor/meson.build b/extensions/systemMonitor/meson.build
new file mode 100644
index 0000000..48504f6
--- /dev/null
+++ b/extensions/systemMonitor/meson.build
@@ -0,0 +1,5 @@
+extension_data += configure_file(
+ input: metadata_name + '.in',
+ output: metadata_name,
+ configuration: metadata_conf
+)
diff --git a/extensions/systemMonitor/metadata.json.in b/extensions/systemMonitor/metadata.json.in diff --git a/extensions/systemMonitor/metadata.json.in b/extensions/systemMonitor/metadata.json.in
new file mode 100644 new file mode 100644
index 0000000..fa75007 index 0000000..fa75007
@ -522,11 +475,77 @@ index 0000000..13f95ec
+ font-size: 9pt; + font-size: 9pt;
+ font-weight: bold; + font-weight: bold;
+} +}
diff --git a/meson.build b/meson.build
index 201c484..cde2d34 100644
--- a/meson.build
+++ b/meson.build
@@ -30,60 +30,61 @@ if ver_arr[1].to_int().is_even()
else
shell_version = '.'.join(ver_arr)
endif
uuid_suffix = '@gnome-shell-extensions.gcampax.github.com'
classic_extensions = [
'alternate-tab',
'apps-menu',
'places-menu',
'launch-new-instance',
'window-list'
]
default_extensions = classic_extensions
default_extensions += [
'drive-menu',
'screenshot-window-sizer',
'windowsNavigator',
'workspace-indicator'
]
all_extensions = default_extensions
all_extensions += [
'auto-move-windows',
'dash-to-dock',
'example',
'native-window-placement',
'no-hot-corner',
'panel-favorites',
+ 'systemMonitor',
'top-icons',
'updates-dialog',
'user-theme'
]
enabled_extensions = get_option('enable_extensions')
if enabled_extensions.length() == 0
set = get_option('extension_set')
if set == 'classic'
enabled_extensions += classic_extensions
elif set == 'default'
enabled_extensions += default_extensions
elif set == 'all'
enabled_extensions += all_extensions
endif
endif
classic_mode_enabled = get_option('classic_mode')
if classic_mode_enabled
# Sanity check: Make sure all classic extensions are enabled
foreach e : classic_extensions
if not enabled_extensions.contains(e)
error('Classic mode is enabled, ' +
'but the required extension @0@ is not.'.format(e))
endif
endforeach
endif
-- --
2.14.2 2.17.1




From 529c0c1da0259953130a0e098820854336b1c87e Mon Sep 17 00:00:00 2001 From 8ffea72d040e165c73b1b2eba82e6c4e106aee7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 17 May 2017 19:31:58 +0200 Date: Wed, 17 May 2017 19:31:58 +0200
Subject: [PATCH 2/4] systemMonitor: Move indicators to calendar Subject: [PATCH 2/4] systemMonitor: Move indicators to calendar
@ -537,15 +556,18 @@ drop-down looks like the best option, given that it replaced the
old tray (and also took over the old keyboard shortcut to bring old tray (and also took over the old keyboard shortcut to bring
it up quickly). it up quickly).
--- ---
extensions/systemMonitor/extension.js | 56 ++++++++++++++++----------------- extensions/systemMonitor/extension.js | 56 ++++++++++++-------------
extensions/systemMonitor/stylesheet.css | 14 --------- extensions/systemMonitor/stylesheet.css | 14 -------
2 files changed, 28 insertions(+), 42 deletions(-) 2 files changed, 28 insertions(+), 42 deletions(-)


diff --git a/extensions/systemMonitor/extension.js b/extensions/systemMonitor/extension.js diff --git a/extensions/systemMonitor/extension.js b/extensions/systemMonitor/extension.js
index 58a2f57..01146fa 100644 index 7b09df0..1388a1f 100644
--- a/extensions/systemMonitor/extension.js --- a/extensions/systemMonitor/extension.js
+++ b/extensions/systemMonitor/extension.js +++ b/extensions/systemMonitor/extension.js
@@ -4,10 +4,12 @@ const Clutter = imports.gi.Clutter; @@ -1,132 +1,146 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Clutter = imports.gi.Clutter;
const GTop = imports.gi.GTop; const GTop = imports.gi.GTop;
const Lang = imports.lang; const Lang = imports.lang;
const Mainloop = imports.mainloop; const Mainloop = imports.mainloop;
@ -558,7 +580,21 @@ index 58a2f57..01146fa 100644
const Tweener = imports.ui.tweener; const Tweener = imports.ui.tweener;
const Gettext = imports.gettext.domain('gnome-shell-extensions'); const Gettext = imports.gettext.domain('gnome-shell-extensions');
@@ -29,18 +31,21 @@ const Indicator = new Lang.Class({ const _ = Gettext.gettext;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
const INDICATOR_UPDATE_INTERVAL = 500;
const INDICATOR_NUM_GRID_LINES = 3;
const ITEM_LABEL_SHOW_TIME = 0.15;
const ITEM_LABEL_HIDE_TIME = 0.1;
const ITEM_HOVER_TIMEOUT = 300;
const Indicator = new Lang.Class({
Name: 'SystemMonitor.Indicator',
_init: function() { _init: function() {
this._initValues(); this._initValues();
@ -588,7 +624,32 @@ index 58a2f57..01146fa 100644
this._timeout = Mainloop.timeout_add(INDICATOR_UPDATE_INTERVAL, Lang.bind(this, function () { this._timeout = Mainloop.timeout_add(INDICATOR_UPDATE_INTERVAL, Lang.bind(this, function () {
this._updateValues(); this._updateValues();
@@ -73,6 +78,7 @@ const Indicator = new Lang.Class({ this.drawing_area.queue_repaint();
return true;
}));
},
showLabel: function() {
if (this.label == null)
return;
this.label.opacity = 0;
this.label.show();
let [stageX, stageY] = this.actor.get_transformed_position();
let itemWidth = this.actor.allocation.x2 - this.actor.allocation.x1;
let itemHeight = this.actor.allocation.y2 - this.actor.allocation.y1;
let labelWidth = this.label.width;
let labelHeight = this.label.height;
let xOffset = Math.floor((itemWidth - labelWidth) / 2)
let x = stageX + xOffset;
let node = this.label.get_theme_node();
let yOffset = node.get_length('-y-offset');
let y = stageY - this.label.get_height() - yOffset; let y = stageY - this.label.get_height() - yOffset;
this.label.set_position(x, y); this.label.set_position(x, y);
@ -596,7 +657,27 @@ index 58a2f57..01146fa 100644
Tweener.addTween(this.label, Tweener.addTween(this.label,
{ opacity: 255, { opacity: 255,
time: ITEM_LABEL_SHOW_TIME, time: ITEM_LABEL_SHOW_TIME,
@@ -100,6 +106,14 @@ const Indicator = new Lang.Class({ transition: 'easeOutQuad',
});
},
setLabelText: function(text) {
if (this.label == null)
this.label = new St.Label({ style_class: 'extension-systemMonitor-indicator-label'});
this.label.set_text(text);
Main.layoutManager.addChrome(this.label);
this.label.hide();
},
hideLabel: function () {
Tweener.addTween(this.label,
{ opacity: 0,
time: ITEM_LABEL_HIDE_TIME,
transition: 'easeOutQuad',
onComplete: Lang.bind(this, function() {
this.label.hide();
})
}); });
}, },
@ -611,7 +692,61 @@ index 58a2f57..01146fa 100644
destroy: function() { destroy: function() {
Mainloop.source_remove(this._timeout); Mainloop.source_remove(this._timeout);
@@ -194,6 +208,7 @@ const Indicator = new Lang.Class({ this.actor.destroy();
if (this.label)
this.label.destroy();
},
_initValues: function() {
},
_updateValues: function() {
},
_draw: function(area) {
let [width, height] = area.get_surface_size();
let themeNode = this.actor.get_theme_node();
let cr = area.get_context();
//draw the background grid
let color = themeNode.get_color(this.gridColor);
let gridOffset = Math.floor(height / (INDICATOR_NUM_GRID_LINES + 1));
for (let i = 1; i <= INDICATOR_NUM_GRID_LINES; ++i) {
cr.moveTo(0, i * gridOffset + .5);
cr.lineTo(width, i * gridOffset + .5);
}
Clutter.cairo_set_source_color(cr, color);
cr.setLineWidth(1);
cr.setDash([4,1], 0);
cr.stroke();
@@ -167,60 +181,61 @@ const Indicator = new Lang.Class({
// We outline at full opacity and fill with 40% opacity
let outlineColor = themeNode.get_color(stat.color);
let color = new Clutter.Color(outlineColor);
color.alpha = color.alpha * .4;
// Render the background between us and the next level
makePath(stat.values, false);
// If there is a process below us, render the cpu between us and it, otherwise,
// render to the bottom of the chart
if (i == renderStats.length - 1) {
cr.lineTo(stat.values.length - 1, height);
cr.lineTo(0, height);
cr.closePath();
} else {
let nextStat = this.stats[renderStats[i+1]];
makePath(nextStat.values, true);
}
cr.closePath()
Clutter.cairo_set_source_color(cr, color);
cr.fill();
// Render the outline of this level
makePath(stat.values, false, .5);
Clutter.cairo_set_source_color(cr, outlineColor);
cr.setLineWidth(1.0);
cr.setDash([], 0);
cr.stroke();
} }
} }
}); });
@ -619,7 +754,61 @@ index 58a2f57..01146fa 100644
const CpuIndicator = new Lang.Class({ const CpuIndicator = new Lang.Class({
Name: 'SystemMonitor.CpuIndicator', Name: 'SystemMonitor.CpuIndicator',
@@ -302,9 +317,7 @@ const Extension = new Lang.Class({ Extends: Indicator,
_init: function() {
this.parent();
this.gridColor = '-grid-color';
this.renderStats = [ 'cpu-user', 'cpu-sys', 'cpu-iowait' ];
// Make sure renderStats is sorted as necessary for rendering
let renderStatOrder = {'cpu-total': 0, 'cpu-user': 1, 'cpu-sys': 2, 'cpu-iowait': 3};
this.renderStats = this.renderStats.sort(function(a,b) {
return renderStatOrder[a] - renderStatOrder[b];
});
this.setLabelText(_("CPU"));
},
_initValues: function() {
this._prev = new GTop.glibtop_cpu;
GTop.glibtop_get_cpu(this._prev);
this.stats = {
'cpu-user': {color: '-cpu-user-color', values: []},
'cpu-sys': {color: '-cpu-sys-color', values: []},
'cpu-iowait': {color: '-cpu-iowait-color', values: []},
'cpu-total': {color: '-cpu-total-color', values: []}
};
@@ -275,96 +290,81 @@ const MemoryIndicator = new Lang.Class({
'mem-cached': { color: "-mem-cached-color", values: [] }
};
},
_updateValues: function() {
GTop.glibtop_get_mem(this.mem);
let t = this.mem.user / this.mem.total;
this.stats['mem-user'].values.push(t);
t += (this.mem.used - this.mem.user - this.mem.cached) / this.mem.total;
this.stats['mem-other'].values.push(t);
t += this.mem.cached / this.mem.total;
this.stats['mem-cached'].values.push(t);
}
});
const INDICATORS = [CpuIndicator, MemoryIndicator];
const Extension = new Lang.Class({
Name: 'SystemMonitor.Extension',
_init: function() {
Convenience.initTranslations();
this._showLabelTimeoutId = 0;
this._resetHoverTimeoutId = 0;
this._labelShowing = false;
}, },
enable: function() { enable: function() {
@ -630,7 +819,8 @@ index 58a2f57..01146fa 100644
this._indicators = [ ]; this._indicators = [ ];
for (let i = 0; i < INDICATORS.length; i++) { for (let i = 0; i < INDICATORS.length; i++) {
@@ -313,31 +326,18 @@ const Extension = new Lang.Class({ let indicator = new (INDICATORS[i])();
indicator.actor.connect('notify::hover', Lang.bind(this, function() { indicator.actor.connect('notify::hover', Lang.bind(this, function() {
this._onHover(indicator); this._onHover(indicator);
})); }));
@ -666,11 +856,38 @@ index 58a2f57..01146fa 100644
}, },
_onHover: function (item) { _onHover: function (item) {
if (item.actor.get_hover()) {
if (this._showLabelTimeoutId == 0) {
let timeout = this._labelShowing ? 0 : ITEM_HOVER_TIMEOUT;
this._showLabelTimeoutId = Mainloop.timeout_add(timeout,
Lang.bind(this, function() {
this._labelShowing = true;
item.showLabel();
return false;
}));
if (this._resetHoverTimeoutId > 0) {
Mainloop.source_remove(this._resetHoverTimeoutId);
this._resetHoverTimeoutId = 0;
}
}
} else {
if (this._showLabelTimeoutId > 0)
Mainloop.source_remove(this._showLabelTimeoutId);
this._showLabelTimeoutId = 0;
item.hideLabel();
if (this._labelShowing) {
this._resetHoverTimeoutId = Mainloop.timeout_add(ITEM_HOVER_TIMEOUT,
Lang.bind(this, function() {
this._labelShowing = false;
return false;
}));
}
}
diff --git a/extensions/systemMonitor/stylesheet.css b/extensions/systemMonitor/stylesheet.css diff --git a/extensions/systemMonitor/stylesheet.css b/extensions/systemMonitor/stylesheet.css
index 13f95ec..978ac12 100644 index 13f95ec..978ac12 100644
--- a/extensions/systemMonitor/stylesheet.css --- a/extensions/systemMonitor/stylesheet.css
+++ b/extensions/systemMonitor/stylesheet.css +++ b/extensions/systemMonitor/stylesheet.css
@@ -1,17 +1,4 @@ @@ -1,35 +1,21 @@
-.extension-systemMonitor-container { -.extension-systemMonitor-container {
- spacing: 5px; - spacing: 5px;
- padding-left: 5px; - padding-left: 5px;
@ -688,7 +905,9 @@ index 13f95ec..978ac12 100644
height: 50px; height: 50px;
-grid-color: #575757; -grid-color: #575757;
-cpu-total-color: rgb(0,154,62); -cpu-total-color: rgb(0,154,62);
@@ -21,7 +8,6 @@ -cpu-user-color: rgb(69,154,0);
-cpu-sys-color: rgb(255,253,81);
-cpu-iowait-color: rgb(210,148,0);
-mem-user-color: rgb(210,148,0); -mem-user-color: rgb(210,148,0);
-mem-cached-color: rgb(90,90,90); -mem-cached-color: rgb(90,90,90);
-mem-other-color: rgb(205,203,41); -mem-other-color: rgb(205,203,41);
@ -696,11 +915,19 @@ index 13f95ec..978ac12 100644
} }
.extension-systemMonitor-indicator-label { .extension-systemMonitor-indicator-label {
border-radius: 7px;
padding: 4px 12px;
background-color: rgba(0,0,0,0.9);
text-align: center;
-y-offset: 8px;
font-size: 9pt;
font-weight: bold;
}
-- --
2.14.2 2.17.1




From 77669f312fcd4cdc823c74fecb12480fb5e9769f Mon Sep 17 00:00:00 2001 From e1133a8a92c49a90e02f8d2f1e66c7aae9d19519 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Thu, 18 May 2017 16:20:07 +0200 Date: Thu, 18 May 2017 16:20:07 +0200
Subject: [PATCH 3/4] systemMonitor: Handle clicks on section title Subject: [PATCH 3/4] systemMonitor: Handle clicks on section title
@ -716,10 +943,37 @@ Fixes: #3
1 file changed, 19 insertions(+), 1 deletion(-) 1 file changed, 19 insertions(+), 1 deletion(-)


diff --git a/extensions/systemMonitor/extension.js b/extensions/systemMonitor/extension.js diff --git a/extensions/systemMonitor/extension.js b/extensions/systemMonitor/extension.js
index 01146fa..cc49cbb 100644 index 1388a1f..9c010d8 100644
--- a/extensions/systemMonitor/extension.js --- a/extensions/systemMonitor/extension.js
+++ b/extensions/systemMonitor/extension.js +++ b/extensions/systemMonitor/extension.js
@@ -303,6 +303,24 @@ const MemoryIndicator = new Lang.Class({ @@ -276,75 +276,93 @@ const MemoryIndicator = new Lang.Class({
// Make sure renderStats is sorted as necessary for rendering
let renderStatOrder = { 'mem-cached': 0, 'mem-other': 1, 'mem-user': 2 };
this.renderStats = this.renderStats.sort(function(a,b) {
return renderStatOrder[a] - renderStatOrder[b];
});
this.setLabelText(_("Memory"));
},
_initValues: function() {
this.mem = new GTop.glibtop_mem;
this.stats = {
'mem-user': { color: "-mem-user-color", values: [] },
'mem-other': { color: "-mem-other-color", values: [] },
'mem-cached': { color: "-mem-cached-color", values: [] }
};
},
_updateValues: function() {
GTop.glibtop_get_mem(this.mem);
let t = this.mem.user / this.mem.total;
this.stats['mem-user'].values.push(t);
t += (this.mem.used - this.mem.user - this.mem.cached) / this.mem.total;
this.stats['mem-other'].values.push(t);
t += this.mem.cached / this.mem.total;
this.stats['mem-cached'].values.push(t);
} }
}); });
@ -744,7 +998,14 @@ index 01146fa..cc49cbb 100644
const INDICATORS = [CpuIndicator, MemoryIndicator]; const INDICATORS = [CpuIndicator, MemoryIndicator];
const Extension = new Lang.Class({ const Extension = new Lang.Class({
@@ -317,7 +335,7 @@ const Extension = new Lang.Class({ Name: 'SystemMonitor.Extension',
_init: function() {
Convenience.initTranslations();
this._showLabelTimeoutId = 0;
this._resetHoverTimeoutId = 0;
this._labelShowing = false;
}, },
enable: function() { enable: function() {
@ -753,11 +1014,38 @@ index 01146fa..cc49cbb 100644
this._indicators = [ ]; this._indicators = [ ];
for (let i = 0; i < INDICATORS.length; i++) { for (let i = 0; i < INDICATORS.length; i++) {
let indicator = new (INDICATORS[i])();
indicator.actor.connect('notify::hover', Lang.bind(this, function() {
this._onHover(indicator);
}));
this._section.addMessage(indicator, false);
this._indicators.push(indicator);
}
Main.panel.statusArea.dateMenu._messageList._addSection(this._section);
this._section.actor.get_parent().set_child_at_index(this._section.actor, 0);
},
disable: function() {
this._indicators.forEach(function(i) { i.destroy(); });
Main.panel.statusArea.dateMenu._messageList._removeSection(this._section);
},
_onHover: function (item) {
if (item.actor.get_hover()) {
if (this._showLabelTimeoutId == 0) {
let timeout = this._labelShowing ? 0 : ITEM_HOVER_TIMEOUT;
this._showLabelTimeoutId = Mainloop.timeout_add(timeout,
Lang.bind(this, function() {
this._labelShowing = true;
item.showLabel();
-- --
2.14.2 2.17.1




From 7ba627fcc4646366c851fb0e4a4aa0ddf521b6b7 Mon Sep 17 00:00:00 2001 From d2a0c7bfdb3fedf56021b6fd64628e4cda1aa294 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Thu, 18 May 2017 18:00:17 +0200 Date: Thu, 18 May 2017 18:00:17 +0200
Subject: [PATCH 4/4] systemMonitor: Provide classic styling Subject: [PATCH 4/4] systemMonitor: Provide classic styling
@ -768,25 +1056,11 @@ style.


Fixes: #4 Fixes: #4
--- ---
extensions/systemMonitor/Makefile.am | 6 ++++++
extensions/systemMonitor/classic.css | 6 ++++++ extensions/systemMonitor/classic.css | 6 ++++++
2 files changed, 12 insertions(+) extensions/systemMonitor/meson.build | 4 ++++
2 files changed, 10 insertions(+)
create mode 100644 extensions/systemMonitor/classic.css create mode 100644 extensions/systemMonitor/classic.css


diff --git a/extensions/systemMonitor/Makefile.am b/extensions/systemMonitor/Makefile.am
index 50ce6d2..64a61df 100644
--- a/extensions/systemMonitor/Makefile.am
+++ b/extensions/systemMonitor/Makefile.am
@@ -1,3 +1,9 @@
EXTENSION_ID = systemMonitor
+EXTRA_MODULES =
+
+if CLASSIC_MODE
+ EXTRA_MODULES += classic.css
+endif
+
include ../../extension.mk
diff --git a/extensions/systemMonitor/classic.css b/extensions/systemMonitor/classic.css diff --git a/extensions/systemMonitor/classic.css b/extensions/systemMonitor/classic.css
new file mode 100644 new file mode 100644
index 0000000..946863d index 0000000..946863d
@ -799,6 +1073,20 @@ index 0000000..946863d
+ background-color: rgba(237,237,237,0.9); + background-color: rgba(237,237,237,0.9);
+ border: 1px solid #a1a1a1; + border: 1px solid #a1a1a1;
+} +}
diff --git a/extensions/systemMonitor/meson.build b/extensions/systemMonitor/meson.build
index 48504f6..b6548b1 100644
--- a/extensions/systemMonitor/meson.build
+++ b/extensions/systemMonitor/meson.build
@@ -1,5 +1,9 @@
extension_data += configure_file(
input: metadata_name + '.in',
output: metadata_name,
configuration: metadata_conf
)
+
+if classic_mode_enabled
+ extension_data += files('classic.css')
+endif
-- --
2.14.2 2.17.1



66
SPECS/gnome-shell-extensions.spec

@ -5,8 +5,8 @@
%global pkg_prefix gnome-shell-extension %global pkg_prefix gnome-shell-extension


Name: gnome-shell-extensions Name: gnome-shell-extensions
Version: 3.26.2 Version: 3.28.1
Release: 3%{?dist} Release: 5%{?dist}
Summary: Modify and extend GNOME Shell functionality and behavior Summary: Modify and extend GNOME Shell functionality and behavior


Group: User Interface/Desktops Group: User Interface/Desktops
@ -14,8 +14,11 @@ Group: User Interface/Desktops
License: GPLv2+ and BSD License: GPLv2+ and BSD
URL: http://wiki.gnome.org/Projects/GnomeShell/Extensions URL: http://wiki.gnome.org/Projects/GnomeShell/Extensions
Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/%{major_version}/%{name}-%{version}.tar.xz Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/%{major_version}/%{name}-%{version}.tar.xz
Source2: https://github.com/sass/sassc/archive/3.4.1.tar.gz
Source3: https://github.com/sass/libsass/archive/3.4.5.tar.gz
# BuildRequires: gnome-common # BuildRequires: gnome-common
BuildRequires: autoconf automake BuildRequires: meson
BuildRequires: ruby
BuildRequires: gettext >= 0.19.6 BuildRequires: gettext >= 0.19.6
BuildRequires: git BuildRequires: git
BuildRequires: pkgconfig(gnome-desktop-3.0) BuildRequires: pkgconfig(gnome-desktop-3.0)
@ -24,17 +27,16 @@ Requires: gnome-shell >= %{min_gs_version}
BuildArch: noarch BuildArch: noarch


Patch1: 0001-Update-style.patch Patch1: 0001-Update-style.patch
Patch2: 0001-classic-shade-panel-in-overview.patch Patch2: 0001-classic-Shade-panel-in-overview.patch
Patch3: 0001-apps-menu-add-logo-icon-to-Applications-menu.patch Patch3: 0001-apps-menu-add-logo-icon-to-Applications-menu.patch
Patch4: add-extra-extensions.patch Patch4: add-extra-extensions.patch
Patch5: 0001-apps-menu-Explicitly-set-label_actor.patch Patch5: 0001-apps-menu-Explicitly-set-label_actor.patch
Patch6: resurrect-system-monitor.patch Patch6: resurrect-system-monitor.patch
Patch7: 0001-loginDialog-make-info-messages-themed.patch Patch7: 0001-data-drop-app-icon-styling.patch
Patch8: apps-menu-follow-sort-order.patch
Patch9: apps-menu-support-separators.patch
Patch10: classic-style-fixes.patch
Patch11: 0001-Include-top-icons-in-classic-session.patch Patch11: 0001-Include-top-icons-in-classic-session.patch


Patch99: 0001-Revert-data-Remove-nautilus-classic.patch

%description %description
GNOME Shell Extensions is a collection of extensions providing additional and GNOME Shell Extensions is a collection of extensions providing additional and
optional functionality to GNOME Shell. optional functionality to GNOME Shell.
@ -299,19 +301,27 @@ workspaces.




%prep %prep
%setup -q -n libsass-3.4.5 -b3 -T
%setup -q -n sassc-3.4.1 -b2 -T
%autosetup -S git %autosetup -S git




%build %build
autoreconf -f (cd ../libsass-3.4.5;
# In case we build from a Git checkout export LIBSASS_VERSION=3.4.5
[ -x autogen.sh ] && NOCONFIGURE=1 ./autogen.sh make %{?_smp_mflags})
%configure --enable-extensions="all" (cd ../sassc-3.4.1;
make %{?_smp_mflags} %make_build LDFLAGS="$RPM_OPT_FLAGS $PWD/../libsass-3.4.5/lib/libsass.a" \

CFLAGS="$RPM_OPT_FLAGS -I$PWD/../libsass-3.4.5/include" \
CXXFLAGS="$RPM_OPT_FLAGS" \
SASS_LIBSASS_PATH=$PWD/../libsass-3.4.5)
export PATH=$PWD/../sassc-3.4.1/bin:$PATH

%meson -Dextension_set="all" -Dclassic_mode=true
%meson_build


%install %install
%make_install %meson_install


# Drop useless example extension # Drop useless example extension
rm -r $RPM_BUILD_ROOT%{_datadir}/gnome-shell/extensions/example*/ rm -r $RPM_BUILD_ROOT%{_datadir}/gnome-shell/extensions/example*/
@ -321,7 +331,7 @@ rm $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.exampl




%files -n %{pkg_prefix}-common -f %{name}.lang %files -n %{pkg_prefix}-common -f %{name}.lang
%doc COPYING NEWS README %doc COPYING NEWS README.md




%files -n gnome-classic-session %files -n gnome-classic-session
@ -480,7 +490,29 @@ fi




%changelog %changelog
* Fri Feb 23 2018 Florian Müllner <fmuellner@redhat.com> - 3.26.2-3 * Tue Sep 04 2018 Ray Strode <rstrode@redhat.com> - 3.28.1-5
- Get rid of weird drop shadow next to app menu
Resolves: #1599841

* Wed Aug 01 2018 Ray Strode <rstrode@redhat.com> - 3.28.1-4
- Make icons on desktop default in classic session again
Resolves: #1610477

* Fri Jun 22 2018 Florian Müllner <fmuellner@redhat.com> - 3.28.1-3
- Fix a couple of regressions from the rebase:
- add back classic overview style
- update dash-to-dock to a compatible version
Related: #1569717

* Mon Jun 11 2018 Ray Strode <rstrode@redhat.com> - 3.28.1-2
- Import updated styles from gnome-shell
Related: #1569717

* Fri Jun 08 2018 Ray Strode <rstrode@redhat.com> - 3.28.1-1
- Rebase to 3.28.1
Resolves: #1569717

* Fri Feb 23 2018 Florian Müllner <fmuellner@redhat.com> - 3.26.2-3
- Enable top-icons extension in classic mode - Enable top-icons extension in classic mode
Resolves: #1548446 Resolves: #1548446



Loading…
Cancel
Save