Closed
Bug 259203
Opened 20 years ago
Closed 20 years ago
uninstalling current non-default theme breaks browser
Categories
(Toolkit :: Add-ons Manager, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: p_ch, Assigned: bugs)
Details
(Keywords: fixed-aviary1.0)
Attachments
(1 file, 1 obsolete file)
|
6.88 KB,
patch
|
asa
:
approval-aviary+
|
Details | Diff | Splinter Review |
Steps to reproduce: - install a theme - restart - uninstall the current theme - restart Browser is completely horked, there's no way to select any theme, the extension manager is broken. There is no easy way to get around it, except by deleting the Extension.rdf file and "lose" the extensions. Uninstalling the current theme should select the default one. pch
Comment 1•20 years ago
|
||
I can't reproduce this on windows. It won't let me uninstall the current theme. It seems like it does, but on restart, that selected (supposedly uninstalled) theme is still my theme. tested this morning's bits on windows2K
Comment 2•20 years ago
|
||
marcia and I could reliably reproduce bug 258892. Is this related?
| Reporter | ||
Comment 3•20 years ago
|
||
I retested on today branch build and got the same problems. That's the same steps as in bug 258892. Whereas the windows bug is inocuous, linux breaks badly on this one. I attached a screenshot in bug 258892 because I was about to dupe it, but the behaviours are so different on the two platforms that I am not sure it is a good idea to do it.
Comment 4•20 years ago
|
||
Do you have chrome JS errors logged, and does anything show up in the JS console?
Comment 5•20 years ago
|
||
OK, this can be fixed in chromereg, "UninstallProvider" needs a little bit more love. This could also use some EM love, and I might be able to fix that also.
Assignee: bugs → bsmedberg
Comment 6•20 years ago
|
||
Instead of hardcoding a resource urn:mozilla:locale:en-US we need to loop through the locales from urn:mozilla:locale:root and find a matching locale. This patch also falls back to matching languages which don't have matching country codes, for example you can set "en-GB" as your preferred locale, and still select the "en-US" locale for extensions that only ship it.
Comment 7•20 years ago
|
||
Comment on attachment 159994 [details] [diff] [review] Part 1 - chromereg goodness darin, this is mostly string-fu, so you get to do the honors again
Attachment #159994 -
Flags: review?(darin)
Comment 8•20 years ago
|
||
Comment on attachment 159994 [details] [diff] [review] Part 1 - chromereg goodness >Index: nsChromeRegistry.cpp >+ // "a" is short >+ if (as == ae) { >+ if (*++bs == '-') >+ return PR_TRUE; >+ >+ return PR_FALSE; >+ } nit: you could compress this code down to just this: if (as == ae) return *++bs == '-'; > nsresult > nsChromeRegistry::FindSubProvider(const nsACString& aPackage, > const nsACString& aProvider, > nsCOMPtr<nsIRDFResource> &aSelectedProvider) > { > nsresult rv; > > PRBool isLocale = aProvider.Equals(NS_LITERAL_CSTRING("locale")); nit: use EqualsLiteral? (w/ code as is for the branches) >+ if (name.Equals(selectedProvider)) >+ thisQuality = PRECISE; >+ else if (isLocale && LanguagesMatch(name, selectedProvider)) >+ thisQuality = LANGUAGE; nit: indentation inconsistency >+ if (thisQuality <= quality) continue; >+ >+ rv = TrySubProvider(aPackage, kid, aSelectedProvider); >+ if (NS_FAILED(rv)) continue; might be nice to put the |continue| statements on a separate line to faciliate setting breakpoints in a debugger :-/ >+ // we found the locale, cache it in memory locale _or skin_ right?
Attachment #159994 -
Flags: review?(darin) → review+
Updated•20 years ago
|
Attachment #159994 -
Flags: approval-aviary?
Comment 9•20 years ago
|
||
This is the patch actually checked in on the trunk. I'm going to leave this bug open for "part 2", the extension manager UI changes.
Updated•20 years ago
|
Attachment #159994 -
Attachment is obsolete: true
Updated•20 years ago
|
Attachment #160057 -
Flags: approval-aviary?
Updated•20 years ago
|
Attachment #159994 -
Flags: approval-aviary?
Comment 10•20 years ago
|
||
Comment on attachment 160057 [details] [diff] [review] Patch actually checked in on trunk a=asa for aviary checkin.
Attachment #160057 -
Flags: approval-aviary? → approval-aviary+
Comment 11•20 years ago
|
||
so if you have two languages which are not remotely compatible but share a common prefix, you'll use the one that doesn't interest the user if the one the user wants is unavailable?
Comment 12•20 years ago
|
||
Part 1 checked in on branch. Still leaving this open for UI changes in the theme manager.
Comment 13•20 years ago
|
||
ok, I took a quick look through the theme manager, and I don't feel comfortable catching all the permutations of uninstall. Reassigning to ben for the part 2 fix (disabling the uninstall button for selected themes).
Assignee: bsmedberg → bugs
QA Contact: bugs → bsmedberg
Comment 14•20 years ago
|
||
Ben fixed the FE half of this bug in bug 258892
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•