It's late and I really don't know what I'm doing

Talk about add-ons and extension development.
User avatar
diesel_travis
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY
Contact:

Post by diesel_travis »

clav wrote:... it might just be window._content.document.popupNode

I really ought to know this, since I must have used it when i wrote GoTo... :(


woo hoo! i checked out the goto src and its document.popupNode. thanx clav!

Now, all i have to do is get the context menu items to only show up when images are clicked on.
jedbro
Posts: 1899
Joined: November 10th, 2002, 12:35 pm
Location: Mexico / Boulder Co.
Contact:

Post by jedbro »

clav wrote:it's missing support for locale packages. is QuickNote using hard coded strings ?

Shame on me.... I know ;)
When I first started out with the extension I hard coded the strings for testing reasons, and was just too lazy to create locales.
I promise I will do this for the next release ;)

diesel_jackass wrote:Now, all i have to do is get the context menu items to only show up when images are clicked on.

I suggest you check out the <a href="http://extensionroom.mozdev.org/#nukeimage">Nuke Image</a> extension by Ted.
It should have the exact code you are looking for to do this.
User avatar
ehume
Posts: 6743
Joined: November 17th, 2002, 12:33 pm
Location: Princeton, NJ, USA

Post by ehume »

This process is very interesting. I've been using All-in-One's customization to make mouse gestures (up, down, up-down) to double, halve and reset images sizes. Now d_j is making a separate extension to do just those. This will give us even more choices.
Firefox: Sic transit gloria mundi.
User avatar
diesel_travis
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY
Contact:

Post by diesel_travis »

ehume wrote:This process is very interesting. I've been using All-in-One's customization to make mouse gestures (up, down, up-down) to double, halve and reset images sizes. Now d_j is making a separate extension to do just those. This will give us even more choices.

that's a good thing, right? :-)

here's my tentative plans for this extension:
0.1 - get it to work as it is
0.2 - break out some preferences into an option screen, maybe add some cascaded options

the reset image size sounds pretty good, i'll have to throw that in there. i'll have to grab the gestures extension and see how it was done.

anyone have any other suggestions?

right now the extension installs fine on latest build/XP (my work machine), but i'm getting an error: -239 trying to install it in the latest build/2000 (my home machine). kinda frustrating.
User avatar
diesel_travis
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY
Contact:

Post by diesel_travis »

Ok, it appears to work fine on my latest build/XP machine. Feel free to try it out:
http://travis.servebeer.com/imagezoomer/imageZoomer.html

thanks everyone for your help!
User avatar
Pike
Posts: 2293
Joined: August 10th, 2003, 12:12 pm
Location: UK
Contact:

Post by Pike »

I can't seem to install it. It just doesnt appear in my extension list. I noticed in imageZoomer.jar/content/imagezoomer/contents.rdf:

Code: Select all

<RDF:li>chrome://copyimage/content/imageZoomerOverlay.xul</RDF:li>


Note the copyimage dir in the chrome path.
User avatar
diesel_travis
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY
Contact:

Post by diesel_travis »

nice catch, i've updated/uploaded the changes. I wonder if that would account for the error code: -239 that i was getting at home?
thanx
User avatar
Pike
Posts: 2293
Joined: August 10th, 2003, 12:12 pm
Location: UK
Contact:

Post by Pike »

I'd guess the -239 error is caused by your installer trying to register a none existant skin (I've had that before but it only gave the error on profile installs, not app dir installs).

To get it to install correctly I had to change installed-chrome.txt from:

Code: Select all

content,install,url,jar:resource:/chrome/imagezoomer.jar!/content/
locale,install,url,jar:resource:/chrome/imagezoomer.jar!/locale/en-US/
skin,install,url,jar:resource:/chrome/imagezoomer.jar!/skin/classic/

...to...

Code: Select all

content,install,url,jar:resource:/chrome/imagezoomer.jar!/content/imagezoomer/
locale,install,url,jar:resource:/chrome/imagezoomer.jar!/locale/en-US/imagezoomer/

I think you either need to change the directory structure of your .JAR or alter your install.js.

Anyway I have it installed now, very nice extension. :)

