Closed Bug 132242 Opened 22 years ago Closed 22 years ago

pref-themes.(xul|js) does not select current skin, on first load of panel

Categories

(SeaMonkey :: Themes, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 155925
mozilla1.2alpha

People

(Reporter: jrgmorrison, Assigned: bugzilla)

References

Details

I looked for a duplicate of this, but couldn't find it.

When you go to the Themes pref panel, in either modern or classic, when the 
panel is loaded, neither skin is selected (doesn't show the preview panel, 
etc.). 

This bit of js is failing:

    var selected = chromeRegistry.isSkinSelected(child.getAttribute("name"), 
                                                 true);
    if (selected == Components.interfaces.nsIChromeRegistry.FULL) {
      tree.selectItem(child);
      break;
    }

|selected| has the value for Components.interfaces.nsIChromeRegistry.PARTIAL
for all the kids, so the .selectItem is never called. 

(tested in win2k, cvs pulled 8pm mar19, and in a 3/12 comm. verif build).
See this on Linux too: OS->All.
OS: Windows 2000 → All
*** Bug 135136 has been marked as a duplicate of this bug. ***
Keywords: mozilla1.0, nsbeta1
nsbeta1- per Nav triage team
Keywords: nsbeta1nsbeta1-
Target Milestone: --- → mozilla1.2alpha
*** Bug 138536 has been marked as a duplicate of this bug. ***
dup of bug 127993?
There (currently) seem to be other problems here:

1)
>  var list = document.getElementById( "skinsList" );
>  ...
>  for (var i = 0; i < list.childNodes.length; ++i) {

the length here is actually the number of available themes plus one (?)... The
0th theme is empty.  trying to access it produces an exception.  starting at 1
instead of 0 works, but this probably indicates a problem elsewhere.

2) this code doesn't seem to work:
>    theme = kPrefSvc.getComplexValue("general.skins.selectedSkin",
>                            Components.interfaces.nsISupportsWString).data;
I have the pref explicitly set in prefs.js and kPrefSvc still returns "null" here.

3) I see something similar to what was originally reported here, but only in a
clean profile.  once the general.skins.selectedSkin pref is set, that part works.
*** Bug 150426 has been marked as a duplicate of this bug. ***
*** Bug 163150 has been marked as a duplicate of this bug. ***
dup of 155925? (I know it's newer, but it has two patches, unlike this bug.)
*** Bug 168256 has been marked as a duplicate of this bug. ***
adding actuall JS error so that people can find the bug:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004003 (NS_ERROR_INVALID_POINTER) [nsIXULChromeRegistry.isSkinSelected]" 
nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame ::
chrome://communicator/content/pref/pref-themes.js :: Startup :: line 76"  data: no]
Bug 155925 has a patch.

*** This bug has been marked as a duplicate of 155925 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.