NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 12 13 14 15 16 … 93 Next »
Settings config screen for class IEventNotification plugin

 
  • 0 Vote(s) - 0 Average
Settings config screen for class IEventNotification plugin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#1
2011-07-11, 08:50 AM
I've got a plugin defined as:

Code:
class AudioAdjust : IEventNotification, IPluginConfiguration
{
  public SettingsPage GetSettingsPage()
  {
    // returns new instance of my gui config form
  }
}

The plugin itself is found (and runs) fine, but I can't get it to appear on the Settings dialog for configuration. The other plugins I've done this with were both derived from IScreenPlugin. I don't really want to have to do that in this case, because the plugin only ever works behind the scenes.

Should it be possible?

Thanks

Iain
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#2
2011-07-11, 10:55 AM
It's not really a form anymore, but, rather, a UserControl that inherits NUtility.SettingsPage. This is how the plugin config settings are contained within the main settings form, instead of floating around.

It does make things nice and uniform, but also leaves you constrained within the real-estate that sub provides. I made mine 531 x 355, which seems to look pretty good.

(Ok, I'm not sure I made sense there at all...)
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#3
2011-07-11, 11:46 AM
Ommina Wrote:(Ok, I'm not sure I made sense there at all...)
You made sense, but that wasn't the question I was asking Smile

I know how to do the settings stuff; I've done it before for the System and SubMenu plugins. But they're both IScreenPlugin classes, which NPVR seems to pick up fine and list in its Settings dialog.

This new plugin only extends from IEventNotification, which NPVR will instantiate and run fine, but it won't show its IPluginConfiguration implementation in the dialog. Nothing shows up for it, so the user doesn't have any way of configuring it.

Iain
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,778
Threads: 954
Joined: May 2006
#4
2011-07-11, 11:51 AM
I use a minimal plugin to control my Sharehelper utility via the config screen

Code:
namespace ShareHelper
{
    // "SimpleButtonPlugin" is basically a list of buttons on the left

    public class ShareHelper : SimpleButtonPlugin, IPluginConfiguration
    {
        SettingsPage config = null;
        public override string GetName()
        {
            return "ShareHelper";
        }
        public SettingsPage GetSettingsPage()
        {
            config = new Config();
            return config;
        }
    }
}

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#5
2011-07-11, 12:30 PM
mvallevand Wrote:I use a minimal plugin to control my Sharehelper utility via the config screen

Nice idea, thanks.

It does mean that it still shows up as a tickable main menu component though, and it would be nice to avoid that altogether (ie, it shows up under the "Plugins" tab, but not within it).

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#6
2011-07-11, 04:25 PM
The Settings -> Plugins screen was only intended to be used by IScreenPlugins. It was really there for enabling and disabling their display on the menu, but did also provide access to their setting screen.

I'll see if I can add support for non-IScreenPlugins in the next release.
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#7
2011-07-11, 05:17 PM
Thanks sub, that'd be great if you could.

Iain
Ommina
Offline

Senior Member

Posts: 330
Threads: 39
Joined: Feb 2006
#8
2011-07-11, 10:39 PM
imilne Wrote:You made sense, but that wasn't the question I was asking Smile

Whoops! Oh well, at least it made sense for a different question!
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#9
2011-09-17, 06:02 PM
sub Wrote:The Settings -> Plugins screen was only intended to be used by IScreenPlugins. It was really there for enabling and disabling their display on the menu, but did also provide access to their setting screen.

I'll see if I can add support for non-IScreenPlugins in the next release.

Bump. I take it this didn't make it in?

(not complaining, just checking)

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#10
2011-09-17, 06:06 PM
Sorry, no. I forgot.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 2,735 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,296 2020-11-14, 08:01 PM
Last Post: sub
  VIdeo playback from plugin mvallevand 5 3,421 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,861 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,737 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,028 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 1,932 2013-03-12, 06:48 AM
Last Post: psycik
  List of "IEventNotification" events? reven 8 3,326 2012-11-01, 10:56 PM
Last Post: reven
  Best way to load settings for NPVR? reven 4 2,125 2012-11-01, 01:13 AM
Last Post: reven
  Plugin problems with started from the command line mvallevand 11 4,931 2012-08-12, 07:56 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode