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 05-09-2006, 11:36 AM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Removing garbage widgets from STV

I know I can safely remove

- "circularities" widgets
- yellow action chain widgets

from an STV.


What about orphaned blue action chains (for e.g. a blue IF action chain at the root level which leads to an UI widget ? I assume I can remove them as well (as long as they dont contain any widgets referenced elsewhere), since they never get executed ? Is this correct ?


Thanks,

Dirk
Reply With Quote
  #2  
Old 05-09-2006, 12:16 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
If they are in the root like that & have no references to them, they shouldn't ever be used as far as I know & would be safe to delete. They probably showed up there after having a parent removed.

- 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 05-09-2006, 12:19 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by Opus4
If they are in the root like that & have no references to them, they shouldn't ever be used as far as I know & would be safe to delete. They probably showed up there after having a parent removed.

- Andy
That's what I thought, thanks for the confirmation.


Dirk
Reply With Quote
  #4  
Old 05-09-2006, 03:47 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
As a follow-up question, what about other widget types (e.g. panels, items, etc) in the root hierarchy ? Does anything else besides menus and hooks make sense as a root widget ? If not, can I assume that (as long as those orphaned widget trees are not referenced from somewhere else) these can be safely deleted as well ?

Thanks,
Dirk
Reply With Quote
  #5  
Old 05-09-2006, 04:52 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Root-level Hook widgets are potentially active (although it may depend on the specific hook type).

Apart from that, anything other than Menus that shows up at root level is by definition unreferenced and can be deleted.

Even unreferenced (non-bold) Menus can be deleted, except for the three special menu names Main Menu, Screen Saver, and Server Connection Lost, which are referenced by name from the Sage core. (Might be nice if Studio would always show those three menu names in bold.)

Just be careful when you delete a widget tree that there are no bold primary references within the tree. One trick I use is to select the bold widget and do Ctrl+U, Ctrl+D on it to send the primary reference somewhere else.

Personally I think the Delete command would be a lot more intuitive (and a lot safer) if deleting a widget automatically deleted the whole subtree, excluding any primary references. That would minimize the danger of deleting something you want to keep, without littering the root level with a lot of orphan widgets.
__________________
-- Greg
Reply With Quote
  #6  
Old 05-09-2006, 05:21 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by GKusnick
Apart from that, anything other than Menus that shows up at root level is by definition unreferenced and can be deleted.
I could see one potentially exception to this rule: if some STV code would modify the tree structure at runtime so that an unreferenced node suddenly becomes referenced. But I doubt there is code out there which does that ...

Quote:
Originally Posted by GKusnick
Just be careful when you delete a widget tree that there are no bold primary references within the tree. One trick I use is to select the bold widget and do Ctrl+U, Ctrl+D on it to send the primary reference somewhere else.
Yep, that's what I thought I would do ...

Quote:
Originally Posted by GKusnick
Personally I think the Delete command would be a lot more intuitive (and a lot safer) if deleting a widget automatically deleted the whole subtree, excluding any primary references. That would minimize the danger of deleting something you want to keep, without littering the root level with a lot of orphan widgets.
100% agree on this one ...


Btw, so what's up with this orphaned "IsPVR350OSDEnabled() && HasPVR350TVOutput()" that I first noticed in the standard 4.1 STV, and which is still in 5.0 ? Anyone knows ?

Thanks for the clarifications,

Dirk
Reply With Quote
  #7  
Old 05-09-2006, 06:15 PM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
Quote:
Originally Posted by GKusnick
Personally I think the Delete command would be a lot more intuitive (and a lot safer) if deleting a widget automatically deleted the whole subtree, excluding any primary references. That would minimize the danger of deleting something you want to keep, without littering the root level with a lot of orphan widgets.
Expand the widget, highlight everything and delete.

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #8  
Old 05-09-2006, 06:35 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by gplasky
Expand the widget, highlight everything and delete.
That's exactly what you don't want to do. If there are primary references embedded in there, you'll end up deleting code that you want to keep. (I.e. it will delete all the singly-referenced widgets under the primary ref, even though they're still needed by code elsewhere hanging on to secondary refs.)

When deleting large chunks of code, there's really no alternative to going through it manually, booting the primary refs somewhere else, before it's safe to block-select and delete what's left over. This is the part that would be easier and safer if automated.
__________________
-- Greg
Reply With Quote
  #9  
Old 05-09-2006, 06:40 PM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by gplasky
Expand the widget, highlight everything and delete.

Gerry
Yeah true, but quite error-prone, I don't know how often I accidently deleted a widget I didn't want to because I selected more lines than needed ...

Dirk
Reply With Quote
  #10  
Old 05-09-2006, 08:44 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by flachbar
Btw, so what's up with this orphaned "IsPVR350OSDEnabled() && HasPVR350TVOutput()" that I first noticed in the standard 4.1 STV, and which is still in 5.0 ? Anyone knows ?
Someone may place test code there instead of deleting it just to keep it for future reference. I've done that a few times under If False lines -- something that isn't needed now may be useful & turned on later.

Generally, you can delete whatever you don't want to have in your STV. I would just be careful about deciding to add such deletions to an import, though.

- 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
  #11  
Old 05-10-2006, 04:11 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
Quote:
Originally Posted by GKusnick
Even unreferenced (non-bold) Menus can be deleted, except for the three special menu names Main Menu, Screen Saver, and Server Connection Lost
.. unless you are using my dynamic menu import which links to menus by Name, and does not reference them...

I have asked for a delete widget tree function in the past, which would automaticaly delete orphans, and only dereference widgets linked elsewhere, but it never came... It is also difficult to implement, as handling loops is pretty difficult...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki

Last edited by nielm; 05-10-2006 at 04:17 AM.
Reply With Quote
  #12  
Old 05-10-2006, 09:10 AM
dflachbart dflachbart is offline
SageTVaholic
 
Join Date: Jan 2006
Location: Brookfield, CT
Posts: 2,743
Quote:
Originally Posted by nielm

I have asked for a delete widget tree function in the past, which would automaticaly delete orphans, and only dereference widgets linked elsewhere, but it never came... It is also difficult to implement, as handling loops is pretty difficult...
Yeah, I wished we had such a delete function built into the SageAPI. I ended up writing my own widget tree deletion in java which can handle loops. If interested, it's available in my import library...

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 06:15 PM.


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