[SM2.0.1] Workaround browser.toolbars.showbutton.* prefs that should not have been migrated from 1.1

RESOLVED FIXED in seamonkey2.1a1

Status

SeaMonkey
UI Design
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: Philip Chee, Assigned: Philip Chee)

Tracking

({fixed-seamonkey2.0.1, fixed-seamonkey2.0.3})

SeaMonkey 2.0 Branch
seamonkey2.1a1
fixed-seamonkey2.0.1, fixed-seamonkey2.0.3

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 2 obsolete attachments)

(Assignee)

Description

8 years ago
We seem to have accidentally migrated from 1.1 all the "browser.toolbars.showbutton.*" preferences when we shouldn't. The most common case appears to be the home button. Our button pref listener is still active because of the Go and Search buttons in the URL bar. One possible symptom is that the Home button is invisible anywhere including in the toolbar customization palette window. We since these prefs are already migrated we need a way to ignore them in 2.0.1
(Assignee)

Updated

8 years ago
Assignee: nobody → philip.chee
(Assignee)

Comment 1

8 years ago
Created attachment 415891 [details] [diff] [review]
Patch v1.0 gButtonPrefListener

> +        if (/(bookmarks|home|print)/.test(item.substr(this.domain.length+1)))
> +          Application.prefs.get(item).reset();

Clear userpref for those button prefs which we should not have migrated.

> -  MAKESAMETYPEPREFTRANSFORM("browser.toolbars.showbutton.bookmarks",   Bool),
> -  MAKESAMETYPEPREFTRANSFORM("browser.toolbars.showbutton.home",        Bool),
> -  MAKESAMETYPEPREFTRANSFORM("browser.toolbars.showbutton.print",       Bool),

Fix the migrator code.
Attachment #415891 - Flags: review?(neil)
Attachment #415891 - Flags: approval-seamonkey2.0.1?

Comment 2

8 years ago
Comment on attachment 415891 [details] [diff] [review]
Patch v1.0 gButtonPrefListener

