diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-10 13:32:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-10 13:32:02 +0000 |
commit | 9969d17a688d6d8e1764d7242fd4c8b838ec2228 (patch) | |
tree | 010ad3d1857c611930d8086909451a5120ad978f /extensions/vertical-workspaces/lib/appFavorites.js | |
parent | Adding upstream version 20230618. (diff) | |
download | gnome-shell-extensions-extra-upstream/20231210.tar.xz gnome-shell-extensions-extra-upstream/20231210.zip |
Adding upstream version 20231210.upstream/20231210
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'extensions/vertical-workspaces/lib/appFavorites.js')
-rw-r--r-- | extensions/vertical-workspaces/lib/appFavorites.js | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/extensions/vertical-workspaces/lib/appFavorites.js b/extensions/vertical-workspaces/lib/appFavorites.js deleted file mode 100644 index 50ebce9..0000000 --- a/extensions/vertical-workspaces/lib/appFavorites.js +++ /dev/null @@ -1,61 +0,0 @@ -/** - * V-Shell (Vertical Workspaces) - * appFavorites.js - * - * @author GdH <G-dH@github.com> - * @copyright 2022 - 2023 - * @license GPL-3.0 - * - */ - -'use strict'; - -const { Shell } = imports.gi; -const AppFavorites = imports.ui.appFavorites; -const Main = imports.ui.main; - -const Me = imports.misc.extensionUtils.getCurrentExtension(); -const _Util = Me.imports.lib.util; - -let opt; -let _overrides; -let _firstRun = true; - -function update(reset = false) { - opt = Me.imports.lib.settings.opt; - const moduleEnabled = opt.get('appFavoritesModule', true); - reset = reset || !moduleEnabled; - - // don't even touch this module if disabled - if (_firstRun && reset) - return; - - _firstRun = false; - - if (_overrides) - _overrides.removeAll(); - - - // if notifications are enabled no override is needed - if (reset || opt.SHOW_FAV_NOTIFICATION) { - _overrides = null; - opt = null; - return; - } - - _overrides = new _Util.Overrides(); - - // AppFavorites.AppFavorites is const, first access returns undefined - const dummy = AppFavorites.AppFavorites; - _overrides.addOverride('AppFavorites', AppFavorites.AppFavorites.prototype, AppFavoritesCommon); -} - -const AppFavoritesCommon = { - addFavoriteAtPos(appId, pos) { - this._addFavorite(appId, pos); - }, - - removeFavorite(appId) { - this._removeFavorite(appId); - }, -}; |