[Small Patch] Extended callback support in GUIWindowManager

Discussion in 'General Development (no feature request here!)' started by Sven, October 7, 2007.

  1. Sven

    Sven Portal Member

    Joined:
    January 13, 2007
    Messages:
    40
    Likes Received:
    1
    Ratings:
    +1 / 0
    Home Country:
    Germany Germany
    Hi,



    I'm currently experimenting with plugin development. In doing so, I noticed I'm missing a way to have my callback function called by the message processing thread.

    Recent svn builds already have GUIWindowManager.SendThreadCallbackAndWait() but in my case the function should not wait. So I added the following method:

    Code (Text):
    1. static public int SendThreadCallback(Callback callback, int param1, int param2, object data, bool wait)

    For backward compatibility, I left the old function and modified it to call the new method with wait set to true.

    The updated file is attached. It's based on an up-to-date svn-version of GUIWindowManager.cs.

    I hope this patch will be accepted since it offers more possibilities to plugin developers (in my case, I use this patch to open a dialog from a process plugin - otherwise the remote is blocked until the dialog is dismissed).
    Since it's a minor change and the behaviour of existing code is not changed, it could maybe (in my opinion) be merged even before 0.2.3.0 release. This way one won't have to wait for the 0.2.4.0 (or whatever) release.


    Any comments are welcome,
    Sven
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!