SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-06-2006, 06:29 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Show menu in STVImported hook ?

I am trying to incorporate user interaction into the import process, so I tried to show an options menu in the STVImported hook (as a direct child of the hook), but it doesn't get displayed at all ...

Is it in general impossible to show any widgets at import time ? If not, how can I do it ?


Thanks,
Dirk
Reply With Quote
  #2  
Old 03-06-2006, 09:35 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
UI interaction during the import process is not possible. From what I understand, I think it is just doing all the widget manipulation behind the scenes as it updates the STV, then 'loads' it as the your STV, jumping to the main menu when done.

If something needed to be configured, you might put it in the AfterMenuLoad hook for the Main Menu... if the stuff isn't configured (property is null, perhaps), then go through the config steps.

If you wanted to ask the user what to import in the first place, you might be better off with 2 separate imports... since that is where they will be deciding what to import.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #3  
Old 03-06-2006, 10:07 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by Opus4
UI interaction during the import process is not possible. From what I understand, I think it is just doing all the widget manipulation behind the scenes as it updates the STV, then 'loads' it as the your STV, jumping to the main menu when done.
darn, I had a feeling that this would be the answer ...


Quote:
Originally Posted by Opus4
If something needed to be configured, you might put it in the AfterMenuLoad hook for the Main Menu... if the stuff isn't configured (property is null, perhaps), then go through the config steps.

If you wanted to ask the user what to import in the first place, you might be better off with 2 separate imports... since that is where they will be deciding what to import.

- Andy
Well, I actually would like to use it for a different purpose:

I implemented my import in such a way that it is completely 'uninstallable', without leaving any trace in the STV. I do not want to distribute two separate STVis (one for install, one for uninstall), so I combined all the code into the same STVi. But now it would be great to have a way for the user to specify what to do when he loads the file - install a the STVi (possibly updating an older version), or uninstall the current one ...

Well, I guess that leaves me only with setting a property in Sage.properties to specify the desired behavior, but which will require a SageTV restart ...

Thanks for the answer, even if I hoped to hear something else...

Dirk

Last edited by dflachbart; 03-06-2006 at 10:30 PM.
Reply With Quote
  #4  
Old 03-07-2006, 02:36 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
I don't see why the uninstall has to be an import-time option. Why can't you hook your uninstall code up to a menu command in a config dialog somewhere? Then the user wouldn't have to re-import to get access to the uninstall code. It would already be loaded.

But come to that, it's not clear that an uninstaller is even necessary. Sage already saves a copy of the pre-import STV. So all your uninstall command really needs to do is reload that saved STV. Of course this will also remove any other STVIs imported after yours. But then I don't see how you can guarantee foolproof uninstallation in that case anyway. Who knows what some subsequent STVI might have done to confuse your uninstall logic.
__________________
-- Greg
Reply With Quote
  #5  
Old 03-07-2006, 07:15 AM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by GKusnick
I don't see why the uninstall has to be an import-time option. Why can't you hook your uninstall code up to a menu command in a config dialog somewhere? Then the user wouldn't have to re-import to get access to the uninstall code. It would already be loaded.
This is a good idea, but if I have an import which only adds functionality to existing code without having any visible menus on its own, I wouldn't want to create a new menu just for that purpose ....

Quote:
Originally Posted by GKusnick
But come to that, it's not clear that an uninstaller is even necessary. Sage already saves a copy of the pre-import STV. So all your uninstall command really needs to do is reload that saved STV. Of course this will also remove any other STVIs imported after yours. But then I don't see how you can guarantee foolproof uninstallation in that case anyway. Who knows what some subsequent STVI might have done to confuse your uninstall logic.
I am aware about SageTV making a copy of the current STV when importing, and that you can uninstall by reverting and reapplying all later imports But this is sometimes tedious if you have a lot of plugins imported...

But I clearly see your point, and I am beginning to think it might be better to make the process of reimporting existing STVis more convenient. I know this is possible with an import simply calling ImportSTVFile(), but I am thinking about a more automated solution. Is it possible to intercept the import of a different STVi from the currently loaded STV (basically an import that monitors other imports) ?


Thanks for your comments,
Dirk
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.