Changeset 252
- Timestamp:
- 02/22/08 19:59:33 (2 years ago)
- Files:
-
- trunk/uploadr/LICENSE.txt (modified) (2 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Info.plist (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/LICENSE.txt (modified) (2 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/application.ini (modified) (2 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/chrome.manifest (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/chrome.manifest.prod (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/about.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/alert.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/api.js (modified) (17 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/buttons.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/clh.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/conf.js (modified) (3 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/confirm.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/dock.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/drag.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/file.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/grid.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/help.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/keyboard.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/main.xul (modified) (3 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/meta.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/mouse.js (modified) (2 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.js (modified) (15 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/prompt.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/set.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/settings.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/settings.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/settings_dialog.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/threads.js (modified) (7 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/ui.js (modified) (5 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/upgrade.js (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/upload.js (modified) (17 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/users.js (modified) (2 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/video_big.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/video_offline.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/video_restricted.xul (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/branding/brand.dtd (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/branding/brand.properties (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/de-de/main.dtd (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/de-de/main.properties (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/en-US/main.dtd (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/en-US/main.properties (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/es-us/main.dtd (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/es-us/main.properties (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/fr-fr/main.dtd (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/fr-fr/main.properties (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/it-it/main.dtd (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/it-it/main.properties (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/ko-kr/main.dtd (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/ko-kr/main.properties (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/pt-br/main.dtd (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/pt-br/main.properties (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/zh-hk/main.dtd (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/zh-hk/main.properties (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/Makefile (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/clh.js (modified) (3 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/dll.cpp (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGM.cpp (modified) (4 diffs)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGM.h (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGMModule.cpp (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/flIGM.idl (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/flIKey.idl (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/flKey.cpp (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/flKey.h (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/flKeyModule.cpp (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/gm.cpp (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/md5.h (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/components/xpidl-build.bat (modified) (1 diff)
- trunk/uploadr/MacUploadr.app/Contents/Resources/defaults/preferences/prefs.js (modified) (2 diffs)
- trunk/uploadr/Makefile (modified) (1 diff)
- trunk/uploadr/README (modified) (1 diff)
- trunk/uploadr/windows_install_build.nsi (modified) (1 diff)
- trunk/uploadr/windows_install_lang/English.nsh (modified) (1 diff)
- trunk/uploadr/windows_install_lang/French.nsh (modified) (1 diff)
- trunk/uploadr/windows_install_lang/German.nsh (modified) (1 diff)
- trunk/uploadr/windows_install_lang/Italian.nsh (modified) (1 diff)
- trunk/uploadr/windows_install_lang/Korean.nsh (modified) (1 diff)
- trunk/uploadr/windows_install_lang/PortugueseBR.nsh (modified) (1 diff)
- trunk/uploadr/windows_install_lang/Spanish.nsh (modified) (1 diff)
- trunk/uploadr/windows_install_lang/TradChinese.nsh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/uploadr/LICENSE.txt
r110 r252 1 Flickr Uploader. Copyright (c) 2007 Yahoo! Inc. All rights reserved. This 2 library is free software; you can redistribute it and/or modify it under the 3 terms of the GNU General Public License (GPL), version 2 ONLY. 1 Flickr Uploadr 2 3 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is free 4 software; you can redistribute it and/or modify it under the terms of the GNU 5 General Public License (GPL), version 2 ONLY. 4 6 5 7 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 … … 243 245 software generally. 244 246 245 NO WARRANTY247 NO WARRANTY 246 248 247 249 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR trunk/uploadr/MacUploadr.app/Contents/Info.plist
r234 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/LICENSE.txt
r114 r252 1 1 Flickr Uploadr 2 2 3 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL), version 2 ONLY. This program is distributed WITHOUT ANY WARRANTY, whether express or implied. A copy of the GNU GPL is set forth below. Additional terms and conditions apply to any use of any Flickr or other services associated with this program, and your use of such services is expressly conditioned on your compliance with those terms. 4 5 The package containing this program also includes the following software. 6 7 8 XULRunner. Copyright © 2007 Mozilla Foundation. This software is licensed under the Mozilla Public License, the GNU General Public License, or the GNU Lesser General Public License. See product and licensing information, as well as source code, at http://developer.mozilla.org/en/docs/Mozilla_Application_Framework. 9 10 GraphicsMagick. Copyright © 2007 GraphicsMagick Group. This software is licensed under the X11-type License. See product and licensing information, as well as source code, at: http://www.graphicsmagick.org/. 11 12 Exiv2. Copyright © 2004-2007 Andreas Huggel. This software is licensed under the GNU General Public License. See product and licensing information, as well as source code, at: http://www.exiv2.org/ 3 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This program is 4 free software; you can redistribute it and/or modify it under the terms of the 5 GNU General Public License (GPL), version 2 ONLY. This program is distributed 6 WITHOUT ANY WARRANTY, whether express or implied. A copy of the GNU GPL is 7 set forth below. Additional terms and conditions apply to any use of any 8 Flickr or other services associated with this program, and your use of such 9 services is expressly conditioned on your compliance with those terms. 10 11 The package containing this program also includes the following software. 12 13 XULRunner. Copyright (c) 2008 Mozilla Foundation. This software is licensed 14 under the Mozilla Public License, the GNU General Public License, or the GNU 15 Lesser General Public License. See product and licensing information, as 16 well as source code, at: 17 http://developer.mozilla.org/en/docs/Mozilla_Application_Framework. 18 19 GraphicsMagick. Copyright (c) 2008 GraphicsMagick Group. This software is 20 licensed under the X11-type License. See product and licensing information, 21 as well as source code, at: http://www.graphicsmagick.org/. 22 23 Exiv2. Copyright (c) 2004-2008 Andreas Huggel. This software is licensed 24 under the GNU General Public License. See product and licensing information, 25 as well as source code, at: http://www.exiv2.org/ 13 26 14 27 ------------------------------------------------------------------------------ … … 16 29 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 17 30 18 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 31 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, 32 Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and 33 distribute verbatim copies of this license document, but changing it is not 34 allowed. 19 35 20 36 Preamble 21 37 22 The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. 23 24 When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. 25 26 To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. 27 28 For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. 29 30 We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. 31 32 Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. 33 34 Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. 35 36 The precise terms and conditions for copying, distribution and modification follow. 37 38 GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 39 40 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". 41 42 Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 43 44 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. 45 46 You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 47 48 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: 49 50 a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. 51 52 b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. 53 54 c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) 55 56 These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. 57 58 Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. 59 60 In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 61 62 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: 63 64 a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 65 66 b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, 67 68 c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) 69 70 The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. 71 72 If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 73 74 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 75 76 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 77 78 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 79 80 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. 81 82 If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. 83 84 It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. 85 86 This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 87 88 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 89 90 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. 91 92 Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 93 94 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. 95 96 NO WARRANTY 97 98 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 99 100 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 38 The licenses for most software are designed to take away your freedom to share 39 and change it. By contrast, the GNU General Public License is intended to 40 guarantee your freedom to share and change free software--to make sure the 41 software is free for all its users. This General Public License applies to 42 most of the Free Software Foundation's software and to any other program whose 43 authors commit to using it. (Some other Free Software Foundation software is 44 covered by the GNU Library General Public License instead.) You can apply it 45 to your programs, too. 46 47 When we speak of free software, we are referring to freedom, not price. Our 48 General Public Licenses are designed to make sure that you have the freedom to 49 distribute copies of free software (and charge for this service if you wish), 50 that you receive source code or can get it if you want it, that you can change 51 the software or use pieces of it in new free programs; and that you know you 52 can do these things. 53 54 To protect your rights, we need to make restrictions that forbid anyone to 55 deny you these rights or to ask you to surrender the rights. These 56 restrictions translate to certain responsibilities for you if you distribute 57 copies of the software, or if you modify it. 58 59 For example, if you distribute copies of such a program, whether gratis or for 60 a fee, you must give the recipients all the rights that you have. You must 61 make sure that they, too, receive or can get the source code. And you must 62 show them these terms so they know their rights. 63 64 We protect your rights with two steps: (1) copyright the software, and (2) 65 offer you this license which gives you legal permission to copy, distribute 66 and/or modify the software. 67 68 Also, for each author's protection and ours, we want to make certain that 69 everyone understands that there is no warranty for this free software. If the 70 software is modified by someone else and passed on, we want its recipients to 71 know that what they have is not the original, so that any problems introduced 72 by others will not reflect on the original authors' reputations. 73 74 Finally, any free program is threatened constantly by software patents. We 75 wish to avoid the danger that redistributors of a free program will 76 individually obtain patent licenses, in effect making the program proprietary. 77 To prevent this, we have made it clear that any patent must be licensed for 78 everyone's free use or not licensed at all. 79 80 The precise terms and conditions for copying, distribution and modification 81 follow. 82 83 GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND 84 MODIFICATION 85 86 0. This License applies to any program or other work which contains a notice 87 placed by the copyright holder saying it may be distributed under the terms of 88 this General Public License. The "Program", below, refers to any such program 89 or work, and a "work based on the Program" means either the Program or any 90 derivative work under copyright law: that is to say, a work containing the 91 Program or a portion of it, either verbatim or with modifications and/or 92 translated into another language. (Hereinafter, translation is included 93 without limitation in the term "modification".) Each licensee is addressed as 94 "you". 95 96 Activities other than copying, distribution and modification are not covered 97 by this License; they are outside its scope. The act of running the Program is 98 not restricted, and the output from the Program is covered only if its 99 contents constitute a work based on the Program (independent of having been 100 made by running the Program). Whether that is true depends on what the Program 101 does. 102 103 1. You may copy and distribute verbatim copies of the Program's source code as 104 you receive it, in any medium, provided that you conspicuously and 105 appropriately publish on each copy an appropriate copyright notice and 106 disclaimer of warranty; keep intact all the notices that refer to this License 107 and to the absence of any warranty; and give any other recipients of the 108 Program a copy of this License along with the Program. 109 110 You may charge a fee for the physical act of transferring a copy, and you may 111 at your option offer warranty protection in exchange for a fee. 112 113 2. You may modify your copy or copies of the Program or any portion of it, 114 thus forming a work based on the Program, and copy and distribute such 115 modifications or work under the terms of Section 1 above, provided that you 116 also meet all of these conditions: 117 118 a) You must cause the modified files to carry prominent notices stating that 119 you changed the files and the date of any change. 120 121 b) You must cause any work that you distribute or publish, that in whole or in 122 part contains or is derived from the Program or any part thereof, to be 123 licensed as a whole at no charge to all third parties under the terms of this 124 License. 125 126 c) If the modified program normally reads commands interactively when run, you 127 must cause it, when started running for such interactive use in the most 128 ordinary way, to print or display an announcement including an appropriate 129 copyright notice and a notice that there is no warranty (or else, saying that 130 you provide a warranty) and that users may redistribute the program under 131 these conditions, and telling the user how to view a copy of this License. 132 (Exception: if the Program itself is interactive but does not normally print 133 such an announcement, your work based on the Program is not required to print 134 an announcement.) 135 136 These requirements apply to the modified work as a whole. If identifiable 137 sections of that work are not derived from the Program, and can be reasonably 138 considered independent and separate works in themselves, then this License, 139 and its terms, do not apply to those sections when you distribute them as 140 separate works. But when you distribute the same sections as part of a whole 141 which is a work based on the Program, the distribution of the whole must be on 142 the terms of this License, whose permissions for other licensees extend to the 143 entire whole, and thus to each and every part regardless of who wrote it. 144 145 Thus, it is not the intent of this section to claim rights or contest your 146 rights to work written entirely by you; rather, the intent is to exercise the 147 right to control the distribution of derivative or collective works based on 148 the Program. 149 150 In addition, mere aggregation of another work not based on the Program with 151 the Program (or with a work based on the Program) on a volume of a storage or 152 distribution medium does not bring the other work under the scope of this 153 License. 154 155 3. You may copy and distribute the Program (or a work based on it, under 156 Section 2) in object code or executable form under the terms of Sections 1 and 157 2 above provided that you also do one of the following: 158 159 a) Accompany it with the complete corresponding machine-readable source code, 160 which must be distributed under the terms of Sections 1 and 2 above on a 161 medium customarily used for software interchange; or, 162 163 b) Accompany it with a written offer, valid for at least three years, to give 164 any third party, for a charge no more than your cost of physically performing 165 source distribution, a complete machine-readable copy of the corresponding 166 source code, to be distributed under the terms of Sections 1 and 2 above on a 167 medium customarily used for software interchange; or, 168 169 c) Accompany it with the information you received as to the offer to 170 distribute corresponding source code. (This alternative is allowed only for 171 noncommercial distribution and only if you received the program in object code 172 or executable form with such an offer, in accord with Subsection b above.) 173 174 The source code for a work means the preferred form of the work for making 175 modifications to it. For an executable work, complete source code means all 176 the source code for all modules it contains, plus any associated interface 177 definition files, plus the scripts used to control compilation and 178 installation of the executable. However, as a special exception, the source 179 code distributed need not include anything that is normally distributed (in 180 either source or binary form) with the major components (compiler, kernel, and 181 so on) of the operating system on which the executable runs, unless that 182 component itself accompanies the executable. 183 184 If distribution of executable or object code is made by offering access to 185 copy from a designated place, then offering equivalent access to copy the 186 source code from the same place counts as distribution of the source code, 187 even though third parties are not compelled to copy the source along with the 188 object code. 189 190 4. You may not copy, modify, sublicense, or distribute the Program except as 191 expressly provided under this License. Any attempt otherwise to copy, modify, 192 sublicense or distribute the Program is void, and will automatically terminate 193 your rights under this License. However, parties who have received copies, or 194 rights, from you under this License will not have their licenses terminated so 195 long as such parties remain in full compliance. 196 197 5. You are not required to accept this License, since you have not signed it. 198 However, nothing else grants you permission to modify or distribute the 199 Program or its derivative works. These actions are prohibited by law if you do 200 not accept this License. Therefore, by modifying or distributing the Program 201 (or any work based on the Program), you indicate your acceptance of this 202 License to do so, and all its terms and conditions for copying, distributing 203 or modifying the Program or works based on it. 204 205 6. Each time you redistribute the Program (or any work based on the Program), 206 the recipient automatically receives a license from the original licensor to 207 copy, distribute or modify the Program subject to these terms and conditions. 208 You may not impose any further restrictions on the recipients' exercise of the 209 rights granted herein. You are not responsible for enforcing compliance by 210 third parties to this License. 211 212 7. If, as a consequence of a court judgment or allegation of patent 213 infringement or for any other reason (not limited to patent issues), 214 conditions are imposed on you (whether by court order, agreement or otherwise) 215 that contradict the conditions of this License, they do not excuse you from 216 the conditions of this License. If you cannot distribute so as to satisfy 217 simultaneously your obligations under this License and any other pertinent 218 obligations, then as a consequence you may not distribute the Program at all. 219 For example, if a patent license would not permit royalty-free redistribution 220 of the Program by all those who receive copies directly or indirectly through 221 you, then the only way you could satisfy both it and this License would be to 222 refrain entirely from distribution of the Program. 223 224 If any portion of this section is held invalid or unenforceable under any 225 particular circumstance, the balance of the section is intended to apply and 226 the section as a whole is intended to apply in other circumstances. 227 228 It is not the purpose of this section to induce you to infringe any patents or 229 other property right claims or to contest validity of any such claims; this 230 section has the sole purpose of protecting the integrity of the free software 231 distribution system, which is implemented by public license practices. Many 232 people have made generous contributions to the wide range of software 233 distributed through that system in reliance on consistent application of that 234 system; it is up to the author/donor to decide if he or she is willing to 235 distribute software through any other system and a licensee cannot impose that 236 choice. 237 238 This section is intended to make thoroughly clear what is believed to be a 239 consequence of the rest of this License. 240 241 8. If the distribution and/or use of the Program is restricted in certain 242 countries either by patents or by copyrighted interfaces, the original 243 copyright holder who places the Program under this License may add an explicit 244 geographical distribution limitation excluding those countries, so that 245 distribution is permitted only in or among countries not thus excluded. In 246 such case, this License incorporates the limitation as if written in the body 247 of this License. 248 249 9. The Free Software Foundation may publish revised and/or new versions of the 250 General Public License from time to time. Such new versions will be similar in 251 spirit to the present version, but may differ in detail to address new 252 problems or concerns. 253 254 Each version is given a distinguishing version number. If the Program 255 specifies a version number of this License which applies to it and "any later 256 version", you have the option of following the terms and conditions either of 257 that version or of any later version published by the Free Software 258 Foundation. If the Program does not specify a version number of this License, 259 you may choose any version ever published by the Free Software Foundation. 260 261 10. If you wish to incorporate parts of the Program into other free programs 262 whose distribution conditions are different, write to the author to ask for 263 permission. For software which is copyrighted by the Free Software Foundation, 264 write to the Free Software Foundation; we sometimes make exceptions for this. 265 Our decision will be guided by the two goals of preserving the free status of 266 all derivatives of our free software and of promoting the sharing and reuse of 267 software generally. 268 269 NO WARRANTY 270 271 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR 272 THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE 273 STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE 274 PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 275 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 276 FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND 277 PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, 278 YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 279 280 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL 281 ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 282 THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 283 GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE 284 OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR 285 DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR 286 A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH 287 HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 101 288 102 289 END OF TERMS AND CONDITIONS 103 104 trunk/uploadr/MacUploadr.app/Contents/Resources/application.ini
r231 r252 2 2 ; Flickr Uploadr 3 3 ; 4 ; Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 ; software; you can redistribute it and/or modify it under the terms of the6 ; GNU General Public License (GPL), version 2 only. This library is4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 24 24 Enabled=False 25 25 ServerURL=http://www.flickr.com/services/uploadr/crash/ 26 27 [XRE] 28 EnableExtensionManager=1 trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/chrome.manifest
r153 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/chrome.manifest.prod
r216 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/about.xul
r95 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/alert.xul
r95 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/api.js
r250 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 30 30 31 31 checkToken: function(token) { 32 _api({32 api.start({ 33 33 'method': 'flickr.auth.checkToken', 34 34 'auth_token': token … … 52 52 53 53 getFrob: function(fresh) { 54 _api({54 api.start({ 55 55 'method': 'flickr.auth.getFrob' 56 56 }, null, null, null, fresh); … … 73 73 return; 74 74 } 75 var url = _api({75 var url = api.start({ 76 76 'perms': 'write', 77 77 'frob': users.frob, … … 86 86 getToken: function(frob) { 87 87 if (frob) { 88 _api({88 api.start({ 89 89 'method': 'flickr.auth.getToken', 90 90 'frob': frob … … 114 114 // Sets up the photostream header 115 115 getInfo: function(user_id) { 116 _api({116 api.start({ 117 117 'method': 'flickr.people.getInfo', 118 118 'auth_token': users.token, … … 141 141 142 142 getUploadStatus: function() { 143 _api({143 api.start({ 144 144 'method': 'flickr.people.getUploadStatus', 145 145 'auth_token': users.token … … 186 186 checkTickets: function(tickets) { 187 187 block_exit(); 188 _api({188 api.start({ 189 189 'method': 'flickr.photos.upload.checkTickets', 190 190 'auth_token': users.token, … … 275 275 addPhoto: function(photoset_id, photo_id){ 276 276 block_exit(); 277 _api({277 api.start({ 278 278 'method': 'flickr.photosets.addPhoto', 279 279 'auth_token': users.token, … … 297 297 create: function(title, description, primary_photo_id) { 298 298 block_exit(); 299 _api({299 api.start({ 300 300 'method': 'flickr.photosets.create', 301 301 'auth_token': users.token, … … 352 352 353 353 getList: function(user_id) { 354 _api({354 api.start({ 355 355 'method': 'flickr.photosets.getList', 356 356 'auth_token': users.token … … 428 428 429 429 getContentType: function() { 430 _api({430 api.start({ 431 431 'method': 'flickr.prefs.getContentType', 432 432 'auth_token': users.token … … 443 443 444 444 getHidden: function() { 445 _api({445 api.start({ 446 446 'method': 'flickr.prefs.getHidden', 447 447 'auth_token': users.token … … 458 458 459 459 getPrivacy: function() { 460 _api({460 api.start({ 461 461 'method': 'flickr.prefs.getPrivacy', 462 462 'auth_token': users.token … … 480 480 481 481 getSafetyLevel: function() { 482 _api({482 api.start({ 483 483 'method': 'flickr.prefs.getSafetyLevel', 484 484 'auth_token': users.token … … 499 499 500 500 logUploadStats: function(source, num_photos, upload_time, bytes, errors) { 501 _api({501 api.start({ 502 502 'method': 'flickr.utils.logUploadStats', 503 503 'auth_token': users.token, … … 517 517 }; 518 518 519 // Hashes of timeouts and XHRs being used to track running API calls 520 var _timeouts = {}; 521 522 // The guts of the API object - this actually makes the XHR calls and finds the callback 523 // Callbacks are named exactly like the API method but with an _ in front of the last 524 // part of the method name (for example flickr.foo.bar calls back to flickr.foo._bar) 525 var _api = function(params, url, browser, post, id) { 526 if (conf.console.request) { 527 Components.utils.reportError('API REQUEST: ' + params.toSource()); 528 } 529 if (null == url) { 530 // url = 'http://api.flickr.com/services/rest/'; 531 url = 'http://api.dev.flickr.com/services/rest/'; 532 } 533 if (null == browser) { 534 browser = false; 535 } 536 if (null == post) { 537 post = false; 538 } 539 if (null == id) { 540 id = -1; 541 } 542 543 // Sign the call 544 params['api_key'] = key.key(); 545 var sig = []; 546 var esc_params = {}; 547 for (var p in params) { 548 if ('object' == typeof params[p]) { 549 esc_params[p] = params[p]; 550 } else { 551 sig.push(p); 552 esc_params[p] = escape_utf8('' + params[p], !post); 553 } 554 } 555 sig.sort(); 556 var calc = []; 557 var ii = sig.length; 558 for (var i = 0; i < ii; ++i) { 559 calc.push(sig[i] + (post ? esc_params[sig[i]] : escape_utf8('' + params[sig[i]], false))); 560 } 561 esc_params['api_sig'] = key.sign(calc.join('')); 562 563 // Build either a POST payload or a GET URL 564 // There is an assumption here that no one will be sending a file over GET 565 var mstream = ''; 566 var boundary = '--------------------------deadbeef'; 567 if (post) { 568 mstream = Cc['@mozilla.org/io/multiplex-input-stream;1'].createInstance( 569 Ci.nsIMultiplexInputStream); 570 var sstream; 571 for (var p in esc_params) { 519 var api = { 520 521 // Hashes of timeouts and XHRs being used to track running API calls 522 timeouts: {}, 523 524 // Escape and sign a set of parameters, returning the new version 525 escape_and_sign: function(params, post) { 526 params['api_key'] = key.key(); 527 var sig = []; 528 var esc_params = {api_key: '', api_sig: ''}; 529 for (var p in params) { 530 if ('object' == typeof params[p]) { 531 esc_params[p] = params[p]; 532 } else { 533 sig.push(p); 534 esc_params[p] = escape_utf8('' + params[p], !post) 535 .replace(/(^\s+|\s+$)/g, ''); 536 } 537 } 538 sig.sort(); 539 var calc = []; 540 var ii = sig.length; 541 for (var i = 0; i < ii; ++i) { 542 calc.push(sig[i] + (post ? esc_params[sig[i]] : escape_utf8('' + params[sig[i]], false))); 543 } 544 esc_params['api_sig'] = key.sign(calc.join('')); 545 return esc_params; 546 }, 547 548 // The guts of the API object - this actually makes the XHR calls and finds the callback 549 // Callbacks are named exactly like the API method but with an _ in front of the last 550 // part of the method name (for example flickr.foo.bar calls back to flickr.foo._bar) 551 start: function(params, url, browser, post, id) { 552 if (conf.console.request) { 553 Cc['@mozilla.org/consoleservice;1'] 554 .getService(Ci.nsIConsoleService) 555 .logStringMessage('API REQUEST: ' + params.toSource()); 556 } 557 if (null == url) { 558 // url = 'http://api.flickr.com/services/rest/'; 559 url = 'http://api.dev.flickr.com/services/rest/'; 560 } 561 if (null == browser) { 562 browser = false; 563 } 564 if (null == post) { 565 post = false; 566 } 567 if (null == id) { 568 id = -1; 569 } 570 571 // Escape params and sign the call 572 params = api.escape_and_sign(params, post); 573 574 // Build either a POST payload or a GET URL 575 // There is an assumption here that no one will be sending a file over GET 576 var mstream = ''; 577 var boundary = '------deadbeef---deadbeef---' + Math.random(); 578 if (post) { 579 mstream = Cc['@mozilla.org/io/multiplex-input-stream;1'].createInstance( 580 Ci.nsIMultiplexInputStream); 581 var sstream; 582 for (var p in params) { 583 sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 584 Ci.nsIStringInputStream); 585 sstream.setData('--' + boundary + '\r\nContent-Disposition: form-data; name="' + 586 p + '"', -1); 587 mstream.appendStream(sstream); 588 if ('object' == typeof params[p] && null != params[p]) { 589 sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 590 Ci.nsIStringInputStream); 591 sstream.setData('; filename="' + params[p].filename + 592 '"\r\nContent-Type: application/octet-stream\r\n\r\n', -1); 593 mstream.appendStream(sstream); 594 var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsILocalFile); 595 file.initWithPath(params[p].path); 596 var fstream = Cc['@mozilla.org/network/file-input-stream;1'].createInstance( 597 Ci.nsIFileInputStream); 598 fstream.init(file, 1, 1, Ci.nsIFileInputStream.CLOSE_ON_EOF); 599 var bstream = Cc['@mozilla.org/network/buffered-input-stream;1'].createInstance( 600 Ci.nsIBufferedInputStream); 601 bstream.init(fstream, 4096); 602 mstream.appendStream(bstream); 603 sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 604 Ci.nsIStringInputStream); 605 sstream.setData('\r\n', -1); 606 mstream.appendStream(sstream); 607 } else { 608 sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 609 Ci.nsIStringInputStream); 610 sstream.setData('\r\n\r\n' + params[p] + '\r\n', -1); 611 mstream.appendStream(sstream); 612 } 613 } 572 614 sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 573 615 Ci.nsIStringInputStream); 574 sstream.setData('--' + boundary + '\r\nContent-Disposition: form-data; name="' + 575 p + '"', -1); 616 sstream.setData('--' + boundary + '--', -1); 576 617 mstream.appendStream(sstream); 577 if ('object' == typeof esc_params[p] && null != esc_params[p]) { 578 sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 579 Ci.nsIStringInputStream); 580 sstream.setData('; filename="' + esc_params[p].filename + 581 '"\r\nContent-Type: application/octet-stream\r\n\r\n', -1); 582 mstream.appendStream(sstream); 583 var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsILocalFile); 584 file.initWithPath(esc_params[p].path); 585 var fstream = Cc['@mozilla.org/network/file-input-stream;1'].createInstance( 586 Ci.nsIFileInputStream); 587 fstream.init(file, 1, 1, Ci.nsIFileInputStream.CLOSE_ON_EOF); 588 var bstream = Cc['@mozilla.org/network/buffered-input-stream;1'].createInstance( 589 Ci.nsIBufferedInputStream); 590 bstream.init(fstream, 4096); 591 mstream.appendStream(bstream); 592 sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 593 Ci.nsIStringInputStream); 594 sstream.setData('\r\n', -1); 595 mstream.appendStream(sstream); 596 } else { 597 sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 598 Ci.nsIStringInputStream); 599 sstream.setData('\r\n\r\n' + esc_params[p] + '\r\n', -1); 600 mstream.appendStream(sstream); 601 } 602 } 603 sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 604 Ci.nsIStringInputStream); 605 sstream.setData('--' + boundary + '--', -1); 606 mstream.appendStream(sstream); 607 upload.progress_total = mstream.available() >> 10; 608 } else { 609 var args = []; 610 for (var p in esc_params) { 611 args.push(p + '=' + esc_params[p]); 612 } 613 url += '?' + args.join('&'); 614 } 615 616 // Open a browser 617 // Only GET requests are supported here 618 if (browser) { 619 return launch_browser(url); 620 } 621 622 // Use XHR 623 // GET and POST are supported here 624 else { 625 626 // Build up the callback 627 // For the method foo.bar.baz this will call foo.bar._baz with the response 628 var callback; 629 if (params.method) { 630 var index = 1 + params.method.lastIndexOf('.'); 631 callback = params.method.substring(0, index) + '_' + 632 params.method.substring(index, params.method.length) + '(rsp'; 633 if (-1 != id) { 634 callback += ', id'; 635 } 636 callback += ');'; 637 } 638 639 // Callback 640 var xhr = new XMLHttpRequest(); 641 xhr.onreadystatechange = function() { 642 if (4 == xhr.readyState && 200 == xhr.status && xhr.responseXML) { 643 try { 644 var rsp = xhr.responseXML.documentElement; 645 if (conf.console.error && ( 646 'object' != typeof rsp || 'ok' != rsp.getAttribute('stat'))) { 647 Components.utils.reportError('API ERROR: ' + xhr.responseText); 648 } else if (conf.console.response) { 649 Components.utils.reportError('API RESPONSE: ' + xhr.responseText); 650 } 651 652 // If this is a normal method call 653 if (params.method) { 654 655 // It returned normally, don't timeout 656 window.clearTimeout(_timeouts[esc_params['api_sig']]); 657 delete _timeouts[esc_params['api_sig']]; 658 659 eval(callback); 660 } 661 662 // If this is an upload 663 else { 664 upload._start(rsp, id); 665 } 666 667 } catch (err) { 668 Components.utils.reportError(err); 669 } 670 } 671 }; 672 673 // Send the request 674 xhr.open(post ? 'POST' : 'GET', url, true); 675 if (post) { 676 xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + 677 boundary); 618 upload.progress_total = mstream.available() >> 10; 678 619 } else { 679 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 680 } 681 xhr.send(mstream); 682 683 // Setup upload progress indicator 684 if (post && -1 != id && !params.method) { 685 upload.progress_handle = window.setInterval(function() { 686 upload.progress(mstream, id); 687 }, conf.check); 688 } 689 690 // Setup timeout guard on everything else 691 else if (params.method) { 692 _timeouts[esc_params['api_sig']] = window.setTimeout(function() { 693 if (conf.console.timeout) { 694 Components.utils.reportError('API TIMEOUT: ' + callback); 695 } 696 var rsp = false; 697 eval(callback); 698 }, conf.timeout); 699 } 700 701 } 620 var args = []; 621 for (var p in params) { 622 args.push(p + '=' + params[p]); 623 } 624 url += '?' + args.join('&'); 625 } 626 627 // Open a browser 628 // Only GET requests are supported here 629 if (browser) { 630 return launch_browser(url); 631 } 632 633 // Use XHR 634 // GET and POST are supported here 635 else { 636 637 // Build up the callback 638 // For the method foo.bar.baz this will call foo.bar._baz with the response 639 var callback; 640 if (params.method) { 641 var index = 1 + params.method.lastIndexOf('.'); 642 callback = params.method.substring(0, index) + '_' + 643 params.method.substring(index, params.method.length) + '(rsp'; 644 if (-1 != id) { 645 callback += ', id'; 646 } 647 callback += ');'; 648 } 649 650 // Callback 651 var xhr = new XMLHttpRequest(); 652 xhr.onreadystatechange = function() { 653 if (4 == xhr.readyState && 200 == xhr.status && xhr.responseXML) { 654 try { 655 var rsp = xhr.responseXML.documentElement; 656 if (conf.console.error && ( 657 'object' != typeof rsp || 'ok' != rsp.getAttribute('stat'))) { 658 Components.utils.reportError('API ERROR: ' + xhr.responseText); 659 } else if (conf.console.response) { 660 Cc['@mozilla.org/consoleservice;1'] 661 .getService(Ci.nsIConsoleService) 662 .logStringMessage('API RESPONSE: ' + xhr.responseText); 663 } 664 665 // If this is a normal method call 666 if (params.method) { 667 668 // It returned normally, don't timeout 669 window.clearTimeout(api.timeouts[params['api_sig']]); 670 delete api.timeouts[params['api_sig']]; 671 672 eval(callback); 673 } 674 675 // If this is an upload 676 else { 677 upload._start(rsp, id); 678 } 679 680 } catch (err) { 681 Components.utils.reportError(err); 682 } 683 } 684 }; 685 686 // Send the request 687 xhr.open(post ? 'POST' : 'GET', url, true); 688 if (post) { 689 xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + 690 boundary); 691 } else { 692 xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 693 } 694 xhr.send(mstream); 695 696 // Setup upload progress indicator 697 if (post && -1 != id && !params.method) { 698 upload.progress_handle = window.setInterval(function() { 699 upload.progress(mstream, id); 700 }, conf.check); 701 } 702 703 // Setup timeout guard on everything else 704 else if (params.method) { 705 api.timeouts[params['api_sig']] = window.setTimeout(function() { 706 if (conf.console.timeout) { 707 Components.utils.reportError('API TIMEOUT: ' + callback); 708 } 709 var rsp = false; 710 eval(callback); 711 }, conf.timeout); 712 } 713 714 } 715 716 }, 717 718 // 702 719 703 720 }; trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/buttons.js
r205 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/clh.js
r224 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/conf.js
r245 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 34 34 35 35 // Upload progress-checking interval (milliseconds) 36 check: 400,36 check: 200, 37 37 38 38 // How often should the app auto-save metadata? (seconds) … … 50 50 // How many times (in a row) should we automatically retry a photo? 51 51 // This is PER PHOTO and will be reset after each successful upload 52 auto_retry_count: 1,//3,52 auto_retry_count: 3, 53 53 54 54 // How many times should checkTickets retry before giving up? 55 55 tickets_retry_count: 10, 56 57 // Should we use the new socket uploadr? 58 socket_uploadr: true, 59 60 56 61 57 62 // trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/confirm.xul
r95 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/dock.xul
r227 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/drag.js
r224 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/file.js
r190 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/grid.js
r158 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/help.xul
r95 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/keyboard.js
r199 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/main.xul
r244 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 115 115 oncommand="help.faq();" /> 116 116 <menuseparator /> 117 <menuitem id="menu_ updates"118 label="&menu.help.update;"119 class="menuitem-iconic"120 oncommand="upgrade.check();"/>117 <menuitem id="menu_addons" label="&menu.help.addons;" 118 oncommand="help.addons();" /> 119 <menuitem id="menu_updates" label="&menu.help.update;" 120 class="menuitem-iconic" oncommand="upgrade.check();"/> 121 121 <menuseparator /> 122 122 <menuitem id="menu_console" label="&menu.help.console;" … … 204 204 205 205 <!-- Status bar for showing helpful messages --> 206 <statusbar >206 <statusbar id="status-bar"> 207 207 <statusbarpanel id="status" label="" flex="1" /> 208 208 </statusbar> trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/meta.js
r250 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/mouse.js
r250 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 213 213 214 214 // Clicking on a single photo will do drag-reordering 215 if (e.target.src ) {215 if (e.target.src && 'buddyicon' != e.target.id) { 216 216 if (1 < photos.count) { 217 217 mouse.dragging = 1; trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.js
r245 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 47 47 48 48 // Find a good default directory for the file picker 49 var path = nsPreferences.getLocalizedUnicharPref('flickr.add_directory', ''); 49 var path = nsPreferences.getLocalizedUnicharPref( 50 'flickr.add_directory', ''); 50 51 if ('' == path) { 51 var path = Cc['@mozilla.org/file/directory_service;1'] .getService(52 Ci.nsIProperties).get('ProfD', Ci.nsIFile).path;52 var path = Cc['@mozilla.org/file/directory_service;1'] 53 .getService(Ci.nsIProperties).get('ProfD', Ci.nsIFile).path; 53 54 if (path.match(/^\//)) { 54 55 path += '/../../../../../Pictures'; … … 57 58 } 58 59 } 59 var def = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsILocalFile); 60 var def = Cc['@mozilla.org/file/local;1'] 61 .createInstance(Ci.nsILocalFile); 60 62 def.initWithPath(path); 61 63 62 64 // Open the file picker 63 var fp = Cc['@mozilla.org/filepicker;1'].createInstance(Ci.nsIFilePicker); 65 var fp = Cc['@mozilla.org/filepicker;1'] 66 .createInstance(Ci.nsIFilePicker); 64 67 fp.init(window, locale.getString('dialog.add'), 65 68 Ci.nsIFilePicker.modeOpenMultiple); … … 247 250 if (photos.count) { 248 251 if (photos.sort) { 249 threads.worker.dispatch(new Sort(), threads.worker.DISPATCH_NORMAL); 250 document.getElementById('photos_sort_default').style.display = 'block'; 251 document.getElementById('photos_sort_revert').style.display = 'none'; 252 threads.worker.dispatch(new Sort(), 253 threads.worker.DISPATCH_NORMAL); 254 document.getElementById('photos_sort_default') 255 .style.display = 'block'; 256 document.getElementById('photos_sort_revert') 257 .style.display = 'none'; 252 258 } else { 253 threads.worker.dispatch(new EnableUpload(), threads.worker.DISPATCH_NORMAL); 254 document.getElementById('photos_sort_default').style.display = 'none'; 255 document.getElementById('photos_sort_revert').style.display = 'block'; 256 } 257 document.getElementById('photos_init').style.display = 'none'; 258 document.getElementById('photos_new').style.display = 'none'; 259 document.getElementById('no_meta_prompt').style.visibility = 'visible'; 259 threads.worker.dispatch(new EnableUpload(), 260 threads.worker.DISPATCH_NORMAL); 261 document.getElementById('photos_sort_default') 262 .style.display = 'none'; 263 document.getElementById('photos_sort_revert') 264 .style.display = 'block'; 265 } 266 document.getElementById('photos_init') 267 .style.display = 'none'; 268 document.getElementById('photos_new') 269 .style.display = 'none'; 270 document.getElementById('no_meta_prompt') 271 .style.visibility = 'visible'; 260 272 mouse.show_photos(); 261 273 } else { … … 276 288 277 289 // Create a spot for the image, leaving a spinning placeholder 278 // Add images to the start of the list because this is our best guess for ordering279 // newest to oldest290 // Add images to the start of the list because this is our best 291 // guess for ordering newest to oldest 280 292 var img = document.createElementNS(NS_HTML, 'img'); 281 293 img.className = 'loading'; … … 339 351 photos.sort = true; 340 352 buttons.upload.disable(); 341 document.getElementById('photos_sort_default').style.display = 'none'; 342 document.getElementById('photos_sort_revert').style.display = 'none'; 343 document.getElementById('photos_init').style.display = '-moz-box'; 344 document.getElementById('no_meta_prompt').style.visibility = 'hidden'; 353 document.getElementById('photos_sort_default') 354 .style.display = 'none'; 355 document.getElementById('photos_sort_revert') 356 .style.display = 'none'; 357 document.getElementById('photos_init') 358 .style.display = '-moz-box'; 359 document.getElementById('no_meta_prompt') 360 .style.visibility = 'hidden'; 345 361 } 346 362 … … 359 375 mouse.click({target: {}}); 360 376 361 // For each selected image, show the loading spinner and dispatch the rotate job 377 // For each selected image, show the loading spinner and dispatch 378 // the rotate job 362 379 buttons.upload.disable(); 363 380 for (var i = 0; i < ii; ++i) { … … 366 383 block_sort(); 367 384 photos.batch_size -= p.size; 368 var img = document.getElementById('photo' + p.id).getElementsByTagName('img')[0]; 385 var img = document.getElementById('photo' + p.id) 386 .getElementsByTagName('img')[0]; 369 387 img.className = 'loading'; 370 388 img.setAttribute('width', 16); 371 389 img.setAttribute('height', 8); 372 390 img.src = 'chrome://uploadr/skin/balls-16x8-trans.gif'; 373 threads.worker.dispatch(new Rotate(p.id, degrees, conf.thumb_size, 374 p.path), threads.worker.DISPATCH_NORMAL); 375 } 376 } 377 threads.worker.dispatch(new EnableUpload(), threads.worker.DISPATCH_NORMAL); 391 threads.worker.dispatch(new Rotate(p.id, degrees, 392 conf.thumb_size, p.path), 393 threads.worker.DISPATCH_NORMAL); 394 } 395 } 396 threads.worker.dispatch(new EnableUpload(), 397 threads.worker.DISPATCH_NORMAL); 378 398 379 399 }, … … 389 409 390 410 // Don't upload if this is a user action and the button is disabled 391 if (from_user && 'disabled_button' == document.getElementById('button_upload').className) { 411 if (from_user && 'disabled_button' == document.getElementById( 412 'button_upload').className) { 392 413 return; 393 414 } 394 415 395 416 // Remove error indicators 396 var li = document.getElementById('photos_list').getElementsByTagName('li'); 417 var li = document.getElementById('photos_list') 418 .getElementsByTagName('li'); 397 419 var ii = li.length; 398 420 for (var i = 0; i < ii; ++i) { … … 434 456 435 457 // Resize because of user settings 436 if (null != settings.resize && -1 != settings.resize && 437 (p.width > settings.resize || p.height > settings.resize)) { 458 if (null != settings.resize && 459 -1 != settings.resize && 460 (p.width > settings.resize || 461 p.height > settings.resize)) { 438 462 resizing = true; 439 threads.worker.dispatch(new Resize(p.id, settings.resize, 440 p.path), threads.worker.DISPATCH_NORMAL); 463 threads.worker.dispatch(new Resize( 464 p.id, settings.resize, p.path), 465 threads.worker.DISPATCH_NORMAL); 441 466 } 442 467 … … 444 469 else if (p.size > users.filesize) { 445 470 resizing = true; 446 threads.worker.dispatch(new Resize(p.id, -1, p.path),447 threads.worker.DISPATCH_NORMAL);471 threads.worker.dispatch(new Resize(p.id, -1, 472 p.path), threads.worker.DISPATCH_NORMAL); 448 473 } 449 474 … … 478 503 } 479 504 ui.bandwidth_updated(); 480 threads.worker.dispatch(new RetryUpload(true), threads.worker.DISPATCH_NORMAL); 505 threads.worker.dispatch(new RetryUpload(true), 506 threads.worker.DISPATCH_NORMAL); 481 507 482 508 // Give some meaningful feedback 483 // In the future, it'd be nice if this said "Resizing..."484 509 if (not_started) { 485 510 document.getElementById('footer').style.display = '-moz-box'; … … 487 512 var progress_text = document.getElementById('progress_text'); 488 513 progress_text.className = 'spinning'; 489 progress_text.value = '';514 progress_text.value = locale.getString('upload.resizing.status'); 490 515 status.set(locale.getString('status.uploading')); 491 516 buttons.upload.disable(); … … 622 647 document.getElementById('no_meta_prompt').style.visibility = 'visible'; 623 648 } 624 for (var i = 0; i < ii; ++i) { 625 photos._add(list[i].path); 626 photos.list[photos.list.length - 1] = list[i]; 627 } 649 // for (var i = 0; i < ii; ++i) { 650 // photos._add(list[i].path); 651 // photos.list[photos.list.length - 1] = list[i]; 652 // } 653 photos.add(list); 628 654 629 655 // Sort photos based on previous sort setting 656 /* 630 657 if (list.length) { 631 658 photos.sort = obj.sort; … … 640 667 } 641 668 } 669 */ 642 670 643 671 // Bring in old sets that were created locally but not on the site trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.xul
r240 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/prompt.xul
r95 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is free 7 7 software; you can redistribute it and/or modify it under the terms of the 8 8 GNU General Public License (GPL), version 2 only. This library is trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/set.xul
r101 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/settings.js
r240 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/settings.xul
r169 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/settings_dialog.js
r207 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/threads.js
r250 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 13 13 // Hooks to threads 14 14 worker: null, 15 uploadr: null, 15 16 main: null, 16 17 17 // GraphicsMagick 18 // GraphicsMagick XPCOM object 18 19 gm: null, 19 20 … … 21 22 init: function() { 22 23 try { 24 25 // Threads themselves 23 26 var t = Cc['@mozilla.org/thread-manager;1'].getService(); 24 27 threads.worker = t.newThread(0); 28 threads.uploadr = t.newThread(0); 25 29 threads.main = t.mainThread; 30 31 // GraphicsMagick, for use on the worker thread 26 32 threads.gm = Cc['@flickr.com/gm;1'].createInstance(Ci.flIGM); 27 threads.gm.init(Cc['@mozilla.org/file/directory_service;1'].getService( 28 Ci.nsIProperties).get('resource:app', Ci.nsIFile).path); 33 threads.gm.init(Cc['@mozilla.org/file/directory_service;1'] 34 .getService(Ci.nsIProperties) 35 .get('resource:app', Ci.nsIFile).path); 36 29 37 } catch (err) { 30 38 Components.utils.reportError(err); … … 98 106 } 99 107 108 // Width and height 100 109 photos.list[this.id].width = parseInt(thumb[1]); 101 110 photos.list[this.id].height = parseInt(thumb[2]); 111 112 // Date taken 102 113 if (/\d{4}:\d{2}:\d{2} \d{2}:\d{2}:\d{2}/.test(thumb[3])) { 103 114 photos.list[this.id].date_taken = thumb[3]; … … 121 132 minutes + ':' + seconds; 122 133 } 134 135 // Thumbnail 123 136 photos.list[this.id].thumb_width = parseInt(thumb[4]); 124 137 photos.list[this.id].thumb_height = parseInt(thumb[5]); … … 126 139 img.setAttribute('height', thumb[5]); 127 140 img.src = 'file://' + thumb[6]; 141 photos.list[this.id].thumb = thumb[6]; 128 142 129 143 // Make video icons for videos … … 139 153 } 140 154 141 photos.list[this.id].thumb = thumb[6];155 // Title/tags/description 142 156 if ('' == photos.list[this.id].title) { 143 157 var title = thumb[7] ? thumb[7].replace(/^\s+|\s+$/, trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/ui.js
r244 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 186 186 faq: function() { 187 187 launch_browser('http://flickr.com/help/tools/'); 188 }, 189 190 addons: function() { 191 var wm = Cc['@mozilla.org/appshell/window-mediator;1'] 192 .getService(Ci.nsIWindowMediator); 193 var em = wm.getMostRecentWindow('Extension:Manager'); 194 if (em) { 195 em.focus(); 196 return; 197 } 198 window.openDialog('chrome://mozapps/content/extensions/extensions.xul', 199 '', 'chrome,menubar,extra-chrome,toolbar,dialog=no,resizable'); 188 200 } 189 201 … … 324 336 325 337 // Don't exit if exit is blocked 326 if (!force && 0 < _block_exit && !confirm(locale.getString('dialog.exit.text'), 338 if (!force && 0 < _block_exit && !confirm( 339 locale.getString('dialog.exit.text'), 327 340 locale.getString('dialog.exit.title'), 328 341 locale.getString('dialog.exit.ok'), … … 339 352 if (0 == photos.count) { 340 353 try { 341 var profile = Cc['@mozilla.org/file/directory_service;1'] .getService(342 Ci.nsIProperties).get('ProfD', Ci.nsIFile);354 var profile = Cc['@mozilla.org/file/directory_service;1'] 355 .getService(Ci.nsIProperties).get('ProfD', Ci.nsIFile); 343 356 profile.append('images'); 344 357 profile.remove(true); 345 358 } catch (err) {} 346 359 try { 347 var temp = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsILocalFile); 360 var temp = Cc['@mozilla.org/file/local;1'] 361 .createInstance(Ci.nsILocalFile); 348 362 temp.initWithPath('C:\\temp'); 349 363 if (temp.isDirectory()) { … … 361 375 } 362 376 377 // Shutdown threads 378 threads.worker.shutdown(); 379 threads.uploadr.shutdown(); 380 363 381 // Finally exit 364 var e = Cc['@mozilla.org/toolkit/app-startup;1'] .getService(365 Components.interfaces.nsIAppStartup);382 var e = Cc['@mozilla.org/toolkit/app-startup;1'] 383 .getService(Ci.nsIAppStartup); 366 384 e.quit(Ci.nsIAppStartup.eForceQuit); 367 385 trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/upgrade.js
r242 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/upload.js
r245 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 70 70 } 71 71 72 // Pass the photo to the API73 72 var photo = photos.uploading[id]; 74 _api({ 75 'async': 'async' == conf.mode ? 1 : 0, 76 'auth_token': users.token, 77 'title': photo.title, 78 'description': photo.description, 79 'tags': photo.tags, 80 'is_public': photo.is_public, 81 'is_friend': photo.is_friend, 82 'is_family': photo.is_family, 83 'content_type': photo.content_type, 84 'hidden': photo.hidden, 85 'safety_level': photo.safety_level, 86 'photo': { 87 'filename': photo.filename, 88 'path': photo.path 89 } 90 // }, 'http://up.flickr.com/services/upload/', false, true, id); 91 }, 'http://api.dev.flickr.com/services/upload/', false, true, id); 73 74 // EXPERIMENTAL: Pass the photo to the socket uploadr 75 if (conf.socket_uploadr) { 76 Cc['@mozilla.org/consoleservice;1'] 77 .getService(Ci.nsIConsoleService) 78 .logStringMessage('EXPERIMENTAL socket uploadr'); 79 80 // Dispatch for health and non-blocking profit! 81 threads.uploadr.dispatch(new Upload({ 82 'async': 'async' == conf.mode ? 1 : 0, 83 'auth_token': users.token, 84 'title': photo.title, 85 'description': photo.description, 86 'tags': photo.tags, 87 'is_public': photo.is_public, 88 'is_friend': photo.is_friend, 89 'is_family': photo.is_family, 90 'content_type': photo.content_type, 91 'hidden': photo.hidden, 92 'safety_level': photo.safety_level, 93 'photo': { 94 'filename': photo.filename, 95 'path': photo.path 96 } 97 }, id), threads.uploadr.DISPATCH_NORMAL); 98 99 } 100 101 // Pass the photo to the regular API 102 else { 103 api.start({ 104 'async': 'async' == conf.mode ? 1 : 0, 105 'auth_token': users.token, 106 'title': photo.title, 107 'description': photo.description, 108 'tags': photo.tags, 109 'is_public': photo.is_public, 110 'is_friend': photo.is_friend, 111 'is_family': photo.is_family, 112 'content_type': photo.content_type, 113 'hidden': photo.hidden, 114 'safety_level': photo.safety_level, 115 'photo': { 116 'filename': photo.filename, 117 'path': photo.path 118 } 119 // }, 'http://up.flickr.com/services/upload/', false, true, id); 120 }, 'http://up.dev.flickr.com/services/upload/', false, true, id); 121 } 92 122 93 123 }, … … 116 146 117 147 // Still have available retries 118 if (!upload.cancel && conf.auto_retry_count > upload.retry_count) { 148 if (!upload.cancel && conf.auto_retry_count > 149 upload.retry_count) { 119 150 ++upload.stats.errors; 120 151 ++upload.retry_count; … … 122 153 upload.start(id); 123 154 if (conf.console.retry) { 124 Components.utils.reportError('UPLOAD RETRY: id = ' + id + 155 Cc['@mozilla.org/consoleservice;1'] 156 .getService(Ci.nsIConsoleService) 157 .logStringMessage('UPLOAD RETRY: id = ' + id + 125 158 ', retry = ' + upload.retry_count); 126 159 } … … 148 181 else if (null != photos.uploading[id]) { 149 182 photos.uploading[id].progress_bar.done(true); 150 upload.tickets[rsp.getElementsByTagName('ticketid')[0].firstChild.nodeValue] = id; 183 upload.tickets[rsp.getElementsByTagName('ticketid')[0] 184 .firstChild.nodeValue] = id; 151 185 ++upload.tickets_count; 152 186 if (null != upload.tickets_handle) { … … 199 233 } 200 234 if ('object' == typeof rsp) { 201 photo_id = parseInt(rsp.getElementsByTagName('photoid')[0].firstChild.nodeValue); 235 photo_id = parseInt(rsp.getElementsByTagName('photoid')[0] 236 .firstChild.nodeValue); 202 237 203 238 // If we were ever to use sync upload, we would need imported … … 232 267 } 233 268 234 // But if this isn't last and we're doing synchronous, kick off the next upload 269 // But if this isn't last and we're doing synchronous, kick off 270 // the next upload 235 271 else if ('sync' == conf.mode) { 236 272 var ii = photos.uploading.length; … … 248 284 // Track progress of an upload POST 249 285 progress: function(stream, id) { 286 upload.progress2(stream.available(), id); 287 }, 288 progress2: function(available, id) { 250 289 251 290 // Get this bit of progress … … 254 293 upload.progress_last = upload.progress_total; 255 294 } 256 var a = stream.available() >> 10; 295 // var a = stream.available() >> 10; 296 var a = available >> 10; 257 297 var kb = upload.progress_last - a; 258 298 … … 271 311 // Update the UI 272 312 if (null != photos.uploading[id]) { 273 photos.uploading[id].progress_bar.update(1 - a / upload.progress_total); 274 } 275 var percent = Math.max(0, Math.min(1, photos.kb.sent / photos.kb.total)); 313 photos.uploading[id].progress_bar.update(1 - 314 a / upload.progress_total); 315 } 316 var percent = Math.max(0, Math.min(1, 317 photos.kb.sent / photos.kb.total)); 276 318 if (null != upload.progress_bar) { 277 319 upload.progress_bar.update(percent); 278 320 } 279 if (100 == Math.round(100 * percent)) { // Why doesn't (1 == percent) work here?321 if (100 == Math.round(100 * percent)) { 280 322 document.getElementById('progress_text').value = 281 323 locale.getString('upload.waiting.status'); 282 324 upload.processing = true; 283 325 } else { 284 document.getElementById('progress_text').value = locale.getFormattedString(285 'upload.progress.status', [286 id + 1, // Since starting to use photos.normalize, this should be correct326 document.getElementById('progress_text').value = 327 locale.getFormattedString('upload.progress.status', [ 328 id + 1, 287 329 photos.uploading.length, 288 330 Math.round(100 * percent) … … 327 369 bandwidth: function(rsp) { 328 370 if ('object' == typeof rsp && 329 6 == parseInt(rsp.getElementsByTagName('err')[0].getAttribute('code'))) { 371 6 == parseInt(rsp.getElementsByTagName('err')[0] 372 .getAttribute('code'))) { 330 373 document.getElementById('progress').style.display = 'none'; 331 374 var f = photos.failed; … … 337 380 var ii = f.length; 338 381 if (0 != ii) { 339 document.getElementById('photos_init').style.display = 'none'; 340 document.getElementById('photos_new').style.display = 'none'; 382 document.getElementById('photos_init') 383 .style.display = 'none'; 384 document.getElementById('photos_new') 385 .style.display = 'none'; 341 386 if (photos.sort) { 342 document.getElementById('photos_sort_default').style.display = 'block'; 343 document.getElementById('photos_sort_revert').style.display = 'none'; 387 document.getElementById('photos_sort_default') 388 .style.display = 'block'; 389 document.getElementById('photos_sort_revert') 390 .style.display = 'none'; 344 391 } else { 345 document.getElementById('photos_sort_default').style.display = 'none'; 346 document.getElementById('photos_sort_revert').style.display = 'block'; 392 document.getElementById('photos_sort_default') 393 .style.display = 'none'; 394 document.getElementById('photos_sort_revert') 395 .style.display = 'block'; 347 396 } 348 397 } … … 450 499 flickr.photosets.addPhoto(set_id, meta.sets_map[set_id][0]); 451 500 } else { 452 flickr.photosets.create(set_id, meta.created_sets_desc[index], 501 flickr.photosets.create(set_id, 502 meta.created_sets_desc[index], 453 503 meta.sets_map[set_id][0]); 454 504 } 455 505 } 456 506 457 // If we are adding photos to a set, the last one will call this, otherwise we458 // have to here. If it doesn't get called then limits and such will not be459 // updated for the next upload.507 // If we are adding photos to a set, the last one will call this, 508 // otherwise we have to here. If it doesn't get called then 509 // limits and such will not be updated for the next upload. 460 510 if (not_adding_to_sets) { 461 511 upload.finalize(); … … 537 587 locale.getString('upload.success.cancel')); 538 588 } else if (0 < photos.fail && 0 < photos.ok) { 539 var c = confirm(locale.getFormattedString('upload.error.some.text', 540 [photos.uploading.length - photos.ok, photos.uploading.length]), 589 var c = confirm(locale.getFormattedString( 590 'upload.error.some.text', [ 591 photos.uploading.length - photos.ok, 592 photos.uploading.length 593 ]), 541 594 locale.getString('upload.error.some.title'), 542 595 locale.getString('upload.error.some.ok'), … … 548 601 } 549 602 } else if (0 == photos.fail && 0 < photos.ok && !photos.sets) { 550 go_to_flickr = confirm([locale.getString('upload.error.sets.text'), 551 locale.getString('upload.error.sets.more')], 603 go_to_flickr = confirm([ 604 locale.getString('upload.error.sets.text'), 605 locale.getString('upload.error.sets.more') 606 ], 552 607 locale.getString('upload.error.sets.more'), 553 608 locale.getString('upload.error.sets.title'), 554 609 locale.getString('upload.error.sets.ok'), 555 610 locale.getString('upload.error.sets.cancel')); 556 } else { // if (0 < photos.fail && 0 == photos.ok) {611 } else { 557 612 try_again = confirm([locale.getString('upload.error.all.text'), 558 613 locale.getString('upload.error.all.more')], … … 610 665 } 611 666 612 threads.worker.dispatch(new RetryUpload(true), threads.worker.DISPATCH_NORMAL); 667 threads.worker.dispatch(new RetryUpload(true), 668 threads.worker.DISPATCH_NORMAL); 613 669 } 614 670 … … 622 678 623 679 }; 680 681 var Upload = function(params, id) { 682 this.params = params; 683 this.id = id; 684 } 685 Upload.prototype = { 686 run: function() { 687 var esc_params = api.escape_and_sign(this.params, true); 688 689 // Upload API 690 // var host = 'up.flickr.com'; 691 var host = 'up.dev.flickr.com'; 692 var port = 80; 693 694 // Stream containing the entire HTTP POST payload 695 var boundary = '------deadbeef---deadbeef---' + Math.random(); 696 var mstream = Cc['@mozilla.org/io/multiplex-input-stream;1'] 697 .createInstance(Ci.nsIMultiplexInputStream); 698 var sstream; 699 for (var p in esc_params) { 700 sstream = Cc['@mozilla.org/io/string-input-stream;1'] 701 .createInstance(Ci.nsIStringInputStream); 702 sstream.setData('--' + boundary + 703 '\r\nContent-Disposition: form-data; name="' + p + '"', 704 -1); 705 mstream.appendStream(sstream); 706 if ('object' == typeof esc_params[p] && 707 null != esc_params[p]) { 708 sstream = Cc['@mozilla.org/io/string-input-stream;1'] 709 .createInstance(Ci.nsIStringInputStream); 710 sstream.setData('; filename="' + esc_params[p].filename + 711 '"\r\nContent-Type: application/octet-stream\r\n\r\n', 712 -1); 713 mstream.appendStream(sstream); 714 var file = Cc['@mozilla.org/file/local;1'] 715 .createInstance(Ci.nsILocalFile); 716 file.initWithPath(esc_params[p].path); 717 var fstream = 718 Cc['@mozilla.org/network/file-input-stream;1'] 719 .createInstance(Ci.nsIFileInputStream); 720 fstream.init(file, 1, 1, 721 Ci.nsIFileInputStream.CLOSE_ON_EOF); 722 var bstream = 723 Cc['@mozilla.org/network/buffered-input-stream;1'] 724 .createInstance(Ci.nsIBufferedInputStream); 725 bstream.init(fstream, 4096); 726 mstream.appendStream(bstream); 727 sstream = Cc['@mozilla.org/io/string-input-stream;1'] 728 .createInstance(Ci.nsIStringInputStream); 729 sstream.setData('\r\n', -1); 730 mstream.appendStream(sstream); 731 } else { 732 sstream = Cc['@mozilla.org/io/string-input-stream;1'] 733 .createInstance(Ci.nsIStringInputStream); 734 sstream.setData('\r\n\r\n' + esc_params[p] + '\r\n', -1); 735 mstream.appendStream(sstream); 736 } 737 } 738 sstream = Cc['@mozilla.org/io/string-input-stream;1'] 739 .createInstance(Ci.nsIStringInputStream); 740 sstream.setData('--' + boundary + '--\r\n', -1); 741 mstream.appendStream(sstream); 742 upload.progress_total = mstream.available() >> 10; 743 744 // Headers! 745 sstream = Cc['@mozilla.org/io/string-input-stream;1'] 746 .createInstance(Ci.nsIStringInputStream); 747 sstream.setData('POST /services/upload/ HTTP/1.1\r\n' + 748 'Host: ' + host + '\r\n' + 749 'User-Agent: Flickr Uploadr ' + conf.version + '\r\n' + 750 'Content-Length: ' + mstream.available() + '\r\n' + 751 'Content-Type: multipart/form-data; boundary=' + boundary + 752 '\r\n\r\n', -1); 753 mstream.insertStream(sstream, 0); 754 755 // POST over a raw socket connection 756 // http://www.xulplanet.com/tutorials/mozsdk/sockets.php 757 try { 758 var transportService = 759 Cc['@mozilla.org/network/socket-transport-service;1'] 760 .getService(Ci.nsISocketTransportService); 761 var transport = transportService.createTransport( 762 null, 0, host, port, null); 763 var ostream = transport.openOutputStream( 764 Ci.nsITransport.OPEN_BLOCKING, 0, 0); 765 while (mstream.available()) { 766 ostream.writeFrom(mstream, 767 Math.min(mstream.available(), 8192)); 768 threads.main.dispatch(new UploadProgress( 769 mstream.available(), this.id), 770 threads.main.DISPATCH_NORMAL); 771 } 772 var _istream = transport.openInputStream(0,0,0); 773 var istream = Cc['@mozilla.org/scriptableinputstream;1'] 774 .createInstance(Ci.nsIScriptableInputStream); 775 istream.init(_istream); 776 var pump = Cc['@mozilla.org/network/input-stream-pump;1'] 777 .createInstance(Ci.nsIInputStreamPump); 778 pump.init(_istream, -1, -1, 0, 0, false); 779 pump.asyncRead({ 780 id: this.id, 781 raw: [], 782 onStartRequest: function(request, context) {}, 783 onStopRequest: function(request, context, status) { 784 istream.close(); 785 ostream.close(); 786 787 Cc['@mozilla.org/consoleservice;1'] 788 .getService(Ci.nsIConsoleService) 789 .logStringMessage(this.raw.join('')); 790 791 threads.main.dispatch(new UploadDone( 792 this.raw.join(''), this.id), 793 threads.main.DISPATCH_NORMAL); 794 }, 795 onDataAvailable: function(request, context, 796 stream, offset, count) { 797 this.raw.push(istream.read(count)); 798 }, 799 }, null); 800 } catch (err) { 801 Components.utils.reportError(err); 802 } 803 804 }, 805 QueryInterface: function(iid) { 806 if (iid.equals(Ci.nsIRunnable) || iid.equals(Ci.nsISupports)) { 807 return this; 808 } 809 throw Components.results.NS_ERROR_NO_INTERFACE; 810 } 811 }; 812 813 var UploadProgress = function(available, id) { 814 this.available = available; 815 this.id = id; 816 } 817 UploadProgress.prototype = { 818 run: function() { 819 upload.progress2(this.available, this.id); 820 }, 821 QueryInterface: function(iid) { 822 if (iid.equals(Ci.nsIRunnable) || iid.equals(Ci.nsISupports)) { 823 return this; 824 } 825 throw Components.results.NS_ERROR_NO_INTERFACE; 826 } 827 }; 828 829 var UploadDone = function(raw, id) { 830 this.raw = raw; 831 this.id = id; 832 } 833 UploadDone.prototype = { 834 run: function() { 835 836 // Parse HTTP 837 var http = this.raw.split(/\r?\n/); 838 var rsp = false; 839 if (http && http[0] && 840 http[0].match(/^HTTP\/1\.[01] 200 OK/)) { 841 while ('' != http[0]) { 842 http.shift(); 843 } 844 try { 845 var parser = 846 Cc['@mozilla.org/xmlextras/domparser;1'] 847 .createInstance(Ci.nsIDOMParser); 848 rsp = parser.parseFromString(http.join(''), 849 'text/xml').documentElement; 850 } catch (err) { 851 Components.utils.reportError(err); 852 } 853 } 854 855 upload._start(rsp, this.id); 856 }, 857 QueryInterface: function(iid) { 858 if (iid.equals(Ci.nsIRunnable) || iid.equals(Ci.nsISupports)) { 859 return this; 860 } 861 throw Components.results.NS_ERROR_NO_INTERFACE; 862 } 863 }; trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/users.js
r240 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 161 161 for each (var u in users.list) { 162 162 if (u.current) { 163 users.username = u.username; 164 users.nsid = u.nsid; 163 // TODO: Does this work properly? 164 // users.username = u.username; 165 // users.nsid = u.nsid; 165 166 users.token = u.token; 166 users.is_pro = u.is_pro;167 users.bandwidth = u.bandwidth;168 users.filesize = u.filesize;169 users.sets = u.sets;167 // users.is_pro = u.is_pro; 168 // users.bandwidth = u.bandwidth; 169 // users.filesize = u.filesize; 170 // users.sets = u.sets; 170 171 users.login(); 171 172 break; trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/video_big.xul
r239 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/video_offline.xul
r229 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/video_restricted.xul
r229 r252 4 4 Flickr Uploadr 5 5 6 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free7 software; you can redistribute it and/or modify it under the terms of the 8 GNU General Public License (GPL), version 2 only. This library is6 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 7 free software; you can redistribute it and/or modify it under the terms of 8 the GNU General Public License (GPL), version 2 only. This library is 9 9 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 10 10 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/branding/brand.dtd
r251 r252 3 3 Flickr Uploadr 4 4 5 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 software; you can redistribute it and/or modify it under the terms of the 7 GNU General Public License (GPL), version 2 only. This library is5 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 6 free software; you can redistribute it and/or modify it under the terms of 7 the GNU General Public License (GPL), version 2 only. This library is 8 8 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 9 9 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/branding/brand.properties
r251 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/de-de/main.dtd
r251 r252 3 3 Flickr Uploadr 4 4 5 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 software; you can redistribute it and/or modify it under the terms of the 7 GNU General Public License (GPL), version 2 only. This library is5 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 6 free software; you can redistribute it and/or modify it under the terms of 7 the GNU General Public License (GPL), version 2 only. This library is 8 8 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 9 9 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/de-de/main.properties
r251 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/en-US/main.dtd
r251 r252 3 3 Flickr Uploadr 4 4 5 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 software; you can redistribute it and/or modify it under the terms of the 7 GNU General Public License (GPL), version 2 only. This library is5 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 6 free software; you can redistribute it and/or modify it under the terms of 7 the GNU General Public License (GPL), version 2 only. This library is 8 8 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 9 9 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/en-US/main.properties
r251 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/es-us/main.dtd
r251 r252 3 3 Flickr Uploadr 4 4 5 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 software; you can redistribute it and/or modify it under the terms of the 7 GNU General Public License (GPL), version 2 only. This library is5 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 6 free software; you can redistribute it and/or modify it under the terms of 7 the GNU General Public License (GPL), version 2 only. This library is 8 8 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 9 9 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/es-us/main.properties
r251 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/fr-fr/main.dtd
r251 r252 3 3 Flickr Uploadr 4 4 5 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 software; you can redistribute it and/or modify it under the terms of the 7 GNU General Public License (GPL), version 2 only. This library is5 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 6 free software; you can redistribute it and/or modify it under the terms of 7 the GNU General Public License (GPL), version 2 only. This library is 8 8 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 9 9 GPL for more details (http://www.gnu.org/licenses/gpl.html) 10 10 11 11 --> 12 13 12 <!ENTITY title "Flickr Uploadr"> 14 13 trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/fr-fr/main.properties
r251 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/it-it/main.dtd
r251 r252 3 3 Flickr Uploadr 4 4 5 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 software; you can redistribute it and/or modify it under the terms of the 7 GNU General Public License (GPL), version 2 only. This library is5 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 6 free software; you can redistribute it and/or modify it under the terms of 7 the GNU General Public License (GPL), version 2 only. This library is 8 8 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 9 9 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/it-it/main.properties
r251 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/ko-kr/main.dtd
r251 r252 3 3 Flickr Uploadr 4 4 5 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 software; you can redistribute it and/or modify it under the terms of the 7 GNU General Public License (GPL), version 2 only. This library is5 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 6 free software; you can redistribute it and/or modify it under the terms of 7 the GNU General Public License (GPL), version 2 only. This library is 8 8 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 9 9 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/ko-kr/main.properties
r251 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/pt-br/main.dtd
r251 r252 3 3 Flickr Uploadr 4 4 5 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 software; you can redistribute it and/or modify it under the terms of the 7 GNU General Public License (GPL), version 2 only. This library is5 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 6 free software; you can redistribute it and/or modify it under the terms of 7 the GNU General Public License (GPL), version 2 only. This library is 8 8 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 9 9 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/pt-br/main.properties
r251 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/zh-hk/main.dtd
r251 r252 3 3 Flickr Uploadr 4 4 5 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free6 software; you can redistribute it and/or modify it under the terms of the 7 GNU General Public License (GPL), version 2 only. This library is5 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 6 free software; you can redistribute it and/or modify it under the terms of 7 the GNU General Public License (GPL), version 2 only. This library is 8 8 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 9 9 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/zh-hk/main.properties
r251 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/Makefile
r246 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/clh.js
r207 r252 1 /* 2 * Flickr Uploadr 3 * 4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 */ 10 1 11 const Cc = Components.classes; 2 12 const Ci = Components.interfaces; 3 13 4 const clh_contractID = "@mozilla.org/commandlinehandler/general-startup;1?type=flcmdline";5 const clh_CID = Components.ID("{3e984f42-a822-11dc-8314-0800200c9a66}");6 const clh_ category = "m-flcmdline";7 14 const clh_contractID = 15 "@mozilla.org/commandlinehandler/general-startup;1?type=flcmdline"; 16 const clh_CID = Components.ID("{3e984f42-a822-11dc-8314-0800200c9a66}"); 17 const clh_category = "m-flcmdline"; 8 18 9 19 const myAppHandler = { … … 22 32 23 33 if (1 == cl.state){ // STATE_REMOTE_AUTO 24 // calh: i needed this in my test app, since arg 0 was the application.ini file (wtf?) 25 // don't seem to need it for uploadr though... 34 // calh: i needed this in my test app, since arg 0 was the 35 // application.ini file (wtf?) 36 // don't seem to need it for uploadr though... 26 37 //start = 1; 27 38 } … … 79 90 80 91 QueryInterface : function(iid){ 81 if (iid.equals(Ci.nsIModule) || iid.equals(Ci.nsISupports)) return this; 92 if (iid.equals(Ci.nsIModule) || iid.equals(Ci.nsISupports)) { 93 return this; 94 } 82 95 throw Components.results.NS_ERROR_NO_INTERFACE; 83 96 }, trunk/uploadr/MacUploadr.app/Contents/Resources/components/dll.cpp
r103 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGM.cpp
r249 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) … … 540 540 bh = img.baseColumns(); 541 541 } 542 //int base = bw > bh ? bw : bh;542 int base = bw > bh ? bw : bh; 543 543 out1 << bw << "###" << bh << "###"; 544 544 … … 598 598 599 599 // Find the sharpen sigma as the website does 600 //double sigma;601 //if (base <= 800) {602 //sigma = 1.9;603 //} else if (base <= 1600) {604 //sigma = 2.85;605 //} else {606 //sigma = 3.8;607 //}600 double sigma; 601 if (base <= 800) { 602 sigma = 1.9; 603 } else if (base <= 1600) { 604 sigma = 2.85; 605 } else { 606 sigma = 3.8; 607 } 608 608 609 609 // Create the actual thumbnail 610 610 img.scale(dim.str()); 611 //img.sharpen(1, sigma);611 img.sharpen(1, sigma); 612 612 img.compressType(Magick::NoCompression); 613 613 img.write(*thumb_s); … … 790 790 // Find the sharpen sigma as the website does 791 791 // Which is easy, because for these sizes it's just 0.95 792 double sigma = 0.95;792 // double sigma = 0.95; 793 793 794 794 // Resize the image 795 795 img.scale(dim); 796 img.sharpen(1, sigma);796 // img.sharpen(1, sigma); 797 797 img.compressType(Magick::NoCompression); 798 798 img.write(*resize_s); trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGM.h
r103 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGMModule.cpp
r103 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/flIGM.idl
r224 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/flIKey.idl
r103 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/flKey.cpp
r103 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/flKey.h
r103 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/flKeyModule.cpp
r103 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/gm.cpp
r95 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/md5.h
r103 r252 2 2 * Flickr Uploadr 3 3 * 4 * Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 * software; you can redistribute it and/or modify it under the terms of the6 * GNU General Public License (GPL), version 2 only. This library is4 * Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 * free software; you can redistribute it and/or modify it under the terms of 6 * the GNU General Public License (GPL), version 2 only. This library is 7 7 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 * GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/MacUploadr.app/Contents/Resources/components/xpidl-build.bat
r95 r252 2 2 REM Flickr Uploadr 3 3 REM 4 REM Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 REM software; you can redistribute it and/or modify it under the terms ofthe6 REM GNU General Public License (GPL), version 2 only. This libraryis7 REM distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU8 REM GPL for more details (http://www.gnu.org/licenses/gpl.html)4 REM Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library 5 REM is free software; you can redistribute it and/or modify it under the 6 REM terms of the GNU General Public License (GPL), version 2 only. This 7 REM library is distributed WITHOUT ANY WARRANTY, whether express or implied. 8 REM See the GNU GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 9 REM 10 10 trunk/uploadr/MacUploadr.app/Contents/Resources/defaults/preferences/prefs.js
r208 r252 2 2 pref('toolkit.singletonWindowType', 'app'); 3 3 pref('browser.chromeURL', 'chrome://uploadr/content/dock.xul'); 4 5 4 pref('browser.dom.window.dump.enabled', true); 6 5 pref('javascript.options.showInConsole', true); … … 12 11 13 12 pref('general.useragent.locale', 'en-US'); 13 14 // Can't do this because XMLHttpRequest obeys it 15 //pref('network.protocol-handler.external.http', true); 16 //pref('network.protocol-handler.external.https', true); 17 18 pref('network.protocol-handler.warn-external.http', false); 19 pref('network.protocol-handler.warn-external.https', false); 20 21 //pref('xpinstall.dialog.confirm', 'chrome://mozapps/content/xpinstall/xpinstallConfirm.xul'); 22 //pref('xpinstall.dialog.progress.skin', 'chrome://mozapps/content/extensions/extensions.xul?type=themes'); 23 //pref('xpinstall.dialog.progress.chrome', 'chrome://mozapps/content/extensions/extensions.xul?type=extensions'); 24 //pref('xpinstall.dialog.progress.type.skin', 'Extension:Manager-themes'); 25 //pref('xpinstall.dialog.progress.type.chrome', 'Extension:Manager-extensions'); 26 pref('extensions.update.enabled', true); 27 pref('extensions.update.interval', 86400); 28 pref('extensions.dss.enabled', false); 29 pref('extensions.dss.switchPending', false); 30 pref('extensions.ignoreMTimeChanges', false); 31 pref('extensions.logging.enabled', false); 32 pref('general.skins.selectedSkin', 'uploadr'); 33 //pref('extensions.update.url', '???'); 34 pref('extensions.getMoreExtensionsURL', 'http://flickr.com/tools/uploadr/'); 35 pref('extensions.getMoreThemesURL', 'http://flickr.com/tools/uploadr/'); 36 pref('extensions.getMorePluginsURL', 'http://flickr.com/tools/uploadr/'); trunk/uploadr/Makefile
r232 r252 2 2 # Flickr Uploadr 3 3 # 4 # Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 # software; you can redistribute it and/or modify it under the terms of the6 # GNU General Public License (GPL), version 2 only. This library is4 # Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 # free software; you can redistribute it and/or modify it under the terms of 6 # the GNU General Public License (GPL), version 2 only. This library is 7 7 # distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 # GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/README
r249 r252 1 1 Flickr Uploadr 2 2 3 Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free4 software; you can redistribute it and/or modify it under the terms of the 5 GNU General Public License (GPL), version 2 only. This library is3 Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 4 free software; you can redistribute it and/or modify it under the terms of 5 the GNU General Public License (GPL), version 2 only. This library is 6 6 distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 7 7 GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/windows_install_build.nsi
r248 r252 2 2 ; Flickr Uploadr 3 3 ; 4 ; Copyright (c) 2007 Yahoo! Inc. All rights reserved. This library is free5 ; software; you can redistribute it and/or modify it under the terms of the6 ; GNU General Public License (GPL), version 2 only. This library is4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) trunk/uploadr/windows_install_lang/English.nsh
r248 r252 1 !define LANG "ENGLISH" 1 ; 2 ; Flickr Uploadr 3 ; 4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 ; 10 11 !define LANG "ENGLISH" 2 12 3 13 !insertmacro LANG_STRING title_version "Flickr Uploadr ${VERSION}" trunk/uploadr/windows_install_lang/French.nsh
r248 r252 1 !define LANG "FRENCH" 1 ; 2 ; Flickr Uploadr 3 ; 4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 ; 10 11 !define LANG "FRENCH" 2 12 3 13 !insertmacro LANG_STRING title_version "Flickr Uploadr ${VERSION}" trunk/uploadr/windows_install_lang/German.nsh
r248 r252 1 !define LANG "GERMAN" 1 ; 2 ; Flickr Uploadr 3 ; 4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 ; 10 11 !define LANG "GERMAN" 2 12 3 13 !insertmacro LANG_STRING title_version "Flickr Uploadr ${VERSION}" trunk/uploadr/windows_install_lang/Italian.nsh
r248 r252 1 !define LANG "ITALIAN" 1 ; 2 ; Flickr Uploadr 3 ; 4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 ; 10 11 !define LANG "ITALIAN" 2 12 3 13 !insertmacro LANG_STRING title_version "Flickr Uploadr ${VERSION}" trunk/uploadr/windows_install_lang/Korean.nsh
r248 r252 1 !define LANG "KOREAN" 1 ; 2 ; Flickr Uploadr 3 ; 4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 ; 10 11 !define LANG "KOREAN" 2 12 3 13 !insertmacro LANG_STRING title_version "Flickr Uploadr ${VERSION}" trunk/uploadr/windows_install_lang/PortugueseBR.nsh
r248 r252 1 !define LANG "PORTUGUESEBR" 1 ; 2 ; Flickr Uploadr 3 ; 4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 ; 10 11 !define LANG "PORTUGUESEBR" 2 12 3 13 !insertmacro LANG_STRING title_version "Flickr Uploadr ${VERSION}" trunk/uploadr/windows_install_lang/Spanish.nsh
r248 r252 1 !define LANG "SPANISH" 1 ; 2 ; Flickr Uploadr 3 ; 4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 ; 10 11 !define LANG "SPANISH" 2 12 3 13 !insertmacro LANG_STRING title_version "Flickr Uploadr ${VERSION}" trunk/uploadr/windows_install_lang/TradChinese.nsh
r248 r252 1 !define LANG "TRADCHINESE" 1 ; 2 ; Flickr Uploadr 3 ; 4 ; Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is 5 ; free software; you can redistribute it and/or modify it under the terms of 6 ; the GNU General Public License (GPL), version 2 only. This library is 7 ; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 8 ; GPL for more details (http://www.gnu.org/licenses/gpl.html) 9 ; 10 11 !define LANG "TRADCHINESE" 2 12 3 13 !insertmacro LANG_STRING title_version "Flickr Uploadr ${VERSION}"