Talk about add-ons and extension development.
14 posts • Page 1 of 1
the original extension is here:
i'm trying to improve this extension because of the following issues:
1. all file sizes are given in KB only, and to be specific, KiB. and the decimal places are too many.
2. in the compose dialog, when an attachment is added, the size precedes the filename, and is also in KiB
i'm making changes to the js files inside.
so far i have successfully resolved issue 1. i added conditional if statements to one js file so that attachments in received messages are now displayed in bytes (0 decimal places) for less that 1024, KB (with 1 decimal place) for less than or = 1024^2, and MB (with 2 decimal places) for >1024^2.
i have also been able to reverse the order....it is now <filename> (size). but as soon as i add essentially identical "if" statements to the second js file that controls how attachment sizes are displayed in the compose dialog, the sizes disappear altogether. i am pretty sure it isn't syntax, but i have no idea what it could be, i get no errors or anything.
this is the original and works:
this is my modded one:
(if you comment out my additional "if" statements, the order of size and filename and kB is replaced by KB) not sure why ifs dont work
please help if u can, thanks,
You could have just sent a message to the author.. That would be me
The latest version ( on my site, not UMO ) has support for choosing kB or KiB with a pref.
Note that most ISPs will limit message sizes on KiB (not kB), which is my the extension uses that as the default.
The reason why the extension puts the size before the name is because, with long file names, the size *could* be pushed over to the right, outside of the viewable area of the listbox, meaning that the user would have to scroll right to see the sizes.. Also, the sizes would not all be lined up, so the user sould have to scroll right and left to see which attachements have what sizes.. There was some method to the madness..
I could have added a pref to control the number of decimal places etc etc..
Lots of extensions there, but I can't find the Attachment Sizes extension there. By the way I have a SeaMonkey port at: http://xsidebar.mozdev.org/modifiedmisc.html#attrbytes
I have not updated the text on my site for some time..
However, all of the xpis are on my site in their most current versions..
So, latest Attachment Sizes is there www.supportware.net/mozilla/AttachmentSizes.xpi ( version 0.0.8 )
Philip, this version contains the install.js from your modded version (I only changed the version number, your credits are still there ).. Can you check if it installs correctly on SM ? I have no test env for SM.
GoofyFr, the latest version has been localized.
The 0.0.8 version contains an options panel that allows for changing the units ( kB, mB, gB, KiB, MiB, GiB, Auto, AutoB )
..Auto will use bytes if size is under 10^3 bytes, kB if size is under 10^6 bytes, mB if under 10^9, and gB if over 10^9
..AutoB will use bytes if size is under 2^10 bytes, KiB if size is under 2^20 bytes, MiB if under 2^30, and GiB if over 2^30
you can also change the # decimal places (autos will use default decimal places of 0 for bytes, 1 for kB or KiB, 2 for all others)
you can also change the order of text ( (size) name, or name (size) )
Leeoniya, I have not looked at your code, but thanks for the comments, suggestions
Thanks ausdilecce for the options panel. It's nice to be able to set this the way <I><b>I</b></I> want it to read. Nice job on a handy extension!
Thanks Frank. Good work with the Options panel. Dummy question...what is the "Debug" selection?
Does anyone know how to increase the length or width of the attachment file name display?
here's what i've done, might help..
Sorry for the delay. I can report that v 0.0.8 works fine in SeaMonkey 1.0.5 and 1.5a. Only one nit: you need to correct the version number in content/contents.rdf (currently 0.1) or just remove it.
Can someone tell me where the Options panel is on version 0.0.8?
Otherwise access it from the usual place in the extension manager.
I really like this extension, but the inability to show longer file names in their full form makes the extension quite impractical. Would it be possible to include some user option to select max file name display width? Or at least make the three truncation dots positioned right before the file extension or next to the parenthesis (example: Mypic...jpg(30Kb) or Mypictureof...(30Kb)). The behaviour seems pretty random right now.
14 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests