Closed
Bug 386706
Opened 18 years ago
Closed 18 years ago
update check should be disabled if not possible
Categories
(Calendar :: Sunbird Only, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
0.7
People
(Reporter: wolfiR, Assigned: mschroeder)
Details
(Whiteboard: [l10n impact])
Attachments
(1 file, 1 obsolete file)
|
5.05 KB,
patch
|
dbo
:
review+
|
Details | Diff | Splinter Review |
The update check in the Help menu should be disabled if it's not possible to use it (if it's locked or if the application directory is not writable for a user).
Firefox and Thunderbird do the same.
| Reporter | ||
Comment 1•18 years ago
|
||
This patch uses the same mechanisms used in Firefox to modify the menu item.
| Assignee | ||
Comment 2•18 years ago
|
||
Wolfgang, please request review for your patch (see http://wiki.mozilla.org/Calendar:Module_Ownership for an appropriate reviewer).
| Reporter | ||
Updated•18 years ago
|
Attachment #270711 -
Flags: review?(lilmatt)
| Reporter | ||
Comment 3•18 years ago
|
||
Comment on attachment 270711 [details] [diff] [review]
patch
Was told that lilmatt might not have enough time to review
Attachment #270711 -
Flags: review?(lilmatt) → review?(daniel.boelzle)
| Assignee | ||
Updated•18 years ago
|
Assignee: nobody → mozilla
Hardware: PC → All
| Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Comment 4•18 years ago
|
||
Comment on attachment 270711 [details] [diff] [review]
patch
Sorry for the delay...
>+++ locales/en-US/chrome/calendar/calendar.properties 3 Jul 2007 09:43:51 >+updatesItem_defaultFallback=Check for Updates...
I'd prefer "_fallback" identifiers.
Please use the ellipsis charaacter U+2026 like in <http://lxr.mozilla.org/mozilla1.8/source/calendar/locales/en-US/chrome/calendar/menuOverlay.dtd#45>.
>+++ resources/content/applicationUtil.js 3 Jul 2007 09:43:52 -0000
>+ var updates =
>+ Components.classes["@mozilla.org/updates/update-service;1"].
>+ getService(Components.interfaces.nsIApplicationUpdateService);
>+ var um =
>+ Components.classes["@mozilla.org/updates/update-manager;1"].
>+ getService(Components.interfaces.nsIUpdateManager);
Please use more verbose variable names, like updateService and updateManager.
>+ if (!canUpdate)
>+ return;
use four spaces, add curly braces
>+ // If there's an active update, substitute its name into the label
>+ // we show for this item, otherwise display a generic label.
>+ function getStringWithUpdateName(key) {
>+ if (activeUpdate && activeUpdate.name)
>+ return strings.getFormattedString(key, [activeUpdate.name]);
>+ return strings.getString(key + "Fallback");
>+ }
Since this function is used only once, I'd like to get rid of it.
>+ // By default, show "Check for Updates..."
>+ var key = "default";
>+ if (activeUpdate) {
>+ switch (activeUpdate.state) {
>+ case "downloading":
... four spaces like all over established in applicationUtils.js
rest looks good, but r- for now.
Attachment #270711 -
Flags: review?(daniel.boelzle) → review-
| Reporter | ||
Comment 5•18 years ago
|
||
Just to make that clear. All this is a 1-to-1 copy from Firefox. I basically have no objections to diverge but I haven't expected that to be a requirement ;-)
| Assignee | ||
Comment 6•18 years ago
|
||
I take this bug to finish it before string freeze (and because Daniel asked me to ;)).
(In reply to comment #4)
> >+++ locales/en-US/chrome/calendar/calendar.properties 3 Jul 2007 09:43:51 >+updatesItem_defaultFallback=Check for Updates...
> I'd prefer "_fallback" identifiers.
I think, we shouldn't rename the properties. Localizers know them from Firefox and Thunderbird.
Assignee: mozilla → mschroeder
Attachment #270711 -
Attachment is obsolete: true
Attachment #277402 -
Flags: review?(daniel.boelzle)
Comment 7•18 years ago
|
||
Comment on attachment 277402 [details] [diff] [review]
Patch v2
One last suggestion to be discussed: Since calendar.properties is shared with lightning, but this is a Sunbird-only feature, it IMO makes sense to create a new Sunbird-specific resource file, e.g. sunbird.properties. Opinions?
r=dbo with that suggestion resolved.
Attachment #277402 -
Flags: review?(daniel.boelzle) → review+
| Assignee | ||
Comment 8•18 years ago
|
||
(In reply to comment #7)
> (From update of attachment 277402 [details] [diff] [review])
> One last suggestion to be discussed: Since calendar.properties is shared with
> lightning, but this is a Sunbird-only feature, it IMO makes sense to create a
> new Sunbird-specific resource file, e.g. sunbird.properties. Opinions?
We have no Sunbird specific properties file at the moment, so maybe this should be introduced in a follow-up bug. I also think there are Lightning-only properties in calendar.properties that should go into the existing lightning.properties file. Maybe there should be a bug for general properties cleanup.
Comment 9•18 years ago
|
||
(In reply to comment #8)
Ok, we should do that in a follow-up bug which revises the l10n files; would you please write one?
For now, please tag the added section in calendar.properties (e.g. *Sunbird only*), so it's easier when being moved later on.
Comment 10•18 years ago
|
||
Checked in on HEAD and MOZILLA_1_8_BRANCH; thanks for the patch, Wolfgang and Martin!
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.7
Comment 11•18 years ago
|
||
Martin, please mind to diff patches that properly reflect the files' directories which makes it easier to apply them.
Updated•18 years ago
|
Whiteboard: [l10n impact]
| Assignee | ||
Comment 12•18 years ago
|
||
Filed bug 395567 as follow-up.
You need to log in
before you can comment on or make changes to this bug.
Description
•