Re: Nested Folder in extensions



In GS 3.10 all other submenus are automatically closed when one is open. In fact, I like this feature, and even implemented it myself manually in Alternative Activities for GS 3.6 and 3.8 (for consistent behavior across GS versions). But this feature makes it impossible to use subsubmenus, as whenever you try to open subsubmenu A->B, submenu A is automatically closed. This is a rare case when you need a subsubmenu, it seems, and it is not used in the core GS, so why, probably, it was not taken into account in the GS code.

You can manually override this behavior in your extension. The simplest way to do this would be to change the following method:
https://git.gnome.org/browse/gnome-shell/tree/js/ui/popupMenu.js?h=gnome-3-10#n728

So, in your extension add something like this:
myMenu._setOpenedSubMenu = Lang.bind(this, function (submenu) {
    this._openedSubMenu = submenu;
});

As of GS 3.10 it seems that the only use of the _openedSubMenu property is in this method to close previously opened submenu when another one is open. So, you can safely assign the empty function instead, but I would do as suggested above.I have not tried it myself, but it should work.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]