Jump to content


Photo

Accessing the main ActionList from a plugin


  • Please log in to reply
8 replies to this topic

#1 shumifan50

  • Senior Member
  • 195 posts

+2
Neutral

Posted 29 October 2010 - 12:44

1. Is it possible to access the main window's ActionList from a plugin?
2. How can a plugin hand back the ActionList to the main window, so the remote control controls the normal enigma functions and the plugin ActionList is removed, but the plugin keeps running?

I have tried setFocus, but that seems to only be able to move between widgets on the same Screen. Also tried self.getRelatedWindow("parent"), this returns None, to try and gain access to the main window.

Any help appreciated.
DM600, DM800HD, DM7025, DM500S HD. DM800HDse, 90cm multi-bracket dish: 13E, 19.2E, 23.5E, 28.2E. Runnign OpenPli where I can and loving it!

Re: Accessing the main ActionList from a plugin #2 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 29 October 2010 - 14:13

Tell us what it is you want to accomplish, maybe we can help you with that. You seem to have pinned down a solution, but I suspect that you want to do more than just what you describe here (e.g. "the plugin keeps running" is rather vague).
Real musicians never die - they just decompose

Re: Accessing the main ActionList from a plugin #3 shumifan50

  • Senior Member
  • 195 posts

+2
Neutral

Posted 29 October 2010 - 14:40

@Milo: thanks for the reply

When the plugin starts it gets control of the remote control and by setting an ActionList you can decide what action to perform for each remote control button. If you dont set up the ActionList then the remote control is inactive as it controls nothing, except the volume control and the EXIT button. What I would like to do is to give back control of the remote control to the main window to control channel switching, INFo etc etc (like when the plugin is not running) without terminating the plugin - I just want to give up the remote control. But before that I would like to gain access to the ActionList of the main window to set up a key(s) to allow terminating the plugin (I could do this another way if need be though).
If I can gain access to the main window ActionList, I could also just replace my plugin ActionList with the main window ActionList - this might work, but it might not as the scope for the entrypoints might be wrong, but it might be possible to fix this.

The main objective is to leave the plugin executing in the "background" while letting the remote control go back to "normal" dreambox functions.

I hope that explains it better.
DM600, DM800HD, DM7025, DM500S HD. DM800HDse, 90cm multi-bracket dish: 13E, 19.2E, 23.5E, 28.2E. Runnign OpenPli where I can and loving it!

Re: Accessing the main ActionList from a plugin #4 shumifan50

  • Senior Member
  • 195 posts

+2
Neutral

Posted 1 November 2010 - 14:33

OK. I have now also tried setting my ActionList to the lowest priotity (0x7fffffff) and it disables most of my action keys, but instead of reverting to the main screen ActionList, it just shows the remote keys as not supported (blocked) as when you press a key with no function associated with it. It therefore seems the 'normal' image keys have been delinked completely from the chain of prioritised ActionLists, so it will have to be linked back into the chain. As the main screen is still running (showing a service e.g. BBC News), the main screen action entry points must still be available, it is a matter of finding them, or better still finding the ActionList that references them (which would be the ActionList of the main window). The Global Action list have very few actions supported (e.g. volume).

I will do some more digging.
DM600, DM800HD, DM7025, DM500S HD. DM800HDse, 90cm multi-bracket dish: 13E, 19.2E, 23.5E, 28.2E. Runnign OpenPli where I can and loving it!

Re: Accessing the main ActionList from a plugin #5 shumifan50

  • Senior Member
  • 195 posts

+2
Neutral

Posted 4 November 2010 - 23:46

Anybody! Any help now much appreciated, I am running out of ideas. Suggestions on the best place to look at code will also help. I have the OpenPli environment installed and can do the images compiles, so I should have all the open source available.
DM600, DM800HD, DM7025, DM500S HD. DM800HDse, 90cm multi-bracket dish: 13E, 19.2E, 23.5E, 28.2E. Runnign OpenPli where I can and loving it!

Re: Accessing the main ActionList from a plugin #6 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 5 November 2010 - 10:04

I think you'll need to change your approach. Just "add" your functionality to the main screen, instead of trying to run on top of it as a sort of filter.

And since you still haven't explained what you want to do, there's not much we can do to help.
Real musicians never die - they just decompose

Re: Accessing the main ActionList from a plugin #7 shumifan50

  • Senior Member
  • 195 posts

+2
Neutral

Posted 6 November 2010 - 02:16

@Milo: Thanks for the reply. I cant really describe what I want to do any better. The plugin will be running a stream from another source (from internet) in its window and once it has been set up it no longer needs any input from the remote control. It should just sit there as a PIP (Picture in Picture) window. At the moment it is impossible to change channels, or any other normal remote function, while the plugin is running. The remote becomes active again when the plugin terminates.

Is it possible to attach to the main window? I have not looked at doing this - it might be a better solution, but I have no idea where to start doing that.

The last thing I will try is to set "standalone" and see if that releases the remote.
DM600, DM800HD, DM7025, DM500S HD. DM800HDse, 90cm multi-bracket dish: 13E, 19.2E, 23.5E, 28.2E. Runnign OpenPli where I can and loving it!

Re: Accessing the main ActionList from a plugin #8 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 6 November 2010 - 10:31

If you want to takeover the whole box (framebuffer, lcd, remotecontrols), have a look at what tuxterm/tuxcom/tuxtxt do, for example:

http://openpli.pli-i...lugin/plugin.py

(then in the plugin you cannot use ActionLists anymore, you need to open and read from the input devices yourself)

Re: Accessing the main ActionList from a plugin #9 shumifan50

  • Senior Member
  • 195 posts

+2
Neutral

Posted 10 November 2010 - 13:09

Thanks for that PieterG
DM600, DM800HD, DM7025, DM500S HD. DM800HDse, 90cm multi-bracket dish: 13E, 19.2E, 23.5E, 28.2E. Runnign OpenPli where I can and loving it!


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users