After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767077 - alternateTab: Adjust to gnome-shell changes
alternateTab: Adjust to gnome-shell changes
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2016-05-31 15:17 UTC by Florian Müllner
Modified: 2016-06-10 16:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
alternateTab: Adjust to gnome-shell changes (3.14 KB, patch)
2016-05-31 15:17 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2016-05-31 15:17:24 UTC
See patch.
Comment 1 Florian Müllner 2016-05-31 15:17:28 UTC
Created attachment 328822 [details] [review]
alternateTab: Adjust to gnome-shell changes

The code de-duplication in commit bf8d30603e57b broke the extension,
fix by duplicating the code here now :-(

(It's not really that bad though ...)
Comment 2 Rui Matos 2016-06-09 16:14:35 UTC
Review of attachment 328822 [details] [review]:

I suppose another way to do this would be taking over Main.wm._startSwitcher() and monkey patch a get_name() method on the binding instance that returns what we want and then call the real Main.wm._startSwitcher() with it. Not sure which one is uglier :-P
Comment 3 Florian Müllner 2016-06-10 16:05:01 UTC
Attachment 328822 [details] pushed as e98e5d0 - alternateTab: Adjust to gnome-shell changes

(In reply to Rui Matos from comment #2)
> I suppose another way to do this would be taking over
> Main.wm._startSwitcher() and monkey patch a get_name() method on the binding
> instance that returns what we want and then call the real
> Main.wm._startSwitcher() with it. Not sure which one is uglier :-P

I don't think I like

let originName = binding.get_name();
binding.get_name = function() {
    switch (originName) {
        case 'switch-applications':
        case 'switch-group':
            return 'switch-windows';
        case 'switch-applications-backwards':
        case 'switch-group-backwards':
            return 'switch-windows-backwards';
        default:
            return originName;
}

very much, so going with my original patch :-)