Closed Bug 320823 Opened 19 years ago Closed 19 years ago

Sunbird cannot use themes

Categories

(Calendar :: Sunbird Only, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rod.whiteley, Assigned: mostafah)

References

()

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20051218 Mozilla Sunbird/0.3a1+

The Use Theme button in the Themes window is broken.

Reproducible: Always

Steps to Reproduce:
1. Install a theme.
2. Select it and press the Use Theme button.
3. Restart Sunbird.


Actual Results:  
Error message in JavaScript console.  The theme is not used.

Expected Results:  
The theme should be used after the restart.

This seems to be because defaults/pref/sunbird.js does not define:

pref("extensions.dss.enabled", false); // Dynamic Skin Switching

Related to bug 297410 -- are there more like this?
(In reply to comment #0)

> Steps to Reproduce: 1. Install a theme.

Could you attach a theme file or give us a link to test?

> This seems to be because defaults/pref/sunbird.js does not define:
> pref("extensions.dss.enabled", false); // Dynamic Skin Switching

Does it work if you add that line to your user.js?
Version: unspecified → Trunk
(In reply to comment #1)
> (In reply to comment #0)
> 
> > Steps to Reproduce: 1. Install a theme.
> 
> Could you attach a theme file or give us a link to test?
You can download a theme at http://skypilot.projectit.com/
This a Skypilot f08t05.
If I press 'Use Theme' I get the error you described. In the jsconsole i got:

  Error: uncaught exception: [Exception... "Component returned failure code:
  0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]"  nsresult: 
  "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: chrome://mozapps/
  content/extensions/extensions.js :: anonymous :: line 926"  data: no]

After adding "user_pref("extensions.dss.enabled", false);" to my user.js theme switching works.

I think this is a toolkit error and should be solved there. Toolkit should not fail if there is a missing preference key.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch add prefs to bypass error (obsolete) — — Splinter Review
This patch adds 'extensions.dss.enabled' and 'extensions.dss.switchPending' to sunbird pref file to bypass error. At large this is just copy/paste from the firefox/thunderbird pref file.
Attachment #206432 - Flags: first-review?(jminta)
Attached patch add prefs to bypass error, v2 — — Splinter Review
Attachment #206432 - Attachment is obsolete: true
Attachment #206434 - Flags: first-review?(jminta)
Attachment #206432 - Flags: first-review?(jminta)
Comment on attachment 206434 [details] [diff] [review]
add prefs to bypass error, v2

Thanks for the patch! r=jminta
Attachment #206434 - Flags: first-review?(jminta) → first-review+
patch checked in, marking bug resovled:fixed.  From what I can tell, it's the responsibility of the app that intends to use themes to tell toolkit what types of theme support it offers.  In this case, we were silent on the subject of whether or not we support dynamic skin switching, so toolkit failed.  If someone feels strongly that toolkit should fail more gracefully on this issue, they should feel free to open another bug.  The Sunbird aspect of this is fixed.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: