nothing happens when clicking OK in Install Shortcut dialog on Linux

VERIFIED FIXED

Status

Mozilla Labs
Prism
VERIFIED FIXED
10 years ago
10 years ago

People

(Reporter: myk, Assigned: myk)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
Created attachment 304386 [details] [diff] [review]
patch v1: switches from XPM to PNG for Linux

When I click OK in the Install Shortcut dialog on Linux using the latest trunk version of Prism, nothing happens.  Some debugging traces the problem down to the ImageUtils module, which specifies that the native icon format is XPM.

But Mozilla has no XPM encoder, so imgITools::encodeScaledImage throws an exception when called by ImageUtils::createNativeIcon, which is what stops the accept handler from completing.

"locate /usr/share/icons" returns about ~15k lines on my Linux VM.  Of those, ~12k contain .png, while only 9 contain .xpm:

myk@myk:~$ locate /usr/share/icons | wc
  15507   15507  904367
myk@myk:~$ locate /usr/share/icons | grep .png | wc
  11866   11866  702568
myk@myk:~$ locate /usr/share/icons | grep .xpm | wc
      9       9     521

So PNG seems the dominant icon format, and I think the solution here is simply to encode the icons in that format.

Here's a patch that does that.  With this patch, OK closes the dialog, and an icon appears on my desktop.  Double-clicking the icon opens Prism to the web site for which I was installing the shortcut, so all works well.
Attachment #304386 - Flags: review?(mark.finkle)
Comment on attachment 304386 [details] [diff] [review]
patch v1: switches from XPM to PNG for Linux

Great fix and it fits in with our plan of removing XPM altogether.
Attachment #304386 - Flags: review?(mark.finkle) → review+
(Assignee)

Comment 2

10 years ago
Note: I don't have write access to the Prism repository, so I'll need this checked in for me.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Yay!

Should probably mark bug 414594 a duplicate of this one. (I don't have the Bugzilla permissions to do so.)

Comment 4

10 years ago
Fredrik,

I asked the admins to give you CANCONFIRM and EDITBUGS permissions. You should have received a confirmation mail.

Comment 5

10 years ago
Oh, and thanks Myk! The Linux version has been sorely neglected. It's great to hear that it's up and running now.
Matt, thanks! (I actually mailed Gerv myself after writing comment 3 here, heh.)

Marking this as VERIFIED.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.