Closed Bug 272525 Opened 20 years ago Closed 17 years ago

UI inconsistancy for "Check new messages every X minutes" textfield

Categories

(Thunderbird :: Account Manager, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: data0x0, Assigned: ch.ey)

References

()

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1

In the "Account Settings" manager, if you click on "Server Settings" for each
account (in a mult-account setup), the "Check new messages every X minutes"
textfield is enabled even though it is unchecked.  This happens when you click
on "Server Settings" for one account and proceed to click on "Server Settings"
for another account.  If one account has the check messages enabled and if you
click on "Server Settings" on that account and then on another account, it will
show the "Check new messages..." textfield disabled on the account that does not
have it enabled.
NOTE:  I have not verified this on a single account setup.


Reproducible: Always
Steps to Reproduce:
1.  Go to "Tools -> Account Settings..."
2.  Click on "Server Settings" for each account

Actual Results:  
"Check new messages every X minutes" textfield is enabled when it is unchecked.
(at least one of them will be).


Expected Results:  
Should be disabled if "Check new messages..." is unchecked.


Machine info:
Windows NT 5.1 SP1; .NET CLR 1.1.4322.573

Thunderbird info:
version 0.9+ (20041122)

-----
Images of issue:
http://www11.brinkster.com/00zone00/tb.issue1.gif
http://www11.brinkster.com/00zone00/tb.issue2.gif
-----
Confirmed using Mozilla Application Suite: Mozilla/5.0 (X11; U; Linux i686;
en-US; rv:1.7.5) Gecko/20050207. This happens only when selecting "Server
Settings" from a different account. If you stay inside the options of one
account it works.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Also: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1b1) Gecko/20060807 Thunderbird/2.0a1 ID:2006080703
OS: Windows XP → All
Hardware: PC → All
QA Contact: account-manager
It also affects others like "Messages larger than" in Disk Space and "Automatically delete junk mail older than" in Junk.
And that's a quite strange behaviour since it only affects those textboxes whose en-/disabling is implemented by adding/removing a disabled attribute of broadcasters and having an observes attribute on the textboxes.

In case of the latter of the above options the disabling doesn't work when switching between accounts as long the id's contain a dot like server.purgeSpam or even foo.purgeSpam. It works if they're e.g. server_purgeSpam or so. What's that?
Since in the cases of the server and offline panel only one element needs to be switched it can also be done by directly setting the disabled attribute for the element.
This avoids the problematic observer (and might be some cycles faster) and is simply simpler.

It doesn't solve the cause of the problem, but here's a patch in case someone is interested.
Comment on attachment 267168 [details] [diff] [review]
patch for fixing 2/3 of the problem

Can we get this in to make things at least a bit better?
Attachment #267168 - Flags: review?(mscott)
Comment on attachment 267168 [details] [diff] [review]
patch for fixing 2/3 of the problem

Neil likes reviewing account manager bugs too.
Attachment #267168 - Flags: superreview?(mscott)
Attachment #267168 - Flags: review?(neil)
Attachment #267168 - Flags: review?(mscott)
IIRC the problem with the broadcasters is that if someone sets the attribute directly on the observed element then you can't correct it by setting the attribute on the broadcaster, because the latter attribute is already "right".
Comment on attachment 267168 [details] [diff] [review]
patch for fixing 2/3 of the problem

I think this is right, but just double-checking with IanN ;-)
Attachment #267168 - Flags: review?(neil) → review?(iann_bugzilla)
Comment on attachment 267168 [details] [diff] [review]
patch for fixing 2/3 of the problem

>Index: mailnews/base/prefs/resources/content/am-server.js
>===================================================================
>@@ -207,16 +207,14 @@ function secureSelect()
> 
> function setupBiffUI()
> function setupNotifyUI()
Both the above functions are near identical so could combine into a function similar to onCheckItem in am-offline.js

>Index: mailnews/base/prefs/resources/content/am-offline.xul
>===================================================================
>@@ -104,14 +100,14 @@
> 
>     <hbox align="center" class="indent" hidefor="none">
>         <checkbox  wsm_persist="true" id="offline.notDownload"
>-            label="&offlineNotDownload.label;" accesskey="&offlineNotDownload.accesskey;" oncommand="onCheckItem('bc_notDownload', 'offline.notDownload');"/>
>-        <textbox wsm_persist="true" id="offline.notDownloadMin" size="4" value="50"  observes="bc_notDownload"/> 
>+                   label="&offlineNotDownload.label;" accesskey="&offlineNotDownload.accesskey;" oncommand="onCheckItem('offline.notDownloadMin', 'offline.notDownload');"/>
The above line is over long, as you are touching it please split across two lines.
>+        <textbox wsm_persist="true" id="offline.notDownloadMin" size="4" value="50"/> 
>         <label value="&kb.label;" control="offline.notDownloadMin"/>
>     </hbox>
> 
>     <hbox align="center" class="indent" hidefor="movemail,pop3,imap,none">
>-        <checkbox wsm_persist="true" id="nntp.downloadMsg" label="&nntpDownloadMsg.label;" accesskey="&nntpDownloadMsg.accesskey;" oncommand="onCheckItem('bc_downloadMsg', 'nntp.downloadMsg');"/>
>-        <textbox wsm_persist="true" id="nntp.downloadMsgMin" size="2" value="30" observes="bc_downloadMsg"/>
>+      <checkbox wsm_persist="true" id="nntp.downloadMsg" label="&nntpDownloadMsg.label;" accesskey="&nntpDownloadMsg.accesskey;" oncommand="onCheckItem('nntp.downloadMsgMin', 'nntp.downloadMsg');"/>
The above line is over long, please split across two lines.
>+        <textbox wsm_persist="true" id="nntp.downloadMsgMin" size="2" value="30"/>
Indentation is incorrect, should line up with checkbox.
Attachment #267168 - Flags: review?(iann_bugzilla) → review-
This one should address Ians comment.
Assignee: mscott → ch.ey
Attachment #267168 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #270005 - Flags: review?(iann_bugzilla)
Attachment #267168 - Flags: superreview?(mscott)
Comment on attachment 270005 [details] [diff] [review]
[checked in] 2/3 patch v2

Looks good to me, r=me
Attachment #270005 - Flags: review?(iann_bugzilla) → review+
Attachment #270005 - Flags: superreview?(neil)
Comment on attachment 270005 [details] [diff] [review]
[checked in] 2/3 patch v2

I'm still catching up on bugmail (I've only just read IanN's review of the previous patch) so I'll punt this one to Scott ;-)
Attachment #270005 - Flags: superreview?(neil) → superreview?(mscott)
Comment on attachment 270005 [details] [diff] [review]
[checked in] 2/3 patch v2

OK, I got there eventually ;-)
Attachment #270005 - Flags: superreview?(mscott) → superreview+
Thanks Ian and Neil. Neil, would you be so kind to also check it in sometime or other?
mailnews/base/prefs/resources/content/am-server.xul 1.119
mailnews/base/prefs/resources/content/am-server.js 1.71
mailnews/base/prefs/resources/content/am-offline.xul 1.28
mailnews/base/prefs/resources/content/am-offline.js 1.26
Keywords: checkin-needed
Attachment #270005 - Attachment description: 2/3 patch v2 → [checked in] 2/3 patch v2
Thanks Phil for checkin, marking fixed.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Depends on: 457882
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: