Skip to content

Commit

Permalink
Add Back Pop!_Shop Details to app library
Browse files Browse the repository at this point in the history
Because of 1550976
  • Loading branch information
13r0ck authored and jackpot51 committed Apr 1, 2022
1 parent 725f4a6 commit b6fc996
Showing 1 changed file with 11 additions and 24 deletions.
35 changes: 11 additions & 24 deletions extension.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const AppDisplay = imports.ui.appDisplay;
const { AppMenu } = imports.ui.appMenu;
const AltTab = imports.ui.altTab;
const ExtensionUtils = imports.misc.extensionUtils;
const extension = ExtensionUtils.getCurrentExtension();
Expand Down Expand Up @@ -265,32 +266,18 @@ function enable() {
});

// Pop Shop details
/*TODO
let AppMenu;
if (AppDisplay.AppIconMenu !== undefined) {
AppMenu = AppDisplay.AppIconMenu;
} else {
AppMenu = AppDisplay.AppMenu;
}
let original_rebuildMenu = AppMenu.prototype._rebuildMenu;
inject(AppMenu.prototype, "_rebuildMenu", function () {
let ret = original_rebuildMenu.apply(this, arguments);
if (!this._source.app.is_window_backed()) {
if (Shell.AppSystem.get_default().lookup_app('io.elementary.appcenter.desktop')) {
this._appendSeparator();
let item = this._appendMenuItem(_("Show Details"));
item.connect('activate', () => {
let id = this._source.app.get_id();
Util.trySpawn(["io.elementary.appcenter", "appstream://" + id]);
Main.overview.hide();
});
}
inject(AppMenu.prototype, "_updateDetailsVisibility", function () {
this._detailsItem.visible = false;

const sw = this._appSystem.lookup_app('io.elementary.appcenter.desktop');
if (sw !== null) {
this._detailsItem = this.addAction(_('Show Details'), async () => {
const id = this._app.get_id();
Util.trySpawn(["io.elementary.appcenter", "appstream://" + id]);
Main.overview.hide();
});
}
return ret;
});
*/

// Hide activities button
activities_signal_show = Main.panel.statusArea.activities.connect("show", function() {
Expand Down

0 comments on commit b6fc996

Please sign in to comment.