In BrowserToolboxCustomizeDone() you call gButtonPrefListener.updateButton twice (although I can't remember why). Is there any point trying to do anything else here? Or maybe split it into two listeners, one for go and one for search?

>-  MAKESAMETYPEPREFTRANSFORM("browser.toolbars.showbutton.bookmarks",   Bool),
>-  MAKESAMETYPEPREFTRANSFORM("browser.toolbars.showbutton.home",        Bool),
>-  MAKESAMETYPEPREFTRANSFORM("browser.toolbars.showbutton.print",       Bool),
These are obviously correct, sigh...

Comment 3

8 years ago
Comment on attachment 415891 [details] [diff] [review]
Patch v1.0 gButtonPrefListener

>+        if (/(bookmarks|home|print)/.test(item.substr(this.domain.length+1)))
Let's have a stronger regexp than this. (A good enough one will avoid the need for a substr.) r=me with this fixed.

>+          Application.prefs.get(item).reset();
Nit: I'd prefer pref.clearUserPref to match the rest of this object.
Attachment #415891 - Flags: review?(neil) → review+
(Assignee)

Comment 4

8 years ago
Created attachment 416096 [details] [diff] [review]
Patch 1.1 make the regexp match those buttons exactly

As discussed over #irc I've changed the regexp to 
if (/\.(bookmarks|home|print)$/.test(item))
Attachment #415891 - Attachment is obsolete: true
Attachment #416096 - Flags: superreview?(neil)
Attachment #416096 - Flags: review?(neil)
Attachment #416096 - Flags: approval-seamonkey2.0.1?
Attachment #415891 - Flags: approval-seamonkey2.0.1?
(Assignee)

Comment 5

8 years ago
Created attachment 416101 [details] [diff] [review]
Patch 1.2 use pref.clearUserPref() instead r=neil

>>+          Application.prefs.get(item).reset();
> Nit: I'd prefer pref.clearUserPref to match the rest of this object.

Fixed.
Attachment #416096 - Attachment is obsolete: true
Attachment #416101 - Flags: superreview?(neil)
Attachment #416101 - Flags: review+
Attachment #416101 - Flags: approval-seamonkey2.0.1?
Attachment #416096 - Flags: superreview?(neil)
Attachment #416096 - Flags: review?(neil)
Attachment #416096 - Flags: approval-seamonkey2.0.1?

Updated

8 years ago
Attachment #416101 - Flags: superreview?(neil)
Attachment #416101 - Flags: superreview+
Attachment #416101 - Flags: approval-seamonkey2.0.1?
Attachment #416101 - Flags: approval-seamonkey2.0.1+
(Assignee)

Updated

8 years ago
Status: NEW → ASSIGNED
Keywords: checkin-needed
Whiteboard: [checkin 191 needed]

Comment 6

8 years ago
Checked in as http://hg.mozilla.org/comm-central/rev/ea0a6d28a439 and http://hg.mozilla.org/releases/comm-1.9.1/rev/1d2ec61f068b
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed → fixed-seamonkey2.0.1
Resolution: --- → FIXED
Whiteboard: [checkin 191 needed]
Target Milestone: --- → seamonkey2.1a1

Comment 7

8 years ago
(In reply to comment #5)
>Created an attachment (id=416101)
>Patch 1.2 use pref.clearUserPref() instead r=neil
>>>+          Application.prefs.get(item).reset();
>> Nit: I'd prefer pref.clearUserPref to match the rest of this object.
>Fixed.
Oh dear. Oh dear oh dear. How could I forget to check. D'oh!
(Assignee)

Comment 8

8 years ago
>>> Nit: I'd prefer pref.clearUserPref to match the rest of this object.
>>Fixed.
> Oh dear. Oh dear oh dear. How could I forget to check. D'oh!
Hmm. Aaargh. Sorry about the braino. I could have sworn I had fixed it.
....
In fact I have it fixed locally. Oh drat I think I forgot to do hg qrefresh.
(Assignee)

Comment 9

8 years ago
Created attachment 416881 [details] [diff] [review]
[Checkin: comment 10] Patch v1.3 Nit really fixed.

Really fixed. (fingers crossed)
Attachment #416881 - Flags: review?(neil)
Attachment #416881 - Flags: approval-seamonkey2.0.2?

Updated

8 years ago
Attachment #416881 - Flags: review?(neil)
Attachment #416881 - Flags: review+
Attachment #416881 - Flags: approval-seamonkey2.0.2?
Attachment #416881 - Flags: approval-seamonkey2.0.2+
(Assignee)

Updated

8 years ago
Keywords: checkin-needed
Whiteboard: [c-c/c-191 checkin needed]
(Assignee)

Updated

8 years ago
Attachment #416881 - Attachment description: Patch v1.3 Nit really fixed. → [for c-191/c-c checkin] Patch v1.3 Nit really fixed.
(Assignee)

Updated

8 years ago
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 416881 [details] [diff] [review]
[Checkin: comment 10] Patch v1.3 Nit really fixed.

http://hg.mozilla.org/comm-central/rev/b228857ea6fb
http://hg.mozilla.org/releases/comm-1.9.1/rev/926cae605771
Attachment #416881 - Attachment description: [for c-191/c-c checkin] Patch v1.3 Nit really fixed. → [Checkin: comment 10] Patch v1.3 Nit really fixed.
Please change status as needed, probably after verification with a nightly that contains the change.
Keywords: checkin-needed
Whiteboard: [c-c/c-191 checkin needed]
(Assignee)

Comment 12

8 years ago
Confirm fixed.
Build identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.9.1.7pre) Gecko/20091212 Lightning/1.0b2pre SeaMonkey/2.0.2pre
Status: REOPENED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED

Updated

8 years ago
Keywords: fixed-seamonkey2.0.2
Blocks: 549395
You need to log in before you can comment on or make changes to this bug.