p.s. You haven't registered you Esperanto locale either.
Last edited by Pike on September 18th, 2003, 8:40 am, edited 1 time in total.
User avatar
diesel_travis
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY
Contact:

Post by diesel_travis »

Should my install.js look like this then?

Code: Select all

const name = "imagezoomer";
...
    registerChrome(contentFlag, folder, "content/" + name + "/");
    registerChrome(localeFlag, folder, APP_LOCALE_FOLDER + name + "/");

if so i'll update/upload the xpi. thanks for the help.

i'm glad you like it! can i just register both locales like so:

Code: Select all

    registerChrome(localeFlag, folder, APP_LOCALE_FOLDER + name + "/");
    registerChrome(localeFlag, folder, APP_LOCALE_FOLDER2 + name + "/");

?
User avatar
Pike
Posts: 2293
Joined: August 10th, 2003, 12:12 pm
Location: UK
Contact:

Post by Pike »

diesel_jackass wrote:Should my install.js look like this then?

Code: Select all

const name = "imagezoomer";
...
    registerChrome(contentFlag, folder, "content/" + name + "/");
    registerChrome(localeFlag, folder, APP_LOCALE_FOLDER + name + "/");


I think so, but don't quote me on it :)

diesel_jackass wrote:i'm glad you like it! can i just register both locales like so:

Code: Select all

    registerChrome(localeFlag, folder, APP_LOCALE_FOLDER + name + "/");
    registerChrome(localeFlag, folder, APP_LOCALE_FOLDER2 + name + "/");

?

I have no idea, I keep meaning to try in case I need to make an extension with an en-UK locale, you could try it and see.
David H
Posts: 2254
Joined: June 13th, 2003, 5:17 am
Location: Japan

Post by David H »

This sounds like a useful extension. The only problem I have is that I think 200% makes the image too big. I'd prefer a smaller step of 150% instead.
User avatar
diesel_travis
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY
Contact:

Post by diesel_travis »

I did the following and it seemed to work:

Code: Select all

const APP_LOCALE_FOLDERS  = new Array("locale/en-US/", "locale/eo/");
...
   for(var i=0; i<APP_LOCALE_FOLDERS.length; i++) {
       registerChrome(localeFlag, folder, APP_LOCALE_FOLDERS[i] + name + "/");
   }

it seems like a more extensible solution than APP_LOCALE_FOLDER1, APP_LOCALE_FOLDER2, etc.

it put the following in my installed-chrome.txt:

Code: Select all

content,install,url,jar:resource:/chrome/imagezoomer.jar!/content/imagezoomer/
locale,install,url,jar:resource:/chrome/imagezoomer.jar!/locale/en-US/imagezoomer/
locale,install,url,jar:resource:/chrome/imagezoomer.jar!/locale/eo/imagezoomer/
User avatar
diesel_travis
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY
Contact:

Post by diesel_travis »

David H wrote:This sounds like a useful extension. The only problem I have is that I think 200% makes the image too big. I'd prefer a smaller step of 150% instead.

Yeah, I agree. Once this version is stable enough to release, I'll work on customizing the zoom levels. What I'd like to have is a cascaded menu with options like: 2x, 1.5x, .75x, .5x, Custom, Original, Set Dimensions.
2x, 1.5x, .75x, .5x - zoom to those magnifications
Custom - pops up box for user input of zoom level
Original - sets the image to its original dimensions
Set Dimensions - 2 successive inputs for the image height and width (both boxes prefilled with current dimension)
User avatar
Pike
Posts: 2293
Joined: August 10th, 2003, 12:12 pm
Location: UK
Contact:

Post by Pike »

Just tried it and it installs fine now, definitely going to be keeping this extension installed. :D
User avatar
diesel_travis
Posts: 133
Joined: September 16th, 2003, 11:31 pm
Location: Rochester, NY
Contact:

Post by diesel_travis »

Pike wrote:Just tried it and it installs fine now, definitely going to be keeping this extension installed. :D

yay! :biggrin:
i'll strip out all the comments and other unnecessary junk and announce it in a new thread (after lunch of course).
Thanks everyone for your help.
Post Reply