Skip to content
This repository has been archived by the owner on Jul 7, 2019. It is now read-only.

Move bind app-keys logic from AppGroup to AppList #57

Merged
merged 3 commits into from
Dec 17, 2016

Conversation

zqq90
Copy link
Contributor

@zqq90 zqq90 commented Dec 17, 2016

Keep it simple, bind app-keys in AppList is more controllable than in AppList.

And, two fixes:

  • drag-drop will break binding of app-keys, even origin logic.
  • after drag, AppGroup.isFavapp will become to true, new window will be created when click or press app-keys

wish you like this

@jaszhix jaszhix merged commit 69d2f21 into jaszhix:master Dec 17, 2016
@jaszhix
Copy link
Owner

jaszhix commented Dec 17, 2016

Ah, good catch - I normally don't use the key bindings, so glad you caught this. I tested and it seems to work well. Thanks.

@zqq90
Copy link
Contributor Author

zqq90 commented Dec 17, 2016

@jaszhix
but this only works in last workspace,
I just noticed that, AppList will be created for each workspace.
I can fixed this in next pr.

Are applets singletons ?

@jaszhix
Copy link
Owner

jaszhix commented Dec 17, 2016

The appList is created for each workspace only when you switch workspaces, so for me, I have a fairly common workflow of only using workspace one, and ocassionally switching to two, so in that case if there is only one appList created, it seems to work.

You can get the current appList from child classes with:

this._applet.metaWorkspaces[this._applet.currentWs].appList

or use the alias I created in MyApplet:

this._applet.getCurrentAppList()

Edit: As for singletons, there is only one instance of MyApplet, unless a user places multiple instances of ITM on their panels, if that's what you mean. But appList may be created one time, or as many times as a user switches to a workspace, and appGroup will be created for each open app inside appList, and it contains each app's child windows.

@zqq90 zqq90 mentioned this pull request Dec 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants