From f59d24a5b4c1e4fa976e3c4cf573a27cb3148dc5 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:54:10 +0000 Subject: import gnome-shell-extensions-3.26.2-3.el7 --- diff --git a/.gitignore b/.gitignore index 0e00f4e..6eaa884 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/gnome-shell-extensions-3.22.2.tar.xz +SOURCES/gnome-shell-extensions-3.26.2.tar.xz diff --git a/.gnome-shell-extensions.metadata b/.gnome-shell-extensions.metadata index 7ede0b6..dbbdacb 100644 --- a/.gnome-shell-extensions.metadata +++ b/.gnome-shell-extensions.metadata @@ -1 +1 @@ -ba47368620b445a98543de0461f05529a3b7a0b9 SOURCES/gnome-shell-extensions-3.22.2.tar.xz +47f7e208484a2a49f87b4db7b66bd4cb8cdbce8e SOURCES/gnome-shell-extensions-3.26.2.tar.xz diff --git a/SOURCES/0001-Include-top-icons-in-classic-session.patch b/SOURCES/0001-Include-top-icons-in-classic-session.patch new file mode 100644 index 0000000..9f46e91 --- /dev/null +++ b/SOURCES/0001-Include-top-icons-in-classic-session.patch @@ -0,0 +1,28 @@ +From d5e0f26fc59216da2b2f129d4395a9da0c63e974 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Fri, 23 Feb 2018 16:56:46 +0100 +Subject: [PATCH] Include top-icons in classic session + +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ddb6422..378783f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -29,9 +29,9 @@ fi + AC_SUBST([SHELL_VERSION]) + + dnl keep this in alphabetic order +-CLASSIC_EXTENSIONS="apps-menu places-menu alternate-tab launch-new-instance window-list" ++CLASSIC_EXTENSIONS="apps-menu places-menu alternate-tab launch-new-instance top-icons 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 systemMonitor 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 updates-dialog user-theme" + AC_SUBST(CLASSIC_EXTENSIONS, [$CLASSIC_EXTENSIONS]) + AC_SUBST(ALL_EXTENSIONS, [$ALL_EXTENSIONS]) + AC_ARG_ENABLE([extensions], +-- +2.14.3 + diff --git a/SOURCES/0001-Update-style.patch b/SOURCES/0001-Update-style.patch new file mode 100644 index 0000000..e92358b --- /dev/null +++ b/SOURCES/0001-Update-style.patch @@ -0,0 +1,36 @@ +From 47d0b2071b07fe70537dde46dc90635e869291f4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Fri, 6 Oct 2017 19:41:06 +0200 +Subject: [PATCH] Update style + +--- + data/gnome-classic.css | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/data/gnome-classic.css b/data/gnome-classic.css +index 086fa12..888b695 100644 +--- a/data/gnome-classic.css ++++ b/data/gnome-classic.css +@@ -689,6 +689,9 @@ StScrollBar { + -st-icon-style: symbolic; + margin-left: 4px; + margin-right: 4px; } ++ #panel .panel-button .panel-logo-icon { ++ padding-right: .4em; ++ icon-size: 1em; } + #panel .panel-button .system-status-icon, + #panel .panel-button .app-menu-icon > StIcon, + #panel .panel-button .popup-menu-arrow { +@@ -1714,6 +1717,9 @@ StScrollBar { + padding-bottom: 12px; + spacing: 8px; + width: 23em; } ++ .login-dialog-prompt-layout .login-dialog-timed-login-indicator { ++ height: 2px; ++ background-color: #8b8b8b; } + + .login-dialog-prompt-label { + color: #bebeb6; +-- +2.14.2 + diff --git a/SOURCES/0001-apps-menu-Explicitly-set-label_actor.patch b/SOURCES/0001-apps-menu-Explicitly-set-label_actor.patch index cc9c24c..b7a1767 100644 --- a/SOURCES/0001-apps-menu-Explicitly-set-label_actor.patch +++ b/SOURCES/0001-apps-menu-Explicitly-set-label_actor.patch @@ -1,4 +1,4 @@ -From 674ad0b6469e6797c83fd5932a670b76def884d5 Mon Sep 17 00:00:00 2001 +From d04e66f692f5022a476c4ad8a9caeb0b5952b7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 17 Mar 2016 17:15:38 +0100 Subject: [PATCH] apps-menu: Explicitly set label_actor @@ -10,10 +10,10 @@ so set the label_actor explicitly as workaround. 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js -index 8e7afef..c840a06 100644 +index 41d1faf..03000bf 100644 --- a/extensions/apps-menu/extension.js +++ b/extensions/apps-menu/extension.js -@@ -36,7 +36,9 @@ const ActivitiesMenuItem = new Lang.Class({ +@@ -38,7 +38,9 @@ const ActivitiesMenuItem = new Lang.Class({ _init: function(button) { this.parent(); this._button = button; @@ -24,7 +24,7 @@ index 8e7afef..c840a06 100644 }, activate: function(event) { -@@ -109,7 +111,9 @@ const CategoryMenuItem = new Lang.Class({ +@@ -140,7 +142,9 @@ const CategoryMenuItem = new Lang.Class({ else name = _("Favorites"); @@ -36,5 +36,5 @@ index 8e7afef..c840a06 100644 }, -- -2.12.0 +2.14.2 diff --git a/SOURCES/0001-apps-menu-add-logo-icon-to-Applications-menu.patch b/SOURCES/0001-apps-menu-add-logo-icon-to-Applications-menu.patch index 98728ad..2f79690 100644 --- a/SOURCES/0001-apps-menu-add-logo-icon-to-Applications-menu.patch +++ b/SOURCES/0001-apps-menu-add-logo-icon-to-Applications-menu.patch @@ -1,41 +1,18 @@ -From f1a607062817a981099349139055618542ea1f05 Mon Sep 17 00:00:00 2001 +From fe6695b8d45fe7d1d9aea8c41c9aa54048a9704d Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 21 Jan 2014 16:48:17 -0500 Subject: [PATCH] apps-menu: add logo icon to Applications menu Brand requested it. --- - data/gnome-classic.css | 3 +++ - extensions/apps-menu/extension.js | 6 ++++++ - 2 files changed, 9 insertions(+) + extensions/apps-menu/extension.js | 5 +++++ + 1 file changed, 5 insertions(+) -diff --git a/data/gnome-classic.css b/data/gnome-classic.css -index 29a4132..f1a004d 100644 ---- a/data/gnome-classic.css -+++ b/data/gnome-classic.css -@@ -686,6 +686,9 @@ StScrollBar { - -st-icon-style: symbolic; - margin-left: 4px; - margin-right: 4px; } -+ #panel .panel-button .panel-logo-icon { -+ padding-right: .4em; -+ icon-size: 1em; } - #panel .panel-button:hover { - color: #454f52; } - #panel .panel-button:active, #panel .panel-button:overview, #panel .panel-button:focus, #panel .panel-button:checked { diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js -index 4792854..8e7afef 100644 +index 2f4002a..41d1faf 100644 --- a/extensions/apps-menu/extension.js +++ b/extensions/apps-menu/extension.js -@@ -1,6 +1,7 @@ - /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ - - const Atk = imports.gi.Atk; -+const Gio = imports.gi.Gio; - const GMenu = imports.gi.GMenu; - const Lang = imports.lang; - const Shell = imports.gi.Shell; -@@ -263,6 +264,11 @@ const ApplicationsButton = new Lang.Class({ +@@ -433,6 +433,11 @@ const ApplicationsButton = new Lang.Class({ let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' }); @@ -48,5 +25,5 @@ index 4792854..8e7afef 100644 y_expand: true, y_align: Clutter.ActorAlign.CENTER }); -- -2.12.0 +2.14.2 diff --git a/SOURCES/0001-classic-shade-panel-in-overview.patch b/SOURCES/0001-classic-shade-panel-in-overview.patch index 4256b72..950629f 100644 --- a/SOURCES/0001-classic-shade-panel-in-overview.patch +++ b/SOURCES/0001-classic-shade-panel-in-overview.patch @@ -1,4 +1,4 @@ -From c391bd5c645398f2978a9dc2755fd076a97ea340 Mon Sep 17 00:00:00 2001 +From c948a42b9b5aad6f26a8b8cb61743eedabf3d83f Mon Sep 17 00:00:00 2001 From: Jakub Steiner Date: Tue, 14 Jan 2014 17:00:23 +0100 Subject: [PATCH] classic: shade panel in overview @@ -11,10 +11,10 @@ Subject: [PATCH] classic: shade panel in overview 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/data/gnome-classic.css b/data/gnome-classic.css -index ee4ec52..29a4132 100644 +index 086fa12..961782f 100644 --- a/data/gnome-classic.css +++ b/data/gnome-classic.css -@@ -1865,12 +1865,10 @@ StScrollBar { +@@ -1891,12 +1891,10 @@ StScrollBar { border-bottom: 1px solid #666; app-icon-bottom-clip: 0px; } #panel:overview { @@ -31,5 +31,5 @@ index ee4ec52..29a4132 100644 -natural-hpadding: 8px; -minimum-hpadding: 4px; -- -2.12.0 +2.14.2 diff --git a/SOURCES/0001-loginDialog-make-info-messages-themed.patch b/SOURCES/0001-loginDialog-make-info-messages-themed.patch index 6e54c8f..25108d7 100644 --- a/SOURCES/0001-loginDialog-make-info-messages-themed.patch +++ b/SOURCES/0001-loginDialog-make-info-messages-themed.patch @@ -1,6 +1,6 @@ -From a382e21acd24a1002fbcc160aa7591ff99b191e6 Mon Sep 17 00:00:00 2001 +From 6bb945c95efae345ca388df4a2251a14a55630a5 Mon Sep 17 00:00:00 2001 From: Ray Strode -Date: Mon, 26 Jun 2017 14:44:06 -0400 +Date: Mon, 26 Jun 2017 14:35:05 -0400 Subject: [PATCH] loginDialog: make info messages themed They were lacking a definition before leading them to @@ -10,37 +10,10 @@ show up invisible. 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/gnome-classic.css b/data/gnome-classic.css -index f1a004d..30c7fca 100644 +index d9291a1..4d0d737 100644 --- a/data/gnome-classic.css +++ b/data/gnome-classic.css -@@ -1599,63 +1599,65 @@ StScrollBar { - box-shadow: inset 0 1px #5d696d; - text-shadow: 0 1px black; - icon-shadow: 0 1px black; } - .login-dialog .modal-dialog-button:default:active { - color: white; - border-color: rgba(0, 0, 0, 0.7); - background-color: #3583d5; - box-shadow: inset 0 0 black; - text-shadow: none; - icon-shadow: none; } - .login-dialog .modal-dialog-button:default:insensitive { - color: #8e9192; - border-color: rgba(0, 0, 0, 0.7); - background-color: rgba(65, 71, 72, 0.7); - box-shadow: none; - text-shadow: none; - icon-shadow: none; } - - .login-dialog-logo-bin { - padding: 24px 0px; } - - .login-dialog-banner { - color: #d6d6d1; } - - .login-dialog-button-box { - spacing: 5px; } - +@@ -1651,9 +1651,11 @@ StScrollBar { .login-dialog-message-warning { color: #f57900; } @@ -54,33 +27,6 @@ index f1a004d..30c7fca 100644 .login-dialog-user-selection-box { padding: 100px 0px; } - .login-dialog-user-selection-box .login-dialog-not-listed-label { - padding-left: 2px; } - .login-dialog-not-listed-button:focus .login-dialog-user-selection-box .login-dialog-not-listed-label, .login-dialog-not-listed-button:hover .login-dialog-user-selection-box .login-dialog-not-listed-label { - color: #eeeeec; } - - .login-dialog-not-listed-label { - font-size: 90%; - font-weight: bold; - color: #a6a69b; - padding-top: 1em; } - - .login-dialog-user-list-view { - -st-vfade-offset: 1em; } - - .login-dialog-user-list { - spacing: 12px; - padding: .2em; - width: 23em; } - .login-dialog-user-list:expanded .login-dialog-user-list-item:focus { - background-color: #4a90d9; - color: #ffffff; } - .login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in { - border-right: 2px solid #4a90d9; } - - .login-dialog-user-list-item { - border-radius: 5px; - padding: .2em; -- -2.13.0 +2.14.2 diff --git a/SOURCES/0001-window-list-Hide-workspace-indicator-when-there-s-1-.patch b/SOURCES/0001-window-list-Hide-workspace-indicator-when-there-s-1-.patch deleted file mode 100644 index c5c6bbb..0000000 --- a/SOURCES/0001-window-list-Hide-workspace-indicator-when-there-s-1-.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 8cb224b951f7271bcc73ae96a5d397ddc888a49c Mon Sep 17 00:00:00 2001 -From: Felipe Borges -Date: Fri, 20 Jan 2017 15:10:11 +0100 -Subject: [PATCH] window-list: Hide workspace indicator when there's 1 - workspace - -There's no need to show the workspace indicator at the right -corner of the window-list if there's just a single workspace -AND the workspace creation is static. This saves us a bit more -of space. - -https://bugzilla.gnome.org/show_bug.cgi?id=777504 ---- - extensions/window-list/extension.js | 25 +++++++++++++++++++++---- - 1 file changed, 21 insertions(+), 4 deletions(-) - -diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js -index 15db297..4d1f83c 100644 ---- a/extensions/window-list/extension.js -+++ b/extensions/window-list/extension.js -@@ -813,10 +813,15 @@ const WindowList = new Lang.Class({ - this._workspaceIndicator = new WorkspaceIndicator(); - indicatorsBox.add(this._workspaceIndicator.container, { expand: false, y_fill: true }); - -+ this._mutterSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' }); - this._workspaceSettings = this._getWorkspaceSettings(); - this._workspacesOnlyOnPrimaryChangedId = - this._workspaceSettings.connect('changed::workspaces-only-on-primary', - Lang.bind(this, this._updateWorkspaceIndicatorVisibility)); -+ this._dynamicWorkspacesSettings = this._getDynamicWorkspacesSettings(); -+ this._dynamicWorkspacesChangedId = -+ this._dynamicWorkspacesSettings.connect('changed::dynamic-workspaces', -+ Lang.bind(this, this._updateWorkspaceIndicatorVisibility)); - this._updateWorkspaceIndicatorVisibility(); - - this._menuManager = new PopupMenu.PopupMenuManager(this); -@@ -898,11 +903,17 @@ const WindowList = new Lang.Class({ - this._groupingModeChanged(); - }, - -+ _getDynamicWorkspacesSettings: function() { -+ if (this._workspaceSettings.list_keys().indexOf('dynamic-workspaces') > -1) -+ return this._workspaceSettings; -+ return this._mutterSettings; -+ }, -+ - _getWorkspaceSettings: function() { - let settings = global.get_overrides_settings(); - if (settings.list_keys().indexOf('workspaces-only-on-primary') > -1) - return settings; -- return new Gio.Settings({ schema_id: 'org.gnome.mutter' }); -+ return this._mutterSettings; - }, - - _onScrollEvent: function(actor, event) { -@@ -936,9 +947,12 @@ const WindowList = new Lang.Class({ - }, - - _updateWorkspaceIndicatorVisibility: function() { -- this._workspaceIndicator.actor.visible = -- this._monitor == Main.layoutManager.primaryMonitor || -- !this._workspaceSettings.get_boolean('workspaces-only-on-primary'); -+ let hasWorkspaces = this._dynamicWorkspacesSettings.get_boolean('dynamic-workspaces') || -+ global.screen.n_workspaces > 1; -+ let workspacesOnMonitor = this._monitor == Main.layoutManager.primaryMonitor || -+ !this._workspaceSettings.get_boolean('workspaces-only-on-primary'); -+ -+ this._workspaceIndicator.actor.visible = hasWorkspaces && workspacesOnMonitor; - }, - - _getPreferredUngroupedWindowListWidth: function() { -@@ -1109,6 +1123,8 @@ const WindowList = new Lang.Class({ - Lang.bind(this, this._onWindowRemoved)); - this._workspaceSignals.set(workspace, signals); - } -+ -+ this._updateWorkspaceIndicatorVisibility(); - }, - - _disconnectWorkspaceSignals: function() { -@@ -1177,6 +1193,7 @@ const WindowList = new Lang.Class({ - - _onDestroy: function() { - this._workspaceSettings.disconnect(this._workspacesOnlyOnPrimaryChangedId); -+ this._dynamicWorkspacesSettings.disconnect(this._dynamicWorkspacesChangedId); - - this._workspaceIndicator.destroy(); - --- -2.12.0 - diff --git a/SOURCES/add-extra-extensions.patch b/SOURCES/add-extra-extensions.patch index c5d0617..661d577 100644 --- a/SOURCES/add-extra-extensions.patch +++ b/SOURCES/add-extra-extensions.patch @@ -1,22 +1,22 @@ -From 2c81d3faaff49f5e4595869cffeccfaa3d5eb980 Mon Sep 17 00:00:00 2001 +From 8cf377db7c25c6908803bdf118e8a4c419479b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 20 May 2015 17:44:50 +0200 -Subject: [PATCH 1/4] Add top-icons extension +Subject: [PATCH 1/5] Add top-icons extension --- configure.ac | 5 +- extensions/top-icons/Makefile.am | 3 + - extensions/top-icons/extension.js | 192 ++++++++++++++++++++++++++++++++++ + extensions/top-icons/extension.js | 225 ++++++++++++++++++++++++++++++++++ extensions/top-icons/metadata.json.in | 10 ++ extensions/top-icons/stylesheet.css | 1 + - 5 files changed, 209 insertions(+), 2 deletions(-) + 5 files changed, 242 insertions(+), 2 deletions(-) create mode 100644 extensions/top-icons/Makefile.am create mode 100644 extensions/top-icons/extension.js create mode 100644 extensions/top-icons/metadata.json.in create mode 100644 extensions/top-icons/stylesheet.css diff --git a/configure.ac b/configure.ac -index c5a8c45..3b7aca9 100644 +index 93776e5..8880911 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ AC_SUBST([SHELL_VERSION]) @@ -56,10 +56,10 @@ index 0000000..4650164 +include ../../extension.mk diff --git a/extensions/top-icons/extension.js b/extensions/top-icons/extension.js new file mode 100644 -index 0000000..97f8c78 +index 0000000..953ea28 --- /dev/null +++ b/extensions/top-icons/extension.js -@@ -0,0 +1,192 @@ +@@ -0,0 +1,225 @@ +// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- + +const Clutter = imports.gi.Clutter; @@ -73,30 +73,45 @@ index 0000000..97f8c78 +const Meta = imports.gi.Meta; +const Mainloop = imports.mainloop; +const NotificationDaemon = imports.ui.notificationDaemon; ++const System = imports.system; + +let trayAddedId = 0; +let trayRemovedId = 0; +let getSource = null; +let icons = []; -+let notificationDaemon; ++let notificationDaemon = null; ++let sysTray = null; ++ ++const PANEL_ICON_SIZE = 24; + +function init() { + if (Main.legacyTray) { + notificationDaemon = Main.legacyTray; + NotificationDaemon.STANDARD_TRAY_ICON_IMPLEMENTATIONS = imports.ui.legacyTray.STANDARD_TRAY_ICON_IMPLEMENTATIONS; + } -+ else if (Main.notificationDaemon._fdoNotificationDaemon) { ++ else if (Main.notificationDaemon._fdoNotificationDaemon && ++ Main.notificationDaemon._fdoNotificationDaemon._trayManager) { + notificationDaemon = Main.notificationDaemon._fdoNotificationDaemon; + getSource = Lang.bind(notificationDaemon, NotificationDaemon.FdoNotificationDaemon.prototype._getSource); + } -+ else { ++ else if (Main.notificationDaemon._trayManager) { + notificationDaemon = Main.notificationDaemon; + getSource = Lang.bind(notificationDaemon, NotificationDaemon.NotificationDaemon.prototype._getSource); + } ++ else { ++ NotificationDaemon.STANDARD_TRAY_ICON_IMPLEMENTATIONS = { ++ 'bluetooth-applet': 1, 'gnome-sound-applet': 1, 'nm-applet': 1, ++ 'gnome-power-manager': 1, 'keyboard': 1, 'a11y-keyboard': 1, ++ 'kbd-scrolllock': 1, 'kbd-numlock': 1, 'kbd-capslock': 1, 'ibus-ui-gtk': 1 ++ }; ++ } +} + +function enable() { -+ GLib.idle_add(GLib.PRIORITY_LOW, moveToTop); ++ if (notificationDaemon) ++ GLib.idle_add(GLib.PRIORITY_LOW, moveToTop); ++ else ++ createTray(); +} + +function createSource (title, pid, ndata, sender, trayIcon) { @@ -118,7 +133,7 @@ index 0000000..97f8c78 + let parent = box.get_parent(); + + let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; -+ let iconSize = Panel.PANEL_ICON_SIZE * scaleFactor; ++ let iconSize = PANEL_ICON_SIZE * scaleFactor; + + icon.set_size(iconSize, iconSize); + box.add_actor(icon); @@ -177,6 +192,21 @@ index 0000000..97f8c78 + icons.splice(icons.indexOf(icon), 1); +} + ++function createTray() { ++ sysTray = new Shell.TrayManager(); ++ sysTray.connect('tray-icon-added', onTrayIconAdded); ++ sysTray.connect('tray-icon-removed', onTrayIconRemoved); ++ sysTray.manage_screen(global.screen, Main.panel.actor); ++} ++ ++function destroyTray() { ++ icons.forEach(icon => { icon.get_parent().destroy(); }); ++ icons = []; ++ ++ sysTray = null; ++ System.gc(); // force finalizing tray to unmanage screen ++} ++ +function moveToTop() { + notificationDaemon._trayManager.disconnect(notificationDaemon._trayIconAddedId); + notificationDaemon._trayManager.disconnect(notificationDaemon._trayIconRemovedId); @@ -250,7 +280,10 @@ index 0000000..97f8c78 +} + +function disable() { -+ moveToTray(); ++ if (notificationDaemon) ++ moveToTray(); ++ else ++ destroyTray(); +} diff --git a/extensions/top-icons/metadata.json.in b/extensions/top-icons/metadata.json.in new file mode 100644 @@ -276,13 +309,13 @@ index 0000000..25134b6 @@ -0,0 +1 @@ +/* This extensions requires no special styling */ -- -2.13.0 +2.14.2 -From 774167b7d8a0f413c8ffce2979bc69e9e1e28466 Mon Sep 17 00:00:00 2001 +From 1c3daaf0284f93f8fb0b80acae332c9629aabd6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 20 May 2015 18:05:41 +0200 -Subject: [PATCH 2/4] Add dash-to-dock extension +Subject: [PATCH 2/5] Add dash-to-dock extension --- configure.ac | 5 +- @@ -323,7 +356,7 @@ Subject: [PATCH 2/4] Add dash-to-dock extension create mode 100644 extensions/dash-to-dock/windowPreview.js diff --git a/configure.ac b/configure.ac -index 3b7aca9..cc7cd29 100644 +index 8880911..4178191 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ AC_SUBST([SHELL_VERSION]) @@ -12999,13 +13032,13 @@ index 0000000..4f84b4d +}); + -- -2.13.0 +2.14.2 -From aa76304194ae13defe36cadf3aa8e73031d7a7ad Mon Sep 17 00:00:00 2001 +From 9f6e5b7f81fe3796d04ee8585a8319bb6aa17b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 20 May 2015 18:55:47 +0200 -Subject: [PATCH 3/4] Add panel-favorites extension +Subject: [PATCH 3/5] Add panel-favorites extension --- configure.ac | 5 +- @@ -13020,7 +13053,7 @@ Subject: [PATCH 3/4] Add panel-favorites extension create mode 100644 extensions/panel-favorites/stylesheet.css diff --git a/configure.ac b/configure.ac -index cc7cd29..f05b0cb 100644 +index 4178191..0602094 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ AC_SUBST([SHELL_VERSION]) @@ -13368,13 +13401,13 @@ index 0000000..120adac + -y-offset: 6px; +} -- -2.13.0 +2.14.2 -From d1f53a86db0e65d08cc7664561b874169c4dd85c Mon Sep 17 00:00:00 2001 +From baec74c44a6d57b4525466403d164a5ab0112259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 4 Mar 2016 17:07:21 +0100 -Subject: [PATCH 4/4] Add updates-dialog extension +Subject: [PATCH 4/5] Add updates-dialog extension --- configure.ac | 5 +- @@ -13392,7 +13425,7 @@ Subject: [PATCH 4/4] Add updates-dialog extension create mode 100644 extensions/updates-dialog/stylesheet.css diff --git a/configure.ac b/configure.ac -index f05b0cb..7944b52 100644 +index 0602094..98c6983 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ AC_SUBST([SHELL_VERSION]) @@ -14001,5 +14034,124 @@ index d98ca1b..43a817f 100644 extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml extensions/window-list/extension.js -- -2.13.0 +2.14.2 + + +From d640b8f483903cf13c0a1c09fbc4b064dea3b920 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Thu, 1 Jun 2017 23:57:14 +0200 +Subject: [PATCH 5/5] Add no-hot-corner extension + +--- + configure.ac | 5 +++-- + extensions/no-hot-corner/Makefile.am | 3 +++ + extensions/no-hot-corner/extension.js | 31 +++++++++++++++++++++++++++++++ + extensions/no-hot-corner/metadata.json.in | 9 +++++++++ + extensions/no-hot-corner/stylesheet.css | 1 + + 5 files changed, 47 insertions(+), 2 deletions(-) + create mode 100644 extensions/no-hot-corner/Makefile.am + create mode 100644 extensions/no-hot-corner/extension.js + create mode 100644 extensions/no-hot-corner/metadata.json.in + create mode 100644 extensions/no-hot-corner/stylesheet.css + +diff --git a/configure.ac b/configure.ac +index 98c6983..34b2171 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 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 top-icons updates-dialog user-theme" + AC_SUBST(CLASSIC_EXTENSIONS, [$CLASSIC_EXTENSIONS]) + AC_SUBST(ALL_EXTENSIONS, [$ALL_EXTENSIONS]) + AC_ARG_ENABLE([extensions], +@@ -63,7 +63,7 @@ ENABLED_EXTENSIONS= + for e in $enable_extensions; do + case $e in + 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|panel-favorites|places-menu|screenshot-window-sizer|top-icons|updates-dialog|user-theme|window-list|windowsNavigator|workspace-indicator) ++ 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" + ;; + *) +@@ -86,6 +86,7 @@ AC_CONFIG_FILES([ + extensions/example/Makefile + extensions/launch-new-instance/Makefile + extensions/native-window-placement/Makefile ++ extensions/no-hot-corner/Makefile + extensions/panel-favorites/Makefile + extensions/places-menu/Makefile + extensions/screenshot-window-sizer/Makefile +diff --git a/extensions/no-hot-corner/Makefile.am b/extensions/no-hot-corner/Makefile.am +new file mode 100644 +index 0000000..903b272 +--- /dev/null ++++ b/extensions/no-hot-corner/Makefile.am +@@ -0,0 +1,3 @@ ++EXTENSION_ID = no-hot-corner ++ ++include ../../extension.mk +diff --git a/extensions/no-hot-corner/extension.js b/extensions/no-hot-corner/extension.js +new file mode 100644 +index 0000000..e7a0d63 +--- /dev/null ++++ b/extensions/no-hot-corner/extension.js +@@ -0,0 +1,31 @@ ++const Main = imports.ui.main; ++ ++let _id; ++ ++function _disableHotCorners() { ++ // Disables all hot corners ++ Main.layoutManager.hotCorners.forEach(function(hotCorner) { ++ if (!hotCorner) { ++ return; ++ } ++ ++ hotCorner._toggleOverview = function() {}; ++ hotCorner._pressureBarrier._trigger = function() {}; ++ }); ++} ++ ++function init() { ++} ++ ++function enable() { ++ _disableHotCorners(); ++ // Hot corners may be re-created afterwards (for example, If there's a monitor change). ++ // So we catch all changes. ++ _id = Main.layoutManager.connect('hot-corners-changed', _disableHotCorners); ++} ++ ++function disable() { ++ // Disconnects the callback and re-creates the hot corners ++ Main.layoutManager.disconnect(_id); ++ Main.layoutManager._updateHotCorners(); ++} +diff --git a/extensions/no-hot-corner/metadata.json.in b/extensions/no-hot-corner/metadata.json.in +new file mode 100644 +index 0000000..406d83b +--- /dev/null ++++ b/extensions/no-hot-corner/metadata.json.in +@@ -0,0 +1,9 @@ ++{ ++"extension-id": "@extension_id@", ++"uuid": "@uuid@", ++"name": "No Topleft Hot Corner", ++"description": "Disable the hot corner in the top left; you can still reach the overview by clicking the Activities button or pressing the dedicated key.", ++"shell-version": [ "@shell_current@" ], ++"url": "https://github.com/HROMANO/nohotcorner/", ++"version": 15 ++} +diff --git a/extensions/no-hot-corner/stylesheet.css b/extensions/no-hot-corner/stylesheet.css +new file mode 100644 +index 0000000..25134b6 +--- /dev/null ++++ b/extensions/no-hot-corner/stylesheet.css +@@ -0,0 +1 @@ ++/* This extensions requires no special styling */ +-- +2.14.2 diff --git a/SOURCES/apps-menu-desktop-dnd.patch b/SOURCES/apps-menu-desktop-dnd.patch deleted file mode 100644 index 41c2eed..0000000 --- a/SOURCES/apps-menu-desktop-dnd.patch +++ /dev/null @@ -1,460 +0,0 @@ -From 5aad5b8cb31833cb2db12cd0b9c2c4daceb93536 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Wed, 15 Mar 2017 05:16:49 +0100 -Subject: [PATCH 1/5] apps-menu: Use Map to keep track of app items - -The use of Array to keep track of inserted items is extremely -confusing, as no elements are ever added to the array. What -the code actually does is monkey-patching properties into an -empty object (that happens to be of type "Array"). While the -direct idiomatic replacement would be {}, update the code to -use a proper map instead. - -https://bugzilla.gnome.org/show_bug.cgi?id=780371 ---- - extensions/apps-menu/extension.js | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - -diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js -index c840a06..5f44b42 100644 ---- a/extensions/apps-menu/extension.js -+++ b/extensions/apps-menu/extension.js -@@ -296,6 +296,7 @@ const ApplicationsButton = new Lang.Class({ - Lang.bind(this, this._setKeybinding)); - this._setKeybinding(); - -+ this._applicationsButtons = new Map(); - this.reloadFlag = false; - this._createLayout(); - this._display(); -@@ -504,7 +505,7 @@ const ApplicationsButton = new Lang.Class({ - }, - - _display: function() { -- this._applicationsButtons = new Array(); -+ this._applicationsButtons.clear(); - this.mainBox.style=('width: 35em;'); - this.mainBox.hide(); - -@@ -563,12 +564,13 @@ const ApplicationsButton = new Lang.Class({ - if (apps) { - for (let i = 0; i < apps.length; i++) { - let app = apps[i]; -- if (!this._applicationsButtons[app]) { -- let applicationMenuItem = new ApplicationMenuItem(this, app); -- this._applicationsButtons[app] = applicationMenuItem; -+ let item = this._applicationsButtons.get(app); -+ if (!item) { -+ item = new ApplicationMenuItem(this, app); -+ this._applicationsButtons.set(app, item); - } -- if (!this._applicationsButtons[app].actor.get_parent()) -- this.applicationsBox.add_actor(this._applicationsButtons[app].actor); -+ if (!item.actor.get_parent()) -+ this.applicationsBox.add_actor(item.actor); - } - } - }, --- -2.12.2 - - -From 7ed3f8618af00d6d0fb1440b6668d336b2b611d0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Wed, 15 Mar 2017 01:30:53 +0100 -Subject: [PATCH 2/5] apps-menu: Allow creating desktop launchers via DND - -Back in the olden days, it used to be possible to drag items from -the application menu to the desktop to create a launcher shortcut. -Reimplement that "classic" functionality in the apps menu extension. - -https://bugzilla.gnome.org/show_bug.cgi?id=780371 ---- - extensions/apps-menu/extension.js | 116 +++++++++++++++++++++++++++++++++++++- - 1 file changed, 115 insertions(+), 1 deletion(-) - -diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js -index 5f44b42..160975d 100644 ---- a/extensions/apps-menu/extension.js -+++ b/extensions/apps-menu/extension.js -@@ -1,6 +1,7 @@ - /* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */ - - const Atk = imports.gi.Atk; -+const DND = imports.ui.dnd; - const Gio = imports.gi.Gio; - const GMenu = imports.gi.GMenu; - const Lang = imports.lang; -@@ -8,6 +9,7 @@ const Shell = imports.gi.Shell; - const St = imports.gi.St; - 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; -@@ -73,6 +75,16 @@ const ApplicationMenuItem = new Lang.Class({ - textureCache.disconnect(iconThemeChangedId); - })); - this._updateIcon(); -+ -+ this.actor._delegate = this; -+ let draggable = DND.makeDraggable(this.actor); -+ -+ draggable.connect('drag-begin', () => { -+ Shell.util_set_hidden_from_pick(Main.legacyTray.actor, true); -+ }); -+ draggable.connect('drag-end', () => { -+ Shell.util_set_hidden_from_pick(Main.legacyTray.actor, false); -+ }); - }, - - activate: function(event) { -@@ -88,8 +100,16 @@ const ApplicationMenuItem = new Lang.Class({ - this.parent(active, params); - }, - -+ getDragActor: function() { -+ return this._app.create_icon_texture(APPLICATION_ICON_SIZE); -+ }, -+ -+ getDragActorSource: function() { -+ return this._iconBin; -+ }, -+ - _updateIcon: function() { -- this._iconBin.set_child(this._app.create_icon_texture(APPLICATION_ICON_SIZE)); -+ this._iconBin.set_child(this.getDragActor()); - } - }); - -@@ -251,6 +271,93 @@ const ApplicationsMenu = new Lang.Class({ - } - }); - -+const DesktopTarget = new Lang.Class({ -+ Name: 'DesktopTarget', -+ -+ _init: function() { -+ this._desktopDestroyedId = 0; -+ -+ this._windowAddedId = -+ global.window_group.connect('actor-added', -+ Lang.bind(this, this._onWindowAdded)); -+ -+ global.get_window_actors().forEach(a => { -+ this._onWindowAdded(a.get_parent(), a); -+ }); -+ }, -+ -+ _onWindowAdded: function(group, actor) { -+ if (!(actor instanceof Meta.WindowActor)) -+ return; -+ -+ if (actor.meta_window.get_window_type() == Meta.WindowType.DESKTOP) -+ this._setDesktop(actor); -+ }, -+ -+ _setDesktop: function(desktop) { -+ if (this._desktop) { -+ this._desktop.disconnect(this._desktopDestroyedId); -+ this._desktopDestroyedId = 0; -+ -+ delete this._desktop._delegate; -+ } -+ -+ this._desktop = desktop; -+ -+ if (this._desktop) { -+ this._desktopDestroyedId = this._desktop.connect('destroy', () => { -+ this._setDesktop(null); -+ }); -+ this._desktop._delegate = this; -+ } -+ }, -+ -+ _getSourceAppInfo: function(source) { -+ if (!(source instanceof ApplicationMenuItem)) -+ return null; -+ return source._app.app_info; -+ }, -+ -+ destroy: function() { -+ if (this._windowAddedId) -+ global.window_group.disconnect(this._windowAddedId); -+ this._windowAddedId = 0; -+ -+ this._setDesktop(null); -+ }, -+ -+ handleDragOver: function(source, actor, x, y, time) { -+ let appInfo = this._getSourceAppInfo(source); -+ if (!appInfo) -+ return DND.DragMotionResult.CONTINUE; -+ -+ return DND.DragMotionResult.COPY_DROP; -+ }, -+ -+ acceptDrop: function(source, actor, x, y, time) { -+ let appInfo = this._getSourceAppInfo(source); -+ if (!appInfo) -+ return false; -+ -+ this.emit('app-dropped'); -+ -+ let desktop = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_DESKTOP); -+ -+ let src = Gio.File.new_for_path(appInfo.get_filename()); -+ let dst = Gio.File.new_for_path(GLib.build_filenamev([desktop, src.get_basename()])); -+ -+ try { -+ // copy_async() isn't introspectable :-( -+ src.copy(dst, Gio.FileCopyFlags.OVERWRITE, null, null); -+ } catch(e) { -+ log('Failed to copy to desktop: ' + e.message); -+ } -+ -+ return true; -+ } -+}); -+Signals.addSignalMethods(DesktopTarget.prototype); -+ - const ApplicationsButton = new Lang.Class({ - Name: 'ApplicationsButton', - Extends: PanelMenu.Button, -@@ -296,6 +403,11 @@ const ApplicationsButton = new Lang.Class({ - Lang.bind(this, this._setKeybinding)); - this._setKeybinding(); - -+ this._desktopTarget = new DesktopTarget(); -+ this._desktopTarget.connect('app-dropped', () => { -+ this.menu.close(); -+ }); -+ - this._applicationsButtons = new Map(); - this.reloadFlag = false; - this._createLayout(); -@@ -340,6 +452,8 @@ const ApplicationsButton = new Lang.Class({ - Main.sessionMode.hasOverview ? - Lang.bind(Main.overview, Main.overview.toggle) : - null); -+ -+ this._desktopTarget.destroy(); - }, - - _onCapturedEvent: function(actor, event) { --- -2.12.2 - - -From c90b4ec5daf6d3906360e61330a7aa386470d65b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Wed, 15 Mar 2017 05:23:57 +0100 -Subject: [PATCH 3/5] apps-menu: Only enable DND when there's a desktop - -It's not very useful to allow dragging when there's no drop target, -so tie the functionality added in the previous commit to the presence -of a DESKTOP window. - -https://bugzilla.gnome.org/show_bug.cgi?id=780371 ---- - extensions/apps-menu/extension.js | 24 ++++++++++++++++++++++++ - 1 file changed, 24 insertions(+) - -diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js -index 160975d..a013a3e 100644 ---- a/extensions/apps-menu/extension.js -+++ b/extensions/apps-menu/extension.js -@@ -79,6 +79,13 @@ const ApplicationMenuItem = new Lang.Class({ - this.actor._delegate = this; - let draggable = DND.makeDraggable(this.actor); - -+ let maybeStartDrag = draggable._maybeStartDrag; -+ draggable._maybeStartDrag = (event) => { -+ if (this._dragEnabled) -+ return maybeStartDrag.call(draggable, event); -+ return false; -+ }; -+ - draggable.connect('drag-begin', () => { - Shell.util_set_hidden_from_pick(Main.legacyTray.actor, true); - }); -@@ -100,6 +107,13 @@ const ApplicationMenuItem = new Lang.Class({ - this.parent(active, params); - }, - -+ setDragEnabled: function(enable) { -+ if (this._dragEnabled == enable) -+ return; -+ -+ this._dragEnabled = enable; -+ }, -+ - getDragActor: function() { - return this._app.create_icon_texture(APPLICATION_ICON_SIZE); - }, -@@ -286,6 +300,10 @@ const DesktopTarget = new Lang.Class({ - }); - }, - -+ get hasDesktop() { -+ return this._desktop != null; -+ }, -+ - _onWindowAdded: function(group, actor) { - if (!(actor instanceof Meta.WindowActor)) - return; -@@ -303,6 +321,7 @@ const DesktopTarget = new Lang.Class({ - } - - this._desktop = desktop; -+ this.emit('desktop-changed'); - - if (this._desktop) { - this._desktopDestroyedId = this._desktop.connect('destroy', () => { -@@ -407,6 +426,10 @@ const ApplicationsButton = new Lang.Class({ - this._desktopTarget.connect('app-dropped', () => { - this.menu.close(); - }); -+ this._desktopTarget.connect('desktop-changed', () => { -+ for (let item of this._applicationsButtons.values()) -+ item.setDragEnabled(this._desktopTarget.hasDesktop); -+ }); - - this._applicationsButtons = new Map(); - this.reloadFlag = false; -@@ -681,6 +704,7 @@ const ApplicationsButton = new Lang.Class({ - let item = this._applicationsButtons.get(app); - if (!item) { - item = new ApplicationMenuItem(this, app); -+ item.setDragEnabled(this._desktopTarget.hasDesktop); - this._applicationsButtons.set(app, item); - } - if (!item.actor.get_parent()) --- -2.12.2 - - -From f88c53b1a31e3937cbcb5e15f77a385f063bc04f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Fri, 21 Apr 2017 23:54:41 +0200 -Subject: [PATCH 4/5] apps-menu: Mark copied .desktop files as trusted - -The application can already be launched from the menu without further -confirmation from the user, so there is no security gain in asking the -user to trust it when launched from the desktop - just set the appropriate -attributes of the newly copied file to mark it as trusted to nautilus. - -https://bugzilla.gnome.org/show_bug.cgi?id=781596 ---- - extensions/apps-menu/extension.js | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js -index a013a3e..665cc71 100644 ---- a/extensions/apps-menu/extension.js -+++ b/extensions/apps-menu/extension.js -@@ -337,6 +337,30 @@ const DesktopTarget = new Lang.Class({ - return source._app.app_info; - }, - -+ _markTrusted: function(file) { -+ let modeAttr = Gio.FILE_ATTRIBUTE_UNIX_MODE; -+ let trustedAttr = 'metadata::trusted'; -+ let queryFlags = Gio.FileQueryInfoFlags.NONE; -+ let ioPriority = GLib.PRIORITY_DEFAULT; -+ -+ file.query_info_async(modeAttr, queryFlags, ioPriority, null, -+ (o, res) => { -+ try { -+ let info = o.query_info_finish(res); -+ let mode = info.get_attribute_uint32(modeAttr) | 0100; -+ -+ info.set_attribute_uint32(modeAttr, mode); -+ info.set_attribute_string(trustedAttr, 'yes'); -+ file.set_attributes_async (info, queryFlags, ioPriority, null, -+ (o, res) => { -+ o.set_attributes_finish(res); -+ }); -+ } catch(e) { -+ log('Failed to mark file as trusted: ' + e.message); -+ } -+ }); -+ }, -+ - destroy: function() { - if (this._windowAddedId) - global.window_group.disconnect(this._windowAddedId); -@@ -368,6 +392,7 @@ const DesktopTarget = new Lang.Class({ - try { - // copy_async() isn't introspectable :-( - src.copy(dst, Gio.FileCopyFlags.OVERWRITE, null, null); -+ this._markTrusted(dst); - } catch(e) { - log('Failed to copy to desktop: ' + e.message); - } --- -2.12.2 - - -From 7c91918e6c7cea50f1d1f6fc25c24154b495c104 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Sat, 22 Apr 2017 00:21:37 +0200 -Subject: [PATCH 5/5] apps-menu: 'Touch' copied .desktop file after updating - attributes - -At least for now, nautilus' file monitor is blind to certain metadata -updates: -https://git.gnome.org/browse/nautilus/tree/src/nautilus-mime-actions.c#n1537 - -So in order for the changes in the previous patch to take effect -immediately, we need to force nautilus to reload the file info. -Achieve this by updating the access time of the newly copied file -after marking it as trusted. - -https://bugzilla.gnome.org/show_bug.cgi?id=781596 ---- - extensions/apps-menu/extension.js | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js -index 665cc71..d2613c5 100644 ---- a/extensions/apps-menu/extension.js -+++ b/extensions/apps-menu/extension.js -@@ -337,6 +337,23 @@ const DesktopTarget = new Lang.Class({ - return source._app.app_info; - }, - -+ _touchFile: function(file) { -+ let queryFlags = Gio.FileQueryInfoFlags.NONE; -+ let ioPriority = GLib.PRIORITY_DEFAULT; -+ -+ let info = new Gio.FileInfo(); -+ info.set_attribute_uint64(Gio.FILE_ATTRIBUTE_TIME_ACCESS, -+ GLib.get_real_time()); -+ file.set_attributes_async (info, queryFlags, ioPriority, null, -+ (o, res) => { -+ try { -+ o.set_attributes_finish(res); -+ } catch(e) { -+ log('Failed to update access time: ' + e.message); -+ } -+ }); -+ }, -+ - _markTrusted: function(file) { - let modeAttr = Gio.FILE_ATTRIBUTE_UNIX_MODE; - let trustedAttr = 'metadata::trusted'; -@@ -354,6 +371,9 @@ const DesktopTarget = new Lang.Class({ - file.set_attributes_async (info, queryFlags, ioPriority, null, - (o, res) => { - o.set_attributes_finish(res); -+ -+ // Hack: force nautilus to reload file info -+ this._touchFile(file); - }); - } catch(e) { - log('Failed to mark file as trusted: ' + e.message); --- -2.12.2 - diff --git a/SOURCES/apps-menu-follow-sort-order.patch b/SOURCES/apps-menu-follow-sort-order.patch new file mode 100644 index 0000000..d6238ea --- /dev/null +++ b/SOURCES/apps-menu-follow-sort-order.patch @@ -0,0 +1,107 @@ +From d19a80a7e7b7a19a723365bae85cc99ebd5bc25b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Fri, 13 Oct 2017 00:30:31 +0200 +Subject: [PATCH 1/2] apps-menu: Don't override sort order + +Keep the order in which GMenu returns loaded apps, so users can +reorder entries in Alacarte. + +https://bugzilla.gnome.org/show_bug.cgi?id=788939 +--- + extensions/apps-menu/extension.js | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js +index e430140..dba31e7 100644 +--- a/extensions/apps-menu/extension.js ++++ b/extensions/apps-menu/extension.js +@@ -745,9 +745,6 @@ const ApplicationsButton = new Lang.Class({ + + if (category_menu_id) { + applist = this.applicationsByCategory[category_menu_id]; +- applist.sort(function(a,b) { +- return a.get_name().toLowerCase() > b.get_name().toLowerCase(); +- }); + } else { + applist = new Array(); + let favorites = global.settings.get_strv('favorite-apps'); +-- +2.14.2 + + +From a9d09c692cfb2944cdfd5b5c61140b3f9aa4b250 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Fri, 13 Oct 2017 01:43:20 +0200 +Subject: [PATCH 2/2] apps-menu: Reload on tree changes + +Now that we respect the sort order defined in the .menu file, make +sure to reload the menu on those changes as well, not just when +the installed apps themselves change. + +https://bugzilla.gnome.org/show_bug.cgi?id=788939 +--- + extensions/apps-menu/extension.js | 30 +++++++++++++++++++----------- + 1 file changed, 19 insertions(+), 11 deletions(-) + +diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js +index dba31e7..600eda3 100644 +--- a/extensions/apps-menu/extension.js ++++ b/extensions/apps-menu/extension.js +@@ -466,18 +466,25 @@ const ApplicationsButton = new Lang.Class({ + }); + }); + ++ this._tree = new GMenu.Tree({ menu_basename: 'applications.menu' }); ++ this._treeChangedId = this._tree.connect('changed', ++ Lang.bind(this, this._onTreeChanged)); ++ + this._applicationsButtons = new Map(); + this.reloadFlag = false; + this._createLayout(); + this._display(); +- this._installedChangedId = appSys.connect('installed-changed', Lang.bind(this, function() { +- if (this.menu.isOpen) { +- this._redisplay(); +- this.mainBox.show(); +- } else { +- this.reloadFlag = true; +- } +- })); ++ this._installedChangedId = appSys.connect('installed-changed', ++ Lang.bind(this, this._onTreeChanged)); ++ }, ++ ++ _onTreeChanged: function() { ++ if (this.menu.isOpen) { ++ this._redisplay(); ++ this.mainBox.show(); ++ } else { ++ this.reloadFlag = true; ++ } + }, + + get hotCorner() { +@@ -495,6 +502,8 @@ const ApplicationsButton = new Lang.Class({ + Main.overview.disconnect(this._showingId); + Main.overview.disconnect(this._hidingId); + appSys.disconnect(this._installedChangedId); ++ this._tree.disconnect(this._treeChangedId); ++ this._tree = null; + + Main.wm.setCustomKeybindingHandler('panel-main-menu', + Shell.ActionMode.NORMAL | +@@ -675,9 +684,8 @@ const ApplicationsButton = new Lang.Class({ + + //Load categories + this.applicationsByCategory = {}; +- let tree = new GMenu.Tree({ menu_basename: 'applications.menu' }); +- tree.load_sync(); +- let root = tree.get_root_directory(); ++ 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(); +-- +2.14.2 + diff --git a/SOURCES/apps-menu-support-separators.patch b/SOURCES/apps-menu-support-separators.patch new file mode 100644 index 0000000..fdd7dbb --- /dev/null +++ b/SOURCES/apps-menu-support-separators.patch @@ -0,0 +1,100 @@ +From a91f33c152c1f463d21a388727e64945c88e4d54 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Fri, 13 Oct 2017 01:20:17 +0200 +Subject: [PATCH 1/2] apps-menu: Minor code cleanup + +The parameter to _clearApplicationBox() has never been used, so +remove it. In fact, modern javascript makes the function so compact +that we can just move the code inline. + +https://bugzilla.gnome.org/show_bug.cgi?id=788939 +--- + extensions/apps-menu/extension.js | 15 +++------------ + 1 file changed, 3 insertions(+), 12 deletions(-) + +diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js +index 600eda3..8138d4c 100644 +--- a/extensions/apps-menu/extension.js ++++ b/extensions/apps-menu/extension.js +@@ -712,19 +712,10 @@ const ApplicationsButton = new Lang.Class({ + this.mainBox.style+=('height: ' + height); + }, + +- _clearApplicationsBox: function(selectedActor) { +- let actors = this.applicationsBox.get_children(); +- for (let i = 0; i < actors.length; i++) { +- let actor = actors[i]; +- this.applicationsBox.remove_actor(actor); +- } +- }, +- + selectCategory: function(dir, categoryMenuItem) { +- if (categoryMenuItem) +- this._clearApplicationsBox(categoryMenuItem.actor); +- else +- this._clearApplicationsBox(null); ++ this.applicationsBox.get_children().forEach(c => { ++ this.applicationsBox.remove_actor(c); ++ }); + + if (dir) + this._displayButtons(this._listApplications(dir.get_menu_id())); +-- +2.14.2 + + +From dd79357f429fabfec63ab1ea772428000bf038d0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Fri, 13 Oct 2017 01:44:19 +0200 +Subject: [PATCH 2/2] apps-menu: Support separators + +We currently only load entries and directories, and ignore any +separators defined by the user/admin. Make some people happy +by supporting them ... + +https://bugzilla.gnome.org/show_bug.cgi?id=788939 +--- + extensions/apps-menu/extension.js | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js +index 8138d4c..c2ecf5f 100644 +--- a/extensions/apps-menu/extension.js ++++ b/extensions/apps-menu/extension.js +@@ -592,6 +592,8 @@ const ApplicationsButton = new Lang.Class({ + app = new Shell.App({ app_info: entry.get_app_info() }); + if (app.get_app_info().should_show()) + this.applicationsByCategory[categoryId].push(app); ++ } else if (nextType == GMenu.TreeItemType.SEPARATOR) { ++ this.applicationsByCategory[categoryId].push('separator'); + } else if (nextType == GMenu.TreeItemType.DIRECTORY) { + let subdir = iter.get_directory(); + if (!subdir.get_is_nodisplay()) +@@ -714,7 +716,10 @@ const ApplicationsButton = new Lang.Class({ + + selectCategory: function(dir, categoryMenuItem) { + this.applicationsBox.get_children().forEach(c => { +- this.applicationsBox.remove_actor(c); ++ if (c._delegate instanceof PopupMenu.PopupSeparatorMenuItem) ++ c._delegate.destroy(); ++ else ++ this.applicationsBox.remove_actor(c); + }); + + if (dir) +@@ -727,7 +732,11 @@ const ApplicationsButton = new Lang.Class({ + if (apps) { + for (let i = 0; i < apps.length; i++) { + let app = apps[i]; +- let item = this._applicationsButtons.get(app); ++ let item; ++ if (app instanceof Shell.App) ++ item = this._applicationsButtons.get(app); ++ else ++ item = new PopupMenu.PopupSeparatorMenuItem(); + if (!item) { + item = new ApplicationMenuItem(this, app); + item.setDragEnabled(this._desktopTarget.hasDesktop); +-- +2.14.2 + diff --git a/SOURCES/classic-style-fixes.patch b/SOURCES/classic-style-fixes.patch new file mode 100644 index 0000000..47d21e7 --- /dev/null +++ b/SOURCES/classic-style-fixes.patch @@ -0,0 +1,89 @@ +From 145845f99ac42d0355752d60bbcf561ce31afb55 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Wed, 17 Jan 2018 18:26:51 +0100 +Subject: [PATCH 1/3] classic: Fix "Clear All" button readability + +Most buttons appear in modal dialogs which keep their normal +appearance in the classic theme, except for the calendar's +"Clear All" which needs a dark text color to be readable on +the light background. + +https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/26 +--- + data/gnome-classic.css | 3 +++ + 2 files changed, 7 insertions(+) + +diff --git a/data/gnome-classic.css b/data/gnome-classic.css +index 4d0d737..be332c9 100644 +--- a/data/gnome-classic.css ++++ b/data/gnome-classic.css +@@ -1961,3 +1961,6 @@ StScrollBar { + + .calendar-day-with-events { + background-image: url("calendar-today.svg"); } ++ ++.message-list-clear-button.button { ++ color: #2e3436; } +-- +2.14.3 + + +From c882621cb806474c077f1511a0f0cfd87432d4c7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20K=C3=BCmmerlin?= +Date: Wed, 24 Jan 2018 22:07:36 +0100 +Subject: [PATCH 2/3] classic: make notifications legible again + +https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/41 + +As requested in discussion about !26, this is resolved by +switching to a light background. +--- + data/gnome-classic.css | 8 ++++++++ + 2 files changed, 17 insertions(+) + +diff --git a/data/gnome-classic.css b/data/gnome-classic.css +index be332c9..6dad881 100644 +--- a/data/gnome-classic.css ++++ b/data/gnome-classic.css +@@ -1964,3 +1964,11 @@ StScrollBar { + + .message-list-clear-button.button { + color: #2e3436; } ++ ++.notification-banner { ++ background-color: #ededed !important; ++ color: #2e3436; } ++ .notification-banner .notification-button { ++ background-color: #e0e0e0; } ++ .notification-banner .notification-button:hover, .notification-banner .notification-buttonfocus { ++ background-color: #e8e8e8; } +-- +2.14.3 + + +From eac93f3f081306d62d82e8d2e45f73cd38c318b1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20K=C3=BCmmerlin?= +Date: Wed, 24 Jan 2018 22:24:06 +0100 +Subject: [PATCH 3/3] classic: never show drop shadow for panel icons + +https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/39 +--- + data/gnome-classic.css | 2 ++ + 2 files changed, 6 insertions(+) + +diff --git a/data/gnome-classic.css b/data/gnome-classic.css +index 6dad881..93d84ba 100644 +--- a/data/gnome-classic.css ++++ b/data/gnome-classic.css +@@ -1923,6 +1923,8 @@ StScrollBar { + width: 0; + height: 0; + margin: 0; } ++ #panel .panel-button .system-status-icon { ++ icon-shadow: none; } + #panel .panel-corner, + #panel .panel-corner:active, + #panel .panel-corner:overview, +-- +2.14.3 + diff --git a/SOURCES/resurrect-system-monitor.patch b/SOURCES/resurrect-system-monitor.patch index 3080359..57865cf 100644 --- a/SOURCES/resurrect-system-monitor.patch +++ b/SOURCES/resurrect-system-monitor.patch @@ -1,4 +1,4 @@ -From 9493ca34aa624d13818cd917fb190ef543cc845d Mon Sep 17 00:00:00 2001 +From 5b4f81b1b510cc254221cac762dd282408c18a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 17 May 2017 19:13:50 +0200 Subject: [PATCH 1/4] extensions: Resurrect systemMonitor extension @@ -41,15 +41,15 @@ index cc53a8d..e2bea7a 100644 Loads a shell theme from ~/.themes//gnome-shell. diff --git a/configure.ac b/configure.ac -index 7944b52..ecb2fd6 100644 +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 panel-favorites top-icons updates-dialog user-theme" -+ALL_EXTENSIONS="$DEFAULT_EXTENSIONS auto-move-windows dash-to-dock example native-window-placement panel-favorites systemMonitor 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 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], @@ -63,9 +63,9 @@ index 7944b52..ecb2fd6 100644 + [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|panel-favorites|places-menu|screenshot-window-sizer|top-icons|updates-dialog|user-theme|window-list|windowsNavigator|workspace-indicator) + 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" -@@ -89,6 +94,7 @@ AC_CONFIG_FILES([ +@@ -90,6 +95,7 @@ AC_CONFIG_FILES([ extensions/panel-favorites/Makefile extensions/places-menu/Makefile extensions/screenshot-window-sizer/Makefile @@ -523,10 +523,10 @@ index 0000000..13f95ec + font-weight: bold; +} -- -2.12.2 +2.14.2 -From 6b31a97ee501b4242d3c763a20de0577bf3f879d Mon Sep 17 00:00:00 2001 +From 529c0c1da0259953130a0e098820854336b1c87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 17 May 2017 19:31:58 +0200 Subject: [PATCH 2/4] systemMonitor: Move indicators to calendar @@ -697,10 +697,10 @@ index 13f95ec..978ac12 100644 .extension-systemMonitor-indicator-label { -- -2.12.2 +2.14.2 -From c39dfc4aaef29c41a045552aebbdd88e22627aa2 Mon Sep 17 00:00:00 2001 +From 77669f312fcd4cdc823c74fecb12480fb5e9769f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 18 May 2017 16:20:07 +0200 Subject: [PATCH 3/4] systemMonitor: Handle clicks on section title @@ -754,10 +754,10 @@ index 01146fa..cc49cbb 100644 for (let i = 0; i < INDICATORS.length; i++) { -- -2.12.2 +2.14.2 -From a35f8412cc18493c63e98f6984dc10b9d74b5faf Mon Sep 17 00:00:00 2001 +From 7ba627fcc4646366c851fb0e4a4aa0ddf521b6b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 18 May 2017 18:00:17 +0200 Subject: [PATCH 4/4] systemMonitor: Provide classic styling @@ -800,5 +800,5 @@ index 0000000..946863d + border: 1px solid #a1a1a1; +} -- -2.12.2 +2.14.2 diff --git a/SPECS/gnome-shell-extensions.spec b/SPECS/gnome-shell-extensions.spec index 23c978a..3bd14ba 100644 --- a/SPECS/gnome-shell-extensions.spec +++ b/SPECS/gnome-shell-extensions.spec @@ -5,8 +5,8 @@ %global pkg_prefix gnome-shell-extension Name: gnome-shell-extensions -Version: 3.22.2 -Release: 10%{?dist} +Version: 3.26.2 +Release: 3%{?dist} Summary: Modify and extend GNOME Shell functionality and behavior Group: User Interface/Desktops @@ -17,19 +17,23 @@ Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/%{major_version}/ # BuildRequires: gnome-common BuildRequires: autoconf automake BuildRequires: gettext >= 0.19.6 +BuildRequires: git BuildRequires: pkgconfig(gnome-desktop-3.0) BuildRequires: pkgconfig(libgtop-2.0) Requires: gnome-shell >= %{min_gs_version} BuildArch: noarch -Patch1: 0001-classic-shade-panel-in-overview.patch -Patch2: 0001-apps-menu-add-logo-icon-to-Applications-menu.patch -Patch3: add-extra-extensions.patch -Patch4: 0001-apps-menu-Explicitly-set-label_actor.patch -Patch5: 0001-window-list-Hide-workspace-indicator-when-there-s-1-.patch -Patch6: apps-menu-desktop-dnd.patch -Patch7: resurrect-system-monitor.patch -Patch8: 0001-loginDialog-make-info-messages-themed.patch +Patch1: 0001-Update-style.patch +Patch2: 0001-classic-shade-panel-in-overview.patch +Patch3: 0001-apps-menu-add-logo-icon-to-Applications-menu.patch +Patch4: add-extra-extensions.patch +Patch5: 0001-apps-menu-Explicitly-set-label_actor.patch +Patch6: resurrect-system-monitor.patch +Patch7: 0001-loginDialog-make-info-messages-themed.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 %description GNOME Shell Extensions is a collection of extensions providing additional and @@ -82,6 +86,7 @@ Requires: %{pkg_prefix}-alternate-tab = %{version}-%{release} Requires: %{pkg_prefix}-apps-menu = %{version}-%{release} Requires: %{pkg_prefix}-launch-new-instance = %{version}-%{release} Requires: %{pkg_prefix}-places-menu = %{version}-%{release} +Requires: %{pkg_prefix}-top-icons = %{version}-%{release} Requires: %{pkg_prefix}-window-list = %{version}-%{release} Requires: nautilus # Obsolete fallback mode components @@ -176,6 +181,16 @@ This GNOME Shell extension provides additional configurability for the window layout in the overview, including a mechanism similar to KDE4. +%package -n %{pkg_prefix}-no-hot-corner +Summary: Disable the hot corner in GNOME Shell +Group: User Interface/Desktops +License: GPLv2+ +Requires: %{pkg_prefix}-common = %{version}-%{release} + +%description -n %{pkg_prefix}-no-hot-corner +This GNOME Shell extension disables the hot corner in the top bar. + + %package -n %{pkg_prefix}-panel-favorites Summary: Favorite launchers in GNOME Shell's top bar Group: User Interface/Desktops @@ -284,16 +299,7 @@ workspaces. %prep -%setup -q - -%patch1 -p1 -b .shade-panel-in-overview -%patch2 -p1 -b .brand-applications-menu -%patch3 -p1 -b .add-extra-extensions -%patch4 -p1 -b .fix-menu-category-accessibility -%patch5 -p1 -b .hide-indicator-in-single-workspace-case -%patch6 -p1 -b .apps-menu-desktop-dnd -%patch7 -p1 -b .apps-menu-desktop-dnd -%patch8 -p1 -b .fix-pam-info-messages +%autosetup -S git %build @@ -355,6 +361,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.exampl %{_datadir}/glib-2.0/schemas/org.gnome.shell.extensions.native-window-placement.gschema.xml %{_datadir}/gnome-shell/extensions/native-window-placement*/ +%files -n %{pkg_prefix}-no-hot-corner +%{_datadir}/gnome-shell/extensions/no-hot-corner*/ + %files -n %{pkg_prefix}-panel-favorites %{_datadir}/gnome-shell/extensions/panel-favorites*/ @@ -471,6 +480,32 @@ fi %changelog +* Fri Feb 23 2018 Florian Müllner - 3.26.2-3 +- Enable top-icons extension in classic mode + Resolves: #1548446 + +* Wed Feb 07 2018 Florian Müllner - 3.26.2-2 +- Fix notification legibility in classic mode + Resolves: #1507457 +- Fix stray icon shadows in classic mode + Resolves: #1530654 + +* Fri Nov 03 2017 Kalev Lember - 3.26.2-1 +- Update to 3.26.2 +- Related: #1505743 + +* Tue Oct 17 2017 Florian Müllner - 3.26.1-1 +- apps-menu: Support separators + Resolves: #1435074 + +* Tue Oct 17 2017 Florian Müllner - 3.26.1-1 +- apps-menu: Follow sort order + Resolves: #1435073 + +* Fri Oct 06 2017 Florian Müllner - 3.26.1-1 +- Update to 3.26.1 + Related: #1481381 + * Mon Jun 26 2017 Ray Strode - 3.22.2-10 - Fix pam info messages at the unlock screen Related: #1449359