Closed
Bug 590615
Opened 15 years ago
Closed 14 years ago
Sync UI: Avoid accessing Weave.Service (= importing service.js)
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(fennec2.0b2+)
VERIFIED
FIXED
Tracking | Status | |
---|---|---|
fennec | 2.0b2+ | --- |
People
(Reporter: philikon, Assigned: philikon)
References
Details
Attachments
(1 file, 2 obsolete files)
1.48 KB,
patch
|
vingtetun
:
review+
|
Details | Diff | Splinter Review |
Bug 587027 moves some things around so that it's possible to not having to
import all of Sync if it isn't being used at all. The Sync UI in Fennec should
take advantage of this.
Assignee | ||
Comment 1•15 years ago
|
||
This should do the trick, though it's untested (mostly due to the fact that bug 587027 hasn't landed in m-c yet, but also because I don't have a Fennec build set up ;)).
Comment 2•15 years ago
|
||
(In reply to comment #0)
> Bug 587027 moves some things around so that it's possible to not having to
> import all of Sync if it isn't being used at all. The Sync UI in Fennec should
> take advantage of this.
There is still some Weave.Service call into the file you have patched
Assignee | ||
Comment 3•15 years ago
|
||
(In reply to comment #2)
> There is still some Weave.Service call into the file you have patched
Yes, but hopefully only when necessary (e.g. after or during set up).
Updated•15 years ago
|
tracking-fennec: --- → ?
Updated•15 years ago
|
tracking-fennec: ? → 2.0b1+
Updated•15 years ago
|
Assignee: nobody → philipp
Comment 4•15 years ago
|
||
Comment on attachment 469133 [details] [diff] [review]
v1
Vivien - try this out and make sure we don't get any errors and Sync still connects ok.
If all is OK, let's land it.
Attachment #469133 -
Flags: review?(21)
Comment 5•15 years ago
|
||
Comment on attachment 469133 [details] [diff] [review]
v1
Oh, we are waiting for bug 590633. Guess we can't really test it yet, let alone land it.
Attachment #469133 -
Flags: review?(21)
Updated•15 years ago
|
tracking-fennec: 2.0b1+ → 2.0b2+
Comment 6•15 years ago
|
||
Comment on attachment 469133 [details] [diff] [review]
v1
All clear for us now
Attachment #469133 -
Flags: review?(21)
Comment 7•15 years ago
|
||
Comment on attachment 469133 [details] [diff] [review]
v1
>diff --git a/chrome/content/aboutHome.xhtml b/chrome/content/aboutHome.xhtml
> function updateWeaveButton() {
>- let isDisabled = !getChromeWin().Weave.Service.isLoggedIn;
>+ let win = getChromeWin();
>+ let isDisabled =
>+ (win.Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED)
>+ || !win.Weave.Service.isLoggedIn;
> document.getElementById("remoteTabs").setAttribute("disabled", isDisabled);
We could potentially do a "let weave = getchromeWin().Weave;" and use that, what do you think?
Also it seems that the expression is wrong because Weave.CLIENT_NOT_CONFIGURED will probably not work since Weave will be undefined if i am correct.
Attachment #469133 -
Flags: review?(21) → review-
Assignee | ||
Comment 8•15 years ago
|
||
Address review comments and unbitrot. Still untested (haven't built Fennec yet).
Attachment #469133 -
Attachment is obsolete: true
Attachment #475882 -
Flags: review?(21)
Comment 9•15 years ago
|
||
Comment on attachment 475882 [details] [diff] [review]
v2
>diff --git a/chrome/content/aboutHome.xhtml b/chrome/content/aboutHome.xhtml
>+ let Weave = getChromeWin().Weave;
>+ if (!Weave)
>+ return;
Nit: add a line break here
>+ let isDisabled =
>+ (Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED)
>+ || !Weave.Service.isLoggedIn;
>+ document.getElementById("remoteTabs").setAttribute("disabled", isDisabled);
> }
It works on my build, but I want the Weave variable to be renamed to weave before landing.
Attachment #475882 -
Flags: review?(21) → review+
Assignee | ||
Comment 10•15 years ago
|
||
Address review comments.
Attachment #475882 -
Attachment is obsolete: true
Comment 11•15 years ago
|
||
(In reply to comment #10)
> Created attachment 476030 [details] [diff] [review]
> v3
>
> Address review comments.
Thanks Philipp, I'm waiting for the beta 1 code freeze and branching to land this one.
Comment 12•15 years ago
|
||
Vivien - feel free to r+ and use the [fennec-checkin-postb1] whiteboard flag :)
Attachment #476030 -
Flags: review+
Whiteboard: [fennec-checkin-postb1]
Comment 13•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [fennec-checkin-postb1]
Comment 14•14 years ago
|
||
Verified this on Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110919 Firefox/9.0a1 Fennec/9.0a1
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•