tux-droid-svn Mailing List for Tux Droid CE (Page 40)
Status: Beta
Brought to you by:
ks156
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
(32) |
Mar
(108) |
Apr
(71) |
May
(38) |
Jun
(128) |
Jul
(1) |
Aug
(14) |
Sep
(77) |
Oct
(104) |
Nov
(90) |
Dec
(71) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(81) |
Feb
(18) |
Mar
(40) |
Apr
(102) |
May
(151) |
Jun
(74) |
Jul
(151) |
Aug
(257) |
Sep
(447) |
Oct
(379) |
Nov
(404) |
Dec
(430) |
| 2009 |
Jan
(173) |
Feb
(236) |
Mar
(519) |
Apr
(300) |
May
(112) |
Jun
(232) |
Jul
(314) |
Aug
(58) |
Sep
(203) |
Oct
(293) |
Nov
(26) |
Dec
(109) |
| 2010 |
Jan
(19) |
Feb
(25) |
Mar
(33) |
Apr
(1) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: remi <c2m...@c2...> - 2009-07-05 14:48:18
|
Author: remi
Date: 2009-07-05 16:48:08 +0200 (Sun, 05 Jul 2009)
New Revision: 5055
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
Log:
* Added "About" tool in the "Tools" page. (You need the previously committed plugin-tool "tool-about-tux" in your plugin directory)
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl 2009-07-05 14:46:23 UTC (rev 5054)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl 2009-07-05 14:48:08 UTC (rev 5055)
@@ -38,6 +38,7 @@
<![CDATA[
function initialization()
{
+ initializeLightbox();
}
function startATool(uuid)
@@ -51,6 +52,18 @@
}
getRequest("/plugins_server/start_plugin", args);
}
+
+ function updateWindowAbout(uuid)
+ {
+ setpng(document.getElementById("windowGadgetHelpIcon"));
+ var skin = document.getElementById("skin").value;
+ var language = document.getElementById("language").value;
+ var src = "/wi_user_01/gadget_help?uuid=" + uuid;
+ src += "&language=" + language;
+ src += "&skin=" + skin;
+ src += "&rndParam=" + Math.random();
+ document.getElementById("windowAboutContentIFrame").src = src;
+ }
]]>
</script>
</head>
@@ -95,33 +108,77 @@
<div class="frame01TopSpace">
</div>
<div class="frame01Middle">
- <xsl:for-each select="root/data/*">
- <!-- ATTITUNE STUDIO -->
- <xsl:if test="name() = 'attitunes_studio'">
- <xsl:element name="a">
- <xsl:attribute name="class">toolsBtnTitle toolsBtnStartEnable</xsl:attribute>
- <xsl:attribute name="id">toolsStartAttitunesStatudio</xsl:attribute>
- <xsl:attribute name="onclick">javascript:startATool('<xsl:value-of select="uuid"/>');return false;</xsl:attribute>
- <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="../../translations/start"/>
- </xsl:element>
- <span class="toolsRowName"><xsl:value-of select="name"/></span>
- <div class="frame01Sep"></div>
- </xsl:if>
- <!-- TUX CONTROLLER -->
- <xsl:if test="name() = 'tux_controller'">
- <xsl:element name="a">
- <xsl:attribute name="class">toolsBtnTitle toolsBtnStartEnable</xsl:attribute>
- <xsl:attribute name="id">toolsStartAttitunesStatudio</xsl:attribute>
- <xsl:attribute name="onclick">javascript:startATool('<xsl:value-of select="uuid"/>');return false;</xsl:attribute>
- <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="../../translations/start"/>
- </xsl:element>
- <span class="toolsRowName"><xsl:value-of select="name"/></span>
- <!-- <div class="frame01Sep"></div> -->
- </xsl:if>
- </xsl:for-each>
+ <!-- ATTITUNE STUDIO -->
+ <xsl:if test="root/data/attitunes_studio != ''">
+ <xsl:element name="a">
+ <xsl:attribute name="class">toolsBtnTitle toolsBtnStartEnable</xsl:attribute>
+ <xsl:attribute name="id">toolsStartAttitunesStatudio</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:startATool('<xsl:value-of select="root/data/attitunes_studio/uuid"/>');return false;</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/start"/>
+ </xsl:element>
+ <span class="toolsRowName"><xsl:value-of select="root/data/attitunes_studio/name"/></span>
+ <div class="frame01Sep"></div>
+ </xsl:if>
+ <!-- TUX CONTROLLER -->
+ <xsl:if test="root/data/tux_controller != ''">
+ <xsl:element name="a">
+ <xsl:attribute name="class">toolsBtnTitle toolsBtnStartEnable</xsl:attribute>
+ <xsl:attribute name="id">toolsStartAttitunesStudio</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:startATool('<xsl:value-of select="root/data/tux_controller/uuid"/>');return false;</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/start"/>
+ </xsl:element>
+ <span class="toolsRowName"><xsl:value-of select="root/data/tux_controller/name"/></span>
+ <div class="frame01Sep"></div>
+ </xsl:if>
+ <!-- ABOUT -->
+ <xsl:if test="root/data/about != ''">
+ <xsl:element name="a">
+ <xsl:attribute name="class">toolsBtnTitle toolsBtnShowEnable</xsl:attribute>
+ <xsl:attribute name="id"><xsl:value-of select="root/data/about/uuid"/></xsl:attribute>
+ <xsl:attribute name="name">lbOn</xsl:attribute>
+ <xsl:attribute name="rel">windowAbout</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/show"/>
+ </xsl:element>
+ <span class="toolsRowName"><xsl:value-of select="root/data/about/name"/></span>
+ </xsl:if>
+
+
</div>
<div class="frame01Bottom"></div>
</div>
+
+ <!-- WINDOW ABOUT -->
+ <div id="windowAbout" class="window01Box" onfocus="updateWindowAbout(arguments[0]);" style="height:350px; margin-top:65px;">
+ <div class="windowFrame01Top">
+ <div class="windowGadgetIcon">
+ <xsl:element name="img">
+ <xsl:attribute name="id">windowGadgetHelpIcon</xsl:attribute>
+ <xsl:attribute name="src"><xsl:value-of select="root/data/about/icon"/></xsl:attribute>
+ <xsl:attribute name="height">33</xsl:attribute>
+ <xsl:attribute name="width">33</xsl:attribute>
+ </xsl:element>
+ </div>
+ <span class="windowTitle" id="windowGadgetHelpTitle"><xsl:value-of select="root/data/about/name"/></span>
+ </div>
+ <div class="windowFrame01Middle" style="height:290px;">
+ <iframe class="windowContentIFrame"
+ id="windowAboutContentIFrame"
+ name="windowAboutContentIFrame"
+ frameborder="0"
+ scrolling="no"
+ style="height:240px"
+ src="">
+ </iframe>
+ <div style="display:table;float:left;height:34px;width:370px"></div>
+ <xsl:element name="a">
+ <xsl:attribute name="class">windowBtn</xsl:attribute>
+ <xsl:attribute name="name">lbOff</xsl:attribute>
+ <xsl:attribute name="rel">deactivate</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="root/translations/close"/>
+ </xsl:element>
+ </div>
+ <div class="windowFrame01Bottom"></div>
+ </div>
</body>
</html>
</xsl:template>
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-07-05 14:46:23 UTC (rev 5054)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-07-05 14:48:08 UTC (rev 5055)
@@ -94,6 +94,16 @@
'uuid' : tuxControllerData['description']['uuid'],
'help' : tuxControllerData['description']['helpFile'],
}
+ # About TuxBox
+ aboutTuxBoxData = resourcePluginsServer.getPluginData(
+ "d7c4218d-5a5c-4cdd-b515-0df7411c000f", language)
+ if aboutTuxBoxData != None:
+ result['about'] = {
+ 'name' : aboutTuxBoxData['description']['translatedName'],
+ 'icon' : aboutTuxBoxData['description']['iconFile'],
+ 'uuid' : aboutTuxBoxData['description']['uuid'],
+ 'help' : aboutTuxBoxData['description']['helpFile'],
+ }
return result
# Create an instance of the resource
@@ -391,6 +401,8 @@
skin = parameters['skin']
data = resourceUgcServer.getUgcData(uuid, language)
if data == None:
+ data = resourcePluginsServer.getPluginData(uuid, language)
+ if data == None:
contentStruct['root']['result'] = getStrError(E_TDREST_FAILED)
else:
contentStruct['root']['data'] = data
|
Author: remi Date: 2009-07-05 16:46:23 +0200 (Sun, 05 Jul 2009) New Revision: 5054 Added: software_suite_v3/software/tool/tool-about-tux/ software_suite_v3/software/tool/tool-about-tux/branches/ software_suite_v3/software/tool/tool-about-tux/tags/ software_suite_v3/software/tool/tool-about-tux/trunk/ software_suite_v3/software/tool/tool-about-tux/trunk/LICENSE software_suite_v3/software/tool/tool-about-tux/trunk/build.py software_suite_v3/software/tool/tool-about-tux/trunk/builder/ software_suite_v3/software/tool/tool-about-tux/trunk/builder/PluginPackager.py software_suite_v3/software/tool/tool-about-tux/trunk/builder/__init__.py software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/ software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/__init__.py software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/ software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/DirectoriesAndFilesTools.py software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/__init__.py software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/version.py software_suite_v3/software/tool/tool-about-tux/trunk/builder/version.py software_suite_v3/software/tool/tool-about-tux/trunk/executables/ software_suite_v3/software/tool/tool-about-tux/trunk/resources/ software_suite_v3/software/tool/tool-about-tux/trunk/resources/en.po software_suite_v3/software/tool/tool-about-tux/trunk/resources/fr.po software_suite_v3/software/tool/tool-about-tux/trunk/resources/help.wiki software_suite_v3/software/tool/tool-about-tux/trunk/resources/icon.png software_suite_v3/software/tool/tool-about-tux/trunk/resources/plugin.pot software_suite_v3/software/tool/tool-about-tux/trunk/resources/plugin.xml Log: * Added "tool-about-tux" plugin. This plugin tool is used for embedding the "About" informations in the "tools" page. Added: software_suite_v3/software/tool/tool-about-tux/trunk/LICENSE =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/LICENSE (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/LICENSE 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + 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. + + Preamble + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 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". + +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. + + 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. + +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. + + 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: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + 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. + + 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.) + +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. + +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. + +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. + + 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: + + 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, + + 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, + + 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.) + +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. + +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. + + 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. + + 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. + + 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. + + 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. + +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. + +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. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 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. + + 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. + +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. + + 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. + + NO WARRANTY + + 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. + + 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. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: software_suite_v3/software/tool/tool-about-tux/trunk/build.py =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/build.py (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/build.py 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +# Copyleft (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +from builder.PluginPackager import PluginPackager + +if __name__ == "__main__": + PluginPackager().createScp("tool-about-tux.scp") Added: software_suite_v3/software/tool/tool-about-tux/trunk/builder/PluginPackager.py =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/builder/PluginPackager.py (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/builder/PluginPackager.py 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyleft (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +import os +from zipfile import * + +from util.misc.DirectoriesAndFilesTools import * + +# ------------------------------------------------------------------------------ +# Class to create a SCP file from the main directory of a python plugin project. +# ------------------------------------------------------------------------------ +class PluginPackager(object): + """Class to create a SCP file from the main directory of a python plugin + project. + """ + + # -------------------------------------------------------------------------- + # Create a scp file. + # -------------------------------------------------------------------------- + def createScp(self, scpFileName): + """Create a scp file. + @param scpFileName: Smart-Core Plugin file name. + @return: The success of the file creation. + """ + self.__sourcePath = os.path.realpath("") + if not os.path.isdir(self.__sourcePath): + return False + if not os.path.isdir(os.path.join(self.__sourcePath, "executables")): + return False + if not os.path.isdir(os.path.join(self.__sourcePath, "resources")): + return False + # Get some paths + SRC_EXECUTABLES_PATH = os.path.join(self.__sourcePath, "executables") + SRC_RESOURCES_PATH = os.path.join(self.__sourcePath, "resources") + TMP_BUILD_PATH = os.path.join(self.__sourcePath, "tmp") + DEST_EXECUTABLES_PATH = os.path.join(TMP_BUILD_PATH, "executables") + DEST_RESOURCES_PATH = os.path.join(TMP_BUILD_PATH, "resources") + DEST_SCP_FILENAME = os.path.join(self.__sourcePath, scpFileName) + # Create the temporary build path + MKDirsF(TMP_BUILD_PATH) + # Copy "executables" directory + CPDir(SRC_EXECUTABLES_PATH, DEST_EXECUTABLES_PATH) + # Copy "resources" directory + CPDir(SRC_RESOURCES_PATH, DEST_RESOURCES_PATH) + # Filtering the content of temporary path + RMWithFilters(TMP_BUILD_PATH, filters = ['.svn', '.pyc']) + # Create a zip file + directory = TMP_BUILD_PATH + last_cwd = os.getcwd() + os.chdir(TMP_BUILD_PATH) + zf = ZipFile(DEST_SCP_FILENAME, 'w', compression = ZIP_DEFLATED) + def walker(zip, directory, files, root = directory): + for file in files: + file = os.path.join(directory, file) + name = file[len(TMP_BUILD_PATH) + 1:] + if os.path.isfile(file): + zip.write(file, name, ZIP_DEFLATED) + elif os.path.isdir(file): + file = os.path.join(file, "") + name = os.path.join(name, "") + zip.writestr(name, name) + os.path.walk(TMP_BUILD_PATH, walker, zf) + zf.close() + os.chdir(os.path.abspath(last_cwd)) + # Remove the temporary directory + RMDirs(TMP_BUILD_PATH) + return True Added: software_suite_v3/software/tool/tool-about-tux/trunk/builder/__init__.py =================================================================== Added: software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/__init__.py =================================================================== Added: software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/DirectoriesAndFilesTools.py =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/DirectoriesAndFilesTools.py (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/DirectoriesAndFilesTools.py 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,161 @@ +# -*- coding: utf-8 -*- + +import version +__author__ = version.author +__date__ = version.date +__version__ = version.version +__licence__ = version.licence +del version + +# Copyleft (C) 2008 Acness World +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +import os +import shutil + +if os.name == 'nt': + import win32con + import win32file + +# ============================================================================== +# Public functions +# ============================================================================== + +# ------------------------------------------------------------------------------ +# Force to create a directories tree if not exists. +# ------------------------------------------------------------------------------ +def MKDirs(path): + """Force to create a directories tree if not exists. + @param path: Directory path. + """ + if not os.path.isdir(path): + try: + os.makedirs(path) + except: + pass + +# ------------------------------------------------------------------------------ +# Force to create a directories tree after having deleted the old one. +# ------------------------------------------------------------------------------ +def MKDirsF(path): + """Force to create a directories tree after having deleted the old one. + @param path: Directory path. + """ + if os.path.isdir(path): + RMDirs(path) + os.makedirs(path) + +# ------------------------------------------------------------------------------ +# Remove directories and files recursively. +# ------------------------------------------------------------------------------ +def RMDirs(path): + """Remove directories and files recursively. + @param path: Path of the base directory. + """ + if not os.path.isdir(path): + return + for root, dirs, files in os.walk(path, topdown = False): + for d in dirs: + try: + os.removedirs(os.path.join(root, d)) + except: + pass + for f in files: + try: + if os.name == 'nt': + win32file.SetFileAttributesW(os.path.join(root, f), + win32con.FILE_ATTRIBUTE_NORMAL) + os.remove(os.path.join(root, f)) + except: + pass + if os.path.isdir(path): + try: + os.removedirs(path) + except: + pass + +# ------------------------------------------------------------------------------ +# Remove directories and files recursively with filters. +# ------------------------------------------------------------------------------ +def RMWithFilters(path, filters = ['.pyc', '.pyo']): + """Remove directories and files recursively with filters. + @param path: Path of the base directory. + @param filters: Filters as list. + """ + def checkFilter(name): + for filter in filters: + if name.lower().find(filter.lower()) == (len(name) - len(filter)): + return True + return False + + if not os.path.isdir(path): + return + + for root, dirs, files in os.walk(path, topdown = False): + for d in dirs: + if checkFilter(os.path.join(root, d)): + try: + RMDirs(os.path.join(root, d)) + except: + pass + for f in files: + if checkFilter(os.path.join(root, f)): + try: + if os.name == 'nt': + win32file.SetFileAttributesW(os.path.join(root, f), + win32con.FILE_ATTRIBUTE_NORMAL) + os.remove(os.path.join(root, f)) + except: + pass + +# ------------------------------------------------------------------------------ +# Remove a file. +# ------------------------------------------------------------------------------ +def RMFile(path): + """Remove a file. + @param path: File path. + """ + if os.path.isfile(path): + try: + if os.name == 'nt': + win32file.SetFileAttributesW(path, + win32con.FILE_ATTRIBUTE_NORMAL) + os.remove(path) + except: + pass + +# ------------------------------------------------------------------------------ +# Copy a directories tree to another directory. +# ------------------------------------------------------------------------------ +def CPDir(src, dest): + """Copy a directories tree to another directory. + @param src: Source path. + @param dest: Destination path. + """ + if not os.path.isdir(src): + return + if os.path.isdir(dest): + RMDirs(dest) + shutil.copytree(src, dest) + +# ------------------------------------------------------------------------------ +# Retrieve the OS temporary directory. +# ------------------------------------------------------------------------------ +def GetOSTMPDir(): + """Retrieve the OS temporary directory. + @return: The OS temporary directory. + """ + result = None + # On Windows + if os.name == 'nt': + result = os.environ.get('tmp') + if result == None: + result = os.environ.get('temp') + if result == None: + result = "c:\\windows\\temp" + # On linux + else: + result = "/tmp" + return result Added: software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/__init__.py =================================================================== Added: software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/version.py =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/version.py (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/builder/util/misc/version.py 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +"""Version data for tuxisalive.lib.Util""" + +__author__ = "Remi Jocaille (rem...@c2...)" + +# Copyleft (C) 2008 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +name = 'util.misc' +version = '0.0.1' +author = "Remi Jocaille (rem...@c2...)" + +description = "Utilities libraries." + +licence = "GPL" +date = "December 2008" Added: software_suite_v3/software/tool/tool-about-tux/trunk/builder/version.py =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/builder/version.py (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/builder/version.py 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,9 @@ +# Copyleft (C) 2009 C2ME Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + +version = '0.0.1' +author = "Remi Jocaille (rem...@c2...)" +licence = "GPL" +date = "2009" Added: software_suite_v3/software/tool/tool-about-tux/trunk/resources/en.po =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/resources/en.po (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/resources/en.po 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,2 @@ +msgid "About TuxBox" +msgstr "About" Added: software_suite_v3/software/tool/tool-about-tux/trunk/resources/fr.po =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/resources/fr.po (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/resources/fr.po 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,2 @@ +msgid "About TuxBox" +msgstr "A propos" Added: software_suite_v3/software/tool/tool-about-tux/trunk/resources/help.wiki =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/resources/help.wiki (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/resources/help.wiki 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,13 @@ +\\ +\\ + +{text-align:center;}[img:/d7c4218d-5a5c-4cdd-b515-0df7411c000f/icon.png, TuxBox]\\ +\\ + +{text-align:center;font-size:16px;} +'''TuxBox'''\\ + + +{text-align:center;}Version 0.0.1\\ +\\ +Copyright(C) 2009 Kysoh Added: software_suite_v3/software/tool/tool-about-tux/trunk/resources/icon.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/software/tool/tool-about-tux/trunk/resources/icon.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/software/tool/tool-about-tux/trunk/resources/plugin.pot =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/resources/plugin.pot (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/resources/plugin.pot 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,2 @@ +msgid "About TuxBox" +msgstr "" Added: software_suite_v3/software/tool/tool-about-tux/trunk/resources/plugin.xml =================================================================== --- software_suite_v3/software/tool/tool-about-tux/trunk/resources/plugin.xml (rev 0) +++ software_suite_v3/software/tool/tool-about-tux/trunk/resources/plugin.xml 2009-07-05 14:46:23 UTC (rev 5054) @@ -0,0 +1,23 @@ +<plugin> + <interpreter + kind="python"> + <executable>executables/none.py</executable> + </interpreter> + <description> + <name>About TuxBox</name> + <ttsName>About TuxBox.</ttsName> + <description>This tool embed Tux Droid about infos.</description> + <author>Kysoh</author> + <version>0.0.1</version> + <iconFile>resources/icon.png</iconFile> + <uuid>d7c4218d-5a5c-4cdd-b515-0df7411c000f</uuid> + <platform>all</platform> + </description> + <parameters/> + <commands> + <command + name="run" + description="Fake command for plugin support (Don't start me !)" /> + </commands> + <tasks/> +</plugin> |
|
From: remi <c2m...@c2...> - 2009-07-05 14:39:51
|
Author: remi Date: 2009-07-05 14:31:33 +0200 (Sun, 05 Jul 2009) New Revision: 5052 Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_show_activate.png software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_show_disable.png software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_show_enable.png Log: * Added "show" button pictures Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_show_activate.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_show_activate.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_show_disable.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_show_disable.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_show_enable.png =================================================================== (Binary files differ) Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/gadgets_btn_show_enable.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
|
From: remi <c2m...@c2...> - 2009-07-05 13:16:26
|
Author: remi
Date: 2009-07-05 14:45:47 +0200 (Sun, 05 Jul 2009)
New Revision: 5053
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css
software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot
software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po
software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po
Log:
* Added trnaslations and css rules for the "show" button
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css 2009-07-05 12:31:33 UTC (rev 5052)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css 2009-07-05 12:45:47 UTC (rev 5053)
@@ -94,6 +94,32 @@
background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_disable.png);
}
+.toolsBtnShowEnable{
+ margin-left:10px;
+ width:54px;
+ _width:72px;
+ padding-left:18px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_show_enable.png);
+}
+
+.toolsBtnShowEnable:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_show_activate.png);
+}
+
+.toolsBtnShowActivate{
+ width:54px;
+ _width:72px;
+ padding-left:18px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_show_activate.png);
+}
+
+.toolsBtnShowDisable{
+ width:54px;
+ _width:72px;
+ padding-left:18px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_show_disable.png);
+}
+
.toolsRowName{
width:390px;
height:34px;
Modified: software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot 2009-07-05 12:31:33 UTC (rev 5052)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/default.pot 2009-07-05 12:45:47 UTC (rev 5053)
@@ -139,3 +139,5 @@
msgid "rarely"
msgstr ""
+msgid "show"
+msgstr ""
Modified: software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po 2009-07-05 12:31:33 UTC (rev 5052)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/en.po 2009-07-05 12:45:47 UTC (rev 5053)
@@ -138,3 +138,6 @@
msgid "rarely"
msgstr "Rarely"
+
+msgid "show"
+msgstr "Show"
Modified: software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po 2009-07-05 12:31:33 UTC (rev 5052)
+++ software_suite_v3/smart-core/smart-server/trunk/translation/wi_user/fr.po 2009-07-05 12:45:47 UTC (rev 5053)
@@ -138,3 +138,6 @@
msgid "rarely"
msgstr "Rarement"
+
+msgid "show"
+msgstr "Voir"
|
Author: remi
Date: 2009-07-05 14:20:07 +0200 (Sun, 05 Jul 2009)
New Revision: 5051
Added:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_sep_3.png
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
Log:
* Added "Attitunes Studio" and "Tux Controller" in the "tools" page. (You must have these plugins in your plugin directory)
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css 2009-07-05 10:54:28 UTC (rev 5050)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css 2009-07-05 12:20:07 UTC (rev 5051)
@@ -26,12 +26,15 @@
}
div.frame01Sep{
+ margin-top:6px;
+ margin-bottom:6px;
font-family:Verdana, Bitstream Vera Sans;
display:table;
- background-image:url(/data/web_interface/user_01/img/frame_01_sep.png);
+ background-image:url(/data/web_interface/user_01/img/frame_01_sep_3.png);
background-repeat:repeat;
- height:4px;
+ height:2px;
width:855px;
+ overflow: hidden;
}
div.frame01Bottom{
@@ -66,6 +69,7 @@
}
.toolsBtnStartEnable{
+ margin-left:10px;
width:59px;
_width:72px;
padding-left:13px;
@@ -90,6 +94,24 @@
background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_disable.png);
}
+.toolsRowName{
+ width:390px;
+ height:34px;
+ margin-left:10px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ line-height:34px;
+ font-size:12px;
+ color:#000;
+ text-align:left;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans;
+}
+
.leightbox {
color: #333;
display: none;
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_sep_3.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/img/frame_01_sep_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl 2009-07-05 10:54:28 UTC (rev 5050)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl 2009-07-05 12:20:07 UTC (rev 5051)
@@ -39,6 +39,18 @@
function initialization()
{
}
+
+ function startATool(uuid)
+ {
+ var language = document.getElementById("language").value;
+ var parametersString = "language=" + language;
+ var args = {
+ "command" : "run",
+ "uuid" : uuid,
+ "parameters" : parametersString
+ }
+ getRequest("/plugins_server/start_plugin", args);
+ }
]]>
</script>
</head>
@@ -82,7 +94,31 @@
<!-- NOTIFICATION VIEW -->
<div class="frame01TopSpace">
</div>
- <div class="frame01Middle" style="height:495px;">
+ <div class="frame01Middle">
+ <xsl:for-each select="root/data/*">
+ <!-- ATTITUNE STUDIO -->
+ <xsl:if test="name() = 'attitunes_studio'">
+ <xsl:element name="a">
+ <xsl:attribute name="class">toolsBtnTitle toolsBtnStartEnable</xsl:attribute>
+ <xsl:attribute name="id">toolsStartAttitunesStatudio</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:startATool('<xsl:value-of select="uuid"/>');return false;</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="../../translations/start"/>
+ </xsl:element>
+ <span class="toolsRowName"><xsl:value-of select="name"/></span>
+ <div class="frame01Sep"></div>
+ </xsl:if>
+ <!-- TUX CONTROLLER -->
+ <xsl:if test="name() = 'tux_controller'">
+ <xsl:element name="a">
+ <xsl:attribute name="class">toolsBtnTitle toolsBtnStartEnable</xsl:attribute>
+ <xsl:attribute name="id">toolsStartAttitunesStatudio</xsl:attribute>
+ <xsl:attribute name="onclick">javascript:startATool('<xsl:value-of select="uuid"/>');return false;</xsl:attribute>
+ <xsl:attribute name="href">#</xsl:attribute><xsl:value-of select="../../translations/start"/>
+ </xsl:element>
+ <span class="toolsRowName"><xsl:value-of select="name"/></span>
+ <!-- <div class="frame01Sep"></div> -->
+ </xsl:if>
+ </xsl:for-each>
</div>
<div class="frame01Bottom"></div>
</div>
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py 2009-07-05 10:54:28 UTC (rev 5050)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/01_resourcePluginsServer.py 2009-07-05 12:20:07 UTC (rev 5051)
@@ -336,6 +336,7 @@
"""
plugin = self.__pluginsContainer.getPluginByUuid(pluginUuid)
if plugin != None:
+ plugin
return plugin.start(command, parameters)
else:
return False
@@ -424,8 +425,9 @@
param = paramStruct.split("=")
if len(param) == 2:
params[param[0]] = param[1]
- if not resourcePluginsServer.startPlugin(uuid, command, params):
- contentStruct['root']['result'] = getStrError(E_TDREST_FAILED)
+ t = threading.Thread(target = resourcePluginsServer.startPlugin,
+ args = (uuid, command, params))
+ t.start()
return headersStruct, contentStruct
# Register the service into the resource
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-07-05 10:54:28 UTC (rev 5050)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-07-05 12:20:07 UTC (rev 5051)
@@ -72,20 +72,30 @@
result['soundState'] = soundState
return result
- def startTuxController(self):
- resourcePluginsServer.startPlugin(
- "548f7a77-567d-773e-a0ef-321fe63a1c88",
- "run",
- {})
+ def getAvailableToolsData(self, language):
+ result = {}
+ # Attitunes studio
+ attituneStudioData = resourcePluginsServer.getPluginData(
+ "548f7a9a-567d-773e-a0dd-102fe68a1b49", language)
+ if attituneStudioData != None:
+ result['attitunes_studio'] = {
+ 'name' : attituneStudioData['description']['translatedName'],
+ 'icon' : attituneStudioData['description']['iconFile'],
+ 'uuid' : attituneStudioData['description']['uuid'],
+ 'help' : attituneStudioData['description']['helpFile'],
+ }
+ # Tux Controller
+ tuxControllerData = resourcePluginsServer.getPluginData(
+ "548f7a77-567d-773e-a0ef-321fe63a1c88", language)
+ if tuxControllerData != None:
+ result['tux_controller'] = {
+ 'name' : tuxControllerData['description']['translatedName'],
+ 'icon' : tuxControllerData['description']['iconFile'],
+ 'uuid' : tuxControllerData['description']['uuid'],
+ 'help' : tuxControllerData['description']['helpFile'],
+ }
+ return result
- def startAttitunesStudio(self, path):
- resourcePluginsServer.startPlugin(
- "548f7a9a-567d-773e-a0dd-102fe68a1b49",
- "run",
- {
- 'path' : path,
- })
-
# Create an instance of the resource
resourceWIUser01 = TDSResourceWIUser01("resourceWIUser01")
# Register the resource into the resources manager
@@ -247,7 +257,7 @@
contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
language = parameters['language']
skin = parameters['skin']
- contentStruct['root']['data'] = {}
+ contentStruct['root']['data'] = resourceWIUser01.getAvailableToolsData(language)
contentStruct['root']['translations'] = resourceWIUser01.translations.getTranslations(language)
contentStruct['root']['skin'] = skin
contentStruct['root']['language'] = language
|
|
From: remi <c2m...@c2...> - 2009-07-05 10:54:53
|
Author: remi
Date: 2009-07-05 12:54:28 +0200 (Sun, 05 Jul 2009)
New Revision: 5050
Added:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/attitunes.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/online.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/attitunes.xsl
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/online.xsl
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/index.xsl
software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
Log:
* Added bases for the "attitunes" "tools" and "online" pages creation.
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/attitunes.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/attitunes.css (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/attitunes.css 2009-07-05 10:54:28 UTC (rev 5050)
@@ -0,0 +1,123 @@
+*:focus {
+ outline: none;
+}
+
+*::-moz-focus-inner {
+ border: none;
+}
+
+div.frame01TopSpace{
+ margin-top:15px;
+ font-family:Verdana, Bitstream Vera Sans;
+ background-image:url(/data/web_interface/user_01/img/frame_01_top.png);
+ background-repeat:no-repeat;
+ height:10px;
+ width:855px;
+ overflow: hidden;
+}
+
+div.frame01Middle{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_middle.png);
+ background-repeat:repeat;
+ height:1px;
+ width:855px;
+}
+
+div.frame01Sep{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_sep.png);
+ background-repeat:repeat;
+ height:4px;
+ width:855px;
+}
+
+div.frame01Bottom{
+ margin-top:0px;
+ font-family:Verdana, Bitstream Vera Sans;
+ background-image:url(/data/web_interface/user_01/img/frame_01_bottom.png);
+ background-repeat:no-repeat;
+ height:20px;
+ width:855px;
+ overflow: hidden;
+}
+
+.toolsBtnTitle{
+ width:56px;
+ _width:72px;
+ height:34px;
+ padding-left:16px;
+ padding-top:-1px;
+ margin-left:0px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ line-height:34px;
+ font-size:10px;
+ color:#FFFFFF;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans;
+}
+
+.toolsBtnStartEnable{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_enable.png);
+}
+
+.toolsBtnStartEnable:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_activate.png);
+}
+
+.toolsBtnStartActivate{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_activate.png);
+}
+
+.toolsBtnStartDisable{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_disable.png);
+}
+
+.leightbox {
+ color: #333;
+ display: none;
+ position: absolute;
+ top: 25%;
+ left: 25%;
+ width: 50%;
+ height: 50%;
+ padding: 1em;
+ border: 1em solid #B8B8B8;
+ background-color: white;
+ text-align: left;
+ z-index:1001;
+ overflow: auto;
+}
+
+#overlay{
+ display:none;
+ position:absolute;
+ top:0px;
+ left:0px;
+ width:855px;
+ height:535px;
+ z-index:1000;
+ background-color:#000000;
+ -moz-opacity: 0.7;
+ opacity:.70;
+ filter: alpha(opacity=70);
+}
+
+.lightbox[id]{ /* IE6 and below Can't See This */ position:fixed; }#overlay[id]{ /* IE6 and below Can't See This */ position:fixed; }
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/online.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/online.css (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/online.css 2009-07-05 10:54:28 UTC (rev 5050)
@@ -0,0 +1,123 @@
+*:focus {
+ outline: none;
+}
+
+*::-moz-focus-inner {
+ border: none;
+}
+
+div.frame01TopSpace{
+ margin-top:15px;
+ font-family:Verdana, Bitstream Vera Sans;
+ background-image:url(/data/web_interface/user_01/img/frame_01_top.png);
+ background-repeat:no-repeat;
+ height:10px;
+ width:855px;
+ overflow: hidden;
+}
+
+div.frame01Middle{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_middle.png);
+ background-repeat:repeat;
+ height:1px;
+ width:855px;
+}
+
+div.frame01Sep{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_sep.png);
+ background-repeat:repeat;
+ height:4px;
+ width:855px;
+}
+
+div.frame01Bottom{
+ margin-top:0px;
+ font-family:Verdana, Bitstream Vera Sans;
+ background-image:url(/data/web_interface/user_01/img/frame_01_bottom.png);
+ background-repeat:no-repeat;
+ height:20px;
+ width:855px;
+ overflow: hidden;
+}
+
+.toolsBtnTitle{
+ width:56px;
+ _width:72px;
+ height:34px;
+ padding-left:16px;
+ padding-top:-1px;
+ margin-left:0px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ line-height:34px;
+ font-size:10px;
+ color:#FFFFFF;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans;
+}
+
+.toolsBtnStartEnable{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_enable.png);
+}
+
+.toolsBtnStartEnable:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_activate.png);
+}
+
+.toolsBtnStartActivate{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_activate.png);
+}
+
+.toolsBtnStartDisable{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_disable.png);
+}
+
+.leightbox {
+ color: #333;
+ display: none;
+ position: absolute;
+ top: 25%;
+ left: 25%;
+ width: 50%;
+ height: 50%;
+ padding: 1em;
+ border: 1em solid #B8B8B8;
+ background-color: white;
+ text-align: left;
+ z-index:1001;
+ overflow: auto;
+}
+
+#overlay{
+ display:none;
+ position:absolute;
+ top:0px;
+ left:0px;
+ width:855px;
+ height:535px;
+ z-index:1000;
+ background-color:#000000;
+ -moz-opacity: 0.7;
+ opacity:.70;
+ filter: alpha(opacity=70);
+}
+
+.lightbox[id]{ /* IE6 and below Can't See This */ position:fixed; }#overlay[id]{ /* IE6 and below Can't See This */ position:fixed; }
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/css/tools.css 2009-07-05 10:54:28 UTC (rev 5050)
@@ -0,0 +1,123 @@
+*:focus {
+ outline: none;
+}
+
+*::-moz-focus-inner {
+ border: none;
+}
+
+div.frame01TopSpace{
+ margin-top:15px;
+ font-family:Verdana, Bitstream Vera Sans;
+ background-image:url(/data/web_interface/user_01/img/frame_01_top.png);
+ background-repeat:no-repeat;
+ height:10px;
+ width:855px;
+ overflow: hidden;
+}
+
+div.frame01Middle{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_middle.png);
+ background-repeat:repeat;
+ height:1px;
+ width:855px;
+}
+
+div.frame01Sep{
+ font-family:Verdana, Bitstream Vera Sans;
+ display:table;
+ background-image:url(/data/web_interface/user_01/img/frame_01_sep.png);
+ background-repeat:repeat;
+ height:4px;
+ width:855px;
+}
+
+div.frame01Bottom{
+ margin-top:0px;
+ font-family:Verdana, Bitstream Vera Sans;
+ background-image:url(/data/web_interface/user_01/img/frame_01_bottom.png);
+ background-repeat:no-repeat;
+ height:20px;
+ width:855px;
+ overflow: hidden;
+}
+
+.toolsBtnTitle{
+ width:56px;
+ _width:72px;
+ height:34px;
+ padding-left:16px;
+ padding-top:-1px;
+ margin-left:0px;
+ margin-top:2px;
+ display:table;
+ float:left;
+ line-height:34px;
+ font-size:10px;
+ color:#FFFFFF;
+ text-align:center;
+ vertical-align:middle;
+ font-weight:bold;
+ overflow:hidden;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans;
+}
+
+.toolsBtnStartEnable{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_enable.png);
+}
+
+.toolsBtnStartEnable:hover{
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_activate.png);
+}
+
+.toolsBtnStartActivate{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_activate.png);
+}
+
+.toolsBtnStartDisable{
+ width:59px;
+ _width:72px;
+ padding-left:13px;
+ background-image:url(/data/web_interface/user_01/img/gadgets_btn_play_disable.png);
+}
+
+.leightbox {
+ color: #333;
+ display: none;
+ position: absolute;
+ top: 25%;
+ left: 25%;
+ width: 50%;
+ height: 50%;
+ padding: 1em;
+ border: 1em solid #B8B8B8;
+ background-color: white;
+ text-align: left;
+ z-index:1001;
+ overflow: auto;
+}
+
+#overlay{
+ display:none;
+ position:absolute;
+ top:0px;
+ left:0px;
+ width:855px;
+ height:535px;
+ z-index:1000;
+ background-color:#000000;
+ -moz-opacity: 0.7;
+ opacity:.70;
+ filter: alpha(opacity=70);
+}
+
+.lightbox[id]{ /* IE6 and below Can't See This */ position:fixed; }#overlay[id]{ /* IE6 and below Can't See This */ position:fixed; }
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/attitunes.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/attitunes.xsl (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/attitunes.xsl 2009-07-05 10:54:28 UTC (rev 5050)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<xsl:include href="plugin_gadget_common.xsl"/>
+
+<xsl:template match="/">
+<html>
+ <head>
+ <link href="/data/web_interface/user_01/css/attitunes.css" rel="stylesheet" type="text/css"/>
+ <!-- CSS HACKS FOR BROWSERS -->
+ <xsl:choose>
+ <!-- IE -->
+ <xsl:when test="system-property('xsl:vendor') = 'Microsoft'">
+ <!-- IE <= 7 -->
+ <xsl:comment><![CDATA[[if lte IE 7]>
+ <link href="/data/web_interface/user_01/css/popup-ie6.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window-ie6.css" rel="stylesheet" type="text/css"/>
+ <![endif]]]></xsl:comment>
+ <!-- IE >= 8 -->
+ <xsl:comment><![CDATA[[if gte IE 8]>
+ <link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window.css" rel="stylesheet" type="text/css"/>
+ <![endif]]]></xsl:comment>
+ </xsl:when>
+ <!-- FIREFOX ETC... -->
+ <xsl:otherwise>
+ <link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window.css" rel="stylesheet" type="text/css"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <script src="/data/web_interface/user_01/js/hashtable.js" type="text/javascript"/>
+ <script src="/data/web_interface/user_01/js/common.js" type="text/javascript"/>
+ <script type="text/javascript" src="/data/web_interface/user_01/js/prototype.js"></script>
+ <script type="text/javascript" src="/data/web_interface/user_01/js/lightbox.js"></script>
+ <script language="javascript">
+ <![CDATA[
+ function initialization()
+ {
+ }
+ ]]>
+ </script>
+ </head>
+
+ <body bgcolor="#EFEFEF" onLoad="initialization();">
+ <!-- SKIN STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">skin</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/skin"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- LANGUAGE STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">language</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/language"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- SOME TRANSLATIONS FOR JS -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">translationStart</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/translations/start"/>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">translationStop</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/translations/stop"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- MAIN DIV FRAME -->
+ <div style="position:absolute;
+ left:0px;
+ top:0px;">
+ <!-- NOTIFICATION VIEW -->
+ <div class="frame01TopSpace">
+ </div>
+ <div class="frame01Middle" style="height:495px;">
+ </div>
+ <div class="frame01Bottom"></div>
+ </div>
+ </body>
+</html>
+</xsl:template>
+</xsl:stylesheet>
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/index.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/index.xsl 2009-07-03 18:46:14 UTC (rev 5049)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/index.xsl 2009-07-05 10:54:28 UTC (rev 5050)
@@ -37,17 +37,17 @@
else if (menu == "attitunes")
{
menuCenter2.className = "menuCenterActivate";
- frameUrl = "/wi_user_01/attitunes?";
+ frameUrl = "/wi_user_01/attitunes?uuid=NULL";
}
else if (menu == "tools")
{
menuCenter3.className = "menuCenterActivate";
- frameUrl = "/wi_user_01/tools?";
+ frameUrl = "/wi_user_01/tools?uuid=NULL";
}
else if (menu == "online")
{
menuRight.className = "menuRightActivate";
- frameUrl = "/wi_user_01/online?";
+ frameUrl = "/wi_user_01/online?uuid=NULL";
}
else
{
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/online.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/online.xsl (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/online.xsl 2009-07-05 10:54:28 UTC (rev 5050)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<xsl:include href="plugin_gadget_common.xsl"/>
+
+<xsl:template match="/">
+<html>
+ <head>
+ <link href="/data/web_interface/user_01/css/online.css" rel="stylesheet" type="text/css"/>
+ <!-- CSS HACKS FOR BROWSERS -->
+ <xsl:choose>
+ <!-- IE -->
+ <xsl:when test="system-property('xsl:vendor') = 'Microsoft'">
+ <!-- IE <= 7 -->
+ <xsl:comment><![CDATA[[if lte IE 7]>
+ <link href="/data/web_interface/user_01/css/popup-ie6.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window-ie6.css" rel="stylesheet" type="text/css"/>
+ <![endif]]]></xsl:comment>
+ <!-- IE >= 8 -->
+ <xsl:comment><![CDATA[[if gte IE 8]>
+ <link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window.css" rel="stylesheet" type="text/css"/>
+ <![endif]]]></xsl:comment>
+ </xsl:when>
+ <!-- FIREFOX ETC... -->
+ <xsl:otherwise>
+ <link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window.css" rel="stylesheet" type="text/css"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <script src="/data/web_interface/user_01/js/hashtable.js" type="text/javascript"/>
+ <script src="/data/web_interface/user_01/js/common.js" type="text/javascript"/>
+ <script type="text/javascript" src="/data/web_interface/user_01/js/prototype.js"></script>
+ <script type="text/javascript" src="/data/web_interface/user_01/js/lightbox.js"></script>
+ <script language="javascript">
+ <![CDATA[
+ function initialization()
+ {
+ }
+ ]]>
+ </script>
+ </head>
+
+ <body bgcolor="#EFEFEF" onLoad="initialization();">
+ <!-- SKIN STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">skin</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/skin"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- LANGUAGE STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">language</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/language"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- SOME TRANSLATIONS FOR JS -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">translationStart</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/translations/start"/>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">translationStop</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/translations/stop"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- MAIN DIV FRAME -->
+ <div style="position:absolute;
+ left:0px;
+ top:0px;">
+ <!-- NOTIFICATION VIEW -->
+ <div class="frame01TopSpace">
+ </div>
+ <div class="frame01Middle" style="height:495px;">
+ </div>
+ <div class="frame01Bottom"></div>
+ </div>
+ </body>
+</html>
+</xsl:template>
+</xsl:stylesheet>
Added: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl (rev 0)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/tools.xsl 2009-07-05 10:54:28 UTC (rev 5050)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+<xsl:include href="plugin_gadget_common.xsl"/>
+
+<xsl:template match="/">
+<html>
+ <head>
+ <link href="/data/web_interface/user_01/css/tools.css" rel="stylesheet" type="text/css"/>
+ <!-- CSS HACKS FOR BROWSERS -->
+ <xsl:choose>
+ <!-- IE -->
+ <xsl:when test="system-property('xsl:vendor') = 'Microsoft'">
+ <!-- IE <= 7 -->
+ <xsl:comment><![CDATA[[if lte IE 7]>
+ <link href="/data/web_interface/user_01/css/popup-ie6.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window-ie6.css" rel="stylesheet" type="text/css"/>
+ <![endif]]]></xsl:comment>
+ <!-- IE >= 8 -->
+ <xsl:comment><![CDATA[[if gte IE 8]>
+ <link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window.css" rel="stylesheet" type="text/css"/>
+ <![endif]]]></xsl:comment>
+ </xsl:when>
+ <!-- FIREFOX ETC... -->
+ <xsl:otherwise>
+ <link href="/data/web_interface/user_01/css/popup.css" rel="stylesheet" type="text/css"/>
+ <link href="/data/web_interface/user_01/css/window.css" rel="stylesheet" type="text/css"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <script src="/data/web_interface/user_01/js/hashtable.js" type="text/javascript"/>
+ <script src="/data/web_interface/user_01/js/common.js" type="text/javascript"/>
+ <script type="text/javascript" src="/data/web_interface/user_01/js/prototype.js"></script>
+ <script type="text/javascript" src="/data/web_interface/user_01/js/lightbox.js"></script>
+ <script language="javascript">
+ <![CDATA[
+ function initialization()
+ {
+ }
+ ]]>
+ </script>
+ </head>
+
+ <body bgcolor="#EFEFEF" onLoad="initialization();">
+ <!-- SKIN STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">skin</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/skin"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- LANGUAGE STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">language</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/language"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- SOME TRANSLATIONS FOR JS -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">translationStart</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/translations/start"/>
+ </xsl:attribute>
+ </xsl:element>
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">translationStop</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="root/translations/stop"/>
+ </xsl:attribute>
+ </xsl:element>
+ <!-- MAIN DIV FRAME -->
+ <div style="position:absolute;
+ left:0px;
+ top:0px;">
+ <!-- NOTIFICATION VIEW -->
+ <div class="frame01TopSpace">
+ </div>
+ <div class="frame01Middle" style="height:495px;">
+ </div>
+ <div class="frame01Bottom"></div>
+ </div>
+ </body>
+</html>
+</xsl:template>
+</xsl:stylesheet>
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-07-03 18:46:14 UTC (rev 5049)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/07_web_interfaces/01_resourceWIUser01.py 2009-07-05 10:54:28 UTC (rev 5050)
@@ -72,6 +72,20 @@
result['soundState'] = soundState
return result
+ def startTuxController(self):
+ resourcePluginsServer.startPlugin(
+ "548f7a77-567d-773e-a0ef-321fe63a1c88",
+ "run",
+ {})
+
+ def startAttitunesStudio(self, path):
+ resourcePluginsServer.startPlugin(
+ "548f7a9a-567d-773e-a0dd-102fe68a1b49",
+ "run",
+ {
+ 'path' : path,
+ })
+
# Create an instance of the resource
resourceWIUser01 = TDSResourceWIUser01("resourceWIUser01")
# Register the resource into the resources manager
@@ -181,6 +195,102 @@
resourceWIUser01.addService(TDSServiceWIUser01Gadgets)
# ------------------------------------------------------------------------------
+# Declaration of the service "attitunes".
+# ------------------------------------------------------------------------------
+class TDSServiceWIUser01Attitunes(TDSService):
+
+ def configure(self):
+ self.parametersDict = {
+ 'language' : 'string',
+ 'skin' : 'string',
+ }
+ self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
+ self.exclusiveExecution = False
+ self.name = "attitunes"
+ self.comment = "Show the attitunes page."
+
+ def execute(self, id, parameters):
+ headersStruct = self.getDefaultHeadersStruct()
+ contentStruct = self.getDefaultContentStruct()
+ contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
+ language = parameters['language']
+ skin = parameters['skin']
+ contentStruct['root']['data'] = {}
+ contentStruct['root']['translations'] = resourceWIUser01.translations.getTranslations(language)
+ contentStruct['root']['skin'] = skin
+ contentStruct['root']['language'] = language
+ self.haveXsl = True
+ self.xslPath = "/data/web_interface/%s/xsl/attitunes.xsl" % skin
+ return headersStruct, contentStruct
+
+# Register the service into the resource
+resourceWIUser01.addService(TDSServiceWIUser01Attitunes)
+
+# ------------------------------------------------------------------------------
+# Declaration of the service "tools".
+# ------------------------------------------------------------------------------
+class TDSServiceWIUser01Tools(TDSService):
+
+ def configure(self):
+ self.parametersDict = {
+ 'language' : 'string',
+ 'skin' : 'string',
+ }
+ self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
+ self.exclusiveExecution = False
+ self.name = "tools"
+ self.comment = "Show the tools page."
+
+ def execute(self, id, parameters):
+ headersStruct = self.getDefaultHeadersStruct()
+ contentStruct = self.getDefaultContentStruct()
+ contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
+ language = parameters['language']
+ skin = parameters['skin']
+ contentStruct['root']['data'] = {}
+ contentStruct['root']['translations'] = resourceWIUser01.translations.getTranslations(language)
+ contentStruct['root']['skin'] = skin
+ contentStruct['root']['language'] = language
+ self.haveXsl = True
+ self.xslPath = "/data/web_interface/%s/xsl/tools.xsl" % skin
+ return headersStruct, contentStruct
+
+# Register the service into the resource
+resourceWIUser01.addService(TDSServiceWIUser01Tools)
+
+# ------------------------------------------------------------------------------
+# Declaration of the service "online".
+# ------------------------------------------------------------------------------
+class TDSServiceWIUser01Online(TDSService):
+
+ def configure(self):
+ self.parametersDict = {
+ 'language' : 'string',
+ 'skin' : 'string',
+ }
+ self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
+ self.exclusiveExecution = False
+ self.name = "online"
+ self.comment = "Show the online page."
+
+ def execute(self, id, parameters):
+ headersStruct = self.getDefaultHeadersStruct()
+ contentStruct = self.getDefaultContentStruct()
+ contentStruct['root']['result'] = getStrError(E_TDREST_SUCCESS)
+ language = parameters['language']
+ skin = parameters['skin']
+ contentStruct['root']['data'] = {}
+ contentStruct['root']['translations'] = resourceWIUser01.translations.getTranslations(language)
+ contentStruct['root']['skin'] = skin
+ contentStruct['root']['language'] = language
+ self.haveXsl = True
+ self.xslPath = "/data/web_interface/%s/xsl/online.xsl" % skin
+ return headersStruct, contentStruct
+
+# Register the service into the resource
+resourceWIUser01.addService(TDSServiceWIUser01Online)
+
+# ------------------------------------------------------------------------------
# Declaration of the service "get_states".
# ------------------------------------------------------------------------------
class TDSServiceWIUser01GetStates(TDSService):
|
|
From: remi <c2m...@c2...> - 2009-07-04 00:17:58
|
Author: remi
Date: 2009-07-01 12:06:24 +0200 (Wed, 01 Jul 2009)
New Revision: 4959
Modified:
software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/alert.xsl
Log:
* fixed a xsl template name
Modified: software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/alert.xsl
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/alert.xsl 2009-07-01 10:03:54 UTC (rev 4958)
+++ software_suite_v3/smart-core/smart-server/trunk/data/web_interface/user_01/xsl/alert.xsl 2009-07-01 10:06:24 UTC (rev 4959)
@@ -109,7 +109,7 @@
</xsl:template>
<!-- FREQUENCY (CRAZY/OFTEN/NORMAL/RARELY) SELECTER -->
- <xsl:template name="quartersSelecter">
+ <xsl:template name="frequencySelecter">
<xsl:param name="time"/>
<xsl:element name="select">
<xsl:attribute name="class">select</xsl:attribute>
|
|
From: remi <c2m...@c2...> - 2009-07-03 18:46:28
|
Author: remi Date: 2009-07-03 20:46:14 +0200 (Fri, 03 Jul 2009) New Revision: 5049 Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/pom.xml Log: * Use the java API 0.3.0 instead of the 0.0.3 Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/pom.xml =================================================================== --- software_suite_v3/software/tool/tool-attitunes-studio/trunk/pom.xml 2009-07-03 18:44:56 UTC (rev 5048) +++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/pom.xml 2009-07-03 18:46:14 UTC (rev 5049) @@ -23,7 +23,7 @@ <dependency> <groupId>com.tuxisalive</groupId> <artifactId>tuxdroid-java-api</artifactId> - <version>0.0.3</version> + <version>0.3.0</version> </dependency> <dependency> <groupId>com.l2fprod</groupId> |
|
From: remi <c2m...@c2...> - 2009-07-03 18:45:11
|
Author: remi
Date: 2009-07-03 20:44:56 +0200 (Fri, 03 Jul 2009)
New Revision: 5048
Modified:
software_suite_v3/software/tool/tool-tux-controller/trunk/pom.xml
software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/control/controlTux.java
Log:
* Syndicate to "light" and "battery" statuses
Modified: software_suite_v3/software/tool/tool-tux-controller/trunk/pom.xml
===================================================================
--- software_suite_v3/software/tool/tool-tux-controller/trunk/pom.xml 2009-07-03 18:43:48 UTC (rev 5047)
+++ software_suite_v3/software/tool/tool-tux-controller/trunk/pom.xml 2009-07-03 18:44:56 UTC (rev 5048)
@@ -32,7 +32,7 @@
<dependency>
<groupId>com.tuxisalive</groupId>
<artifactId>tuxdroid-java-api</artifactId>
- <version>0.0.3</version>
+ <version>0.3.0</version>
</dependency>
<dependency>
<groupId>com.l2fprod</groupId>
Modified: software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/control/controlTux.java
===================================================================
--- software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/control/controlTux.java 2009-07-03 18:43:48 UTC (rev 5047)
+++ software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/control/controlTux.java 2009-07-03 18:44:56 UTC (rev 5048)
@@ -95,8 +95,10 @@
"onSpinRightEvent", "True", null);
tux.event.handler.register(TuxAPIConst.ST_NAME_SPIN_LEFT_MOTOR_ON, this,
"onSpinLeftEvent", "True", null);
+ tux.status.syndicate("light_level");
tux.event.handler.register("light_level", this,
"onLightLevelEvent");
+ tux.status.syndicate("battery_level");
tux.event.handler.register("battery_level", this,
"onBatteryLevelEvent");
tux.tts.registerEventOnVoiceList(this,
|
|
From: remi <c2m...@c2...> - 2009-07-03 18:43:49
|
Author: remi Date: 2009-07-03 20:43:48 +0200 (Fri, 03 Jul 2009) New Revision: 5047 Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/tuxdroid-java-api-0.3.0.jar Log: * Updated tux java API with status syndication (for light and battery levels) Modified: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/tuxdroid-java-api-0.3.0.jar =================================================================== (Binary files differ) |
|
From: remi <c2m...@c2...> - 2009-07-03 18:08:29
|
Author: remi Date: 2009-07-03 20:08:23 +0200 (Fri, 03 Jul 2009) New Revision: 5046 Added: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/tuxdroid-java-api-0.3.0.jar Removed: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/tuxdroid-java-api-0.0.3.jar Log: * Updated tux java api to 0.3.0 Deleted: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/tuxdroid-java-api-0.0.3.jar =================================================================== (Binary files differ) Added: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/tuxdroid-java-api-0.3.0.jar =================================================================== (Binary files differ) Property changes on: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/tuxdroid-java-api-0.3.0.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
|
From: remi <c2m...@c2...> - 2009-07-03 17:51:37
|
Author: remi
Date: 2009-07-03 19:51:30 +0200 (Fri, 03 Jul 2009)
New Revision: 5045
Added:
software_suite_v3/software/tool/tool-tux-controller/trunk/resources/
software_suite_v3/software/tool/tool-tux-controller/trunk/resources/help.wiki
software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.png
software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.pot
software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.xml
Modified:
software_suite_v3/software/tool/tool-tux-controller/trunk/pom.xml
software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/mainWindow.java
software_suite_v3/software/tool/tool-tux-controller/trunk/src/i18n/bundle.java
software_suite_v3/software/tool/tool-tux-controller/trunk/src/tuxController/main.java
Log:
* Tux Controller is now embedded into a plugin.
* TODO : Adaptations according to the tux API V3.
Modified: software_suite_v3/software/tool/tool-tux-controller/trunk/pom.xml
===================================================================
--- software_suite_v3/software/tool/tool-tux-controller/trunk/pom.xml 2009-07-03 17:23:19 UTC (rev 5044)
+++ software_suite_v3/software/tool/tool-tux-controller/trunk/pom.xml 2009-07-03 17:51:30 UTC (rev 5045)
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.kysoh</groupId>
- <artifactId>tux_controller</artifactId>
+ <artifactId>tool-tux-controller</artifactId>
<packaging>jar</packaging>
<version>0.0.2</version>
<name>Tux Controller</name>
@@ -32,7 +32,7 @@
<dependency>
<groupId>com.tuxisalive</groupId>
<artifactId>tuxdroid-java-api</artifactId>
- <version>0.0.2</version>
+ <version>0.0.3</version>
</dependency>
<dependency>
<groupId>com.l2fprod</groupId>
@@ -40,8 +40,8 @@
<version>6.7</version>
</dependency>
<dependency>
- <groupId>com.tuxdroid</groupId>
- <artifactId>tuxdroid-installer-paths</artifactId>
+ <groupId>com.kysoh</groupId>
+ <artifactId>smart-core-paths</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
@@ -63,6 +63,7 @@
</resources>
<sourceDirectory>src</sourceDirectory>
<plugins>
+ <!--This section copy the dependencies into ./libraries-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -74,28 +75,60 @@
<goal>copy-dependencies</goal>
</goals>
<configuration>
- <outputDirectory>${project.build.directory}/</outputDirectory>
+ <outputDirectory>./libraries</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
+ <!--This plugin run small ant scripts to pack and clean the plugin-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <!--Set the manifest : mainclass and classpath-->
- <manifest>
- <mainClass>tuxController.main</mainClass>
- <packageName>tuxController</packageName>
- </manifest>
- <manifestEntries>
- <Class-Path>./tuxdroid-api.jar ./skinlf.jar ./tuxdroid-installer-paths.jar</Class-Path>
- </manifestEntries>
- </archive>
- </configuration>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+
+ <!--This section create the .scp file during the package lifecycle-->
+ <execution>
+ <phase>package</phase>
+ <id>package</id>
+ <configuration>
+ <tasks>
+ <mkdir dir="./libraries"/>
+ <copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
+ todir="./libraries" />
+ <zip destfile="./${project.artifactId}.scp">
+ <zipfileset dir="." includes="resources/*" />
+ <zipfileset dir="." includes="libraries/*" >
+ <exclude name="libraries/tuxdroid-java-api*" />
+ <exclude name="libraries/smart-core-paths*" />
+ </zipfileset>
+ <zipfileset dir="." includes="executables/*" />
+ </zip>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <!--This section clean the ./libraries and the SCP file during the 'clean' lifecycle-->
+ <execution>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <delete dir="./libraries"/>
+ <delete file="./${project.artifactId}.scp"></delete>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
+
+ <!--This plugin compile the project-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Added: software_suite_v3/software/tool/tool-tux-controller/trunk/resources/help.wiki
===================================================================
--- software_suite_v3/software/tool/tool-tux-controller/trunk/resources/help.wiki (rev 0)
+++ software_suite_v3/software/tool/tool-tux-controller/trunk/resources/help.wiki 2009-07-03 17:51:30 UTC (rev 5045)
@@ -0,0 +1,2 @@
+= Synopsis =
+Tux Droid Controller tool.
Added: software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.pot
===================================================================
--- software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.pot (rev 0)
+++ software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.pot 2009-07-03 17:51:30 UTC (rev 5045)
@@ -0,0 +1,8 @@
+msgid "Tux Droid Controller"
+msgstr ""
+
+msgid "Tux Droid Controller tool"
+msgstr ""
+
+msgid "Start the tool"
+msgstr ""
Added: software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.xml
===================================================================
--- software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.xml (rev 0)
+++ software_suite_v3/software/tool/tool-tux-controller/trunk/resources/plugin.xml 2009-07-03 17:51:30 UTC (rev 5045)
@@ -0,0 +1,23 @@
+<plugin>
+ <interpreter
+ kind="java">
+ <executable>tuxController.main</executable>
+ </interpreter>
+ <description>
+ <name>Tux Droid Controller</name>
+ <ttsName>Tux Droid Controller.</ttsName>
+ <description>Tux Droid Controller tool</description>
+ <author>Paul Rathgeb</author>
+ <version>0.0.2</version>
+ <iconFile>resources/plugin.png</iconFile>
+ <uuid>548f7a77-567d-773e-a0ef-321fe63a1c88</uuid>
+ <platform>all</platform>
+ </description>
+ <parameters/>
+ <commands>
+ <command
+ name="run"
+ description="Start the tool" />
+ </commands>
+ <tasks/>
+</plugin>
Modified: software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/mainWindow.java
===================================================================
--- software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/mainWindow.java 2009-07-03 17:23:19 UTC (rev 5044)
+++ software_suite_v3/software/tool/tool-tux-controller/trunk/src/GUI/mainWindow.java 2009-07-03 17:51:30 UTC (rev 5045)
@@ -73,6 +73,9 @@
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
setVisible(true);
+ /* Force the frame to be on the top in the os */
+ setAlwaysOnTop(true);
+ setAlwaysOnTop(false);
}
});
control = new controlTux(this);
Modified: software_suite_v3/software/tool/tool-tux-controller/trunk/src/i18n/bundle.java
===================================================================
--- software_suite_v3/software/tool/tool-tux-controller/trunk/src/i18n/bundle.java 2009-07-03 17:23:19 UTC (rev 5044)
+++ software_suite_v3/software/tool/tool-tux-controller/trunk/src/i18n/bundle.java 2009-07-03 17:51:30 UTC (rev 5045)
@@ -30,7 +30,7 @@
private static final ResourceBundle RESOURCE_BUNDLE;
- private static final String ccLang = System.getProperty("CC_SET_LANGUAGE");
+ private static final String ccLang = System.getenv("tgp_language");
static
{
Modified: software_suite_v3/software/tool/tool-tux-controller/trunk/src/tuxController/main.java
===================================================================
--- software_suite_v3/software/tool/tool-tux-controller/trunk/src/tuxController/main.java 2009-07-03 17:23:19 UTC (rev 5044)
+++ software_suite_v3/software/tool/tool-tux-controller/trunk/src/tuxController/main.java 2009-07-03 17:51:30 UTC (rev 5045)
@@ -26,7 +26,7 @@
import GUI.mainWindow;
import com.l2fprod.gui.plaf.skin.SkinLookAndFeel;
import com.l2fprod.util.OS;
-import com.tuxdroid.path.InstallerPaths;
+import com.kysoh.SmartCorePaths;
import javax.swing.JDialog;
import javax.swing.JFrame;
@@ -67,7 +67,7 @@
{
SkinLookAndFeel.setSkin(
SkinLookAndFeel.loadThemePack(
- InstallerPaths.tuxSkinlfThempack.getAbsolutePath()));
+ SmartCorePaths.tuxSkinlfThempack.getAbsolutePath()));
UIManager.setLookAndFeel(new SkinLookAndFeel());
if (OS.isOneDotFourOrMore())
@@ -97,7 +97,7 @@
{
SkinLookAndFeel.setSkin(
SkinLookAndFeel.loadThemePack(
- InstallerPaths.tuxSkinlfThempack.getAbsolutePath()));
+ SmartCorePaths.tuxSkinlfThempack.getAbsolutePath()));
UIManager.setLookAndFeel(new SkinLookAndFeel());
}
catch (Exception e) {}
|
|
From: remi <c2m...@c2...> - 2009-07-03 17:23:25
|
Author: remi Date: 2009-07-03 19:23:19 +0200 (Fri, 03 Jul 2009) New Revision: 5044 Added: software_suite_v3/software/tool/tool-tux-controller/trunk/ Log: * Prepare to embedding "Tux Controller" into a plugin. Copied: software_suite_v3/software/tool/tool-tux-controller/trunk (from rev 3853, software_suite_v2/software/tools/tuxController/trunk) |
|
From: remi <c2m...@c2...> - 2009-07-03 17:21:17
|
Author: remi Date: 2009-07-03 19:21:11 +0200 (Fri, 03 Jul 2009) New Revision: 5043 Added: software_suite_v3/software/tool/tool-tux-controller/ software_suite_v3/software/tool/tool-tux-controller/branches/ software_suite_v3/software/tool/tool-tux-controller/tags/ Log: * Added tool directory for Tux Controller. * Tux Controller will be embedded into a plugin. |
|
From: remi <c2m...@c2...> - 2009-07-03 17:20:14
|
Author: remi Date: 2009-07-03 19:20:09 +0200 (Fri, 03 Jul 2009) New Revision: 5042 Added: software_suite_v3/software/tool/tool-attitunes-studio/branches/ software_suite_v3/software/tool/tool-attitunes-studio/tags/ Log: * added "branches" and "tags" directories |
|
From: remi <c2m...@c2...> - 2009-07-03 17:03:52
|
Author: remi
Date: 2009-07-03 19:03:43 +0200 (Fri, 03 Jul 2009)
New Revision: 5041
Modified:
software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/MainFrame.java
Log:
* Force the frame to be on the top. (The only way to force the application to be on front of webbrowsers ...)
Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/MainFrame.java
===================================================================
--- software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/MainFrame.java 2009-07-03 16:10:05 UTC (rev 5040)
+++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/MainFrame.java 2009-07-03 17:03:43 UTC (rev 5041)
@@ -107,7 +107,11 @@
this.setResizable(false);
//this.pack();
TuxAPIMisc.sleep(0.15);
- this.setVisible(true);
+ this.setVisible(true);
+ /* Force the frame to be on the top in the os */
+ this.setAlwaysOnTop(true);
+ TuxAPIMisc.sleep(0.05);
+ this.setAlwaysOnTop(false);
if (path == null)
{
|
|
From: remi <c2m...@c2...> - 2009-07-03 16:10:19
|
Author: remi Date: 2009-07-03 18:10:05 +0200 (Fri, 03 Jul 2009) New Revision: 5040 Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/messages_en.properties software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/messages_nl.properties Log: * Fixed application title string for "en" and "nl" (right white space was missing) Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/messages_en.properties =================================================================== --- software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/messages_en.properties 2009-07-03 16:08:05 UTC (rev 5039) +++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/messages_en.properties 2009-07-03 16:10:05 UTC (rev 5040) @@ -5,7 +5,7 @@ MainFrame.59=Paste MainFrame.62=Play MainFrame.65=Stop -MainFrame.0=Attitunes studio - +MainFrame.0=Attitunes studio - MainFrame.97=Save changes before continuing ? MainFrame.72=Attitune was modified MainFrame.77=Attitune is loaded Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/messages_nl.properties =================================================================== --- software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/messages_nl.properties 2009-07-03 16:08:05 UTC (rev 5039) +++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/messages_nl.properties 2009-07-03 16:10:05 UTC (rev 5040) @@ -5,7 +5,7 @@ MainFrame.59=Plakken MainFrame.62=Starten MainFrame.65=Stoppen -MainFrame.0=Attitunes studio - +MainFrame.0=Attitunes studio - MainFrame.97=Wil je de wijzigingen opslaan? MainFrame.72=De attitune is gewijzigd MainFrame.77=De attitune is geladen |
|
From: remi <c2m...@c2...> - 2009-07-03 16:08:11
|
Author: remi
Date: 2009-07-03 18:08:05 +0200 (Fri, 03 Jul 2009)
New Revision: 5039
Modified:
software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/MainFrame.java
Log:
* Get the attitune path from the plugin parameter.
Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/MainFrame.java
===================================================================
--- software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/MainFrame.java 2009-07-03 15:55:15 UTC (rev 5038)
+++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/MainFrame.java 2009-07-03 16:08:05 UTC (rev 5039)
@@ -31,6 +31,7 @@
import java.awt.*;
import java.util.Hashtable;
import java.util.List;
+import java.io.File;
import javax.swing.*;
import javax.swing.border.BevelBorder;
@@ -107,6 +108,19 @@
//this.pack();
TuxAPIMisc.sleep(0.15);
this.setVisible(true);
+
+ if (path == null)
+ {
+ path = System.getenv("tgp_path");
+ if (path != null)
+ {
+ File pathFile = new File(path);
+ if (!pathFile.exists())
+ {
+ path = null;
+ }
+ }
+ }
if (path == null)
{
|
|
From: remi <c2m...@c2...> - 2009-07-03 15:55:16
|
Author: remi
Date: 2009-07-03 17:55:15 +0200 (Fri, 03 Jul 2009)
New Revision: 5038
Modified:
software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/ATTMessages.java
Log:
* Retrieve the language parameter to set the correct GUI language
Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/ATTMessages.java
===================================================================
--- software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/ATTMessages.java 2009-07-03 15:36:46 UTC (rev 5037)
+++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/src/com/tuxisalive/attitunes/ATTMessages.java 2009-07-03 15:55:15 UTC (rev 5038)
@@ -30,7 +30,7 @@
{
private static final String BUNDLE_NAME = "com.tuxisalive.attitunes.messages"; //$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE;
- private static final String ccLang = System.getProperty("CC_SET_LANGUAGE");
+ private static final String ccLang = System.getenv("tgp_language");
static
{
|
|
From: remi <c2m...@c2...> - 2009-07-03 15:37:00
|
Author: remi
Date: 2009-07-03 17:36:46 +0200 (Fri, 03 Jul 2009)
New Revision: 5037
Added:
software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/
software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/help.wiki
software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.png
software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.pot
software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.xml
Modified:
software_suite_v3/software/tool/tool-attitunes-studio/trunk/pom.xml
Log:
* Updated pom.xml in order to compile Attitunes studio as scp file.
* Added plugin resources
Modified: software_suite_v3/software/tool/tool-attitunes-studio/trunk/pom.xml
===================================================================
--- software_suite_v3/software/tool/tool-attitunes-studio/trunk/pom.xml 2009-07-03 15:26:39 UTC (rev 5036)
+++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/pom.xml 2009-07-03 15:36:46 UTC (rev 5037)
@@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.kysoh</groupId>
- <artifactId>attitunes_studio</artifactId>
+ <artifactId>tool-attitunes-studio</artifactId>
<packaging>jar</packaging>
<version>0.0.2</version>
<name>Attitunes Studio</name>
@@ -52,34 +52,84 @@
<excludes>
<exclude>**/*.java</exclude>
</excludes>
-
</resource>
</resources>
<sourceDirectory>src</sourceDirectory>
<plugins>
+ <!--This section copy the dependencies into ./libraries-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <!--Set the manifest : mainclass and classpath-->
- <manifest>
- <mainClass>main</mainClass>
- </manifest>
- <manifestEntries>
- <Class-Path>./tuxdroid-java-api-0.0.3.jar ./skinlf-6.7.jar ./smart-core-paths-0.0.1.jar</Class-Path>
- </manifestEntries>
- </archive>
- </configuration>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>./libraries</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
+
+ <!--This plugin run small ant scripts to pack and clean the plugin-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+
+ <!--This section create the .scp file during the package lifecycle-->
+ <execution>
+ <phase>package</phase>
+ <id>package</id>
+ <configuration>
+ <tasks>
+ <mkdir dir="./libraries"/>
+ <copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
+ todir="./libraries" />
+ <zip destfile="./${project.artifactId}.scp">
+ <zipfileset dir="." includes="resources/*" />
+ <zipfileset dir="." includes="libraries/*" >
+ <exclude name="libraries/tuxdroid-java-api*" />
+ <exclude name="libraries/smart-core-paths*" />
+ </zipfileset>
+ <zipfileset dir="." includes="executables/*" />
+ </zip>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+
+ <!--This section clean the ./libraries and the SCP file during the 'clean' lifecycle-->
+ <execution>
+ <phase>clean</phase>
+ <configuration>
+ <tasks>
+ <delete dir="./libraries"/>
+ <delete file="./${project.artifactId}.scp"></delete>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!--This plugin compile the project-->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
- </plugins>
+ </plugins>
</build>
</project>
Added: software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/help.wiki
===================================================================
--- software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/help.wiki (rev 0)
+++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/help.wiki 2009-07-03 15:36:46 UTC (rev 5037)
@@ -0,0 +1,2 @@
+= Synopsis =
+Attitunes studio launcher.
Added: software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.png
===================================================================
(Binary files differ)
Property changes on: software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.pot
===================================================================
--- software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.pot (rev 0)
+++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.pot 2009-07-03 15:36:46 UTC (rev 5037)
@@ -0,0 +1,11 @@
+msgid "Attitunes Studio"
+msgstr ""
+
+msgid "Attitunes studio launcher"
+msgstr ""
+
+msgid "Path of the attitune to edit"
+msgstr ""
+
+msgid "Start the tool"
+msgstr ""
Added: software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.xml
===================================================================
--- software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.xml (rev 0)
+++ software_suite_v3/software/tool/tool-attitunes-studio/trunk/resources/plugin.xml 2009-07-03 15:36:46 UTC (rev 5037)
@@ -0,0 +1,29 @@
+<plugin>
+ <interpreter
+ kind="java">
+ <executable>main</executable>
+ </interpreter>
+ <description>
+ <name>Attitunes Studio</name>
+ <ttsName>Attitunes Studio.</ttsName>
+ <description>Attitunes studio launcher</description>
+ <author>Rémi Jocaille</author>
+ <version>0.0.2</version>
+ <iconFile>resources/plugin.png</iconFile>
+ <uuid>548f7a9a-567d-773e-a0dd-102fe68a1b49</uuid>
+ <platform>all</platform>
+ </description>
+ <parameters>
+ <parameter
+ name="path"
+ description="Path of the attitune to edit"
+ type="string"
+ defaultValue="template.att" />
+ </parameters>
+ <commands>
+ <command
+ name="run"
+ description="Start the tool" />
+ </commands>
+ <tasks/>
+</plugin>
|
|
From: remi <c2m...@c2...> - 2009-07-03 15:26:52
|
Author: remi Date: 2009-07-03 17:26:39 +0200 (Fri, 03 Jul 2009) New Revision: 5036 Added: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/smart-core-paths-0.0.1.jar Log: * Added "smart-core-paths" java library in the common plugin libraries Added: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/smart-core-paths-0.0.1.jar =================================================================== (Binary files differ) Property changes on: software_suite_v3/smart-core/smart-server/trunk/util/applicationserver/plugin/interpreters/javacommonjar/smart-core-paths-0.0.1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
|
From: remi <c2m...@c2...> - 2009-07-03 15:06:02
|
Author: remi Date: 2009-07-03 17:05:56 +0200 (Fri, 03 Jul 2009) New Revision: 5035 Added: software_suite_v3/software/tool/tool-attitunes-studio/trunk/ Log: * Prepare to embedding Attitunes studio into a plugin format. Copied: software_suite_v3/software/tool/tool-attitunes-studio/trunk (from rev 5034, software_suite_v2/software/tools/attitunesStudio/trunk) |
|
From: remi <c2m...@c2...> - 2009-07-03 15:05:18
|
Author: remi Date: 2009-07-03 17:05:06 +0200 (Fri, 03 Jul 2009) New Revision: 5034 Added: software_suite_v3/software/tool/tool-attitunes-studio/ Log: * Added tool directory for Attitunes studio. * Attitunes studio will be embedded into a plugin. |
|
From: remi <c2m...@c2...> - 2009-07-03 14:36:21
|
Author: remi
Date: 2009-07-03 16:03:43 +0200 (Fri, 03 Jul 2009)
New Revision: 5032
Removed:
software_suite_v2/software/tools/attitunesStudio/trunk/.classpath
software_suite_v2/software/tools/attitunesStudio/trunk/.project
software_suite_v2/software/tools/attitunesStudio/trunk/.settings/
Modified:
software_suite_v2/software/tools/attitunesStudio/trunk/pom.xml
Log:
* Updated pom.xml
* Remove useless files and directories
Deleted: software_suite_v2/software/tools/attitunesStudio/trunk/.classpath
===================================================================
--- software_suite_v2/software/tools/attitunesStudio/trunk/.classpath 2009-07-03 13:56:19 UTC (rev 5031)
+++ software_suite_v2/software/tools/attitunesStudio/trunk/.classpath 2009-07-03 14:03:43 UTC (rev 5032)
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry including="*.PNG|*.att|*.png" kind="src" path="images"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="/home/paul/MyTux/MyTuxTools/attitunes_studio/tuxdroid-api.jar"/>
- <classpathentry kind="lib" path="/home/paul/MyTux/MyTuxTools/attitunes_studio/skinlf.jar"/>
- <classpathentry kind="lib" path="/home/paul/MyTux/MyTuxTools/attitunes_studio/tuxdroid-installer-paths.jar"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
Deleted: software_suite_v2/software/tools/attitunesStudio/trunk/.project
===================================================================
--- software_suite_v2/software/tools/attitunesStudio/trunk/.project 2009-07-03 13:56:19 UTC (rev 5031)
+++ software_suite_v2/software/tools/attitunesStudio/trunk/.project 2009-07-03 14:03:43 UTC (rev 5032)
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>attitunes_studio</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
Modified: software_suite_v2/software/tools/attitunesStudio/trunk/pom.xml
===================================================================
--- software_suite_v2/software/tools/attitunesStudio/trunk/pom.xml 2009-07-03 13:56:19 UTC (rev 5031)
+++ software_suite_v2/software/tools/attitunesStudio/trunk/pom.xml 2009-07-03 14:03:43 UTC (rev 5032)
@@ -23,7 +23,7 @@
<dependency>
<groupId>com.tuxisalive</groupId>
<artifactId>tuxdroid-java-api</artifactId>
- <version>0.0.2</version>
+ <version>0.0.3</version>
</dependency>
<dependency>
<groupId>com.l2fprod</groupId>
@@ -31,8 +31,8 @@
<version>6.7</version>
</dependency>
<dependency>
- <groupId>com.tuxdroid</groupId>
- <artifactId>tuxdroid-installer-paths</artifactId>
+ <groupId>com.kysoh</groupId>
+ <artifactId>smart-core-paths</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
@@ -67,7 +67,7 @@
<mainClass>main</mainClass>
</manifest>
<manifestEntries>
- <Class-Path>./tuxdroid-api.jar ./skinlf.jar ./tuxdroid-installer-paths.jar</Class-Path>
+ <Class-Path>./tuxdroid-java-api-0.0.3.jar ./skinlf-6.7.jar ./smart-core-paths-0.0.1.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
|
|
From: remi <c2m...@c2...> - 2009-07-03 14:19:46
|
Author: remi Date: 2009-07-03 15:56:19 +0200 (Fri, 03 Jul 2009) New Revision: 5031 Added: software_suite_v3/smart-core/smart-lib/ software_suite_v3/smart-core/smart-lib/java/ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/branches/ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/tags/ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/LICENSE software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/pom.xml software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/kysoh/ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/kysoh/SmartCorePaths.java software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/kysoh/SmartCorePathsTest.java Log: * Refactored java library for installation paths according to the V3 (smart-core) arch. Added: software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/LICENSE =================================================================== --- software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/LICENSE (rev 0) +++ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/LICENSE 2009-07-03 13:56:19 UTC (rev 5031) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + 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. + + Preamble + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + 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. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 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". + +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. + + 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. + +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. + + 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: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + 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. + + 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.) + +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. + +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. + +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. + + 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: + + 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, + + 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, + + 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.) + +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. + +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. + + 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. + + 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. + + 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. + + 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. + +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. + +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. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 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. + + 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. + +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. + + 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. + + NO WARRANTY + + 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. + + 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. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. Added: software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/pom.xml =================================================================== --- software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/pom.xml (rev 0) +++ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/pom.xml 2009-07-03 13:56:19 UTC (rev 5031) @@ -0,0 +1,33 @@ +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>com.kysoh</groupId> + <artifactId>smart-core-paths</artifactId> + <packaging>jar</packaging> + <version>0.0.1</version> + <name>Smart-Core Paths Library</name> + <url>http://www.tuxisalive.com</url> + <dependencies/> + <build> + <sourceDirectory>src</sourceDirectory> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins + </groupId> + <artifactId>maven-compiler-plugin + </artifactId> + <configuration> + <source>1.6</source> + <target>1.6</target> + </configuration> + </plugin> + </plugins> + </build> + <distributionManagement> + <repository> + <id>kysoh</id> + <name>Kysoh internal Repository</name> + <!-- Replace the url with your local configuration --> + <url>file:///C:\Documents and Settings\User\.m2</url> + </repository> + </distributionManagement> +</project> Added: software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/kysoh/SmartCorePaths.java =================================================================== --- software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/kysoh/SmartCorePaths.java (rev 0) +++ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/kysoh/SmartCorePaths.java 2009-07-03 13:56:19 UTC (rev 5031) @@ -0,0 +1,307 @@ +/* This file is part of "Kysoh Smart-Core Paths". + * Copyright 2009, kysoh + * Authors : Kysoh, jerome conan + * eMail : jerome.conan AT kysohcom + Site : http://www.kysoh.com/ + * + * "Kysoh Smart-Core Paths" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "Kysoh Smart-Core Paths" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "Kysoh Smart-Core Paths"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package com.kysoh; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringWriter; + +/** + * Hello world! + * + */ +public class SmartCorePaths +{ + /* Contains OS name */ + private static String os; + + /* Contains the current installation prefix */ + private static String prefix; + + /* Public values that can be called by InstallerPaths.myNeededFile **/ + public static File directoryIcons; + public static File directoryResourcesMisc; + public static File tuxSkinlfThempack; + public static File tuxTemplateAtt; + public static File directoryDocs; + public static File directorySmartServer; + + + /** + * Class initialization. + */ + static + { + os = System.getProperty("os.name"); + + //OS is windows, then make use of registery keys. + if(SmartCorePaths.isWindows()) + { + SmartCorePaths.prefix = SmartCorePaths.getWindowsPrefix(); + + //Setting up directories and file. + SmartCorePaths.directoryIcons = new File(SmartCorePaths.getPrefix() + + File.separator + "resources" + File.separator + "images"); + + SmartCorePaths.directoryResourcesMisc = new File(SmartCorePaths.getPrefix() + + File.separator + "resources" + File.separator + "misc"); + + SmartCorePaths.tuxSkinlfThempack = new File(SmartCorePaths.getPrefix() + + File.separator + "resources" + File.separator + "misc" + File.separator + "tuxthemepack.zip"); + + SmartCorePaths.tuxTemplateAtt = new File(SmartCorePaths.getPrefix() + + File.separator + "resources" + File.separator + "templates" + File.separator + + "template.att"); + + SmartCorePaths.directoryDocs = new File(SmartCorePaths.getPrefix() + + File.separator + "docs"); + + SmartCorePaths.directorySmartServer = new File(SmartCorePaths.getPrefix() + + File.separator + "softwares" + File.separator + "smart-server"); + } + + else if(SmartCorePaths.isLinux()) + { + /* Try to retrieve the installation prefix */ + SmartCorePaths.prefix = SmartCorePaths.getLinuxPrefix(); + + /* If the prefix isn't null, create the complete paths */ + if (SmartCorePaths.prefix != null) + { + /* Server */ + SmartCorePaths.directorySmartServer = new File(SmartCorePaths.getPrefix() + + File.separator + "share" + File.separator +"tuxdroid" + + File.separator + "tuxhttpserver"); + + /* Icons */ + SmartCorePaths.directoryIcons = new File(SmartCorePaths.getPrefix() + + File.separator + "share" + File.separator + "pixmaps"); + + /* Resources misc */ + SmartCorePaths.directoryResourcesMisc = new File(SmartCorePaths.getPrefix() + + File.separator + "share" + File.separator +"tuxdroid" + + File.separator + "resources" + File.separator + "misc"); + + /* Themepack */ + SmartCorePaths.tuxSkinlfThempack = new File(SmartCorePaths.getPrefix() + + File.separator + "share" + File.separator +"tuxdroid" + + File.separator + "resources" + File.separator + "misc" + File.separator + "tuxthemepack.zip"); + + /* template.att */ + SmartCorePaths.tuxTemplateAtt = new File(SmartCorePaths.getPrefix() + + File.separator + "share" + File.separator +"tuxdroid" + + File.separator + "resources" + File.separator + "templates" + File.separator + + "template.att"); + + /* XXX This directory don't exists on Linux yet */ + SmartCorePaths.directoryDocs = new File(SmartCorePaths.getPrefix() + + File.separator + "share" + File.separator + "tuxdroid" + + File.separator + "resources" + File.separator + "docs"); + } + } + } + + //******************************************************************// + //********* SmartCorePaths class commons functions ***************// + + /** + * @return true if os is windows. + */ + public static boolean isWindows() + { + if((os.contains("Windows")) || os.contains("windows")) + { + return true; + } + return false; + } + + + /** + * @return true if os is linux. + */ + public static boolean isLinux() + { + if(os.contains("Linux") || os.contains("linux")) + { + return true; + } + return false; + } + + + /** + * Return the system OS name. + * @return + */ + public static String getOS() + { + return SmartCorePaths.os; + } + + + /** + * Return the tuxdroid installation paths prefix. + * @return + */ + public static String getPrefix() + { + return SmartCorePaths.prefix.trim(); + } + + //******************************************************************// + //********* Specifics functions used on windows OS ***************// + + /** + * Return a windows tuxdroid property String from registery. + */ + public static String getWindowsString(String keyWord) + { + final String REGQUERY_UTIL = "reg query "; + final String REGSTR_TOKEN = "REG_SZ"; + final String INSTALLER_LANGUAGE = String.format("%s \"HKLM\\Software\\Tux Droid\\Installation\" /v \"%s\"",REGQUERY_UTIL, keyWord); + + try + { + Process process = Runtime.getRuntime().exec(INSTALLER_LANGUAGE); + StreamReader reader = new StreamReader(process.getInputStream()); + + reader.start(); + process.waitFor(); + reader.join(); + String result = reader.getResult(); + int p = result.indexOf(REGSTR_TOKEN); + + if (p == -1) + { + return null; + } + return result.substring(p + REGSTR_TOKEN.length()).trim(); + } + catch (Exception e) + { + e.printStackTrace(); + return null; + } + } + + /** + * @return Windows prefix for windows platform. + */ + private static String getWindowsPrefix() + { + return SmartCorePaths.getWindowsString("Install_Dir"); + } + + + //******************************************************************// + //********* Specifics functions used on Linux OS *****************// + + /** + * Return a linux String tuxdroid property into tuxdroid.conf. + */ + private static String getLinuxString(String keyWord) + { + try + { + /* Search for "PREFIX" on /etc/tuxdroid/tuxrroid.conf */ + Process process = Runtime.getRuntime().exec(String.format("grep %s= /etc/tuxdroid/tuxdroid.conf", keyWord)); + + /* Read the stream */ + StreamReader reader = new StreamReader(process.getInputStream()); + reader.start(); + process.waitFor(); + reader.join(); + String result = reader.getResult(); + + /* Be sure that "PREFIX" has been retrieved */ + if (result.contains(keyWord)) + { + int idx = result.indexOf("="); + result = result.substring(idx + 1); + } + else + { + return null; + } + return result; + } + catch (Exception e) + { + e.printStackTrace(); + return null; + } + } + + /** + * @return The prefix for linux. + */ + private static String getLinuxPrefix() + { + return SmartCorePaths.getLinuxString("PREFIX"); + } + + //******************************************************************// + //********* Privates classes *****************// + private static class StreamReader extends Thread { + private InputStream is; + private StringWriter sw; + + /** + * Constructor. + * @param is : input stream. + */ + public StreamReader(InputStream is) + { + this.is = is; + sw = new StringWriter(); + } + + /** + * Run this thread object. + */ + public void run() + { + try + { + int c; + while ((c = is.read()) != -1) + sw.write(c); + } + catch (IOException e) + { + ; + } + } + + /** + * Return the result as String. + * @return + */ + public String getResult() + { + return sw.toString(); + } + } +} Added: software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/kysoh/SmartCorePathsTest.java =================================================================== --- software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/kysoh/SmartCorePathsTest.java (rev 0) +++ software_suite_v3/smart-core/smart-lib/java/smart-core-paths/trunk/src/com/kysoh/SmartCorePathsTest.java 2009-07-03 13:56:19 UTC (rev 5031) @@ -0,0 +1,52 @@ +/* This file is part of "Kysoh Smart-Core Paths". + * Copyright 2009, kysoh + * Authors : Kysoh, jerome conan + * eMail : jerome.conan AT kysohcom + Site : http://www.kysoh.com/ + * + * "Kysoh Smart-Core Paths" is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * "Kysoh Smart-Core Paths" is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with "Kysoh Smart-Core Paths"; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ + +package com.kysoh; + +import com.kysoh.SmartCorePaths; + +/** + * Test for paths. + */ +public class SmartCorePathsTest +{ + public static void main(String[] args) + { + System.out.println(SmartCorePaths.directoryIcons.getAbsolutePath()); + System.out.println("Exists: " + SmartCorePaths.directoryIcons.exists()); + + System.out.println(SmartCorePaths.directoryResourcesMisc.getAbsolutePath()); + System.out.println("Exists: " + SmartCorePaths.directoryResourcesMisc.exists()); + + System.out.println(SmartCorePaths.tuxSkinlfThempack.getAbsolutePath()); + System.out.println("Exists: " + SmartCorePaths.tuxSkinlfThempack.exists()); + + System.out.println(SmartCorePaths.tuxTemplateAtt.getAbsolutePath()); + System.out.println("Exists: " + SmartCorePaths.tuxTemplateAtt.exists()); + + System.out.println(SmartCorePaths.directoryDocs.getAbsolutePath()); + System.out.println("Exists: " + SmartCorePaths.directoryDocs.exists()); + + System.out.println(SmartCorePaths.directorySmartServer.getAbsolutePath()); + System.out.println("Exists: " + SmartCorePaths.directorySmartServer.exists()); + } +} |