Closed Bug 668512 Opened 13 years ago Closed 13 years ago

add image support to context menu

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dietrich, Assigned: adw)

Details

Attachments

(1 file, 4 obsolete files)

      No description provided.
Pointer to Github pull-request
Pointer to Github pull-request
Attachment #543134 - Attachment is obsolete: true
Attachment #543133 - Flags: review?(adw)
Sweet, I've been wanting to add icon support for a while now, thanks.  r+ with the inline comments addressed.  The only thing missing is the doc update, and I'd be happy to write that myself as a follow-up.  And since this is adding to the API, I'd like to get Myk's opinion on it.

Myk, this patch adds an `image` property to menu items whose value is a string URL pointing to image data.  Any thoughts before we land this?
Attachment #543133 - Flags: review?(adw) → review+
Pointer to Github pull-request
Comment on attachment 543661 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/201/

thanks for review! fixed comments. also added update/removal support and made a few other minor changes so asking for another pass.
Attachment #543661 - Flags: review?(adw)
Thanks for adding null support.  I just noticed a problem: the image setter only works for items in the top-level menu.  It's my fault, since you modeled the image setter after the label setter, and the label setter has the same problem.  Let me figure out how to fix that (bug 669475) and then let's come back to this, if that's OK.
Assignee: nobody → dietrich
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Target Milestone: --- → 1.1
Comment on attachment 543661 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/201/

OK, bug 669475 landed.  I think it should be pretty straightforward to implement images now.
Attachment #543661 - Flags: review?(adw)
(In reply to comment #3)
> Myk, this patch adds an `image` property to menu items whose value is a
> string URL pointing to image data.  Any thoughts before we land this?

ui-r=myk

Any chance y'all can update and land the patch before we merge to the stabilization branch on Tuesday, August 2?
Note for posterity: I checked other addon platforms, and Google Chrome's calls this an "icon", while Safari's calls it an "image", and XUL calls it an "image".
I think I can update Dietrich's patch and have it ready for review by later today.
Assignee: dietrich → adw
Status: NEW → ASSIGNED
Attached patch patch (obsolete) — Splinter Review
A few small unrelated changes:

* nsIDOMHTMLIsIndexElement was recently removed.  Bug 666665 comment 4
  says to use nsIDOMHTMLInputElement instead.

* PRIVATE_PROPS_KEY used to be an object before I changed it to a string
  in the big rewrite patch.  Changing it was dumb, since values passed
  to item.valueOf() are compared to it using equality, which means that
  anyone who happens to guess the key could get the item's private
  properties.  So I reverted it back to an object.

* Underscores added to the names of traits' init methods to make them
  private, as they should be.
Attachment #543133 - Attachment is obsolete: true
Attachment #543661 - Attachment is obsolete: true
Attachment #549907 - Flags: review?(myk)
Attached patch patch with docSplinter Review
Forgot to update the doc.
Attachment #549907 - Attachment is obsolete: true
Attachment #549914 - Flags: review?(myk)
Attachment #549907 - Flags: review?(myk)
Comment on attachment 549914 [details] [diff] [review]
patch with doc

Looks good, r=myk, thanks for the quick turnaround!
Attachment #549914 - Flags: review?(myk) → review+
https://github.com/mozilla/addon-sdk/commit/e9587be2a2d4f1a2c5ab46397623c33cdae46896
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: