Closed Bug 735347 Opened 12 years ago Closed 12 years ago

Prefing off the IM feature should also hide the "Chat" preference pane

Categories

(Thunderbird :: Instant Messaging, defect)

defect
Not set
normal

Tracking

(thunderbird13 fixed)

RESOLVED FIXED
Thunderbird 14.0
Tracking Status
thunderbird13 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 1 open bug)

Details

(Whiteboard: [esr])

Attachments

(1 file)

The "mail.chat.enabled" pref currently prevents the IM code from being initialized, hides the IM UI from the main window ("Chat" button in the toolbar; menu items) and from the Account Settings dialog (hides IM accounts from the list and hides the "Add Chat account…" menu item), but the "Chat" prefpane is still visible in the pref window.
Whiteboard: [esr]
Attached patch Patch (deleted) — Splinter Review
I wish I could just set .hidden = true on the prefpane, but the preference bindings don't like it that way...

Also, I'm not very sure of what the story is with Services.jsm in the prefwindow with all these dynamically loaded overlay files, so I played safe and used the old Components.classes[...].getService form to get the pref service.
Assignee: nobody → florian
Attachment #608112 - Flags: review?(bwinton)
Comment on attachment 608112 [details] [diff] [review]
Patch

>+++ b/mail/components/preferences/jar.mn
>@@ -1,15 +1,17 @@
> messenger.jar:
>+    content/messenger/preferences/preferences.js

So, "preferences.js" seems really generic.  Is there another name we could choose that more accurately describes what it does?
(It probably doesn't matter, so I'm not going to block the review over it, but if you can think of a better name, I'ld appreciate it.  :)

>+    content/messenger/preferences/chat.js

Why are you adding chat.js here?

>+++ b/mail/components/preferences/preferences.js
>@@ -0,0 +1,16 @@
>+/* This Source Code Form is subject to the terms of the Mozilla Public
>+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
>+ * You can obtain one at http://mozilla.org/MPL/2.0/. */

Love that MPL2!  :)

I mostly like it.  r=me with the chat.js removed, or an explanation of why it's necessary (and wasn't necessary before).

Thanks,
Blake.
Attachment #608112 - Flags: review?(bwinton) → review+
(In reply to Blake Winton (:bwinton - Thunderbird UX) from comment #2)
> Comment on attachment 608112 [details] [diff] [review]
> Patch
> 
> >+++ b/mail/components/preferences/jar.mn
> >@@ -1,15 +1,17 @@
> > messenger.jar:
> >+    content/messenger/preferences/preferences.js
> 
> So, "preferences.js" seems really generic.  Is there another name we could
> choose that more accurately describes what it does?

For me "preferences.js" in this context means "the JS file loaded with the XUL file named preferences.xul" so I can't think of a better name.
I was quite surprised that this file didn't exist yet.

> >+    content/messenger/preferences/chat.js
> 
> Why are you adding chat.js here?

It's an unrelated change, I pondered filing a separate bug and attaching a separate patch for it, but that seemed like too much clicking.

chat.xul includes chat.js that contains code to disable the subitems of the "Let my contacts know that I'm idle" when that checkbox is unchecked. However that didn't work because I forgot to package chat.js...
http://hg.mozilla.org/comm-central/rev/41aa34975063
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 14.0
Comment on attachment 608112 [details] [diff] [review]
Patch

[Approval Request Comment]
This is required if we want to have the ability to pref off the IM feature.
Attachment #608112 - Flags: approval-comm-aurora?
Attachment #608112 - Flags: approval-comm-aurora? → approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: