Changeset 252

Show
Ignore:
Timestamp:
02/22/08 19:59:33 (2 years ago)
Author:
rcrowley
Message:

Now have a config variable to use nsISocketTransport instead of XMLHttpRequest for uploads. It is better but not faster. Changed every file to update copyright info.

Files:

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. 
     1Flickr Uploadr 
     2 
     3Copyright (c) 2007-2008 Yahoo! Inc. All rights reserved. This library is free 
     4software; you can redistribute it and/or modify it under the terms of the GNU 
     5General Public License (GPL), version 2 ONLY. 
    46 
    57GNU GENERAL PUBLIC LICENSE Version 2, June 1991 
     
    243245software generally. 
    244246 
    245  NO WARRANTY 
     247NO WARRANTY 
    246248 
    24724911. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR 
  • trunk/uploadr/MacUploadr.app/Contents/Info.plist

    r234 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/LICENSE.txt

    r114 r252  
    11Flickr Uploadr  
    22 
    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/ 
     3Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This program is 
     4free software; you can redistribute it and/or modify it under the terms of the 
     5GNU General Public License (GPL), version 2 ONLY.  This program is distributed 
     6WITHOUT ANY WARRANTY, whether express or implied.  A copy of the GNU GPL is 
     7set forth below.  Additional terms and conditions apply to any use of any 
     8Flickr or other services associated with this program, and your use of such 
     9services is expressly conditioned on your compliance with those terms. 
     10 
     11The package containing this program also includes the following software. 
     12 
     13XULRunner. Copyright (c) 2008 Mozilla Foundation.  This software is licensed 
     14under the Mozilla Public License, the GNU General Public License, or the GNU 
     15Lesser General Public License.  See product and licensing information, as 
     16well as source code, at: 
     17http://developer.mozilla.org/en/docs/Mozilla_Application_Framework.  
     18 
     19GraphicsMagick. Copyright (c) 2008 GraphicsMagick Group.  This software is 
     20licensed under the X11-type License.  See product and licensing information, 
     21as well as source code, at: http://www.graphicsmagick.org/.  
     22 
     23Exiv2. Copyright (c) 2004-2008 Andreas Huggel.  This software is licensed 
     24under the GNU General Public License.  See product and licensing information, 
     25as well as source code, at: http://www.exiv2.org/ 
    1326 
    1427------------------------------------------------------------------------------ 
     
    1629GNU GENERAL PUBLIC LICENSE Version 2, June 1991 
    1730 
    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. 
     31Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, 
     32Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and 
     33distribute verbatim copies of this license document, but changing it is not 
     34allowed. 
    1935 
    2036Preamble 
    2137 
    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. 
     38The licenses for most software are designed to take away your freedom to share 
     39and change it. By contrast, the GNU General Public License is intended to 
     40guarantee your freedom to share and change free software--to make sure the 
     41software is free for all its users. This General Public License applies to 
     42most of the Free Software Foundation's software and to any other program whose 
     43authors commit to using it. (Some other Free Software Foundation software is 
     44covered by the GNU Library General Public License instead.) You can apply it 
     45to your programs, too. 
     46 
     47When we speak of free software, we are referring to freedom, not price. Our 
     48General Public Licenses are designed to make sure that you have the freedom to 
     49distribute copies of free software (and charge for this service if you wish), 
     50that you receive source code or can get it if you want it, that you can change 
     51the software or use pieces of it in new free programs; and that you know you 
     52can do these things. 
     53 
     54To protect your rights, we need to make restrictions that forbid anyone to 
     55deny you these rights or to ask you to surrender the rights. These 
     56restrictions translate to certain responsibilities for you if you distribute 
     57copies of the software, or if you modify it. 
     58 
     59For example, if you distribute copies of such a program, whether gratis or for 
     60a fee, you must give the recipients all the rights that you have. You must 
     61make sure that they, too, receive or can get the source code. And you must 
     62show them these terms so they know their rights. 
     63 
     64We protect your rights with two steps: (1) copyright the software, and (2) 
     65offer you this license which gives you legal permission to copy, distribute 
     66and/or modify the software. 
     67 
     68Also, for each author's protection and ours, we want to make certain that 
     69everyone understands that there is no warranty for this free software. If the 
     70software is modified by someone else and passed on, we want its recipients to 
     71know that what they have is not the original, so that any problems introduced 
     72by others will not reflect on the original authors' reputations. 
     73 
     74Finally, any free program is threatened constantly by software patents. We 
     75wish to avoid the danger that redistributors of a free program will 
     76individually obtain patent licenses, in effect making the program proprietary. 
     77To prevent this, we have made it clear that any patent must be licensed for 
     78everyone's free use or not licensed at all. 
     79 
     80The precise terms and conditions for copying, distribution and modification 
     81follow. 
     82 
     83GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND 
     84MODIFICATION 
     85 
     860. This License applies to any program or other work which contains a notice 
     87placed by the copyright holder saying it may be distributed under the terms of 
     88this General Public License. The "Program", below, refers to any such program 
     89or work, and a "work based on the Program" means either the Program or any 
     90derivative work under copyright law: that is to say, a work containing the 
     91Program or a portion of it, either verbatim or with modifications and/or 
     92translated into another language. (Hereinafter, translation is included 
     93without limitation in the term "modification".) Each licensee is addressed as 
     94"you". 
     95 
     96Activities other than copying, distribution and modification are not covered 
     97by this License; they are outside its scope. The act of running the Program is 
     98not restricted, and the output from the Program is covered only if its 
     99contents constitute a work based on the Program (independent of having been 
     100made by running the Program). Whether that is true depends on what the Program 
     101does. 
     102 
     1031. You may copy and distribute verbatim copies of the Program's source code as 
     104you receive it, in any medium, provided that you conspicuously and 
     105appropriately publish on each copy an appropriate copyright notice and 
     106disclaimer of warranty; keep intact all the notices that refer to this License 
     107and to the absence of any warranty; and give any other recipients of the 
     108Program a copy of this License along with the Program. 
     109 
     110You may charge a fee for the physical act of transferring a copy, and you may 
     111at your option offer warranty protection in exchange for a fee. 
     112 
     1132. You may modify your copy or copies of the Program or any portion of it, 
     114thus forming a work based on the Program, and copy and distribute such 
     115modifications or work under the terms of Section 1 above, provided that you 
     116also meet all of these conditions: 
     117 
     118a) You must cause the modified files to carry prominent notices stating that 
     119you changed the files and the date of any change. 
     120 
     121b) You must cause any work that you distribute or publish, that in whole or in 
     122part contains or is derived from the Program or any part thereof, to be 
     123licensed as a whole at no charge to all third parties under the terms of this 
     124License. 
     125 
     126c) If the modified program normally reads commands interactively when run, you 
     127must cause it, when started running for such interactive use in the most 
     128ordinary way, to print or display an announcement including an appropriate 
     129copyright notice and a notice that there is no warranty (or else, saying that 
     130you provide a warranty) and that users may redistribute the program under 
     131these 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 
     133such an announcement, your work based on the Program is not required to print 
     134an announcement.) 
     135 
     136These requirements apply to the modified work as a whole. If identifiable 
     137sections of that work are not derived from the Program, and can be reasonably 
     138considered independent and separate works in themselves, then this License, 
     139and its terms, do not apply to those sections when you distribute them as 
     140separate works. But when you distribute the same sections as part of a whole 
     141which is a work based on the Program, the distribution of the whole must be on 
     142the terms of this License, whose permissions for other licensees extend to the 
     143entire whole, and thus to each and every part regardless of who wrote it. 
     144 
     145Thus, it is not the intent of this section to claim rights or contest your 
     146rights to work written entirely by you; rather, the intent is to exercise the 
     147right to control the distribution of derivative or collective works based on 
     148the Program. 
     149 
     150In addition, mere aggregation of another work not based on the Program with 
     151the Program (or with a work based on the Program) on a volume of a storage or 
     152distribution medium does not bring the other work under the scope of this 
     153License. 
     154 
     1553. You may copy and distribute the Program (or a work based on it, under 
     156Section 2) in object code or executable form under the terms of Sections 1 and 
     1572 above provided that you also do one of the following: 
     158 
     159a) Accompany it with the complete corresponding machine-readable source code, 
     160which must be distributed under the terms of Sections 1 and 2 above on a 
     161medium customarily used for software interchange; or, 
     162 
     163b) Accompany it with a written offer, valid for at least three years, to give 
     164any third party, for a charge no more than your cost of physically performing 
     165source distribution, a complete machine-readable copy of the corresponding 
     166source code, to be distributed under the terms of Sections 1 and 2 above on a 
     167medium customarily used for software interchange; or, 
     168 
     169c) Accompany it with the information you received as to the offer to 
     170distribute corresponding source code. (This alternative is allowed only for 
     171noncommercial distribution and only if you received the program in object code 
     172or executable form with such an offer, in accord with Subsection b above.) 
     173 
     174The source code for a work means the preferred form of the work for making 
     175modifications to it. For an executable work, complete source code means all 
     176the source code for all modules it contains, plus any associated interface 
     177definition files, plus the scripts used to control compilation and 
     178installation of the executable. However, as a special exception, the source 
     179code distributed need not include anything that is normally distributed (in 
     180either source or binary form) with the major components (compiler, kernel, and 
     181so on) of the operating system on which the executable runs, unless that 
     182component itself accompanies the executable. 
     183 
     184If distribution of executable or object code is made by offering access to 
     185copy from a designated place, then offering equivalent access to copy the 
     186source code from the same place counts as distribution of the source code, 
     187even though third parties are not compelled to copy the source along with the 
     188object code. 
     189 
     1904. You may not copy, modify, sublicense, or distribute the Program except as 
     191expressly provided under this License. Any attempt otherwise to copy, modify, 
     192sublicense or distribute the Program is void, and will automatically terminate 
     193your rights under this License. However, parties who have received copies, or 
     194rights, from you under this License will not have their licenses terminated so 
     195long as such parties remain in full compliance. 
     196 
     1975. You are not required to accept this License, since you have not signed it. 
     198However, nothing else grants you permission to modify or distribute the 
     199Program or its derivative works. These actions are prohibited by law if you do 
     200not accept this License. Therefore, by modifying or distributing the Program 
     201(or any work based on the Program), you indicate your acceptance of this 
     202License to do so, and all its terms and conditions for copying, distributing 
     203or modifying the Program or works based on it. 
     204 
     2056. Each time you redistribute the Program (or any work based on the Program), 
     206the recipient automatically receives a license from the original licensor to 
     207copy, distribute or modify the Program subject to these terms and conditions. 
     208You may not impose any further restrictions on the recipients' exercise of the 
     209rights granted herein. You are not responsible for enforcing compliance by 
     210third parties to this License. 
     211 
     2127. If, as a consequence of a court judgment or allegation of patent 
     213infringement or for any other reason (not limited to patent issues), 
     214conditions are imposed on you (whether by court order, agreement or otherwise) 
     215that contradict the conditions of this License, they do not excuse you from 
     216the conditions of this License. If you cannot distribute so as to satisfy 
     217simultaneously your obligations under this License and any other pertinent 
     218obligations, then as a consequence you may not distribute the Program at all. 
     219For example, if a patent license would not permit royalty-free redistribution 
     220of the Program by all those who receive copies directly or indirectly through 
     221you, then the only way you could satisfy both it and this License would be to 
     222refrain entirely from distribution of the Program. 
     223 
     224If any portion of this section is held invalid or unenforceable under any 
     225particular circumstance, the balance of the section is intended to apply and 
     226the section as a whole is intended to apply in other circumstances. 
     227 
     228It is not the purpose of this section to induce you to infringe any patents or 
     229other property right claims or to contest validity of any such claims; this 
     230section has the sole purpose of protecting the integrity of the free software 
     231distribution system, which is implemented by public license practices. Many 
     232people have made generous contributions to the wide range of software 
     233distributed through that system in reliance on consistent application of that 
     234system; it is up to the author/donor to decide if he or she is willing to 
     235distribute software through any other system and a licensee cannot impose that 
     236choice. 
     237 
     238This section is intended to make thoroughly clear what is believed to be a 
     239consequence of the rest of this License. 
     240 
     2418. If the distribution and/or use of the Program is restricted in certain 
     242countries either by patents or by copyrighted interfaces, the original 
     243copyright holder who places the Program under this License may add an explicit 
     244geographical distribution limitation excluding those countries, so that 
     245distribution is permitted only in or among countries not thus excluded. In 
     246such case, this License incorporates the limitation as if written in the body 
     247of this License. 
     248 
     2499. The Free Software Foundation may publish revised and/or new versions of the 
     250General Public License from time to time. Such new versions will be similar in 
     251spirit to the present version, but may differ in detail to address new 
     252problems or concerns. 
     253 
     254Each version is given a distinguishing version number. If the Program 
     255specifies a version number of this License which applies to it and "any later 
     256version", you have the option of following the terms and conditions either of 
     257that version or of any later version published by the Free Software 
     258Foundation. If the Program does not specify a version number of this License, 
     259you may choose any version ever published by the Free Software Foundation. 
     260 
     26110. If you wish to incorporate parts of the Program into other free programs 
     262whose distribution conditions are different, write to the author to ask for 
     263permission. For software which is copyrighted by the Free Software Foundation, 
     264write to the Free Software Foundation; we sometimes make exceptions for this. 
     265Our decision will be guided by the two goals of preserving the free status of 
     266all derivatives of our free software and of promoting the sharing and reuse of 
     267software generally. 
     268 
     269NO WARRANTY 
     270 
     27111. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR 
     272THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE 
     273STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE 
     274PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 
     275INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
     276FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND 
     277PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, 
     278YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 
     279 
     28012. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL 
     281ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE 
     282THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 
     283GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE 
     284OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR 
     285DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR 
     286A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH 
     287HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 
    101288 
    102289END OF TERMS AND CONDITIONS 
    103  
    104  
  • trunk/uploadr/MacUploadr.app/Contents/Resources/application.ini

    r231 r252  
    22; Flickr Uploadr 
    33; 
    4 ; Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 ; software; you can redistribute it and/or modify it under the terms of the 
    6 ; GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88; GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    2424Enabled=False 
    2525ServerURL=http://www.flickr.com/services/uploadr/crash/ 
     26 
     27[XRE] 
     28EnableExtensionManager=1 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/chrome.manifest

    r153 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/chrome.manifest.prod

    r216 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/about.xul

    r95 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/alert.xul

    r95 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/api.js

    r250 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    3030 
    3131                checkToken: function(token) { 
    32                         _api({ 
     32                        api.start({ 
    3333                                'method': 'flickr.auth.checkToken', 
    3434                                'auth_token': token 
     
    5252 
    5353                getFrob: function(fresh) { 
    54                         _api({ 
     54                        api.start({ 
    5555                                'method': 'flickr.auth.getFrob' 
    5656                        }, null, null, null, fresh); 
     
    7373                                        return; 
    7474                                } 
    75                                 var url = _api({ 
     75                                var url = api.start({ 
    7676                                        'perms': 'write', 
    7777                                        'frob': users.frob, 
     
    8686                getToken: function(frob) { 
    8787                        if (frob) { 
    88                                 _api({ 
     88                                api.start({ 
    8989                                        'method': 'flickr.auth.getToken', 
    9090                                        'frob': frob 
     
    114114                // Sets up the photostream header 
    115115                getInfo: function(user_id) { 
    116                         _api({ 
     116                        api.start({ 
    117117                                'method': 'flickr.people.getInfo', 
    118118                                'auth_token': users.token, 
     
    141141 
    142142                getUploadStatus: function() { 
    143                         _api({ 
     143                        api.start({ 
    144144                                'method': 'flickr.people.getUploadStatus', 
    145145                                'auth_token': users.token 
     
    186186                        checkTickets: function(tickets) { 
    187187                                block_exit(); 
    188                                 _api({ 
     188                                api.start({ 
    189189                                        'method': 'flickr.photos.upload.checkTickets', 
    190190                                        'auth_token': users.token, 
     
    275275                addPhoto: function(photoset_id, photo_id){ 
    276276                        block_exit(); 
    277                         _api({ 
     277                        api.start({ 
    278278                                'method': 'flickr.photosets.addPhoto', 
    279279                                'auth_token': users.token, 
     
    297297                create: function(title, description, primary_photo_id) { 
    298298                        block_exit(); 
    299                         _api({ 
     299                        api.start({ 
    300300                                'method': 'flickr.photosets.create', 
    301301                                'auth_token': users.token, 
     
    352352 
    353353                getList: function(user_id) { 
    354                         _api({ 
     354                        api.start({ 
    355355                                'method': 'flickr.photosets.getList', 
    356356                                'auth_token': users.token 
     
    428428 
    429429                getContentType: function() { 
    430                         _api({ 
     430                        api.start({ 
    431431                                'method': 'flickr.prefs.getContentType', 
    432432                                'auth_token': users.token 
     
    443443 
    444444                getHidden: function() { 
    445                         _api({ 
     445                        api.start({ 
    446446                                'method': 'flickr.prefs.getHidden', 
    447447                                'auth_token': users.token 
     
    458458 
    459459                getPrivacy: function() { 
    460                         _api({ 
     460                        api.start({ 
    461461                                'method': 'flickr.prefs.getPrivacy', 
    462462                                'auth_token': users.token 
     
    480480 
    481481                getSafetyLevel: function() { 
    482                         _api({ 
     482                        api.start({ 
    483483                                'method': 'flickr.prefs.getSafetyLevel', 
    484484                                'auth_token': users.token 
     
    499499 
    500500                logUploadStats: function(source, num_photos, upload_time, bytes, errors) { 
    501                         _api({ 
     501                        api.start({ 
    502502                                'method': 'flickr.utils.logUploadStats', 
    503503                                'auth_token': users.token, 
     
    517517}; 
    518518 
    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) { 
     519var 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                        } 
    572614                        sstream = Cc['@mozilla.org/io/string-input-stream;1'].createInstance( 
    573615                                Ci.nsIStringInputStream); 
    574                         sstream.setData('--' + boundary + '\r\nContent-Disposition: form-data; name="' + 
    575                                 p + '"', -1); 
     616                        sstream.setData('--' + boundary + '--', -1); 
    576617                        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; 
    678619                } 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        // 
    702719 
    703720}; 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/buttons.js

    r205 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/clh.js

    r224 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/conf.js

    r245 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    3434 
    3535        // Upload progress-checking interval (milliseconds) 
    36         check: 400, 
     36        check: 200, 
    3737 
    3838        // How often should the app auto-save metadata? (seconds) 
     
    5050        // How many times (in a row) should we automatically retry a photo? 
    5151        //   This is PER PHOTO and will be reset after each successful upload 
    52         auto_retry_count: 1,//3, 
     52        auto_retry_count: 3, 
    5353 
    5454        // How many times should checkTickets retry before giving up? 
    5555        tickets_retry_count: 10, 
     56 
     57        // Should we use the new socket uploadr? 
     58        socket_uploadr: true, 
     59 
     60 
    5661 
    5762        // 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/confirm.xul

    r95 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/dock.xul

    r227 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/drag.js

    r224 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/file.js

    r190 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/grid.js

    r158 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/help.xul

    r95 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/keyboard.js

    r199 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/main.xul

    r244 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    115115                                        oncommand="help.faq();" /> 
    116116                                        <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();"/> 
    121121                                        <menuseparator /> 
    122122                                        <menuitem id="menu_console" label="&menu.help.console;" 
     
    204204 
    205205        <!-- Status bar for showing helpful messages --> 
    206         <statusbar
     206        <statusbar id="status-bar"
    207207                <statusbarpanel id="status" label="" flex="1" /> 
    208208        </statusbar> 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/meta.js

    r250 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/mouse.js

    r250 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    213213 
    214214                // Clicking on a single photo will do drag-reordering 
    215                 if (e.target.src) { 
     215                if (e.target.src && 'buddyicon' != e.target.id) { 
    216216                        if (1 < photos.count) { 
    217217                                mouse.dragging = 1; 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/photos.js

    r245 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    4747 
    4848                // 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', ''); 
    5051                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; 
    5354                        if (path.match(/^\//)) { 
    5455                                path += '/../../../../../Pictures'; 
     
    5758                        } 
    5859                } 
    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); 
    6062                def.initWithPath(path); 
    6163 
    6264                // 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); 
    6467                fp.init(window, locale.getString('dialog.add'), 
    6568                        Ci.nsIFilePicker.modeOpenMultiple); 
     
    247250                if (photos.count) { 
    248251                        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'; 
    252258                        } 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'; 
    260272                        mouse.show_photos(); 
    261273                } else { 
     
    276288 
    277289                // 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 ordering 
    279                 //   newest to oldest 
     290                //   Add images to the start of the list because this is our best 
     291                //   guess for ordering newest to oldest 
    280292                var img = document.createElementNS(NS_HTML, 'img'); 
    281293                img.className = 'loading'; 
     
    339351                        photos.sort = true; 
    340352                        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'; 
    345361                } 
    346362 
     
    359375                mouse.click({target: {}}); 
    360376 
    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 
    362379                buttons.upload.disable(); 
    363380                for (var i = 0; i < ii; ++i) { 
     
    366383                                block_sort(); 
    367384                                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]; 
    369387                                img.className = 'loading'; 
    370388                                img.setAttribute('width', 16); 
    371389                                img.setAttribute('height', 8); 
    372390                                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); 
    378398 
    379399        }, 
     
    389409 
    390410                // 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) { 
    392413                        return; 
    393414                } 
    394415 
    395416                // Remove error indicators 
    396                 var li = document.getElementById('photos_list').getElementsByTagName('li'); 
     417                var li = document.getElementById('photos_list') 
     418                        .getElementsByTagName('li'); 
    397419                var ii = li.length; 
    398420                for (var i = 0; i < ii; ++i) { 
     
    434456 
    435457                                                // 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)) { 
    438462                                                        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); 
    441466                                                } 
    442467 
     
    444469                                                else if (p.size > users.filesize) { 
    445470                                                        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); 
    448473                                                } 
    449474 
     
    478503                                } 
    479504                                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); 
    481507 
    482508                                // Give some meaningful feedback 
    483                                 //   In the future, it'd be nice if this said "Resizing..." 
    484509                                if (not_started) { 
    485510                                        document.getElementById('footer').style.display = '-moz-box'; 
     
    487512                                        var progress_text = document.getElementById('progress_text'); 
    488513                                        progress_text.className = 'spinning'; 
    489                                         progress_text.value = ''
     514                                        progress_text.value = locale.getString('upload.resizing.status')
    490515                                        status.set(locale.getString('status.uploading')); 
    491516                                        buttons.upload.disable(); 
     
    622647                        document.getElementById('no_meta_prompt').style.visibility = 'visible'; 
    623648                } 
    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); 
    628654 
    629655                // Sort photos based on previous sort setting 
     656/* 
    630657                if (list.length) { 
    631658                        photos.sort = obj.sort; 
     
    640667                        } 
    641668                } 
     669*/ 
    642670 
    643671                // 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  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/prompt.xul

    r95 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is free 
    77software; you can redistribute it and/or modify it under the terms of the 
    88GNU General Public License (GPL), version 2 only.  This library is 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/set.xul

    r101 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/settings.js

    r240 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/settings.xul

    r169 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/settings_dialog.js

    r207 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/threads.js

    r250 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    1313        // Hooks to threads 
    1414        worker: null, 
     15        uploadr: null, 
    1516        main: null, 
    1617 
    17         // GraphicsMagick 
     18        // GraphicsMagick XPCOM object 
    1819        gm: null, 
    1920 
     
    2122        init: function() { 
    2223                try { 
     24 
     25                        // Threads themselves 
    2326                        var t = Cc['@mozilla.org/thread-manager;1'].getService(); 
    2427                        threads.worker = t.newThread(0); 
     28                        threads.uploadr = t.newThread(0); 
    2529                        threads.main = t.mainThread; 
     30 
     31                        // GraphicsMagick, for use on the worker thread 
    2632                        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 
    2937                } catch (err) { 
    3038                        Components.utils.reportError(err); 
     
    98106                                } 
    99107 
     108                                // Width and height 
    100109                                photos.list[this.id].width = parseInt(thumb[1]); 
    101110                                photos.list[this.id].height = parseInt(thumb[2]); 
     111 
     112                                // Date taken 
    102113                                if (/\d{4}:\d{2}:\d{2} \d{2}:\d{2}:\d{2}/.test(thumb[3])) { 
    103114                                        photos.list[this.id].date_taken = thumb[3]; 
     
    121132                                                minutes + ':' + seconds; 
    122133                                } 
     134 
     135                                // Thumbnail 
    123136                                photos.list[this.id].thumb_width = parseInt(thumb[4]); 
    124137                                photos.list[this.id].thumb_height = parseInt(thumb[5]); 
     
    126139                                img.setAttribute('height', thumb[5]); 
    127140                                img.src = 'file://' + thumb[6]; 
     141                                photos.list[this.id].thumb = thumb[6]; 
    128142 
    129143                                // Make video icons for videos 
     
    139153                                } 
    140154 
    141                                 photos.list[this.id].thumb = thumb[6]; 
     155                                // Title/tags/description 
    142156                                if ('' == photos.list[this.id].title) { 
    143157                                        var title = thumb[7] ? thumb[7].replace(/^\s+|\s+$/, 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/ui.js

    r244 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    186186        faq: function() { 
    187187                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'); 
    188200        } 
    189201 
     
    324336 
    325337        // 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'), 
    327340                locale.getString('dialog.exit.title'), 
    328341                locale.getString('dialog.exit.ok'), 
     
    339352        if (0 == photos.count) { 
    340353                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); 
    343356                        profile.append('images'); 
    344357                        profile.remove(true); 
    345358                } catch (err) {} 
    346359                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); 
    348362                        temp.initWithPath('C:\\temp'); 
    349363                        if (temp.isDirectory()) { 
     
    361375        } 
    362376 
     377        // Shutdown threads 
     378        threads.worker.shutdown(); 
     379        threads.uploadr.shutdown(); 
     380 
    363381        // 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); 
    366384        e.quit(Ci.nsIAppStartup.eForceQuit); 
    367385 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/upgrade.js

    r242 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/upload.js

    r245 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    7070                } 
    7171 
    72                 // Pass the photo to the API 
    7372                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                } 
    92122 
    93123        }, 
     
    116146 
    117147                        // 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) { 
    119150                                ++upload.stats.errors; 
    120151                                ++upload.retry_count; 
     
    122153                                upload.start(id); 
    123154                                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 + 
    125158                                                ', retry = ' + upload.retry_count); 
    126159                                } 
     
    148181                else if (null != photos.uploading[id]) { 
    149182                        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; 
    151185                        ++upload.tickets_count; 
    152186                        if (null != upload.tickets_handle) { 
     
    199233                        } 
    200234                        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); 
    202237 
    203238                                // If we were ever to use sync upload, we would need imported 
     
    232267                } 
    233268 
    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 
    235271                else if ('sync' == conf.mode) { 
    236272                        var ii = photos.uploading.length; 
     
    248284        // Track progress of an upload POST 
    249285        progress: function(stream, id) { 
     286                upload.progress2(stream.available(), id); 
     287        }, 
     288        progress2: function(available, id) { 
    250289 
    251290                // Get this bit of progress 
     
    254293                        upload.progress_last = upload.progress_total; 
    255294                } 
    256                 var a = stream.available() >> 10; 
     295//              var a = stream.available() >> 10; 
     296                var a = available >> 10; 
    257297                var kb = upload.progress_last - a; 
    258298 
     
    271311                // Update the UI 
    272312                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)); 
    276318                if (null != upload.progress_bar) { 
    277319                        upload.progress_bar.update(percent); 
    278320                } 
    279                 if (100 == Math.round(100 * percent)) { // Why doesn't (1 == percent) work here? 
     321                if (100 == Math.round(100 * percent)) { 
    280322                        document.getElementById('progress_text').value = 
    281323                                locale.getString('upload.waiting.status'); 
    282324                        upload.processing = true; 
    283325                } 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 correct 
     326                        document.getElementById('progress_text').value = 
     327                                locale.getFormattedString('upload.progress.status', [ 
     328                                        id + 1, 
    287329                                        photos.uploading.length, 
    288330                                        Math.round(100 * percent) 
     
    327369        bandwidth: function(rsp) { 
    328370                if ('object' == typeof rsp && 
    329                         6 == parseInt(rsp.getElementsByTagName('err')[0].getAttribute('code'))) { 
     371                        6 == parseInt(rsp.getElementsByTagName('err')[0] 
     372                        .getAttribute('code'))) { 
    330373                        document.getElementById('progress').style.display = 'none'; 
    331374                        var f = photos.failed; 
     
    337380                        var ii = f.length; 
    338381                        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'; 
    341386                                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'; 
    344391                                } 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'; 
    347396                                } 
    348397                        } 
     
    450499                                flickr.photosets.addPhoto(set_id, meta.sets_map[set_id][0]); 
    451500                        } else { 
    452                                 flickr.photosets.create(set_id, meta.created_sets_desc[index], 
     501                                flickr.photosets.create(set_id, 
     502                                        meta.created_sets_desc[index], 
    453503                                        meta.sets_map[set_id][0]); 
    454504                        } 
    455505                } 
    456506 
    457                 // If we are adding photos to a set, the last one will call this, otherwise we 
    458                 // have to here.  If it doesn't get called then limits and such will not be 
    459                 // 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. 
    460510                if (not_adding_to_sets) { 
    461511                        upload.finalize(); 
     
    537587                                locale.getString('upload.success.cancel')); 
    538588                } 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                                ]), 
    541594                                locale.getString('upload.error.some.title'), 
    542595                                locale.getString('upload.error.some.ok'), 
     
    548601                        } 
    549602                } 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                                ], 
    552607                                locale.getString('upload.error.sets.more'), 
    553608                                locale.getString('upload.error.sets.title'), 
    554609                                locale.getString('upload.error.sets.ok'), 
    555610                                locale.getString('upload.error.sets.cancel')); 
    556                 } else { // if (0 < photos.fail && 0 == photos.ok) { 
     611                } else { 
    557612                        try_again = confirm([locale.getString('upload.error.all.text'), 
    558613                                locale.getString('upload.error.all.more')], 
     
    610665                        } 
    611666 
    612                         threads.worker.dispatch(new RetryUpload(true), threads.worker.DISPATCH_NORMAL); 
     667                        threads.worker.dispatch(new RetryUpload(true), 
     668                                threads.worker.DISPATCH_NORMAL); 
    613669                } 
    614670 
     
    622678 
    623679}; 
     680 
     681var Upload = function(params, id) { 
     682        this.params = params; 
     683        this.id = id; 
     684} 
     685Upload.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 
     787Cc['@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 
     813var UploadProgress = function(available, id) { 
     814        this.available = available; 
     815        this.id = id; 
     816} 
     817UploadProgress.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 
     829var UploadDone = function(raw, id) { 
     830        this.raw = raw; 
     831        this.id = id; 
     832} 
     833UploadDone.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  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    161161                for each (var u in users.list) { 
    162162                        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; 
    165166                                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; 
    170171                                users.login(); 
    171172                                break; 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/video_big.xul

    r239 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/video_offline.xul

    r229 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/content/uploadr/video_restricted.xul

    r229 r252  
    44Flickr Uploadr 
    55 
    6 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    7 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 is 
     6Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     7free software; you can redistribute it and/or modify it under the terms of 
     8the GNU General Public License (GPL), version 2 only.  This library is 
    99distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    1010GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/branding/brand.dtd

    r251 r252  
    33Flickr Uploadr 
    44 
    5 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    6 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 is 
     5Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     6free software; you can redistribute it and/or modify it under the terms of 
     7the GNU General Public License (GPL), version 2 only.  This library is 
    88distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    99GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/branding/brand.properties

    r251 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# 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  
    33Flickr Uploadr 
    44 
    5 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    6 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 is 
     5Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     6free software; you can redistribute it and/or modify it under the terms of 
     7the GNU General Public License (GPL), version 2 only.  This library is 
    88distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    99GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/de-de/main.properties

    r251 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# 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  
    33Flickr Uploadr 
    44 
    5 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    6 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 is 
     5Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     6free software; you can redistribute it and/or modify it under the terms of 
     7the GNU General Public License (GPL), version 2 only.  This library is 
    88distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    99GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/en-US/main.properties

    r251 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# 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  
    33Flickr Uploadr 
    44 
    5 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    6 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 is 
     5Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     6free software; you can redistribute it and/or modify it under the terms of 
     7the GNU General Public License (GPL), version 2 only.  This library is 
    88distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    99GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/es-us/main.properties

    r251 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# 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  
    33Flickr Uploadr 
    44 
    5 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    6 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 is 
     5Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     6free software; you can redistribute it and/or modify it under the terms of 
     7the GNU General Public License (GPL), version 2 only.  This library is 
    88distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    99GPL for more details (http://www.gnu.org/licenses/gpl.html) 
    1010 
    1111--> 
    12  
    1312<!ENTITY title "Flickr Uploadr"> 
    1413 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/fr-fr/main.properties

    r251 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# 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  
    33Flickr Uploadr 
    44 
    5 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    6 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 is 
     5Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     6free software; you can redistribute it and/or modify it under the terms of 
     7the GNU General Public License (GPL), version 2 only.  This library is 
    88distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    99GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/it-it/main.properties

    r251 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# 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  
    33Flickr Uploadr 
    44 
    5 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    6 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 is 
     5Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     6free software; you can redistribute it and/or modify it under the terms of 
     7the GNU General Public License (GPL), version 2 only.  This library is 
    88distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    99GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/ko-kr/main.properties

    r251 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# 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  
    33Flickr Uploadr 
    44 
    5 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    6 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 is 
     5Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     6free software; you can redistribute it and/or modify it under the terms of 
     7the GNU General Public License (GPL), version 2 only.  This library is 
    88distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    99GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/pt-br/main.properties

    r251 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# 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  
    33Flickr Uploadr 
    44 
    5 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    6 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 is 
     5Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     6free software; you can redistribute it and/or modify it under the terms of 
     7the GNU General Public License (GPL), version 2 only.  This library is 
    88distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    99GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/chrome/locale/zh-hk/main.properties

    r251 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/Makefile

    r246 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# 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 
    111const Cc = Components.classes; 
    212const Ci = Components.interfaces; 
    313 
    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  
     14const clh_contractID = 
     15       "@mozilla.org/commandlinehandler/general-startup;1?type=flcmdline"
     16const clh_CID = Components.ID("{3e984f42-a822-11dc-8314-0800200c9a66}")
     17const clh_category = "m-flcmdline"; 
    818 
    919const myAppHandler = { 
     
    2232 
    2333                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... 
    2637                        //start = 1; 
    2738                } 
     
    7990 
    8091        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                } 
    8295                throw Components.results.NS_ERROR_NO_INTERFACE; 
    8396        }, 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/dll.cpp

    r103 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGM.cpp

    r249 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     
    540540                        bh = img.baseColumns(); 
    541541                } 
    542 //            int base = bw > bh ? bw : bh; 
     542              int base = bw > bh ? bw : bh; 
    543543                out1 << bw << "###" << bh << "###"; 
    544544 
     
    598598 
    599599                // 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              } 
    608608 
    609609                // Create the actual thumbnail 
    610610                img.scale(dim.str()); 
    611 //            img.sharpen(1, sigma); 
     611              img.sharpen(1, sigma); 
    612612                img.compressType(Magick::NoCompression); 
    613613                img.write(*thumb_s); 
     
    790790                // Find the sharpen sigma as the website does 
    791791                //   Which is easy, because for these sizes it's just 0.95 
    792               double sigma = 0.95; 
     792//            double sigma = 0.95; 
    793793 
    794794                // Resize the image 
    795795                img.scale(dim); 
    796               img.sharpen(1, sigma); 
     796//            img.sharpen(1, sigma); 
    797797                img.compressType(Magick::NoCompression); 
    798798                img.write(*resize_s); 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGM.h

    r103 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/flGMModule.cpp

    r103 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/flIGM.idl

    r224 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/flIKey.idl

    r103 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/flKey.cpp

    r103 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/flKey.h

    r103 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/flKeyModule.cpp

    r103 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/gm.cpp

    r95 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/md5.h

    r103 r252  
    22 * Flickr Uploadr 
    33 * 
    4  * Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5  * software; you can redistribute it and/or modify it under the terms of the 
    6  * GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77 * distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88 * GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/components/xpidl-build.bat

    r95 r252  
    22REM  Flickr Uploadr 
    33REM 
    4 REM  Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 REM  software; you can redistribute it and/or modify it under the terms of the 
    6 REM  GNU General Public License (GPL), version 2 only.  This library is 
    7 REM  distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    8 REM  GPL for more details (http://www.gnu.org/licenses/gpl.html) 
     4REM  Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library 
     5REM  is free software; you can redistribute it and/or modify it under the 
     6REM  terms of the GNU General Public License (GPL), version 2 only.  This 
     7REM  library is distributed WITHOUT ANY WARRANTY, whether express or implied. 
     8REM  See the GNU GPL for more details (http://www.gnu.org/licenses/gpl.html) 
    99REM 
    1010 
  • trunk/uploadr/MacUploadr.app/Contents/Resources/defaults/preferences/prefs.js

    r208 r252  
    22pref('toolkit.singletonWindowType', 'app'); 
    33pref('browser.chromeURL', 'chrome://uploadr/content/dock.xul'); 
    4  
    54pref('browser.dom.window.dump.enabled', true); 
    65pref('javascript.options.showInConsole', true); 
     
    1211 
    1312pref('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 
     18pref('network.protocol-handler.warn-external.http', false); 
     19pref('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'); 
     26pref('extensions.update.enabled', true); 
     27pref('extensions.update.interval', 86400); 
     28pref('extensions.dss.enabled', false); 
     29pref('extensions.dss.switchPending', false); 
     30pref('extensions.ignoreMTimeChanges', false); 
     31pref('extensions.logging.enabled', false); 
     32pref('general.skins.selectedSkin', 'uploadr'); 
     33//pref('extensions.update.url', '???'); 
     34pref('extensions.getMoreExtensionsURL', 'http://flickr.com/tools/uploadr/'); 
     35pref('extensions.getMoreThemesURL', 'http://flickr.com/tools/uploadr/'); 
     36pref('extensions.getMorePluginsURL', 'http://flickr.com/tools/uploadr/'); 
  • trunk/uploadr/Makefile

    r232 r252  
    22# Flickr Uploadr 
    33# 
    4 # Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 # software; you can redistribute it and/or modify it under the terms of the 
    6 # GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77# distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88# GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/README

    r249 r252  
    11Flickr Uploadr 
    22 
    3 Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    4 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 is 
     3Copyright (c) 2007-2008 Yahoo! Inc.  All rights reserved.  This library is 
     4free software; you can redistribute it and/or modify it under the terms of 
     5the GNU General Public License (GPL), version 2 only.  This library is 
    66distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    77GPL for more details (http://www.gnu.org/licenses/gpl.html) 
  • trunk/uploadr/windows_install_build.nsi

    r248 r252  
    22; Flickr Uploadr 
    33; 
    4 ; Copyright (c) 2007 Yahoo! Inc.  All rights reserved.  This library is free 
    5 ; software; you can redistribute it and/or modify it under the terms of the 
    6 ; GNU General Public License (GPL), version 2 only.  This library is 
     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 
    77; distributed WITHOUT ANY WARRANTY, whether express or implied. See the GNU 
    88; 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" 
    212 
    313!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" 
    212 
    313!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" 
    212 
    313!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" 
    212 
    313!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" 
    212 
    313!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" 
    212 
    313!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" 
    212 
    313!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" 
    212 
    313!insertmacro LANG_STRING title_version "Flickr Uploadr ${VERSION}"