tux-droid-svn Mailing List for Tux Droid CE (Page 58)
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-05-01 08:36:14
|
Author: remi
Date: 2009-05-01 10:36:01 +0200 (Fri, 01 May 2009)
New Revision: 4605
Added:
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/plugins/tuxdroid-gadget-pySkeleton.tpg
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/css/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/css/default.css
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/gif/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/gif/button_80.gif
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/alert.xsl
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/gadget_preview.xsl
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/parameter.xsl
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/plugin_infos.xsl
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/plugin_to_gadget.xsl
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/common/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/common/wiky/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/common/wiky/wiky.js
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/resources/01_robot_system/resourcePluginsServer.py
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/resources/04_web_interface/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/resources/04_web_interface/resourceWIPlugin.py
Log:
* added plugin resource
* added gui resource
* added xsl css and other resources
* added a basic plugin for the tests
Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/plugins/tuxdroid-gadget-pySkeleton.tpg
===================================================================
(Binary files differ)
Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/plugins/tuxdroid-gadget-pySkeleton.tpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:keywords
+ Id
Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/css/default.css
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/css/default.css (rev 0)
+++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/css/default.css 2009-05-01 08:36:01 UTC (rev 4605)
@@ -0,0 +1,270 @@
+a.button{
+ width:80px;
+ height:25px;
+ float:center;
+ display:table;
+ vertical-align:middle;
+ color:#DDDDDD;
+ font-size:12px;
+ font-weight:bold;
+ text-decoration:none;
+ font-family:Verdana, Bitstream Vera Sans, Arial, Helvetica, sans-serif;
+ text-align:center;
+ line-height:20px;
+ background-image:url(/data/web_interface/01/gif/button_80.gif);
+}
+
+a.button:hover{
+ color:#FFFFFF;
+}
+
+span.param_name{
+ font-weight:bold;
+ font-size:8pt;
+ font-family:Verdana, Bitstream Vera Sans;
+ color:#333333;
+}
+
+input.text{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:8pt;
+ font-weight:none;
+ background-color:#DDDDDD;
+ border-color:#888888;
+ border-style:solid;
+ border-width:1px;
+ color:#000000;
+ width:197px;
+}
+
+input.text_2{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:8pt;
+ font-weight:none;
+ background-color:#DDDDDD;
+ border-color:#888888;
+ border-style:solid;
+ border-width:1px;
+ color:#000000;
+ width:412px;
+}
+
+input.checkbox{
+}
+
+select.select{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:8pt;
+ background-color:#DDDDDD;
+ border-color:#888888;
+ border-style:solid;
+ border-width:1px;
+ width:197px;
+}
+
+
+
+
+
+table.main{
+ font-family:Verdana, Bitstream Vera Sans;
+ position:absolute;
+ left:0px;
+ top:0px;
+ background-color:#888888;
+ border:0;
+ width:450px;
+}
+
+td.plugin_name{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:18px;
+ font-weight:bold;
+ text-align:left;
+ background-color:#DDDDDD;
+ color:#333333;
+}
+
+table.description{
+ border:0;
+ width:450px;
+ height:60px;
+}
+
+img.plugin_icon{
+ position:absolute;
+ text-align:left;
+ margin:0 auto;
+ padding: 0;
+}
+
+div.description{
+ margin-left:90px;
+ margin-right:50px;
+}
+
+span.description{
+ font-weight:bold;
+ font-size:9pt;
+ font-family:Verdana, Bitstream Vera Sans;
+ color:#DDDDDD;
+}
+
+span.author{
+ font-size:6pt;
+ font-family:Verdana, Bitstream Vera Sans;
+ color:#000000;
+}
+
+td.section_title{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:8pt;
+ font-weight:bold;
+ text-align:left;
+ vertical-align:middle;
+ color:#333333;
+ border-bottom:1px solid #333333;
+}
+
+td.param_indent{
+ width:30px;
+}
+
+td.param_name{
+ font-weight:bold;
+ font-size:8pt;
+ font-family:Verdana, Bitstream Vera Sans;
+ color:#333333;
+ text-align:right;
+ width:205px;
+ height:20px;
+ background-color:#DDDDDD;
+}
+
+td.param_value{
+ background-color:#DDDDDD;
+ font-size:8pt;
+ font-family:Verdana, Bitstream Vera Sans;
+ color:#333333;
+}
+
+td.param_value_centered{
+ background-color:#DDDDDD;
+ text-align:center;
+ font-size:8pt;
+ font-family:Verdana, Bitstream Vera Sans;
+ color:#333333;
+}
+
+td.ca_name{
+ font-weight:bold;
+ font-size:8pt;
+ text-decoration:underline;
+ font-family:Verdana, Bitstream Vera Sans;
+ color:#DDDDDD;
+ text-align:left;
+}
+
+td.ca_description{
+ font-weight:bold;
+ font-style:italic;
+ font-size:8pt;
+ font-family:Verdana, Bitstream Vera Sans;
+ color:#333333;
+ text-align:left;
+}
+
+div.help_box{
+ height:200px;
+ width:405px;
+ border-color:#333333;
+ border-style:solid;
+ border-width:1px;
+ background-color:#DDDDDD;
+ overflow: auto;
+ font-size:8pt;
+ font-family:Verdana, Bitstream Vera Sans;
+ color: #333333;
+ margin-left: 2%;
+ margin-right: 2%;
+}
+
+h1 {
+ font-weight:bold;
+ font-size:11pt;
+ color: black;
+ margin-left: 2%;
+ margin-right: 2%;
+ margin-bottom:0em;
+}
+
+h2 {
+ font-weight:bold;
+ font-size:9pt;
+ color: black;
+ margin-left: 2%;
+ margin-right: 2%;
+ margin-bottom:0em;
+}
+
+h3 {
+ font-weight:bold;
+ font-size:9pt;
+ margin-left: 2%;
+ margin-right: 2%;
+ border-collapse: collapse;
+}
+
+h4 {
+ font-weight:bold;
+ font-style:italic;
+ font-size:9pt;
+ margin-left: 2%;
+ margin-right: 2%;
+ border-collapse: collapse;
+}
+
+p {
+ margin-top:0em;
+ font-weight:none;
+ font-size:8pt;
+ margin-left:2%;
+ margin-right:2%;
+}
+
+dl {
+ margin-left:2%;
+ margin-right:2%;
+}
+
+li {
+ margin-top:0em;
+ font-weight:none;
+ font-size:8pt;
+}
+
+hr {
+ margin-left:2%;
+ text-align:right;
+ margin-top:0em;
+}
+
+select.select_time{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:8pt;
+ background-color:#DDDDDD;
+ border-color:#888888;
+ border-style:solid;
+ border-width:1px;
+ width:40px;
+}
+
+select.select_year{
+ font-family:Verdana, Bitstream Vera Sans;
+ font-size:8pt;
+ background-color:#DDDDDD;
+ border-color:#888888;
+ border-style:solid;
+ border-width:1px;
+ width:55px;
+}
Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/css/default.css
___________________________________________________________________
Name: svn:keywords
+ Id
Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/gif/button_80.gif
===================================================================
(Binary files differ)
Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/gif/button_80.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Name: svn:keywords
+ Id
Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/alert.xsl
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/alert.xsl (rev 0)
+++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/alert.xsl 2009-05-01 08:36:01 UTC (rev 4605)
@@ -0,0 +1,299 @@
+<?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">
+
+ <!-- OPTIONS LOOP -->
+ <xsl:template name="options_loop">
+ <xsl:param name="value"/>
+ <xsl:param name="counter"/>
+ <xsl:param name="max"/>
+ <xsl:element name="option">
+ <xsl:attribute name="value">
+ <xsl:value-of select="$counter"/>
+ </xsl:attribute>
+ <xsl:if test="$counter = $value">
+ <xsl:attribute name="selected">true</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="$counter"/>
+ </xsl:element>
+ <xsl:if test="$counter < $max">
+ <xsl:call-template name="options_loop">
+ <xsl:with-param name="value" select="$value"/>
+ <xsl:with-param name="counter" select="$counter + 1"/>
+ <xsl:with-param name="max" select="$max"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+
+<!-- TIME RULES -->
+
+ <!-- HOUR SELECTER -->
+ <xsl:template name="hour_selecter">
+ <xsl:param name="time"/>
+ <xsl:param name="mask"/>
+ <xsl:if test="$mask/hour = 'True'">
+ <xsl:element name="select">
+ <xsl:attribute name="class">select_time</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_<xsl:value-of select="name($time)"/>_hour</xsl:attribute>
+ <xsl:call-template name="options_loop">
+ <xsl:with-param name="value" select="$time/hour"/>
+ <xsl:with-param name="counter" select="0"/>
+ <xsl:with-param name="max" select="23"/>
+ </xsl:call-template>
+ </xsl:element> H
+ </xsl:if>
+ </xsl:template>
+
+ <!-- MINUTE SELECTER -->
+ <xsl:template name="minute_selecter">
+ <xsl:param name="time"/>
+ <xsl:param name="mask"/>
+ <xsl:if test="$mask/minute = 'True'">
+ <xsl:element name="select">
+ <xsl:attribute name="class">select_time</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_<xsl:value-of select="name($time)"/>_minute</xsl:attribute>
+ <xsl:call-template name="options_loop">
+ <xsl:with-param name="value" select="$time/minute"/>
+ <xsl:with-param name="counter" select="0"/>
+ <xsl:with-param name="max" select="59"/>
+ </xsl:call-template>
+ </xsl:element> M
+ </xsl:if>
+ </xsl:template>
+
+ <!-- SECOND SELECTER -->
+ <xsl:template name="second_selecter">
+ <xsl:param name="time"/>
+ <xsl:param name="mask"/>
+ <xsl:if test="$mask/second = 'True'">
+ <xsl:element name="select">
+ <xsl:attribute name="class">select_time</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_<xsl:value-of select="name($time)"/>_second</xsl:attribute>
+ <xsl:call-template name="options_loop">
+ <xsl:with-param name="value" select="$time/second"/>
+ <xsl:with-param name="counter" select="0"/>
+ <xsl:with-param name="max" select="59"/>
+ </xsl:call-template>
+ </xsl:element> S
+ </xsl:if>
+ </xsl:template>
+
+ <!-- TIME SELECTER -->
+ <xsl:template name="time_selecter">
+ <xsl:param name="time"/>
+ <xsl:param name="mask"/>
+ <xsl:call-template name="hour_selecter">
+ <xsl:with-param name="time" select='$time' />
+ <xsl:with-param name="mask" select='$mask' />
+ </xsl:call-template>
+ <xsl:call-template name="minute_selecter">
+ <xsl:with-param name="time" select='$time' />
+ <xsl:with-param name="mask" select='$mask' />
+ </xsl:call-template>
+ <xsl:call-template name="second_selecter">
+ <xsl:with-param name="time" select='$time' />
+ <xsl:with-param name="mask" select='$mask' />
+ </xsl:call-template>
+ </xsl:template>
+
+<!-- DATE RULES -->
+
+ <!-- YEAR SELECTER -->
+ <xsl:template name="year_selecter">
+ <xsl:param name="date"/>
+ <xsl:element name="select">
+ <xsl:attribute name="class">select_year</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_date_year</xsl:attribute>
+ <xsl:call-template name="options_loop">
+ <xsl:with-param name="value" select="date/year"/>
+ <xsl:with-param name="counter" select="2009"/>
+ <xsl:with-param name="max" select="2050"/>
+ </xsl:call-template>
+ </xsl:element> /
+ </xsl:template>
+
+ <!-- MONTH SELECTER -->
+ <xsl:template name="month_selecter">
+ <xsl:param name="date"/>
+ <xsl:element name="select">
+ <xsl:attribute name="class">select_time</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_date_month</xsl:attribute>
+ <xsl:call-template name="options_loop">
+ <xsl:with-param name="value" select="date/month"/>
+ <xsl:with-param name="counter" select="1"/>
+ <xsl:with-param name="max" select="12"/>
+ </xsl:call-template>
+ </xsl:element> /
+ </xsl:template>
+
+ <!-- DAY SELECTER -->
+ <xsl:template name="day_selecter">
+ <xsl:param name="date"/>
+ <xsl:element name="select">
+ <xsl:attribute name="class">select_time</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_date_day</xsl:attribute>
+ <xsl:call-template name="options_loop">
+ <xsl:with-param name="value" select="date/day"/>
+ <xsl:with-param name="counter" select="1"/>
+ <xsl:with-param name="max" select="31"/>
+ </xsl:call-template>
+ </xsl:element>
+ </xsl:template>
+
+ <!-- DATE SELECTER -->
+ <xsl:template name="date_selecter">
+ <xsl:param name="date"/>
+ <xsl:call-template name="year_selecter">
+ <xsl:with-param name="date" select='$date' />
+ </xsl:call-template>
+ <xsl:call-template name="month_selecter">
+ <xsl:with-param name="date" select='$date' />
+ </xsl:call-template>
+ <xsl:call-template name="day_selecter">
+ <xsl:with-param name="date" select='$date' />
+ </xsl:call-template>
+ </xsl:template>
+
+<!-- WEEK RULES -->
+ <xsl:template name="week_mask">
+ <xsl:param name="week_mask"/>
+ <xsl:param name="type"/>
+ <!-- Week mask type is 'flat' show radio buttons -->
+ <xsl:if test="$type = 'flat'">
+ <!-- Monday -->
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_day_0</xsl:attribute>
+ <xsl:if test="$week_mask/day_0 = 'True'">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element> Monday
+ <xsl:element name="br"></xsl:element>
+ <!-- Tuesday -->
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_day_1</xsl:attribute>
+ <xsl:if test="$week_mask/day_1 = 'True'">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element> Tuesday
+ <xsl:element name="br"></xsl:element>
+ <!-- Wednesday -->
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_day_2</xsl:attribute>
+ <xsl:if test="$week_mask/day_2 = 'True'">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element> Wednesday
+ <xsl:element name="br"></xsl:element>
+ <!-- Thursday -->
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_day_3</xsl:attribute>
+ <xsl:if test="$week_mask/day_3 = 'True'">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element> Thursday
+ <xsl:element name="br"></xsl:element>
+ <!-- Friday -->
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_day_4</xsl:attribute>
+ <xsl:if test="$week_mask/day_4 = 'True'">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element> Friday
+ <xsl:element name="br"></xsl:element>
+ <!-- Saturday -->
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_day_5</xsl:attribute>
+ <xsl:if test="$week_mask/day_5 = 'True'">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element> Saturday
+ <xsl:element name="br"></xsl:element>
+ <!-- Sunday -->
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_day_6</xsl:attribute>
+ <xsl:if test="$week_mask/day_6 = 'True'">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element> Sunday
+ </xsl:if>
+ <!-- Week mask type is 'weekpart' show checkbox -->
+ <xsl:if test="$type = 'weekpart'">
+ <xsl:element name="input">
+ <xsl:attribute name="type">radio</xsl:attribute>
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_weekpart</xsl:attribute>
+ <xsl:attribute name="name">week</xsl:attribute>
+ <xsl:attribute name="value">0</xsl:attribute>
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:element> All days
+ <xsl:element name="br"></xsl:element>
+ <xsl:element name="input">
+ <xsl:attribute name="type">radio</xsl:attribute>
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_weekpart</xsl:attribute>
+ <xsl:attribute name="name">week</xsl:attribute>
+ <xsl:attribute name="value">1</xsl:attribute>
+ </xsl:element> Only weeks
+ <xsl:element name="br"></xsl:element>
+ <xsl:element name="input">
+ <xsl:attribute name="type">radio</xsl:attribute>
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_weekpart</xsl:attribute>
+ <xsl:attribute name="name">week</xsl:attribute>
+ <xsl:attribute name="value">2</xsl:attribute>
+ </xsl:element> Only week-end
+ </xsl:if>
+ <!-- Week mask type is 'exclusive' show selecter -->
+ <xsl:if test="$type = 'exclusive'">
+ <xsl:element name="select">
+ <xsl:attribute name="class">select</xsl:attribute>
+ <xsl:attribute name="id">req_task_<xsl:value-of select="name"/>_week_mask_exclusive</xsl:attribute>
+ <xsl:element name="option">
+ <xsl:attribute name="value">0</xsl:attribute>
+ <xsl:attribute name="selected">true</xsl:attribute>
+ Monday
+ </xsl:element>
+ <xsl:element name="option">
+ <xsl:attribute name="value">1</xsl:attribute>
+ Tuesday
+ </xsl:element>
+ <xsl:element name="option">
+ <xsl:attribute name="value">2</xsl:attribute>
+ Wednesday
+ </xsl:element>
+ <xsl:element name="option">
+ <xsl:attribute name="value">3</xsl:attribute>
+ Thursday
+ </xsl:element>
+ <xsl:element name="option">
+ <xsl:attribute name="value">4</xsl:attribute>
+ Friday
+ </xsl:element>
+ <xsl:element name="option">
+ <xsl:attribute name="value">5</xsl:attribute>
+ Satuday
+ </xsl:element>
+ <xsl:element name="option">
+ <xsl:attribute name="value">6</xsl:attribute>
+ Sunday
+ </xsl:element>
+ </xsl:element>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/alert.xsl
___________________________________________________________________
Name: svn:keywords
+ Id
Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/gadget_preview.xsl
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/gadget_preview.xsl (rev 0)
+++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/gadget_preview.xsl 2009-05-01 08:36:01 UTC (rev 4605)
@@ -0,0 +1,321 @@
+<?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="alert.xsl"/>
+<xsl:include href="parameter.xsl"/>
+
+<xsl:template match="/">
+<html>
+ <head>
+ <LINK href="/data/web_interface/01/css/default.css" rel="stylesheet" type="text/css"/>
+ <script src="/data/web_interface/common/wiky/wiky.js" type="text/javascript"/>
+ <script language="javascript">
+ <![CDATA[
+ function fillHelpBox()
+ {
+ document.getElementById("help_box").innerHTML = Wiky.toHtml(document.getElementById("req_help_content").value);
+ }
+
+ function setpng(img)
+ {
+ if (document.all && (IEver=parseFloat(navigator.appVersion.split("MSIE")[1])) && (IEver>=5.5) && (IEver<7) && document.body.filters && img)
+ {
+ var imgName = img.src.toUpperCase();
+ if (imgName.substring(imgName.length-3,imgName.length) == "PNG")
+ {
+ img.outerHTML= "<span "+(img.id?"id='"+img.id+"' ":"")+(img.className?"class='"+img.className+"' ":"")+(img.title?"title=\""+img.title+"\" ":"")
+ +"style=\"width:"+img.width+"px;height:"+img.height+"px;"+(img.align=="left"?"float:left;":(img.align=="right"?"float:right;":""))
+ +(img.parentElement.href?"cursor:hand;":"")+"display:inline-block;"+img.style.cssText+";"
+ +"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"',sizingMethod='scale');\"></span>";
+ }
+ }
+ }
+ ]]>
+ </script>
+ </head>
+
+<!-- Names list for request parameters
+== DESCRIPTION ==
+* req_gadget_name
+* req_gagdet_tts_name
+* req_gadget_description
+* req_gadget_author
+* req_gadget_version
+* req_icon_file
+* req_tags_list
+== PARAMETERS (loop on parameters list) ==
+* req_param_%s_visible <parameter name>
+* req_param_%s_value <parameter name>
+== TASKS (loop on tasks list) ==
+* req_task_%s_visible <task name>
+* req_task_%s_date <task name>
+* req_task_%s_hours_begin <task name>
+* req_task_%s_hours_end <task name>
+* req_task_%s_delay <task name>
+== ON DEMAND ==
+* req_task_on_demand_visible
+== HELP ==
+* req_help_content
+-->
+
+ <body onload="javascript:fillHelpBox();">
+ <xsl:for-each select="root/data">
+ <!-- PLUGIN UUID STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">uuid</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="description/uuid"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ <!-- 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="../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="../language"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ <!-- FAKE IMAGE FOR PLUGIN COMMANDS -->
+ <xsl:element name="img">
+ <xsl:attribute name="id">fake_image</xsl:attribute>
+ <xsl:attribute name="src"></xsl:attribute>
+ <xsl:attribute name="width">0</xsl:attribute>
+ <xsl:attribute name="height">0</xsl:attribute>
+ </xsl:element>
+
+ <!-- MAIN TABLE -->
+ <table class="main" >
+
+ <!-- PLUGIN NAME -->
+ <tr height="3"></tr>
+ <tr height="18">
+ <td class="plugin_name" colspan="2">
+ <xsl:value-of select="description/translated_name"/>
+ </td>
+ </tr>
+
+ <!-- DESCRIPTION -->
+ <tr>
+ <td align="center" colspan="2">
+ <table class="description">
+ <tr>
+ <xsl:element name="img">
+ <xsl:attribute name="style">
+ position:absolute;text-align: left;margin: 0 auto; padding: 0;
+ </xsl:attribute>
+ <xsl:attribute name="src">
+ <xsl:value-of select="description/icon_file"/>
+ </xsl:attribute>
+ <xsl:attribute name="onload">javascript:setpng(this);</xsl:attribute>
+ </xsl:element>
+ <td align="center" valign="center">
+ <div class="description">
+ <span class="description">
+ <xsl:value-of select="description/description"/>
+ </span>
+ <xsl:element name="br"></xsl:element>
+ <span class="author">- by <xsl:value-of select="description/author"/> -</span>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <!-- PARAMETERS -->
+ <tr height="18">
+ <td class="section_title" colspan="2">
+ Parameters :
+ </td>
+ </tr>
+ <!-- PARAMETERS TABLE -->
+ <tr>
+ <td align="center" colspan="2">
+ <table border="0" width="450">
+ <!-- For all parameters -->
+ <xsl:for-each select="parameters/*">
+ <xsl:if test="visible = 'True'">
+ <tr>
+ <td class="param_indent">
+ </td>
+ <td class="param_name">
+ <xsl:value-of select="description"/>:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="show_parameter"/>
+ </td>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ </table>
+ </td>
+ </tr>
+
+ <!-- LIVE WITH TUX DROID -->
+ <tr height="18">
+ <td class="section_title" colspan="2">
+ Live with Tux Droid :
+ </td>
+ </tr>
+ <!-- LIVE WITH TUX DROID TABLE -->
+ <tr>
+ <td align="center" colspan="2">
+ <table border="0" width="450">
+ <!-- For all tasks -->
+ <xsl:for-each select="tasks/*">
+ <tr>
+ <td class="param_indent">
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ </xsl:element>
+ </td>
+ <td class="ca_name" colspan="2">
+ <xsl:value-of select="translated_name"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="param_indent"></td>
+ <td class="ca_description" colspan="2">
+ <xsl:value-of select="description"/>
+ </td>
+ </tr>
+ <xsl:if test="date_visible = 'True'">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="param_name">
+ Date:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="date_selecter">
+ <xsl:with-param name="date" select='date' />
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="hours_begin_visible = 'True'">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="param_name">
+ Starting at:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="time_selecter">
+ <xsl:with-param name="time" select='hours_begin' />
+ <xsl:with-param name="mask" select='hours_begin_mask' />
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="hours_end_visible = 'True'">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="param_name">
+ Stopping at:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="time_selecter">
+ <xsl:with-param name="time" select='hours_end' />
+ <xsl:with-param name="mask" select='hours_end_mask' />
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="delay_visible = 'True'">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="param_name">
+ Delay:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="time_selecter">
+ <xsl:with-param name="time" select='delay' />
+ <xsl:with-param name="mask" select='delay_mask' />
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="week_mask_visible = 'True'">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="param_name">
+ My week:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="week_mask">
+ <xsl:with-param name="week_mask" select='week_mask' />
+ <xsl:with-param name="type" select='week_mask_type' />
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ <!-- On demand -->
+ <xsl:if test="default_run_command = 'run'">
+ <tr>
+ <td class="param_indent">
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ </xsl:element>
+ </td>
+ <td class="ca_name" colspan="2">
+ On demande
+ </td>
+ </tr>
+ <tr>
+ <td class="param_indent"></td>
+ <td class="ca_description" colspan="2">
+ This gadget will be accessible with the remote control.
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ </td>
+ </tr>
+
+ <!-- HELP -->
+ <tr height="18">
+ <td class="section_title" colspan="2">
+ Help :
+ </td>
+ </tr>
+
+ <!-- HELP TABLE -->
+ <tr>
+ <td align="center" colspan="2">
+ <table border="0" width="450">
+ <tr>
+ <td class="param_indent"></td>
+ <td>
+ <div id="help_box" class="help_box">
+ <textarea id="req_help_content" style="visibility:hidden;">
+ <xsl:value-of select="description/help_file"/>
+ </textarea>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr height="10"></tr>
+ </table>
+ </xsl:for-each>
+ </body>
+</html>
+</xsl:template>
+</xsl:stylesheet>
Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/gadget_preview.xsl
___________________________________________________________________
Name: svn:keywords
+ Id
Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/parameter.xsl
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/parameter.xsl (rev 0)
+++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/parameter.xsl 2009-05-01 08:36:01 UTC (rev 4605)
@@ -0,0 +1,157 @@
+<?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">
+
+ <!-- SHOW PARAMETER -->
+ <xsl:template name="show_parameter">
+ <!-- Parameter is "string" then show it as "text" -->
+ <xsl:if test="type = 'string'">
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_value</xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name"/>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="default_value"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">20</xsl:attribute>
+ </xsl:element>
+ </xsl:if>
+ <!-- Parameter is "file" then show it as "text" -->
+ <xsl:if test="type = 'file'">
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_value</xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name"/>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="default_value"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">20</xsl:attribute>
+ </xsl:element>
+ </xsl:if>
+ <!-- Parameter is "directory" then show it as "text" -->
+ <xsl:if test="type = 'directory'">
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_value</xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name"/>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="default_value"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">20</xsl:attribute>
+ </xsl:element>
+ </xsl:if>
+ <!-- Parameter is "increment" then show it as "text" -->
+ <xsl:if test="type = 'increment'">
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_value</xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name"/>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="default_value"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">20</xsl:attribute>
+ </xsl:element>
+ </xsl:if>
+ <!-- Parameter is "booleans" then show it as "radio buttons" -->
+ <xsl:if test="type = 'booleans'">
+ <xsl:for-each select="enum_values/*">
+ <xsl:element name="input">
+ <xsl:attribute name="type">radio</xsl:attribute>
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_value</xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="../../name"/>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ <xsl:if test=". = ../../default_value">
+ <xsl:attribute name="checked">true</xsl:attribute>
+ </xsl:if>
+ </xsl:element>
+ <xsl:value-of select="."/><xsl:element name="br"/>
+ </xsl:for-each>
+ </xsl:if>
+ <!-- Parameter is "integer" then show it as "input" -->
+ <xsl:if test="type = 'integer'">
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">text</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_value</xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name"/>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="default_value"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">20</xsl:attribute>
+ </xsl:element>
+ </xsl:if>
+ <!-- Parameter is "password" then show it as "input" -->
+ <xsl:if test="type = 'password'">
+ <xsl:element name="input">
+ <xsl:attribute name="class">text</xsl:attribute>
+ <xsl:attribute name="type">password</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_value</xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name"/>
+ </xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="default_value"/>
+ </xsl:attribute>
+ <xsl:attribute name="size">20</xsl:attribute>
+ </xsl:element>
+ </xsl:if>
+ <!-- Parameter is "boolean" then show it as "checkbox" -->
+ <xsl:if test="type = 'boolean'">
+ <xsl:element name="input">
+ <xsl:attribute name="class">checkbox</xsl:attribute>
+ <xsl:attribute name="type">checkbox</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_value</xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name"/>
+ </xsl:attribute>
+ <xsl:if test="default_value = 'true'">
+ <xsl:attribute name="checked">
+ true
+ </xsl:attribute>
+ </xsl:if>
+ </xsl:element>
+ </xsl:if>
+ <!-- Parameter is "enum" then show it as "combobox" -->
+ <xsl:if test="type = 'enum'">
+ <xsl:element name="select">
+ <xsl:attribute name="class">select</xsl:attribute>
+ <xsl:attribute name="id">req_param_<xsl:value-of select="name"/>_value</xsl:attribute>
+ <xsl:attribute name="name">
+ <xsl:value-of select="name"/>
+ </xsl:attribute>
+ <xsl:for-each select="enum_values/*">
+ <xsl:element name="option">
+ <xsl:attribute name="value">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ <xsl:if test=". = ../../default_value">
+ <xsl:attribute name="selected">true</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="."/>
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:element>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/parameter.xsl
___________________________________________________________________
Name: svn:keywords
+ Id
Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/plugin_infos.xsl
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/plugin_infos.xsl (rev 0)
+++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/web_interface/01/xsl/plugin_infos.xsl 2009-05-01 08:36:01 UTC (rev 4605)
@@ -0,0 +1,436 @@
+<?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="alert.xsl"/>
+<xsl:include href="parameter.xsl"/>
+
+<xsl:template match="/">
+<html>
+ <head>
+ <LINK href="/data/web_interface/01/css/default.css" rel="stylesheet" type="text/css"/>
+ <script src="/data/web_interface/common/wiky/wiky.js" type="text/javascript"/>
+ <script language="javascript">
+ <![CDATA[
+ function fillHelpBox()
+ {
+ document.getElementById("help_box").innerHTML = Wiky.toHtml(document.getElementById("help_wiki_source").value);
+ }
+
+ function startGadget(command)
+ {
+ var parametersString = "";
+ var uuid = document.getElementById("uuid").value;
+
+ var parameters = document.getElementsByTagName("input");
+
+ for (var i = 0; i < parameters.length; i++)
+ {
+ var param = parameters[i];
+ if (param.id == 'unvisible')
+ {
+ parametersString += param.name + '=' + param.value.replace('&', '&&') + '|';
+ }
+ }
+
+ for (var i = 0; i < parameters.length; i++)
+ {
+ var param = parameters[i];
+ if ((param.type != 'button') && (param.id != 'unvisible') && (param.name != ''))
+ {
+ if (param.type == 'checkbox')
+ {
+ parametersString += param.name + '=' + param.checked + '|';
+ }
+ else if (param.type == 'radio')
+ {
+ if (param.checked)
+ {
+ parametersString += param.name + '=' + param.value.replace('&', '&&') + '|';
+ }
+ }
+ else
+ {
+ parametersString += param.name + '=' + param.value.replace('&', '&&') + '|';
+ }
+ }
+ }
+
+ parameters = document.getElementsByTagName("select");
+ for (var i = 0; i < parameters.length; i++)
+ {
+ var param = parameters[i];
+ parametersString += param.name + '=' + param.value.replace('&', '&&') + '|';
+ }
+ var url = "/plugins_server/start_plugin?command=";
+ url += command + "&uuid=" + uuid;
+ url += "¶meters=" + parametersString;
+ url += "&rndTag=" + Math.random();
+ document.getElementById("fake_image").src = url;
+ }
+
+ function stopGadget()
+ {
+ var uuid = document.getElementById("uuid").value;
+ var url = "/plugins_server/stop_plugin?";
+ url += "uuid=" + uuid;
+ url += "&rndTag=" + Math.random();
+ document.getElementById("fake_image").src = url;
+ }
+
+ function setpng(img)
+ {
+ if (document.all && (IEver=parseFloat(navigator.appVersion.split("MSIE")[1])) && (IEver>=5.5) && (IEver<7) && document.body.filters && img)
+ {
+ imgName = img.src.toUpperCase();
+ if (imgName.substring(imgName.length-3,imgName.length) == "PNG")
+ {
+ img.outerHTML= "<span "+(img.id?"id='"+img.id+"' ":"")+(img.className?"class='"+img.className+"' ":"")+(img.title?"title=\""+img.title+"\" ":"")
+ +"style=\"width:"+img.width+"px;height:"+img.height+"px;"+(img.align=="left"?"float:left;":(img.align=="right"?"float:right;":""))
+ +(img.parentElement.href?"cursor:hand;":"")+"display:inline-block;"+img.style.cssText+";"
+ +"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"',sizingMethod='scale');\"></span>";
+ }
+ }
+ }
+ ]]>
+ </script>
+ </head>
+ <body onload="javascript:fillHelpBox();">
+ <xsl:for-each select="root/data">
+ <!-- PLUGIN UUID STORAGE -->
+ <xsl:element name="input">
+ <xsl:attribute name="type">hidden</xsl:attribute>
+ <xsl:attribute name="id">uuid</xsl:attribute>
+ <xsl:attribute name="value">
+ <xsl:value-of select="description/uuid"/>
+ </xsl:attribute>
+ </xsl:element>
+
+ <!-- FAKE IMAGE FOR PLUGIN COMMANDS -->
+ <xsl:element name="img">
+ <xsl:attribute name="id">fake_image</xsl:attribute>
+ <xsl:attribute name="src"></xsl:attribute>
+ <xsl:attribute name="width">0</xsl:attribute>
+ <xsl:attribute name="height">0</xsl:attribute>
+ </xsl:element>
+
+ <!-- MAIN TABLE -->
+ <table class="main" >
+
+ <!-- PLUGIN NAME -->
+ <tr height="3"></tr>
+ <tr height="18">
+ <td class="plugin_name" colspan="2">
+ <xsl:value-of select="description/translated_name"/>
+ </td>
+ </tr>
+
+ <!-- DESCRIPTION -->
+ <tr>
+ <td align="center" colspan="2">
+ <table class="description">
+ <tr>
+ <xsl:element name="img">
+ <xsl:attribute name="style">
+ position:absolute;text-align: left;margin: 0 auto; padding: 0;
+ </xsl:attribute>
+ <xsl:attribute name="src">
+ <xsl:value-of select="description/icon_file"/>
+ </xsl:attribute>
+ <xsl:attribute name="onload">javascript:setpng(this);</xsl:attribute>
+ </xsl:element>
+ <td align="center" valign="center">
+ <div class="description">
+ <span class="description">
+ <xsl:value-of select="description/description"/>
+ </span>
+ <xsl:element name="br"></xsl:element>
+ <span class="author">- by <xsl:value-of select="description/author"/> -</span>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <!-- PARAMETERS -->
+ <tr height="18">
+ <td class="section_title" colspan="2">
+ Parameters list :
+ </td>
+ </tr>
+ <!-- PARAMETERS TABLE -->
+ <tr>
+ <td align="center" colspan="2">
+ <table border="0" width="450">
+ <!-- For all parameters -->
+ <xsl:for-each select="parameters/*">
+ <xsl:if test="visible = 'True'">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="param_name">
+ <xsl:value-of select="description"/>:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="show_parameter"/>
+ </td>
+ </tr>
+ </xsl:if>
+ </xsl:for-each>
+ </table>
+ </td>
+ </tr>
+
+ <!-- ALERTS -->
+ <tr height="18">
+ <td class="section_title" colspan="2">
+ Alerts list :
+ </td>
+ </tr>
+ <!-- ALERTS TABLE -->
+ <tr>
+ <td align="center" colspan="2">
+ <table border="0" width="450">
+ <!-- For all tasks -->
+ <xsl:for-each select="tasks/*">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="ca_name" colspan="2">
+ <xsl:value-of select="translated_name"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="param_indent"></td>
+ <td class="ca_description" colspan="2">
+ <xsl:value-of select="description"/>
+ </td>
+ </tr>
+ <xsl:if test="date_visible = 'True'">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="param_name">
+ Date:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="date_selecter">
+ <xsl:with-param name="date" select='date' />
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="hours_begin_visible = 'True'">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="param_name">
+ Starting at:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="time_selecter">
+ <xsl:with-param name="time" select='hours_begin' />
+ <xsl:with-param name="mask" select='hours_begin_mask' />
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="hours_end_visible = 'True'">
+ <tr>
+ <td class="param_indent"></td>
+ <td class="param_name">
+ Stopping at:
+ </td>
+ <td class="param_value">
+ <xsl:call-template name="time_selecter">
+ <xsl:with-param name="time" select='hours_end' />
+ ...
[truncated message content] |
|
From: remi <c2m...@c2...> - 2009-05-01 08:32:13
|
Author: remi Date: 2009-05-01 10:32:06 +0200 (Fri, 01 May 2009) New Revision: 4604 Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/Plugin.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginCommand.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginDescription.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginParameter.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginTask.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginsContainer.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/__init__.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/interpreters/ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/interpreters/PluginInterpreter.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/interpreters/PluginInterpreterJava.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/interpreters/PluginInterpreterPython.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/interpreters/__init__.py softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/interpreters/javacommonjar/ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/interpreters/javacommonjar/karmalab-commons-1.2.jar softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/interpreters/javacommonjar/tuxdroid-gadget-java-kit-0.0.2.jar softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/interpreters/javacommonjar/tuxdroid-java-api-0.0.3.jar Log: * added plugin directory and classes Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/Plugin.py =================================================================== --- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/Plugin.py (rev 0) +++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/Plugin.py 2009-05-01 08:32:06 UTC (rev 4604) @@ -0,0 +1,713 @@ +# Copyright (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 +# +# This module is highly inspired by a "gadget framework" written by +# "Yoran Brault" <http://artisan.karma-lab.net> + +import os +import threading + +from util.i18n.I18n import I18n +from interpreters.PluginInterpreter import PluginInterpreter +from interpreters.PluginInterpreterPython import PluginInterpreterPython +from interpreters.PluginInterpreterJava import PluginInterpreterJava +from PluginDescription import PluginDescription +from PluginParameter import PluginParameter +from PluginCommand import PluginCommand +from PluginTask import PluginTask + +# Default list of the supported language. +SUPPORTED_LANGUAGES_LIST = ["en", "fr", "nl", "es", "it", "pt", "ar", "da", + "de", "no", "sv",] +# Internal parameters list +INTERNAL_PARAMETERS_LIST = ["traces", "language", "country", "locutor", "pitch"] + +# ------------------------------------------------------------------------------ +# Plugin class. +# ------------------------------------------------------------------------------ +class Plugin(object): + """Plugin class. + """ + + # -------------------------------------------------------------------------- + # Constructor of the class. + # -------------------------------------------------------------------------- + def __init__(self, parent, dictionary, tpgFile, workingPath): + """Constructor of the class. + @param parent: Parent Plugins container. + @param dictionary: Plugin structure as dictionary. + @param tpgFile: TPG file name of the plugin. + @param workingPath: Working path of the plugin. + """ + self.__parent = parent + # Save the dictionary + self.__dictionary = dictionary + # Save the working path + self.__workingPath = workingPath + # Save the tpg file name + self.__tpgFile = tpgFile + # Create i18n table + self.__i18nList = {} + self.__updateI18nList() + # Create descriptor + self.__description = PluginDescription(self, dictionary['description'], + self.__workingPath) + # Create parameters + self.__parameters = [] + if dictionary.has_key('parameters'): + keys = dictionary['parameters'].keys() + keys.sort() + for key in keys: + pluginParameter = PluginParameter(self, + dictionary['parameters'][key]) + paramPlatform = pluginParameter.getPlatform() + if paramPlatform != "all": + if paramPlatform == "windows": + if os.name != "nt": + pluginParameter.setVisible('false') + else: + if os.name == "nt": + pluginParameter.setVisible('false') + self.__parameters.append(pluginParameter) + # Add some other parameters + pluginParameter = PluginParameter(self, { + 'name' : 'traces', + 'type' : 'boolean', + 'defaultValue' : 'true', + 'description' : 'Verbose mode', + 'category' : 'internals', + 'visible' : 'false', + }) + self.__parameters.append(pluginParameter) + pluginParameter = PluginParameter(self, { + 'name' : 'language', + 'type' : 'string', + 'defaultValue' : self.__parent.getLanguage(), + 'description' : 'Language', + 'category' : 'internals', + 'visible' : 'false', + }) + self.__parameters.append(pluginParameter) + pluginParameter = PluginParameter(self, { + 'name' : 'country', + 'type' : 'string', + 'defaultValue' : self.__parent.getCountry(), + 'description' : 'Country', + 'category' : 'internals', + 'visible' : 'false', + }) + self.__parameters.append(pluginParameter) + pluginParameter = PluginParameter(self, { + 'name' : 'locutor', + 'type' : 'string', + 'defaultValue' : self.__parent.getLocutor(), + 'description' : 'Locutor', + 'category' : 'internals', + 'visible' : 'false', + }) + self.__parameters.append(pluginParameter) + pluginParameter = PluginParameter(self, { + 'name' : 'pitch', + 'type' : 'integer', + 'defaultValue' : str(self.__parent.getPitch()), + 'description' : 'Pitch', + 'category' : 'internals', + 'visible' : 'false', + }) + self.__parameters.append(pluginParameter) + # Create commands + self.__commands = [] + for key in dictionary['commands'].keys(): + self.__commands.append(PluginCommand(self, + dictionary['commands'][key])) + # Define default check and run commands + commandNamesList = self.getCommandsName() + if "run" in commandNamesList: + self.__defaultRunCommandName = "run" + else: + self.__defaultRunCommandName = self.__commands[0].getName() + if "check" in commandNamesList: + self.__defaultCheckCommandName = "check" + else: + self.__defaultCheckCommandName = self.__defaultRunCommandName + # Create tasks + self.__tasks = [] + if dictionary.has_key('tasks'): + for key in dictionary['tasks'].keys(): + self.__tasks.append(PluginTask(self, + dictionary['tasks'][key])) + # Define interpreter + interpreterClass = PluginInterpreter + if dictionary['interpreter']['kind'] == 'python': + interpreterClass = PluginInterpreterPython + elif dictionary['interpreter']['kind'] == 'java': + interpreterClass = PluginInterpreterJava + self.__interpreterConf = { + 'class' : interpreterClass, + 'executable' : dictionary['interpreter']['executable'], + } + self.__pluginInterpreter = None + self.__interpreterMutex = threading.Lock() + # Define Plugin Instance Parameters + self.__pluginInstanceParameters = {} + self.__pluginInstanceCommand = "" + self.__pluginInstanceIsDaemon = False + # Callbacks + self.__onPluginNotificationCallback = None + self.__onPluginMessageCallback = None + self.__onPluginErrorCallback = None + self.__onPluginTraceCallback = None + self.__onPluginResultCallback = None + self.__onPluginStartingCallback = None + self.__onPluginStoppedCallback = None + + # -------------------------------------------------------------------------- + # Get the data of the plugin as dictionary. + # -------------------------------------------------------------------------- + def getData(self, language): + """Get the data of the plugin as dictionary. + @return a dictionary. + """ + data = {} + # Description + description = self.getDescription() + data['description'] = {} + data['description']['name'] = description.getName() + data['description']['translated_name'] = description.getTranslatedName(language) + data['description']['tts_name'] = description.getTtsName(language) + data['description']['uuid'] = description.getUuid() + data['description']['version'] = description.getVersion() + data['description']['author'] = description.getAuthor() + data['description']['description'] = description.getDescription(language) + data['description']['platform'] = description.getPlatform() + try: + f = open(description.getHelpFile(language), "rb") + try: + helpContent = f.read() + finally: + f.close() + except: + helpContent = "" + data['description']['help_file'] = helpContent + data['description']['icon_file'] = "/%s/icon.png" % description.getUuid() + data['description']['working_path'] = self.getWorkingPath() + data['description']['tpg_file'] = self.getTpgFile() + data['default_run_command'] = self.getDefaultRunCommandName() + data['default_check_command'] = self.getDefaultCheckCommandName() + # Parameters + data['parameters'] = {} + parameters = self.getParameters() + for i, parameter in enumerate(parameters): + nodeName = "parameter_%.3d" % i + data['parameters'][nodeName] = {} + data['parameters'][nodeName]['name'] = parameter.getName() + data['parameters'][nodeName]['translated_name'] = parameter.getTranslatedName(language) + data['parameters'][nodeName]['description'] = parameter.getDescription(language) + data['parameters'][nodeName]['platform'] = parameter.getPlatform() + data['parameters'][nodeName]['category'] = parameter.getCategory() + data['parameters'][nodeName]['type'] = parameter.getType() + data['parameters'][nodeName]['default_value'] = parameter.getDefaultValue(language) + data['parameters'][nodeName]['enum_values'] = parameter.getEnumValues(language) + data['parameters'][nodeName]['min_value'] = parameter.getMinValue() + data['parameters'][nodeName]['max_value'] = parameter.getMaxValue() + data['parameters'][nodeName]['step_value'] = parameter.getStepValue() + data['parameters'][nodeName]['visible'] = parameter.isVisible() + data['parameters'][nodeName]['filters'] = parameter.getFilters() + # Serialize values of enumerated parameters + for key in data['parameters']: + param = data['parameters'][key] + if param['type'] in ['enum', 'booleans']: + values = param['enum_values'].split(",") + enums = {} + for i, value in enumerate(values): + dName = "enum_%.2d" % i + if value != '': + enums[dName] = value.strip() + param['enum_values'] = enums + # Commands + data['commands'] = {} + commands = self.getCommands() + for i, command in enumerate(commands): + nodeName = "command_%.3d" % i + data['commands'][nodeName] = {} + data['commands'][nodeName]['name'] = command.getName() + data['commands'][nodeName]['translated_name'] = command.getTranslatedName(language) + data['commands'][nodeName]['description'] = command.getDescription(language) + data['commands'][nodeName]['is_daemon'] = command.isDaemon() + # Tasks + data['tasks'] = {} + tasks = self.getTasks() + for i, task in enumerate(tasks): + nodeName = "task_%.3d" % i + data['tasks'][nodeName] = {} + data['tasks'][nodeName]['name'] = task.getName() + data['tasks'][nodeName]['translated_name'] = task.getTranslatedName(language) + data['tasks'][nodeName]['description'] = task.getDescription(language) + data['tasks'][nodeName]['command'] = task.getCommand() + data['tasks'][nodeName]['type'] = task.getType() + data['tasks'][nodeName]['activated'] = task.isActivated() + data['tasks'][nodeName]['week_mask'] = task.getWeekMaskDict() + data['tasks'][nodeName]['week_mask_type'] = task.getWeekMaskType() + data['tasks'][nodeName]['week_mask_visible'] = task.getWeekMaskIsVisible() + data['tasks'][nodeName]['date'] = task.getDateDict() + data['tasks'][nodeName]['date_visible'] = task.getDateIsVisible() + data['tasks'][nodeName]['hours_begin'] = task.getTimeDict(task.getHoursBegin()) + data['tasks'][nodeName]['hours_begin_mask'] = task.getTimeMaskDict(task.getHoursBeginMask()) + data['tasks'][nodeName]['hours_begin_visible'] = task.getHoursBeginIsVisible() + data['tasks'][nodeName]['hours_end'] = task.getTimeDict(task.getHoursEnd()) + data['tasks'][nodeName]['hours_end_mask'] = task.getTimeMaskDict(task.getHoursEndMask()) + data['tasks'][nodeName]['hours_end_visible'] = task.getHoursEndIsVisible() + data['tasks'][nodeName]['delay'] = task.getTimeDict(task.getDelay()) + data['tasks'][nodeName]['delay_mask'] = task.getTimeMaskDict(task.getDelayMask()) + data['tasks'][nodeName]['delay_visible'] = task.getDelayIsVisible() + return data + + # -------------------------------------------------------------------------- + # Get the directory path where this plugin is uncompressed. + # -------------------------------------------------------------------------- + def getWorkingPath(self): + """Get the directory path where this plugin is uncompressed. + @return: A directory path as string. + """ + return self.__workingPath + + # -------------------------------------------------------------------------- + # Get the TPG file of the plugin. + # -------------------------------------------------------------------------- + def getTpgFile(self): + """Get the TPG file of the plugin. + @return: A string. + """ + return self.__tpgFile + + # -------------------------------------------------------------------------- + # Get the dictionary of the plugin. + # -------------------------------------------------------------------------- + def getDictionary(self): + """Get the dictionary of the plugin. + @return: A dictionary. + """ + return self.__dictionary + + # -------------------------------------------------------------------------- + # Get the parent plugins container. + # -------------------------------------------------------------------------- + def getContainer(self): + """Get the parent plugins container. + @return: The parent plugins container. + """ + return self.__parent + + # -------------------------------------------------------------------------- + # Get the plugin description object. + # -------------------------------------------------------------------------- + def getDescription(self): + """Get the plugin description object. + @return: The plugin description object. + """ + return self.__description + + # -------------------------------------------------------------------------- + # Get the plugin commands objects list. + # -------------------------------------------------------------------------- + def getCommands(self): + """Get the plugin command objects list. + @return: The plugin commands objects list. + """ + return self.__commands + + # -------------------------------------------------------------------------- + # Get a command object by it name. + # -------------------------------------------------------------------------- + def getCommand(self, commandName): + """Get a command object by it name. + @param commandName: The name of the command. + @return: The command object as PluginCommand or None. + """ + for command in self.__commands: + if command.getName() == commandName: + return command + return None + + # -------------------------------------------------------------------------- + # Get the commands name list. + # -------------------------------------------------------------------------- + def getCommandsName(self): + """Get the commands name list. + @return: A list of strings. + """ + result = [] + for command in self.__commands: + result.append(command.getName()) + return result + + # -------------------------------------------------------------------------- + # Get the plugin tasks objects list. + # -------------------------------------------------------------------------- + def getTasks(self): + """Get the plugin tasks objects list. + @return: The plugin tasks objects list. + """ + return self.__tasks + + # -------------------------------------------------------------------------- + # Get a task object by it name. + # -------------------------------------------------------------------------- + def getTask(self, taskName): + """Get a task object by it name. + @param taskName: The name of the task. + @return: The task object as PluginTask or None. + """ + for task in self.__tasks: + if task.getName() == taskName: + return task + return None + + # -------------------------------------------------------------------------- + # Get the tasks name list. + # -------------------------------------------------------------------------- + def getTasksName(self): + """Get the tasks name list. + @return: A list of strings. + """ + result = [] + for task in self.__tasks: + result.append(task.getName()) + return result + + # -------------------------------------------------------------------------- + # Get the default check command name. + # -------------------------------------------------------------------------- + def getDefaultCheckCommandName(self): + """Get the default check command name. + @return: A string. + """ + return self.__defaultCheckCommandName + + # -------------------------------------------------------------------------- + # Get the default run command name. + # -------------------------------------------------------------------------- + def getDefaultRunCommandName(self): + """Get the default run command name. + @return: A string. + """ + return self.__defaultRunCommandName + + # -------------------------------------------------------------------------- + # Get the parameter objects list. + # -------------------------------------------------------------------------- + def getParameters(self): + """Get the parameter objects list. + @return: The parameter objects list. + """ + return self.__parameters + + # -------------------------------------------------------------------------- + # Get a parameter object by it name. + # -------------------------------------------------------------------------- + def getParameter(self, parameterName): + """Get a parameter object by it name. + @param parameterName: The name of the parameter. + @return: The parameter object or None. + """ + for parameter in self.__parameters: + if parameter.getName() == parameterName: + return parameter + return None + + # -------------------------------------------------------------------------- + # Get the parameters name list. + # -------------------------------------------------------------------------- + def getParametersName(self): + """Get the parameters name list. + @return: A list of strings. + """ + result = [] + for parameter in self.__parameters: + result.append(parameter.getName()) + return result + + # -------------------------------------------------------------------------- + # Get if the current running instance is in daemon mode or not. + # -------------------------------------------------------------------------- + def instanceIsDaemon(self): + """Get if the current running instance is in daemon mode or not. + @return: True or False. + """ + self.__interpreterMutex.acquire() + isDaemon = self.__pluginInstanceIsDaemon + self.__interpreterMutex.release() + return isDaemon + + # ========================================================================== + # I18N + # ========================================================================== + + # -------------------------------------------------------------------------- + # Update the i18n objects list of the plugin. + # -------------------------------------------------------------------------- + def __updateI18nList(self): + """Update the i18n objects list of the plugin. + """ + self.__i18nList = {} + language = self.__parent.getLanguage() + if language not in SUPPORTED_LANGUAGES_LIST: + SUPPORTED_LANGUAGES_LIST.append(language) + for language in SUPPORTED_LANGUAGES_LIST: + i18n = I18n() + i18n.setPoDirectory(os.path.join(self.__workingPath, "resources")) + i18n.setLocale(language) + i18n.update() + self.__i18nList[language] = i18n + + # -------------------------------------------------------------------------- + # Translate a message with the current language of the plugins container. + # -------------------------------------------------------------------------- + def tr(self, message, *arguments): + """Translate a message with the current language of the plugins + container. + @param message: Message to translate. + @param arguments: Arguments to pass in the message. + @return: The translated message. + """ + result = self.__i18nList[self.__parent.getLanguage()].tr(message, + *arguments) + result = result.replace("\\''", "'") + result = result.replace("\\'", "'") + result = result.replace("''", "'") + return result + + # -------------------------------------------------------------------------- + # Translate a message with a specific language. + # -------------------------------------------------------------------------- + def tr2(self, language, message, *arguments): + """Translate a message with a specific language. + @param language: Language of the traduction. + @param message: Message to translate. + @param arguments: Arguments to pass in the message. + @return: The translated message. + """ + if language in self.__i18nList.keys(): + result = self.__i18nList[language].tr(message, *arguments) + else: + result = self.__i18nList[self.__parent.getLanguage()].tr(message, + *arguments) + result = result.replace("\\''", "'") + result = result.replace("\\'", "'") + result = result.replace("''", "'") + return result + + # ========================================================================== + # Plugin execution + # ========================================================================== + + # -------------------------------------------------------------------------- + # Set the plugin notification event callback. + # -------------------------------------------------------------------------- + def setOnPluginNotificationCallback(self, funct): + """Set the plugin notification event callback. + @param funct: Function pointer. + Function prototype: + def onPluginNotification(plugin, instanceParameters, messageId, *args): + pass + """ + self.__onPluginNotificationCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin message event callback. + # -------------------------------------------------------------------------- + def setOnPluginMessageCallback(self, funct): + """Set the plugin message event callback. + @param funct: Function pointer. + Function prototype: + def onPluginMessage(plugin, instanceParameters, message): + pass + """ + self.__onPluginMessageCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin error event callback. + # -------------------------------------------------------------------------- + def setOnPluginErrorCallback(self, funct): + """Set the plugin error event callback. + @param funct: Function pointer. + Function prototype: + def onPluginError(plugin, instanceParameters, *messagesList): + pass + """ + self.__onPluginErrorCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin trace event callback. + # -------------------------------------------------------------------------- + def setOnPluginTraceCallback(self, funct): + """Set the plugin trace event callback. + @param funct: Function pointer. + Function prototype: + def onPluginTrace(plugin, instanceParameters, *messagesList): + pass + """ + self.__onPluginTraceCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin result event callback. + # -------------------------------------------------------------------------- + def setOnPluginResultCallback(self, funct): + """Set the plugin result event callback. + @param funct: Function pointer. + Function prototype: + def onPluginResult(plugin, instanceParameters, pluginResult): + pass + """ + self.__onPluginResultCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin starting event callback. + # -------------------------------------------------------------------------- + def setOnPluginStartingCallback(self, funct): + """Set the plugin starting event callback. + @param funct: Function pointer. + Function prototype: + def onPluginStarting(plugin, instanceParameters): + pass + """ + self.__onPluginStartingCallback = funct + + # -------------------------------------------------------------------------- + # Set the plugin stopped event callback. + # -------------------------------------------------------------------------- + def setOnPluginStoppedCallback(self, funct): + """Set the plugin stopped event callback. + @param funct: Function pointer. + Function prototype: + def onPluginStopped(plugin, instanceParameters): + pass + """ + self.__onPluginStoppedCallback = funct + + # -------------------------------------------------------------------------- + # Event on plugin interpreter started. + # -------------------------------------------------------------------------- + def __onInterpreterStarted(self): + """Event on plugin interpreter started. + """ + if self.__onPluginStartingCallback != None: + self.__onPluginStartingCallback(self, self.__pluginInstanceParameters, + self.__pluginInstanceCommand, self.__pluginInstanceIsDaemon) + + # -------------------------------------------------------------------------- + # Event on plugin interpreter stopped. + # -------------------------------------------------------------------------- + def __onInterpreterStopped(self): + """Event on plugin interpreter stopped. + """ + if self.__onPluginStoppedCallback != None: + self.__onPluginStoppedCallback(self, self.__pluginInstanceParameters, + self.__pluginInstanceCommand, self.__pluginInstanceIsDaemon) + + # -------------------------------------------------------------------------- + # Event on plugin interpreter notification. + # -------------------------------------------------------------------------- + def __onInterpreterNotification(self, messageId, *args): + """Event on plugin interpreter notification. + @param messageId: Message identifiant as string. + @param args: Arguments of the notification. + """ + messageId = messageId.lower() + if messageId == "message": + language = self.__pluginInstanceParameters['language'] + if self.__onPluginMessageCallback != None: + self.__onPluginMessageCallback(self, + self.__pluginInstanceParameters, self.tr2(language, *args)) + elif messageId == "trace": + if self.__onPluginTraceCallback != None: + self.__onPluginTraceCallback(self, + self.__pluginInstanceParameters, *args) + elif messageId == "error": + if self.__onPluginErrorCallback != None: + self.__onPluginErrorCallback(self, + self.__pluginInstanceParameters, *args) + elif messageId == "check_result": + if self.__onPluginResultCallback != None: + if len(args) > 0: + if args[0] == "true": + checkResult = True + else: + checkResult = False + else: + checkResult = False + self.__onPluginResultCallback(self, + self.__pluginInstanceParameters, checkResult) + else: + if self.__onPluginNotificationCallback != None: + self.__onPluginNotificationCallback(self, + self.__pluginInstanceParameters, messageId, *args) + + # -------------------------------------------------------------------------- + # Start this plugin. + # -------------------------------------------------------------------------- + def start(self, command, parameters = {}): + """Start this plugin. + @param command: Command name to start the plugin. + @param parameters: Parameters of the plugin as dictionary. + @return: The success of the plugin starting. + - When the parameters are not defined the plugin is started with the + default ones. + - If a parameter is wrong the default one is set. + - If a parameter is missing the default one is set. + """ + self.__interpreterMutex.acquire() + # Stop the last interpreter + if self.__pluginInterpreter != None: + self.__pluginInterpreter.abort() + # Create the interpreter + self.__pluginInterpreter = self.__interpreterConf['class']() + self.__pluginInterpreter.setOnPluginStartedCallback(self.__onInterpreterStarted) + self.__pluginInterpreter.setOnPluginStoppedCallback(self.__onInterpreterStopped) + self.__pluginInterpreter.setOnNotificationThrowedCallback(self.__onInterpreterNotification) + self.__pluginInterpreter.setWorkingPath(self.getWorkingPath()) + self.__pluginInterpreter.setExecutable(self.__interpreterConf['executable']) + # Fill the parameters + if parameters.has_key('language'): + language = parameters['language'] + else: + language = self.__parent.getLanguage() + pluginParameters = {} + for parameterName in self.getParametersName(): + pluginParameters[parameterName] = self.getParameter(parameterName).getDefaultValue(language) + for parameterName in parameters.keys(): + if pluginParameters.has_key(parameterName): + param = self.getParameter(parameterName) + if param != None: + if param.getType() in ["enum", "booleans"]: + pluginParameters[parameterName] = param.getUntranslatedEnumValue( + parameters[parameterName], language) + continue + pluginParameters[parameterName] = parameters[parameterName] + self.__pluginInterpreter.setParameters(pluginParameters) + self.__pluginInstanceParameters = pluginParameters + # Get the command + pluginCommand = self.getCommand(command) + if pluginCommand == None: + pluginCommand = self.getCommands()[0] + self.__pluginInstanceIsDaemon = pluginCommand.isDaemon() + self.__pluginInstanceCommand = pluginCommand.getName() + # Execute the plugin + self.__pluginInterpreter.run(pluginCommand.getName(), + pluginCommand.isDaemon()) + self.__interpreterMutex.release() + return True + + # -------------------------------------------------------------------------- + # Stop the plugin. + # -------------------------------------------------------------------------- + def stop(self): + """Stop the plugin. + """ + self.__interpreterMutex.acquire() + # Stop the last interpreter + if self.__pluginInterpreter != None: + self.__pluginInterpreter.abort() + self.__interpreterMutex.release() Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/Plugin.py ___________________________________________________________________ Name: svn:keywords + Id Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginCommand.py =================================================================== --- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginCommand.py (rev 0) +++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginCommand.py 2009-05-01 08:32:06 UTC (rev 4604) @@ -0,0 +1,84 @@ +# Copyright (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 +# +# This module is highly inspired by a "gadget framework" written by +# "Yoran Brault" <http://artisan.karma-lab.net> + +# ------------------------------------------------------------------------------ +# Plugin command class. +# ------------------------------------------------------------------------------ +class PluginCommand(object): + """Plugin command class. + """ + + # -------------------------------------------------------------------------- + # Constructor of the class. + # -------------------------------------------------------------------------- + def __init__(self, parent, dictionary): + """Constructor of the class. + @param parent: Parent Plugin object. + @param dictionary: Command as dictionary. + """ + self.__parent = parent + self.__dictionary = dictionary + self.__name = self.__dictionary['name'] + self.__daemon = "false" + if self.__dictionary.has_key('daemon'): + self.__daemon = self.__dictionary['daemon'].lower() + self.__description = self.__dictionary['description'] + + # -------------------------------------------------------------------------- + # Get the parent plugin. + # -------------------------------------------------------------------------- + def getParent(self): + """Get the parent plugin. + @return: The parent plugin. + """ + return self.__parent + + # -------------------------------------------------------------------------- + # Get the name. + # -------------------------------------------------------------------------- + def getName(self): + """Get the name. + @return: A string. + """ + return self.__name + + # -------------------------------------------------------------------------- + # Get if this plugin command work in daemon mode. + # -------------------------------------------------------------------------- + def isDaemon(self): + """Get if this plugin command work in daemon mode. + @return: A boolean. + """ + if self.__daemon == "false": + return False + else: + return True + + # -------------------------------------------------------------------------- + # Get the translated name. + # -------------------------------------------------------------------------- + def getTranslatedName(self, language = None): + """Get the translated name. + @return: A string. + """ + if language == None: + return self.__parent.tr(self.__name) + else: + return self.__parent.tr2(language, self.__name) + + # -------------------------------------------------------------------------- + # Get the description. + # -------------------------------------------------------------------------- + def getDescription(self, language = None): + """Get the description. + @return: A string. + """ + if language == None: + return self.__parent.tr(self.__description) + else: + return self.__parent.tr2(language, self.__description) Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginCommand.py ___________________________________________________________________ Name: svn:keywords + Id Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginDescription.py =================================================================== --- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginDescription.py (rev 0) +++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginDescription.py 2009-05-01 08:32:06 UTC (rev 4604) @@ -0,0 +1,187 @@ +# Copyright (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 +# +# This module is highly inspired by a "gadget framework" written by +# "Yoran Brault" <http://artisan.karma-lab.net> + +import os + +# ------------------------------------------------------------------------------ +# Plugin description class. +# ------------------------------------------------------------------------------ +class PluginDescription(object): + """Plugin description. + """ + + # -------------------------------------------------------------------------- + # Constructor of the class. + # -------------------------------------------------------------------------- + def __init__(self, parent, dictionary, workingPath): + """Constructor of the class. + @param parent: Parent Plugin. + @param dictionary: Description as dictionary. + @param workingPath: Working path of the plugin. + """ + self.__parent = parent + self.__dictionary = dictionary + self.__name = None + self.__uuid = None + self.__author = None + self.__version = None + self.__description = None + self.__iconFile = None + self.__helpFile = None + self.__platform = None + self.__ttsName = None + self.__update(dictionary, workingPath) + + # -------------------------------------------------------------------------- + # Get the parent plugin. + # -------------------------------------------------------------------------- + def getParent(self): + """Get the parent plugin. + @return: A Plugin object. + """ + return self.__parent + + # -------------------------------------------------------------------------- + # Get the dictionary. + # -------------------------------------------------------------------------- + def getDictionary(self): + """Get the dictionary. + @return: A dictionary. + """ + return self.__dictionary + + # -------------------------------------------------------------------------- + # Update the description. + # -------------------------------------------------------------------------- + def __update(self, dictionary, workingPath): + """Update the description. + """ + # Save the dictionary + self.__dictionary = dictionary + # Get the descriptor values + self.__name = dictionary['name'] + self.__author = dictionary['author'] + self.__version = dictionary['version'] + self.__uuid = dictionary['uuid'] + self.__iconFile = os.path.join(workingPath, dictionary['iconFile']) + self.__description = dictionary['description'] + self.__workingPath = workingPath + self.__platform = "all" + if dictionary.has_key('platform'): + self.__platform = dictionary['platform'].lower() + self.__ttsName = self.__name + if dictionary.has_key('ttsName'): + self.__ttsName = dictionary['ttsName'] + + # -------------------------------------------------------------------------- + # Get the plugin name. + # -------------------------------------------------------------------------- + def getName(self): + """Get the plugin name. + @return: A string. + """ + return self.__name + + # -------------------------------------------------------------------------- + # Get the translated name of the plugin. + # -------------------------------------------------------------------------- + def getTranslatedName(self, language = None): + """Get the translated name of the plugin. + @return: A string. + """ + if language == None: + return self.__parent.tr(self.__name) + else: + return self.__parent.tr2(language, self.__name) + + # -------------------------------------------------------------------------- + # Get the TTS name of the plugin. + # -------------------------------------------------------------------------- + def getTtsName(self, language = None): + """Get the TTS name of the plugin. + @return: A string. + """ + if language == None: + return self.__parent.tr(self.__ttsName) + else: + return self.__parent.tr2(language, self.__ttsName) + + # -------------------------------------------------------------------------- + # Get the uuid of the plugin. + # -------------------------------------------------------------------------- + def getUuid(self): + """Get the uuid of the plugin. + @return: A string. + """ + return self.__uuid + + # -------------------------------------------------------------------------- + # Get the author of the plugin. + # -------------------------------------------------------------------------- + def getAuthor(self): + """Get the author of the plugin. + @return: A string. + """ + return self.__author + + # -------------------------------------------------------------------------- + # Get the version of the plugin. + # -------------------------------------------------------------------------- + def getVersion(self): + """Get the version of the plugin. + @return: A string. + """ + return self.__version + + # -------------------------------------------------------------------------- + # Get the translated description of the plugin. + # -------------------------------------------------------------------------- + def getDescription(self, language = None): + """Get the translated description of the plugin. + @return: A string. + """ + if language == None: + return self.__parent.tr(self.__description) + else: + return self.__parent.tr2(language, self.__description) + + # -------------------------------------------------------------------------- + # Get the icon url of the plugin. + # -------------------------------------------------------------------------- + def getIconFile(self): + """Get the icon url of the plugin. + @return: A string. + """ + return self.__iconFile + + # -------------------------------------------------------------------------- + # Get the translated help content of the plugin. + # -------------------------------------------------------------------------- + def getHelpFile(self, language = None): + """Get the translated help content of the plugin. + @return: A string. + """ + if language == None: + return os.path.join(self.__workingPath, "resources", "help.wiki") + else: + helpFile = os.path.join(self.__workingPath, "resources", + "help_%s.wiki" % language) + if not os.path.isfile(helpFile): + return os.path.join(self.__workingPath, "resources", + "help.wiki") + else: + return helpFile + + # -------------------------------------------------------------------------- + # Get the platform of this plugin. + # -------------------------------------------------------------------------- + def getPlatform(self): + """Get the platform of this plugin. + @return: A string. <"all"|"linux"|"windows"> + """ + return self.__platform Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginDescription.py ___________________________________________________________________ Name: svn:keywords + Id Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginParameter.py =================================================================== --- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginParameter.py (rev 0) +++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginParameter.py 2009-05-01 08:32:06 UTC (rev 4604) @@ -0,0 +1,257 @@ +# Copyright (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 +# +# This module is highly inspired by a "gadget framework" written by +# "Yoran Brault" <http://artisan.karma-lab.net> + +# Possible parameter types. +PARAMETER_TYPES_LIST = ['integer', 'string', 'boolean', 'booleans', 'float', + 'enum', 'password', 'file', 'directory', 'increment'] + +# ------------------------------------------------------------------------------ +# Plugin parameter class. +# ------------------------------------------------------------------------------ +class PluginParameter(object): + """Plugin parameter class. + """ + + # -------------------------------------------------------------------------- + # Constructor of the class. + # -------------------------------------------------------------------------- + def __init__(self, parent, dictionary): + """Constructor of the class. + @param parent: Parent Plugin. + @param dictionary: Parameter as dictionary. + """ + self.__parent = parent + self.__dictionary = dictionary + self.__name = None + self.__type = None + self.__enumValues = None + self.__enumValuesList = None + self.__defaultValue = None + self.__description = None + self.__category = None + self.__minValue = None + self.__maxValue = None + self.__platform = None + self.__visible = None + self.__filters = None + self.__stepValue = None + self.__update() + + # -------------------------------------------------------------------------- + # Update the field values with the parameter dictionary. + # -------------------------------------------------------------------------- + def __update(self): + """Update the field values with the parameter dictionary. + """ + self.__name = self.__dictionary['name'] + self.__type = self.__dictionary['type'] + self.__enumValuesList = [] + if self.__type.lower().find("enum") == 0: + self.__type = "enum" + self.__enumValues = self.__dictionary['type'].split("(")[1][:-1] + for value in self.__enumValues.split(","): + self.__enumValuesList.append(value.strip()) + elif self.__type.lower().find("booleans") == 0: + self.__type = "booleans" + self.__enumValues = self.__dictionary['type'].split("(")[1][:-1] + for value in self.__enumValues.split(","): + self.__enumValuesList.append(value.strip()) + else: + self.__enumValues = "" + self.__defaultValue = self.__dictionary['defaultValue'] + self.__description = self.__dictionary['description'] + self.__category = "" + if self.__dictionary.has_key('category'): + self.__category = self.__dictionary['category'] + self.__minValue = "0.0" + if self.__dictionary.has_key('minValue'): + self.__minValue = self.__dictionary['minValue'] + self.__maxValue = "1.0" + if self.__dictionary.has_key('maxValue'): + self.__maxValue = self.__dictionary['maxValue'] + self.__platform = "all" + if self.__dictionary.has_key('platform'): + self.__platform = self.__dictionary['platform'].lower() + self.__visible = "true" + if self.__dictionary.has_key('visible'): + self.__visible = self.__dictionary['visible'].lower() + self.__filters = "" + if self.__dictionary.has_key('filters'): + self.__filters = self.__dictionary['filters'] + self.__stepValue = "1" + if self.__dictionary.has_key('stepValue'): + self.__stepValue = self.__dictionary['stepValue'] + + # -------------------------------------------------------------------------- + # Get the parent plugin. + # -------------------------------------------------------------------------- + def getParent(self): + """Get the parent plugin. + @return: The parent plugin. + """ + return self.__parent + + # -------------------------------------------------------------------------- + # Get the name. + # -------------------------------------------------------------------------- + def getName(self): + """Get the name. + @return: A string. + """ + return self.__name + + # -------------------------------------------------------------------------- + # Get the type. + # -------------------------------------------------------------------------- + def getType(self): + """Get the type. + @return: A string. + """ + return self.__type + + # -------------------------------------------------------------------------- + # Get the default value. + # -------------------------------------------------------------------------- + def getDefaultValue(self, language = None): + """Get the default value. + @return: A string. + """ + if language == None: + return self.__defaultValue + else: + return self.__parent.tr2(language, self.__defaultValue) + + # -------------------------------------------------------------------------- + # Get the description. + # -------------------------------------------------------------------------- + def getDescription(self, language = None): + """Get the description. + @return: A string. + """ + if language == None: + return self.__parent.tr(self.__description) + else: + return self.__parent.tr2(language, self.__description) + + # -------------------------------------------------------------------------- + # Get the translated name. + # -------------------------------------------------------------------------- + def getTranslatedName(self, language = None): + """Get the translated name. + @return: A string. + """ + if language == None: + return self.__parent.tr(self.__name) + else: + return self.__parent.tr2(language, self.__name) + + # -------------------------------------------------------------------------- + # Get the category. + # -------------------------------------------------------------------------- + def getCategory(self): + """Get the category. + @return: A string. + """ + return self.__category + + # -------------------------------------------------------------------------- + # Get the enumerated values. + # -------------------------------------------------------------------------- + def getEnumValues(self, language = None): + """Get the enumerated values. + @return: A string. + """ + if language == None: + return self.__parent.tr(self.__enumValues) + else: + return self.__parent.tr2(language, self.__enumValues) + + # -------------------------------------------------------------------------- + # Get the untranslated value of an enumerated value. + # -------------------------------------------------------------------------- + def getUntranslatedEnumValue(self, translatedValue, language = None): + """Get the untranslated value of an enumerated value. + @return: A string. + """ + translatedValue = translatedValue.strip() + translatedEnumValues = self.getEnumValues(language) + idx = -1 + for i, value in enumerate(translatedEnumValues.split(",")): + if value.strip() == translatedValue: + idx = i + break + if idx != -1: + return self.__enumValuesList[idx] + else: + return self.__enumValuesList[0] + + # -------------------------------------------------------------------------- + # Get the minimal value. + # -------------------------------------------------------------------------- + def getMinValue(self): + """Get the minimal value. + @return: A string. + """ + return self.__minValue + + # -------------------------------------------------------------------------- + # Get the maximal value. + # -------------------------------------------------------------------------- + def getMaxValue(self): + """Get the maximal value. + @return: A string. + """ + return self.__maxValue + + # -------------------------------------------------------------------------- + # Get the platform of this parameter. + # -------------------------------------------------------------------------- + def getPlatform(self): + """Get the platform of this parameter. + @return: A string. <"all"|"linux"|"windows"> + """ + return self.__platform + + # -------------------------------------------------------------------------- + # Get if the parameter is visible or not. + # -------------------------------------------------------------------------- + def isVisible(self): + """Get if the parameter is visible or not. + @return: A string. <"true"|"false"> + """ + if self.__visible.lower() == "true": + return True + else: + return False + + # -------------------------------------------------------------------------- + # Set if the parameter is visible or not. + # -------------------------------------------------------------------------- + def setVisible(self, isVisible): + """Set if the parameter is visible or not. + @param isVisible: A string. <"true"|"false"> + """ + self.__visible = isVisible + + # -------------------------------------------------------------------------- + # Get the file extention filters. (for type="file") + # -------------------------------------------------------------------------- + def getFilters(self): + """Get the file extention filters. (for type="file") + @return: A string. + """ + return self.__filters + + # -------------------------------------------------------------------------- + # Get the step value. + # -------------------------------------------------------------------------- + def getStepValue(self): + """Get the step value. + @return: A string. + """ + return self.__stepValue Property changes on: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginParameter.py ___________________________________________________________________ Name: svn:keywords + Id Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginTask.py =================================================================== --- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginTask.py (rev 0) +++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/applicationserver/plugin/PluginTask.py 2009-05-01 08:32:06 UTC (rev 4604) @@ -0,0 +1,419 @@ +# Copyright (C)... [truncated message content] |
|
From: remi <c2m...@c2...> - 2009-05-01 08:31:30
|
Author: remi
Date: 2009-05-01 10:31:14 +0200 (Fri, 01 May 2009)
New Revision: 4603
Modified:
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/filesystem/DirectoryContentObserver.py
Log:
* improved directory observation cycle
Modified: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/filesystem/DirectoryContentObserver.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/filesystem/DirectoryContentObserver.py 2009-04-30 07:32:49 UTC (rev 4602)
+++ softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/util/filesystem/DirectoryContentObserver.py 2009-05-01 08:31:14 UTC (rev 4603)
@@ -271,7 +271,12 @@
"""
while self.isStarted():
self.__checkForUpdate()
- time.sleep(self.__rate)
+ m = int(self.__rate / 0.1)
+ for i in range(m):
+ if self.isStarted():
+ time.sleep(0.1)
+ else:
+ return
# ------------------------------------------------------------------------------
# Program entry point for example.
|
|
From: jerome <c2m...@c2...> - 2009-04-30 07:32:57
|
Author: jerome Date: 2009-04-30 09:32:49 +0200 (Thu, 30 Apr 2009) New Revision: 4602 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po Log: *Updated po files. Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po 2009-04-30 07:19:59 UTC (rev 4601) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po 2009-04-30 07:32:49 UTC (rev 4602) @@ -1,6 +1,6 @@ msgid "" -msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-28 12:12+0200\nPO-Revision-Date: 2009-04-28 12:13+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: en\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-30 09:25+0200\nPO-Revision-Date: 2009-04-30 09:25+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: en\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" msgid "Belgian Dutch programs" msgstr "Belgian Dutch programs" @@ -98,3 +98,6 @@ msgid "Select time frame" msgstr "Select time frame" +msgid "Error while loading the TV program" +msgstr "Error while loading the TV program" + Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po 2009-04-30 07:19:59 UTC (rev 4601) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po 2009-04-30 07:32:49 UTC (rev 4602) @@ -1,6 +1,6 @@ msgid "" -msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-28 12:12+0200\nPO-Revision-Date: 2009-04-28 12:19+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: es\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-30 09:25+0200\nPO-Revision-Date: 2009-04-30 09:27+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: es\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" msgid "Belgian Dutch programs" msgstr "Programas en Belga Aleman" @@ -98,3 +98,6 @@ msgid "Select time frame" msgstr "Seleccione una franja horaria" +msgid "Error while loading the TV program" +msgstr "Error al cargar el programa de TV" + Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po 2009-04-30 07:19:59 UTC (rev 4601) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po 2009-04-30 07:32:49 UTC (rev 4602) @@ -1,6 +1,6 @@ msgid "" -msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-28 12:12+0200\nPO-Revision-Date: 2009-04-28 12:14+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n > 1);\nX-Generator: Pootle 1.2.1\n" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-30 09:25+0200\nPO-Revision-Date: 2009-04-30 09:26+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n > 1);\nX-Generator: Pootle 1.2.1\n" msgid "Belgian Dutch programs" msgstr "Programmes Flamands" @@ -98,3 +98,6 @@ msgid "Select time frame" msgstr "Choisissez une tranche horaire" +msgid "Error while loading the TV program" +msgstr "Erreur lors du chargement du programme télé" + Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po 2009-04-30 07:19:59 UTC (rev 4601) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po 2009-04-30 07:32:49 UTC (rev 4602) @@ -1,6 +1,6 @@ msgid "" -msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-28 12:12+0200\nPO-Revision-Date: 2009-04-28 12:22+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: nl\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-30 09:25+0200\nPO-Revision-Date: 2009-04-30 09:30+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: nl\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" msgid "Belgian Dutch programs" msgstr "Vlaamse TV programma's" @@ -98,3 +98,6 @@ msgid "Select time frame" msgstr "Selecteer periode van de dag" +msgid "Error while loading the TV program" +msgstr "Fout bij het laden van de TV-programma" + |
|
From: jerome <c2m...@c2...> - 2009-04-30 07:20:08
|
Author: jerome
Date: 2009-04-30 09:19:59 +0200 (Thu, 30 Apr 2009)
New Revision: 4601
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/programs/SimplePrograms.java
Log:
* Fixed a bug with the DIGITAL_FRENCH one.
* Added error message on gadget template.
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-28 10:26:23 UTC (rev 4600)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-30 07:19:59 UTC (rev 4601)
@@ -94,3 +94,5 @@
msgid "Select time frame"
msgstr ""
+msgid "Error while loading the TV program"
+msgstr ""
\ No newline at end of file
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java 2009-04-28 10:26:23 UTC (rev 4600)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java 2009-04-30 07:19:59 UTC (rev 4601)
@@ -25,7 +25,7 @@
public class Configuration extends SimpleGadgetConfiguration{
- private String channel = "VTM";
+ private String channel = "Mezzo";
private boolean giveProgramDescription = false;
private boolean giveMorning = false;
private boolean giveAfternoon = false;
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/programs/SimplePrograms.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/programs/SimplePrograms.java 2009-04-28 10:26:23 UTC (rev 4600)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/programs/SimplePrograms.java 2009-04-30 07:19:59 UTC (rev 4601)
@@ -82,6 +82,11 @@
channelsMap = this.getChannelsLinkByCountry(country, availables);
+ if((!channelsMap.containsKey(channel)) && (country == SimplePrograms.FR))
+ {
+ channelsMap = this.getChannelsLinkByCountry(SimplePrograms.DIGITAL_FRENCH, availables);
+ }
+
program = this.parseProgramsForChannel(this.channel);
if(program.size() > 0)
|
|
From: jerome <c2m...@c2...> - 2009-04-28 10:26:39
|
Author: jerome
Date: 2009-04-28 12:26:23 +0200 (Tue, 28 Apr 2009)
New Revision: 4600
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po
Log:
*Updated translation files.
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po 2009-04-28 09:58:49 UTC (rev 4599)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po 2009-04-28 10:26:23 UTC (rev 4600)
@@ -1,6 +1,6 @@
msgid ""
-msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 11:27+0200\nPO-Revision-Date: 2009-04-24 11:27+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: en\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n"
+msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-28 12:12+0200\nPO-Revision-Date: 2009-04-28 12:13+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: en\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n"
msgid "Belgian Dutch programs"
msgstr "Belgian Dutch programs"
@@ -44,15 +44,6 @@
msgid "Select your channel"
msgstr "Select your channel"
-msgid "Select a digital channel"
-msgstr "Select a digital channel"
-
-msgid "Use standard channels"
-msgstr "Use standard channels"
-
-msgid "Use digital channels"
-msgstr "Use digital channels"
-
msgid "Give program description"
msgstr "Give program description"
@@ -74,9 +65,12 @@
msgid "No TV program for now"
msgstr "No TV program for now"
-msgid "Now playing on {0}, {1}"
-msgstr "Now playing on {0}, {1}"
+msgid "Now playing on {0}. {1}"
+msgstr "Now playing on {0}. {1}"
+msgid "Next playing {0} at {1}"
+msgstr "Next playing {0} at {1}"
+
msgid "On {0}"
msgstr "On {0}"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po 2009-04-28 09:58:49 UTC (rev 4599)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po 2009-04-28 10:26:23 UTC (rev 4600)
@@ -1,6 +1,6 @@
msgid ""
-msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 11:27+0200\nPO-Revision-Date: 2009-04-24 15:05+0200\nLast-Translator: Santiago Perez <san...@gm...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: es\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n"
+msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-28 12:12+0200\nPO-Revision-Date: 2009-04-28 12:19+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: es\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n"
msgid "Belgian Dutch programs"
msgstr "Programas en Belga Aleman"
@@ -44,15 +44,6 @@
msgid "Select your channel"
msgstr "Seleccione su canal"
-msgid "Select a digital channel"
-msgstr "Seleccione un canal digital"
-
-msgid "Use standard channels"
-msgstr "Usar canales estandar"
-
-msgid "Use digital channels"
-msgstr "Usar canales digitales"
-
msgid "Give program description"
msgstr "Dar una descripción del programa"
@@ -74,9 +65,12 @@
msgid "No TV program for now"
msgstr "No dar la programación de TV por ahora"
-msgid "Now playing on {0}, {1}"
+msgid "Now playing on {0}. {1}"
msgstr "Dar programa actual de {0} a {1}"
+msgid "Next playing {0} at {1}"
+msgstr "Próximo programa {0} a {1}"
+
msgid "On {0}"
msgstr "A las {0}"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po 2009-04-28 09:58:49 UTC (rev 4599)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po 2009-04-28 10:26:23 UTC (rev 4600)
@@ -1,6 +1,6 @@
msgid ""
-msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 11:27+0200\nPO-Revision-Date: 2009-04-24 11:28+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n > 1);\nX-Generator: Pootle 1.2.1\n"
+msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-28 12:12+0200\nPO-Revision-Date: 2009-04-28 12:14+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n > 1);\nX-Generator: Pootle 1.2.1\n"
msgid "Belgian Dutch programs"
msgstr "Programmes Flamands"
@@ -44,15 +44,6 @@
msgid "Select your channel"
msgstr "Choisissez votre chaîne"
-msgid "Select a digital channel"
-msgstr "Choisissez une chaîne digitale"
-
-msgid "Use standard channels"
-msgstr "Utiliser les chaînes standard"
-
-msgid "Use digital channels"
-msgstr "Utiliser les chaînes digitales"
-
msgid "Give program description"
msgstr "Donner la description"
@@ -74,9 +65,12 @@
msgid "No TV program for now"
msgstr "Aucun programme de télévision trouvé pour le moment"
-msgid "Now playing on {0}, {1}"
-msgstr "Actuellement sur {0}, {1}"
+msgid "Now playing on {0}. {1}"
+msgstr "Actuellement sur {0}. {1}"
+msgid "Next playing {0} at {1}"
+msgstr "Ensuite {0} à {1}"
+
msgid "On {0}"
msgstr "Sur {0}"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po 2009-04-28 09:58:49 UTC (rev 4599)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po 2009-04-28 10:26:23 UTC (rev 4600)
@@ -1,6 +1,6 @@
msgid ""
-msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 11:27+0200\nPO-Revision-Date: 2009-04-24 11:33+0200\nLast-Translator: Sebastiaan Vanpoucke <se...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: nl\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n"
+msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-28 12:12+0200\nPO-Revision-Date: 2009-04-28 12:22+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: nl\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n"
msgid "Belgian Dutch programs"
msgstr "Vlaamse TV programma's"
@@ -44,15 +44,6 @@
msgid "Select your channel"
msgstr "Selecteer jouw kanaal"
-msgid "Select a digital channel"
-msgstr "Selecteer een digitaal kanaal"
-
-msgid "Use standard channels"
-msgstr "Gebruik standaard kanalen"
-
-msgid "Use digital channels"
-msgstr "Gebruik digitale kanalen"
-
msgid "Give program description"
msgstr "Geef programma beschrijving"
@@ -74,9 +65,12 @@
msgid "No TV program for now"
msgstr "Op het ogenblik is er geen programma aan het spelen"
-msgid "Now playing on {0}, {1}"
-msgstr "Na aan het spelen op {0}, {1}"
+msgid "Now playing on {0}. {1}"
+msgstr "Nu aan het spelen op {0}. {1}"
+msgid "Next playing {0} at {1}"
+msgstr "Gevolgd door {0} om {1}"
+
msgid "On {0}"
msgstr "Op {0}"
|
|
From: jerome <c2m...@c2...> - 2009-04-28 09:58:58
|
Author: jerome Date: 2009-04-28 11:58:49 +0200 (Tue, 28 Apr 2009) New Revision: 4599 Removed: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java Log: * Updated french programs gadget to match other ones. Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml 2009-04-28 09:15:22 UTC (rev 4598) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml 2009-04-28 09:58:49 UTC (rev 4599) @@ -16,35 +16,17 @@ <parameters> <parameter category="Options" - name="useStandard" - description="Use standard channels" - type="boolean" - defaultValue="true" /> - <parameter - category="Options" name="channel" description="Select your channel" - type="enum(ARTE, Canal + France, EuroNews Fr., France 2, France 3, La 5, M6, TF1, TV5)" + type="enum(ARTE,Canal + France,EuroNews Fr.,France 2,France 3,La 5,M6,TF1,TV5 , + AB Channel 1,AB Moteurs,AB4,Action,Animaux,BFM TV,Canal J, + CINE CINEMA CLASSIC,CINE CINEMA EMOTION,CINE CINEMA FAMIZ,CINE CINEMA FRISSON, + CINE CINEMA PREMIER,CINE CINEMA STAR,Cine Fx,Cine Polar,Comédie,Direct 8,Disney Channel, + Encyclopedia,Escales,France 4,Gulli,ITV,LCI,Mangas,Mezzo,NRJ 12,NT1,RTL 9,Série Club, + TF6,TMC,Toute l'histoire,TPS STAR,Virgin 17,Voyage,W9)" defaultValue="TF1" /> <parameter category="Options" - name="useDigital" - description="Use digital channels" - type="boolean" - defaultValue="false" /> - <parameter - category="Options" - name="digitalChannel" - description="Select a digital channel" - type="enum(AB Channel 1, AB Moteurs, AB4, Action, Animaux, BFM TV, Canal J, - CINE CINEMA CLASSIC, CINE CINEMA EMOTION, CINE CINEMA FAMIZ, CINE CINEMA FRISSON, - CINE CINEMA PREMIER, CINE CINEMA STAR, Cine Fx, Cine Polar, Comédie, Direct 8, Disney Channel, - Encyclopedia, Escales, France 4, Gulli, ITV, LCI, Mangas, Mezzo, NRJ 12, NT1, RTL 9, Série Club, - TF6, TMC, Toute l'histoire, TPS STAR, Virgin 17, Voyage, - W9, )" - defaultValue="LCI" /> - <parameter - category="Options" name="tHour" description="Select time frame" type="enum(Morning, Afternoon, Evening)" Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-28 09:15:22 UTC (rev 4598) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-28 09:58:49 UTC (rev 4599) @@ -40,15 +40,6 @@ msgid "Select your channel" msgstr "" -msgid "Select a digital channel" -msgstr "" - -msgid "Use standard channels" -msgstr "" - -msgid "Use digital channels" -msgstr "" - msgid "Give program description" msgstr "" Deleted: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java 2009-04-28 09:15:22 UTC (rev 4598) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java 2009-04-28 09:58:49 UTC (rev 4599) @@ -1,249 +0,0 @@ -/* This file is part of "tuxdroid programs tv". - * Copyright 2009, kysoh - * Author : Conan Jerome - * eMail : jerome.conan AT kysoh.com - * - * "tuxdroid programs tv" 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. - * - * "tuxdroid programs tv" 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 "tuxdroid programs tv"; 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.tvPrograms.gadget; - -import com.kysoh.tuxdroid.gadget.framework.gadget.SimpleGadgetConfiguration; - -public class FrenchConfiguration extends SimpleGadgetConfiguration{ - - private String digitalChannel = "Disney Channel"; - private boolean useDigital = false; - private boolean useStandard = true; - private String channel = "ARTE"; - private boolean giveProgramDescription = false; - private boolean giveMorning = false; - private boolean giveAfternoon = false; - private boolean giveEvening = false; - private boolean giveNowPlaying = true; - - private String tHour = "Morning"; - - /** - * Return the selected digital channel. - * @return - */ - public String getDigitalChannel() - { - return this.digitalChannel; - } - - - /** - * Set the digital channel. - * @param aHertzChannel - */ - public void setDigitalChannel(String aDigitalChannel) - { - this.digitalChannel = aDigitalChannel; - } - - /** - * Sets 'morning' 'evening' or 'afternoon' - * @return - */ - public String getTHour() - { - return this.tHour; - } - - /** - * Sets the parameter value. - * @param aTHour - */ - public void setTHour(String aTHour) - { - this.tHour = aTHour; - - if(this.tHour.equalsIgnoreCase("morning")) - { - this.setGiveMorning(true); - } - else if(this.tHour.equalsIgnoreCase("afternoon")) - { - this.setGiveAfternoon(true); - } - else if(this.tHour.equalsIgnoreCase("evening")) - { - this.setGiveEvening(true); - } - } - - - /** - * Return true if user wants to hear digitals channels. - * @return - */ - public boolean getUseDigital() - { - return this.useDigital; - } - - - /** - * Set the 'use digital' parameter value. - * @param aUseDigital - */ - public void setUseDigital(boolean aUseDigital) - { - this.useDigital = aUseDigital; - } - - - /** - * Return true if user wants to hear standart programs. - * @return - */ - public boolean getUseStandard() - { - return this.useStandard; - } - - - /** - * Set the 'use standart' parameters. - * @param aUseStandart - */ - public void setUseStandard(boolean aUseStandard) - { - this.useStandard = aUseStandard; - } - - - /** - * Return the channel. - * @return - */ - public String getChannel() - { - return this.channel; - } - - - /** - * Sets the channel. - * @param aChannel - */ - public void setChannel(String aChannel) - { - this.channel = aChannel; - } - - - /** - * Return true if user wants to hear the programs description. - * @return - */ - public boolean getGiveProgramDescription() - { - return this.giveProgramDescription; - } - - - /** - * Sets to give program desciption parameter. - * @param give - */ - public void setGiveProgramDescription(boolean give) - { - this.giveProgramDescription = give; - } - - - /** - * Sets the 'now playing' parameter. - * @param aNowPlaying - */ - public void setNowPlaying(boolean aNowPlaying) - { - this.giveNowPlaying = aNowPlaying; - } - - - /** - * Return true if user wants to hear the current played program. - * @return - */ - public boolean getGiveNowPlaying() - { - return this.giveNowPlaying; - } - - - /** - * Set the 'give morning' parameter. - * @param aGiveMorning - */ - public void setGiveMorning(boolean aGiveMorning) - { - this.giveMorning = aGiveMorning; - } - - - /** - * Return true if user wants to hear the morning program. - * @return - */ - public boolean getGiveMorning() - { - return this.giveMorning; - } - - - /** - * Return true if user wants to hear the afternoon program. - * @return - */ - public boolean getGiveAfternoon() - { - return this.giveAfternoon; - } - - - /** - * Set the afternnon parameter. - * @param aGiveAfternoon - */ - public void setGiveAfternoon(boolean aGiveAfternoon) - { - this.giveAfternoon = aGiveAfternoon; - } - - - /** - * Return true if user wants to hear the evening prgrams. - * @return - */ - public boolean getGiveEvening() - { - return this.giveEvening; - } - - - /** - * Set the 'give evening' parameter. - * @param aGiveEvening - */ - public void setGiveEvening(boolean aGiveEvening) - { - this.giveEvening = aGiveEvening; - } -} Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java 2009-04-28 09:15:22 UTC (rev 4598) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java 2009-04-28 09:58:49 UTC (rev 4599) @@ -28,7 +28,7 @@ import com.kysoh.tvPrograms.ProgramLoadListener; import com.kysoh.tvPrograms.programs.SimplePrograms; -public class GadgetProgramsTvFr extends SimpleGadget<FrenchConfiguration> implements ProgramLoadListener{ +public class GadgetProgramsTvFr extends SimpleGadget<Configuration> implements ProgramLoadListener{ SimplePrograms french; @@ -44,18 +44,7 @@ configuration().getGiveMorning() || configuration().getGiveNowPlaying()) { SimplePrograms.addProgramLoadListener(this); - - //Make use of standard french channels. - if(this.configuration().getUseStandard()) - { - french = new SimplePrograms(SimplePrograms.FR, this.configuration().getChannel()); - } - //Make use of digital programs - else if(this.configuration().getUseDigital()) - { - this.configuration().setUseDigital(false); - french = new SimplePrograms(SimplePrograms.DIGITAL_FRENCH, this.configuration().getDigitalChannel()); - } + french = new SimplePrograms(SimplePrograms.FR, this.configuration().getChannel()); } else { @@ -84,149 +73,21 @@ { try { - giveProgram(completeProgram); - //Checking if gadget has to release digital program. - if(this.configuration().getUseDigital()) - { - this.configuration().setUseDigital(false); - french = new SimplePrograms(SimplePrograms.DIGITAL_FRENCH, this.configuration().getDigitalChannel()); - } - + GadgetProgramTV.giveProgram(this.configuration(), completeProgram, this); } catch(Exception error) { - this.loadError(null); + ; } } /** - * Used function to give the current tv program. - * @param configuration - */ - public void giveProgram(Vector<Program> programme) - { - - //Give now playing program. - if(this.configuration().getGiveNowPlaying()) - { - Program nowPlaying = SimplePrograms.getNowPlaying(programme); - if(nowPlaying != null) - { - throwMessage("Now playing on {0}. {1}", nowPlaying.getChannel(), nowPlaying.getTitle()); - - Program nextPlaying = SimplePrograms.getNextPlaying(programme, nowPlaying); - - if(nextPlaying != null) - { - throwMessage("Next playing {0} at {1}", nextPlaying.getTitle(), nextPlaying.getStartTime()); - } - } - else - { - throwMessage("No TV program for now"); - } - } - - //Morning program. - if(this.configuration().getGiveMorning()) - { - throwMessage("Your morning TV Programs"); - - if(!this.configuration().getGiveNowPlaying()) - { - throwMessage("On {0}", programme.get(0).getChannel()); - } - - Vector<Program> morning = SimplePrograms.sortMorning(programme); - - if(morning.size() == 0) - { - throwMessage("I didn't find any TV programs according to your selected time frame."); - } - - for(Program oneProgram : morning) - { - if(!this.configuration().getGiveProgramDescription()) - { - throwMessage("{0}, {1}", oneProgram.getStartTime(), oneProgram.getTitle()); - } - else - { - throwMessage("{0}, {1}, {2}", oneProgram.getStartTime(), oneProgram.getTitle(), oneProgram.getDescription()); - } - } - } - - //Afternoon program. - if (this.configuration().getGiveAfternoon()) - { - throwMessage("Your afternoon TV Programs"); - - if(!this.configuration().getGiveNowPlaying()) - { - throwMessage("On {0}", programme.get(0).getChannel()); - } - - Vector<Program> afternoon = SimplePrograms.sortAfternoon(programme); - - if(afternoon.size() == 0) - { - throwMessage("I didn't find any TV programs according to your selected time frame."); - } - - for(Program oneProgram : afternoon) - { - - if(!this.configuration().getGiveProgramDescription()) - { - throwMessage("{0}, {1}", oneProgram.getStartTime(), oneProgram.getTitle()); - } - else - { - throwMessage("{0}, {1}, {2}", oneProgram.getStartTime(), oneProgram.getTitle(), oneProgram.getDescription()); - } - } - } - - //Evening program. - if(this.configuration().getGiveEvening()) - { - throwMessage("Your evening TV Programs"); - - if(!this.configuration().getGiveNowPlaying()) - { - throwMessage("On {0}", programme.get(0).getChannel()); - } - - Vector<Program> evening = SimplePrograms.sortEvening(programme); - - if(evening.size() == 0) - { - throwMessage("I didn't find any TV programs according to your selected time frame."); - } - - for(Program oneProgram : evening) - { - if(!this.configuration().getGiveProgramDescription()) - { - throwMessage("{0}, {1}", oneProgram.getStartTime(), oneProgram.getTitle()); - } - else - { - throwMessage("{0}, {1}, {2}", oneProgram.getStartTime(), oneProgram.getTitle(), oneProgram.getDescription()); - } - } - } - } - - - /** * Main entry point. * @param args */ public static void main(String[] args) { - new GadgetProgramsTvFr().boot(args, new FrenchConfiguration()); + new GadgetProgramsTvFr().boot(args, new Configuration()); } } |
|
From: jerome <c2m...@c2...> - 2009-04-28 09:15:37
|
Author: jerome
Date: 2009-04-28 11:15:22 +0200 (Tue, 28 Apr 2009)
New Revision: 4598
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_du/resources/gadget.xml
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_fr/resources/gadget.xml
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/ge/resources/gadget.xml
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl/resources/gadget.xml
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/sp/resources/gadget.xml
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/uk/resources/gadget.xml
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramTV.java
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java
Log:
* Updated po template.
* Give program description disabled by default.
* Updated gui string.
* Replaced ',' by '.'.
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_du/resources/gadget.xml
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_du/resources/gadget.xml 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_du/resources/gadget.xml 2009-04-28 09:15:22 UTC (rev 4598)
@@ -33,7 +33,7 @@
name="giveProgramDescription"
description="Give program description"
type="boolean"
- defaultValue="true" />
+ defaultValue="false" />
<parameter
category="Options"
name="giveNowPlaying"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_fr/resources/gadget.xml
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_fr/resources/gadget.xml 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_fr/resources/gadget.xml 2009-04-28 09:15:22 UTC (rev 4598)
@@ -32,7 +32,7 @@
name="giveProgramDescription"
description="Give program description"
type="boolean"
- defaultValue="true" />
+ defaultValue="false" />
<parameter
category="Options"
name="giveNowPlaying"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml 2009-04-28 09:15:22 UTC (rev 4598)
@@ -23,7 +23,7 @@
<parameter
category="Options"
name="channel"
- description="Select a channel"
+ description="Select your channel"
type="enum(ARTE, Canal + France, EuroNews Fr., France 2, France 3, La 5, M6, TF1, TV5)"
defaultValue="TF1" />
<parameter
@@ -54,7 +54,7 @@
name="giveProgramDescription"
description="Give program description"
type="boolean"
- defaultValue="true" />
+ defaultValue="false" />
<parameter
category="Options"
name="giveNowPlaying"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-28 09:15:22 UTC (rev 4598)
@@ -70,9 +70,12 @@
msgid "No TV program for now"
msgstr ""
-msgid "Now playing on {0}, {1}"
+msgid "Now playing on {0}. {1}"
msgstr ""
+msgid "Next playing {0} at {1}"
+msgstr ""
+
msgid "On {0}"
msgstr ""
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/ge/resources/gadget.xml
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/ge/resources/gadget.xml 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/ge/resources/gadget.xml 2009-04-28 09:15:22 UTC (rev 4598)
@@ -31,7 +31,7 @@
name="giveProgramDescription"
description="Give program description"
type="boolean"
- defaultValue="true" />
+ defaultValue="false" />
<parameter
category="Options"
name="giveNowPlaying"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl/resources/gadget.xml
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl/resources/gadget.xml 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl/resources/gadget.xml 2009-04-28 09:15:22 UTC (rev 4598)
@@ -33,7 +33,7 @@
name="giveProgramDescription"
description="Give program description"
type="boolean"
- defaultValue="true" />
+ defaultValue="false" />
<parameter
category="Options"
name="giveNowPlaying"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/sp/resources/gadget.xml
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/sp/resources/gadget.xml 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/sp/resources/gadget.xml 2009-04-28 09:15:22 UTC (rev 4598)
@@ -32,7 +32,7 @@
name="giveProgramDescription"
description="Give program description"
type="boolean"
- defaultValue="true" />
+ defaultValue="false" />
<parameter
category="Options"
name="giveNowPlaying"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/uk/resources/gadget.xml
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/uk/resources/gadget.xml 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/uk/resources/gadget.xml 2009-04-28 09:15:22 UTC (rev 4598)
@@ -32,7 +32,7 @@
name="giveProgramDescription"
description="Give program description"
type="boolean"
- defaultValue="true" />
+ defaultValue="false" />
<parameter
category="Options"
name="giveNowPlaying"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java 2009-04-28 09:15:22 UTC (rev 4598)
@@ -26,7 +26,7 @@
public class Configuration extends SimpleGadgetConfiguration{
private String channel = "VTM";
- private boolean giveProgramDescription = true;
+ private boolean giveProgramDescription = false;
private boolean giveMorning = false;
private boolean giveAfternoon = false;
private boolean giveEvening = false;
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java 2009-04-28 09:15:22 UTC (rev 4598)
@@ -29,7 +29,7 @@
private boolean useDigital = false;
private boolean useStandard = true;
private String channel = "ARTE";
- private boolean giveProgramDescription = true;
+ private boolean giveProgramDescription = false;
private boolean giveMorning = false;
private boolean giveAfternoon = false;
private boolean giveEvening = false;
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramTV.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramTV.java 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramTV.java 2009-04-28 09:15:22 UTC (rev 4598)
@@ -42,7 +42,7 @@
Program nowPlaying = SimplePrograms.getNowPlaying(programme);
if(nowPlaying != null)
{
- gadget.throwMessage("Now playing on {0}, {1}", nowPlaying.getChannel(), nowPlaying.getTitle());
+ gadget.throwMessage("Now playing on {0}. {1}", nowPlaying.getChannel(), nowPlaying.getTitle());
Program nextPlaying = SimplePrograms.getNextPlaying(programme, nowPlaying);
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java 2009-04-26 13:25:22 UTC (rev 4597)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java 2009-04-28 09:15:22 UTC (rev 4598)
@@ -113,7 +113,7 @@
Program nowPlaying = SimplePrograms.getNowPlaying(programme);
if(nowPlaying != null)
{
- throwMessage("Now playing on {0}, {1}", nowPlaying.getChannel(), nowPlaying.getTitle());
+ throwMessage("Now playing on {0}. {1}", nowPlaying.getChannel(), nowPlaying.getTitle());
Program nextPlaying = SimplePrograms.getNextPlaying(programme, nowPlaying);
|
|
From: Gwadavel <c2m...@c2...> - 2009-04-26 13:25:39
|
Author: Gwadavel Date: 2009-04-26 15:25:22 +0200 (Sun, 26 Apr 2009) New Revision: 4597 Added: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/LICENSE softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/build.py softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/ softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/GadgetPackager.py softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/__init__.py softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/util/ softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/version.py Modified: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/executables/tux-gadget-battery.py softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/resources/gadget.xml Log: Rewrite Gadget from developpement tool program SkeletonGadget Added: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/LICENSE =================================================================== --- softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/LICENSE (rev 0) +++ softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/LICENSE 2009-04-26 13:25:22 UTC (rev 4597) @@ -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: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/build.py =================================================================== --- softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/build.py (rev 0) +++ softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/build.py 2009-04-26 13:25:22 UTC (rev 4597) @@ -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.GadgetPackager import GadgetPackager + +if __name__ == "__main__": + GadgetPackager().createTgf("tuxdroid-gadget-battery.tgf") Copied: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/GadgetPackager.py (from rev 4596, softwares_suite_v3/kysoh/software/development_tool/gadget_toolkit/python/skeleton/trunk/builder/GadgetPackager.py) =================================================================== --- softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/GadgetPackager.py (rev 0) +++ softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/GadgetPackager.py 2009-04-26 13:25:22 UTC (rev 4597) @@ -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 TGF file from the main directory of a python gadget project. +# ------------------------------------------------------------------------------ +class GadgetPackager(object): + """Class to create a TGF file from the main directory of a python gadget + project. + """ + + # -------------------------------------------------------------------------- + # Create a tgf file. + # -------------------------------------------------------------------------- + def createTgf(self, tgfFileName): + """Create a tgf file. + @param tgfFileName: Tux Gadget Format 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_TGF_FILENAME = os.path.join(self.__sourcePath, tgfFileName) + # 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_TGF_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 Copied: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/__init__.py (from rev 4596, softwares_suite_v3/kysoh/software/development_tool/gadget_toolkit/python/skeleton/trunk/builder/__init__.py) =================================================================== Copied: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/util (from rev 4596, softwares_suite_v3/kysoh/software/development_tool/gadget_toolkit/python/skeleton/trunk/builder/util) Copied: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/version.py (from rev 4596, softwares_suite_v3/kysoh/software/development_tool/gadget_toolkit/python/skeleton/trunk/builder/version.py) =================================================================== --- softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/version.py (rev 0) +++ softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/builder/version.py 2009-04-26 13:25:22 UTC (rev 4597) @@ -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" Modified: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/executables/tux-gadget-battery.py =================================================================== --- softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/executables/tux-gadget-battery.py 2009-04-24 21:21:23 UTC (rev 4596) +++ softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/executables/tux-gadget-battery.py 2009-04-26 13:25:22 UTC (rev 4597) @@ -1,27 +1,12 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- -# ----------------------------------------------------------------------------- -#Test battery level or battery state of Tux Droid -# -# 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, 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., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. -# ----------------------------------------------------------------------------- -# $Id: $ -# ----------------------------------------------------------------------------- +# Write with Python gadget skeleton +# Copyright (C) 2009 Kysoh Sa +# Remi Jocaille <rem...@c2...> +# Distributed under the terms of the GNU General Public License +# http://www.gnu.org/copyleft/gpl.html + """ CHANGES ======= @@ -30,7 +15,9 @@ - Initial version 2009/03/25 - version 0.1 - Add command "Run" and "Check" - + 2009/04/26 - version 0.1.1 + - Rewrite with Python gadget skeleton + TODO LIST ========= @@ -38,45 +25,104 @@ __author__ = "Eric Lescaudron AKA Gwadavel" __appname__ = "tux battery level" -__version__ = "0.1" -__date__ = "2009/03/25" +__version__ = "0.1.1" +__date__ = "2009/04/26" __license__ = "GPL" """ -DEBUG = False - import os +import time import sys from tuxisalive.api.TuxAPI import * -tgp_ip = "127.0.0.1" -tux = TuxAPI(tgp_ip, 270) +sys.path.append(os.environ['TUXDROID_SERVER_PYTHON_UTIL']) -#Getting command to use. -command = sys.argv[1] +from util.SimpleGadget.SimpleGadgetConfiguration import SimpleGadgetConfiguration +from util.SimpleGadget.SimpleGadget import SimpleGadget -if tux.server.connect(CLIENT_LEVEL_RESTRICTED, 'BatteryLevel', 'batterylevel'): - if(command == "run"): - - level = tux.battery.getLevel() - print("message: the battery level is %1.2f ") %level - state = tux.battery.getState() - print("message: the battery is %s ") %state +class Configuration(SimpleGadgetConfiguration): + """This class make an access to the gadget parameters. + Parameters are automatically filled by the SimpleGadget class at gadget + starting. + """ + + def __init__(self): + """Initialization of the class. + It's necessary to initialize the values because the type of the python + variables is set by value assignation. If we don't initialize the + parameters the simple gadget class can't check and validate the values + passed by the framework through the os environment variables. + """ + # Call the super class + SimpleGadgetConfiguration.__init__(self) - elif(command == "check"): - - state = tux.battery.getState() + +class BatteryGadget(SimpleGadget): + """This class override the SimpleGadget class to make easy + the gadget coding. + """ + + def __init__(self): + """Initialization of the class. + """ + # Call the super class + SimpleGadget.__init__(self) + # Initialize some values ... + __tgp_ip = "127.0.0.1" + self.tux = TuxAPI(__tgp_ip, 270) + self.tux.server.connect(CLIENT_LEVEL_RESTRICTED, 'BatteryGadget', 'battery') + self.__daemonRun = False + + def start(self): + """Gadget entry point. + This method should be used to dispatch commands. + """ + if self.getCommand() == "run": + self.run() + elif self.getCommand() == "run_daemon": + self.runDaemon() + elif self.getCommand() == "check": + self.check() + else: + self.run() + + def run(self): + """Gadget entry point for the "run" command. + """ + level = self.tux.battery.getLevel() + state = self.tux.battery.getState() + message = "the battery level is %1.2f it state is %s" %(level, state) + self.throwMessage(message) + + def runDaemon(self): + """Gadget entry point for the "run_daemon" command. + """ + # Start a fake daemon loop ... + # Warning the daemonRun flag is not safe-thread (in order to have a + # clean code in this gadget example) + self.__daemonRun = True + while self.__daemonRun: + time.sleep(0.5) + self.check() + + def check(self): + """Gadget entry point for the "check" command. + """ + # Check a condition ... + state = self.tux.battery.getState() # Speak only if state == EMPTY if state == "LOW": - print("message: the battery is %s ") %state - - else: - - print("error: No defined command") - - tux.server.disconnect() -else: - print("Server not connected") - -tux.destroy() + message = "the battery is %s " %state + self.throwMessage(message) + + def onGadgetStop(self): + """Callback on gadget stop. + """ + # Stop the fake daemon loop + self.__daemonRun = False + self.tux.server.disconnect() + +if __name__ == "__main__": + gadget = BatteryGadget() + gadget.boot(sys.argv[1:], Configuration()) Modified: softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/resources/gadget.xml =================================================================== --- softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/resources/gadget.xml 2009-04-24 21:21:23 UTC (rev 4596) +++ softwares_suite_v3/community/gadget/tuxdroid-gadget-battery/trunk/resources/gadget.xml 2009-04-26 13:25:22 UTC (rev 4597) @@ -15,9 +15,15 @@ <commands> <command name="run" - description="Says the battery level and it's state" /> + description="Says the battery level and it's state" + daemon="false" /> + <command + name="run_daemon" + description="Daemon Test if battery is low" + daemon="true" /> <command name="check" - description="Says if battery is low" /> + description="Test if battery is low" + daemon="false" /> </commands> </gadget> |
|
From: remi <c2m...@c2...> - 2009-04-24 21:21:29
|
Author: remi Date: 2009-04-24 23:21:23 +0200 (Fri, 24 Apr 2009) New Revision: 4596 Added: softwares_suite_v3/kysoh/tuxware/api/python/branches/0.3.0-plugins-gadgets-conf/ Log: * started a branches to refactor* started a branches to refactoring the gadget approach : - From "gadgets" -> "configurations" - To "plugins" -> "gadgets" -> "configurations" This new approach create a new abstraction level and need a new class names and configurations way Copied: softwares_suite_v3/kysoh/tuxware/api/python/branches/0.3.0-plugins-gadgets-conf (from rev 4595, softwares_suite_v3/kysoh/tuxware/api/python/trunk) |
|
From: remi <c2m...@c2...> - 2009-04-24 19:56:01
|
Author: remi
Date: 2009-04-24 21:55:44 +0200 (Fri, 24 Apr 2009)
New Revision: 4595
Added:
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/attitunes/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/gadgets/
softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/data/plugins/
Log:
* added 3 directories:
- plugins : for *.tpg files (Tux PluGins) (called tgf in the V2)
- gadgets : for *.tg3 files (Tux Gadget v3) (called gadget configuration in the past)
and *.png for gadgets icons
- attitunes : for default *.att files
New file names are need in order to clarifying the terminology between V2 and V3
|
|
From: remi <c2m...@c2...> - 2009-04-24 19:41:37
|
Author: remi Date: 2009-04-24 21:41:18 +0200 (Fri, 24 Apr 2009) New Revision: 4594 Added: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs/ Log: * started a branches to refactoring the gadget approach : - From "gadgets" -> "configurations" - To "plugins" -> "gadgets" -> "configurations" This new approach create a new abstraction level and need a new class names and configurations way Copied: softwares_suite_v3/kysoh/tuxware/server/branches/0.3.0-plugins-gadgets-confs (from rev 4593, softwares_suite_v3/kysoh/tuxware/server/trunk) |
|
From: remi <c2m...@c2...> - 2009-04-24 17:17:18
|
Author: remi
Date: 2009-04-24 19:17:04 +0200 (Fri, 24 Apr 2009)
New Revision: 4593
Modified:
softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/attitunes/Attitune.py
softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/gadgets/Gadget.py
softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/scheduler/Task.py
softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/scheduler/TaskDescription.py
Log:
* updated the api according to the scheduler update
Modified: softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/attitunes/Attitune.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/attitunes/Attitune.py 2009-04-24 17:16:03 UTC (rev 4592)
+++ softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/attitunes/Attitune.py 2009-04-24 17:17:04 UTC (rev 4593)
@@ -97,13 +97,14 @@
"""
cmd = "attitune_manager/stop_attitune?"
return self._sendCommandBooleanResult(cmd)
-
+
# --------------------------------------------------------------------------
# Schedule the start command of this attitune.
# --------------------------------------------------------------------------
def scheduleStart(self, type = "ONCE DELAYED", name = None,
- weekMask = [True, True, True, True, True, True, True], date = None,
- time = "00:00:10"):
+ weekMask = [True, True, True, True, True, True, True],
+ date = "0000/00/00", hoursBegin = "00:00:00" , hoursEnd = "23:59:59",
+ delay = "00:01:00"):
"""Schedule the start command of this attitune.
@param type: <EVERY X|EVERY X FROM FULL HOUR|DAILY AT|ONCE AT|
ONCE DELAYED>
@@ -113,15 +114,19 @@
@param weekMask: Week mask as list of 7 booleans.
Default is [True, True, True, True, True, True, True]
@param date: Task date as string "YYYY/MM/DD".
- Default is None (no date defined)
- @param time: Task time as string "HH:MM:SS".
- Default is "00:00:10".
+ Default is "0000/00/00" (no date defined)
+ @param hoursBegin: Task hours begin as string "HH:MM:SS".
+ Default is "00:00:00".
+ @param hoursEnd: Task hours end as string "HH:MM:SS".
+ Default is "23:59:59".
+ @param delay: Task delay as string "HH:MM:SS".
+ Default is "00:01:00".
@return: The success of the request.
"""
if name == None:
name = self.getDescription().getName()
argsToSend = Task.formatRequestArguments(type, name, weekMask, date,
- time)
+ hoursBegin, hoursEnd, delay)
if argsToSend == None:
return False
argsToSend['attitune_name'] = self.getDescription().getName()
Modified: softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/gadgets/Gadget.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/gadgets/Gadget.py 2009-04-24 17:16:03 UTC (rev 4592)
+++ softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/gadgets/Gadget.py 2009-04-24 17:17:04 UTC (rev 4593)
@@ -314,7 +314,8 @@
# --------------------------------------------------------------------------
def scheduleStart(self, command = None, parameters = {},
type = "ONCE DELAYED", name = None, weekMask = [True, True, True, True,
- True, True, True], date = None, time = "00:00:10"):
+ True, True, True], date = "0000/00/00", hoursBegin = "00:00:00" ,
+ hoursEnd = "23:59:59", delay = "00:01:00"):
"""Schedule the start command of this gadget.
@param command: Command name to start the gadget.
if command is None, the first command is set.
@@ -329,9 +330,13 @@
@param weekMask: Week mask as list of 7 booleans.
Default is [True, True, True, True, True, True, True]
@param date: Task date as string "YYYY/MM/DD".
- Default is None (no date defined)
- @param time: Task time as string "HH:MM:SS".
- Default is "00:00:10".
+ Default is "0000/00/00" (no date defined)
+ @param hoursBegin: Task hours begin as string "HH:MM:SS".
+ Default is "00:00:00".
+ @param hoursEnd: Task hours end as string "HH:MM:SS".
+ Default is "23:59:59".
+ @param delay: Task delay as string "HH:MM:SS".
+ Default is "00:01:00".
@return: The success of the gadget task adding.
"""
if command == None:
@@ -346,21 +351,23 @@
if name == None:
name = self.getDescription().getName()
argsToSend = Task.formatRequestArguments(type, name, weekMask, date,
- time)
+ hoursBegin, hoursEnd, delay)
if argsToSend == None:
return False
argsToSend['gadget_uuid'] = self.__description.getUuid()
argsToSend['gadget_command'] = command
argsToSend['gadget_parameters'] = args
cmd = "task_creation/start_gadget?"
+ print argsToSend
return self._sendCommandBooleanResult(cmd, argsToSend)
# --------------------------------------------------------------------------
# Schedule the run command of this gadget.
# --------------------------------------------------------------------------
def scheduleRun(self, parameters = {}, type = "ONCE DELAYED", name = None,
- weekMask = [True, True, True, True, True, True, True], date = None,
- time = "00:00:10"):
+ weekMask = [True, True, True, True, True, True, True],
+ date = "0000/00/00", hoursBegin = "00:00:00" , hoursEnd = "23:59:59",
+ delay = "00:01:00"):
"""Schedule the run command of this gadget.
@param parameters: Parameters of the gadget as dictionary.
if no parameter is defined the default ones are set.
@@ -373,20 +380,25 @@
@param weekMask: Week mask as list of 7 booleans.
Default is [True, True, True, True, True, True, True]
@param date: Task date as string "YYYY/MM/DD".
- Default is None (no date defined)
- @param time: Task time as string "HH:MM:SS".
- Default is "00:00:10".
+ Default is "0000/00/00" (no date defined)
+ @param hoursBegin: Task hours begin as string "HH:MM:SS".
+ Default is "00:00:00".
+ @param hoursEnd: Task hours end as string "HH:MM:SS".
+ Default is "23:59:59".
+ @param delay: Task delay as string "HH:MM:SS".
+ Default is "00:01:00".
@return: The success of the gadget task adding.
"""
return self.scheduleStart(self.getDefaultRunCommandName(), parameters,
- type, name, weekMask, date, time)
+ type, name, weekMask, date, hoursBegin, hoursEnd, delay)
# --------------------------------------------------------------------------
# Schedule the check command of this gadget.
# --------------------------------------------------------------------------
def scheduleCheck(self, parameters = {}, type = "ONCE DELAYED", name = None,
- weekMask = [True, True, True, True, True, True, True], date = None,
- time = "00:00:10"):
+ weekMask = [True, True, True, True, True, True, True],
+ date = "0000/00/00", hoursBegin = "00:00:00" , hoursEnd = "23:59:59",
+ delay = "00:01:00"):
"""Schedule the check command of this gadget.
@param parameters: Parameters of the gadget as dictionary.
if no parameter is defined the default ones are set.
@@ -399,20 +411,25 @@
@param weekMask: Week mask as list of 7 booleans.
Default is [True, True, True, True, True, True, True]
@param date: Task date as string "YYYY/MM/DD".
- Default is None (no date defined)
- @param time: Task time as string "HH:MM:SS".
- Default is "00:00:10".
+ Default is "0000/00/00" (no date defined)
+ @param hoursBegin: Task hours begin as string "HH:MM:SS".
+ Default is "00:00:00".
+ @param hoursEnd: Task hours end as string "HH:MM:SS".
+ Default is "23:59:59".
+ @param delay: Task delay as string "HH:MM:SS".
+ Default is "00:01:00".
@return: The success of the gadget task adding.
"""
return self.scheduleStart(self.getDefaultCheckCommandName(), parameters,
- type, name, weekMask, date, time)
+ type, name, weekMask, date, hoursBegin, hoursEnd, delay)
# --------------------------------------------------------------------------
# Schedule the stop command of this gadget.
# --------------------------------------------------------------------------
def scheduleStop(self, type = "ONCE DELAYED", name = None,
- weekMask = [True, True, True, True, True, True, True], date = None,
- time = "00:00:10"):
+ weekMask = [True, True, True, True, True, True, True],
+ date = "0000/00/00", hoursBegin = "00:00:00" , hoursEnd = "23:59:59",
+ delay = "00:01:00"):
"""Schedule the stop command of this gadget.
@param type: <EVERY X|EVERY X FROM FULL HOUR|DAILY AT|ONCE AT|
ONCE DELAYED>
@@ -422,15 +439,19 @@
@param weekMask: Week mask as list of 7 booleans.
Default is [True, True, True, True, True, True, True]
@param date: Task date as string "YYYY/MM/DD".
- Default is None (no date defined)
- @param time: Task time as string "HH:MM:SS".
- Default is "00:00:10".
+ Default is "0000/00/00" (no date defined)
+ @param hoursBegin: Task hours begin as string "HH:MM:SS".
+ Default is "00:00:00".
+ @param hoursEnd: Task hours end as string "HH:MM:SS".
+ Default is "23:59:59".
+ @param delay: Task delay as string "HH:MM:SS".
+ Default is "00:01:00".
@return: The success of the request.
"""
if name == None:
name = self.getDescription().getName()
argsToSend = Task.formatRequestArguments(type, name, weekMask, date,
- time)
+ hoursBegin, hoursEnd, delay)
if argsToSend == None:
return False
argsToSend['gadget_uuid'] = self.__description.getUuid()
Modified: softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/scheduler/Task.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/scheduler/Task.py 2009-04-24 17:16:03 UTC (rev 4592)
+++ softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/scheduler/Task.py 2009-04-24 17:17:04 UTC (rev 4593)
@@ -82,8 +82,9 @@
# Format the arguments to pass to a "create task" requests.
# --------------------------------------------------------------------------
def formatRequestArguments(tType = "ONCE DELAYED", name = None,
- weekMask = [True, True, True, True, True, True, True], date = None,
- time = "00:00:10"):
+ weekMask = [True, True, True, True, True, True, True],
+ date = "0000/00/00", hoursBegin = "00:00:00" , hoursEnd = "23:59:59",
+ delay = "00:01:00"):
"""Format the arguments to pass to a "create task" requests.
@param tType: <EVERY X|EVERY X FROM FULL HOUR|DAILY AT|ONCE AT|
ONCE DELAYED>
@@ -93,9 +94,13 @@
@param weekMask: Week mask as list of 7 booleans.
Default is [True, True, True, True, True, True, True]
@param date: Task date as string "YYYY/MM/DD".
- Default is None (no date defined)
- @param time: Task time as string "HH:MM:SS".
- Default is "00:00:10".
+ Default is "0000/00/00" (no date defined)
+ @param hoursBegin: Task hours begin as string "HH:MM:SS".
+ Default is "00:00:00".
+ @param hoursEnd: Task hours end as string "HH:MM:SS".
+ Default is "23:59:59".
+ @param delay: Task delay as string "HH:MM:SS".
+ Default is "00:01:00".
@return: A dictionary or None.
"""
# Check the validity of the task type
@@ -116,55 +121,49 @@
if len(weekMaskString) > 0:
weekMaskString += ","
if b:
- weekMaskString += "1"
+ weekMaskString += "true"
else:
- weekMaskString += "0"
+ weekMaskString += "false"
weekMaskString = '"%s"' % weekMaskString
# Check and format the task date
- if date == None:
- year = -1
- month = -1
- day = -1
- else:
- if type(date) != type(""):
- print "Invalid task date format : (%s) -> YYYY/MM/DD" % str(date)
- return None
- splDate = date.split("/")
- if len(splDate) != 3:
- print "Invalid task date format : (%s) -> YYYY/MM/DD" % date
- return None
- try:
- year = int(splDate[0])
- month = int(splDate[1])
- day = int(splDate[2])
- except:
- print "Invalid task date format : (%s) -> YYYY/MM/DD" % date
- return None
- # Check and format the task time
- if type(time) != type(""):
- print "Invalid task time format : (%s) -> HH:MM:SS" % str(time)
- splTime = time.split(":")
+ if type(date) != type(""):
+ print "Invalid task date format : (%s) -> YYYY/MM/DD" % str(date)
+ return None
+ splDate = date.split("/")
+ if len(splDate) != 3:
+ print "Invalid task date format : (%s) -> YYYY/MM/DD" % date
+ return None
+ date = '"%s"' % date
+ # Check and format the task hours begin
+ if type(hoursBegin) != type(""):
+ print "Invalid task time format : (%s) -> HH:MM:SS" % str(hoursBegin)
+ splTime = hoursBegin.split(":")
if len(splTime) != 3:
- print "Invalid task time format : (%s) -> HH:MM:SS" % time
+ print "Invalid task time format : (%s) -> HH:MM:SS" % hoursBegin
return None
- try:
- hour = int(splTime[0])
- minute = int(splTime[1])
- second = int(splTime[2])
- except:
- print "Invalid task time format : (%s) -> HH:MM:SS" % time
+ # Check and format the task hours end
+ if type(hoursEnd) != type(""):
+ print "Invalid task time format : (%s) -> HH:MM:SS" % str(hoursEnd)
+ splTime = hoursEnd.split(":")
+ if len(splTime) != 3:
+ print "Invalid task time format : (%s) -> HH:MM:SS" % hoursEnd
return None
+ # Check and format the task delay
+ if type(delay) != type(""):
+ print "Invalid task time format : (%s) -> HH:MM:SS" % str(delay)
+ splTime = delay.split(":")
+ if len(splTime) != 3:
+ print "Invalid task time format : (%s) -> HH:MM:SS" % delay
+ return None
# Create the result dictionary
result = {
'task_type' : tType,
'task_name' : name,
'week_mask' : weekMaskString,
- 'hour' : hour,
- 'minute' : minute,
- 'second' : second,
- 'year' : year,
- 'month' : month,
- 'day' : day,
+ 'date' : date,
+ 'hoursBegin' : hoursBegin,
+ 'hoursEnd' : hoursEnd,
+ 'delay' : delay,
}
return result
Modified: softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/scheduler/TaskDescription.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/scheduler/TaskDescription.py 2009-04-24 17:16:03 UTC (rev 4592)
+++ softwares_suite_v3/kysoh/tuxware/api/python/trunk/tuxisalive/api/scheduler/TaskDescription.py 2009-04-24 17:17:04 UTC (rev 4593)
@@ -81,7 +81,7 @@
splitedStr = self.__dictionary['weekMaskString'].split(",")
if len(splitedStr) == 7:
for i, value in enumerate(splitedStr):
- if value == "1":
+ if value == "true":
result[i] = True
else:
result[i] = False
@@ -99,60 +99,57 @@
return self.__dictionary['weekMaskString']
# --------------------------------------------------------------------------
- # Get the year value.
+ # Get the date values.
# --------------------------------------------------------------------------
- def getYear(self):
- """Get the year value.
- @return: An integer or -1.
+ def getDate(self):
+ """Get the date values.
+ @return: A String.
"""
- return self.__dictionary['year']
+ result = "%.4d/%.2d/%.2d" % (int(self.__dictionary['date']['year']),
+ int(self.__dictionary['date']['month']),
+ int(self.__dictionary['date']['day']))
+ return result
# --------------------------------------------------------------------------
- # Get the month value.
+ # Get the hoursBegin values.
# --------------------------------------------------------------------------
- def getMonth(self):
- """Get the month value.
- @return: An integer or -1.
+ def getHoursBegin(self):
+ """Get the hoursBegin values.
+ @return: A String.
"""
- return self.__dictionary['month']
+ result = "%.2d:%.2d:%.2d" % (
+ int(self.__dictionary['hoursBegin']['hour']),
+ int(self.__dictionary['hoursBegin']['minute']),
+ int(self.__dictionary['hoursBegin']['second']))
+ return result
# --------------------------------------------------------------------------
- # Get the day value.
+ # Get the hoursEnd values.
# --------------------------------------------------------------------------
- def getDay(self):
- """Get the day value.
- @return: An integer or -1.
+ def getHoursEnd(self):
+ """Get the hoursEnd values.
+ @return: A String.
"""
- return self.__dictionary['day']
+ result = "%.2d:%.2d:%.2d" % (
+ int(self.__dictionary['hoursEnd']['hour']),
+ int(self.__dictionary['hoursEnd']['minute']),
+ int(self.__dictionary['hoursEnd']['second']))
+ return result
# --------------------------------------------------------------------------
- # Get the hour value.
+ # Get the delay values.
# --------------------------------------------------------------------------
- def getHour(self):
- """Get the hour value.
- @return: An integer.
+ def getDelay(self):
+ """Get the delay values.
+ @return: A String.
"""
- return self.__dictionary['hour']
+ result = "%.2d:%.2d:%.2d" % (
+ int(self.__dictionary['delay']['hour']),
+ int(self.__dictionary['delay']['minute']),
+ int(self.__dictionary['delay']['second']))
+ return result
# --------------------------------------------------------------------------
- # Get the minute value.
- # --------------------------------------------------------------------------
- def getMinute(self):
- """Get the minute value.
- @return: An integer.
- """
- return self.__dictionary['minute']
-
- # --------------------------------------------------------------------------
- # Get the second value.
- # --------------------------------------------------------------------------
- def getSecond(self):
- """Get the second value.
- @return: An integer.
- """
- return self.__dictionary['second']
-
- # --------------------------------------------------------------------------
# Get the user data.
# --------------------------------------------------------------------------
def getData(self):
|
|
From: remi <c2m...@c2...> - 2009-04-24 17:16:20
|
Author: remi
Date: 2009-04-24 19:16:03 +0200 (Fri, 24 Apr 2009)
New Revision: 4592
Modified:
softwares_suite_v3/kysoh/tuxware/server/trunk/resources/01_robot_system/resourceScheduler.py
softwares_suite_v3/kysoh/tuxware/server/trunk/resources/03_advanced_api/resourceTaskCreation.py
softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/Scheduler.py
softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/Task.py
softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/TaskDescription.py
Log:
* improved scheduler functionalities
* updated resources and services
Modified: softwares_suite_v3/kysoh/tuxware/server/trunk/resources/01_robot_system/resourceScheduler.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/trunk/resources/01_robot_system/resourceScheduler.py 2009-04-24 13:24:03 UTC (rev 4591)
+++ softwares_suite_v3/kysoh/tuxware/server/trunk/resources/01_robot_system/resourceScheduler.py 2009-04-24 17:16:03 UTC (rev 4592)
@@ -100,7 +100,7 @@
splitedStr = weekMaskString.split(",")
if len(splitedStr) == 7:
for i, value in enumerate(splitedStr):
- if value == "1":
+ if value == "true":
result[i] = True
else:
result[i] = False
@@ -108,6 +108,28 @@
pass
return result
+ def dateStringToList(self, dateString):
+ result = [0, 0, 0]
+ try:
+ splitedStr = dateString.split("/")
+ if len(splitedStr) == 3:
+ for i, value in enumerate(splitedStr):
+ result[i] = int(value)
+ except:
+ pass
+ return result
+
+ def timeStringToList(self, timeString):
+ result = [0, 0, 0]
+ try:
+ splitedStr = timeString.split(":")
+ if len(splitedStr) == 3:
+ for i, value in enumerate(splitedStr):
+ result[i] = int(value)
+ except:
+ pass
+ return result
+
# --------------------------------------------------------------------------
# Public methods
# --------------------------------------------------------------------------
@@ -121,98 +143,89 @@
"""
return self.__scheduler
- def createTask_RunEveryX(self, name, weekMask, hour, minute, second,
+ def createTask_RunEveryX(self, name, weekMask, hoursBegin, hoursEnd, delay,
command, arguments, data):
"""Create a task which start every x delay.
- hour, minute, second define the time delay between 2 executions.
- Typically for a pooling task.
@param name: Task name.
@param weekMask: Week mask. [True, True, True, True, True, True, True]
- @param hour: <0..23>
- @param minute: <0..59>
- @param second: <0..59>
+ @param hoursBegin: Hours begin. [Hour, Minute, Second]
+ @param hoursEnd: Hours end. [Hour, Minute, Second]
+ @param delay: Delay. [Hour, Minute, Second]
@param command: Command to execute.
@param arguments: Arguments of the command.
@param data: User data.
@return: The task id and the task name or None None.
"""
- task = Task(SCH_LOOP_REL, weekMask, hour, minute, second, -1, -1, -1,
- command, arguments, data)
+ task = Task(SCH_LOOP_REL, weekMask, [0, 0, 0], hoursBegin, hoursEnd,
+ delay, command, arguments, data)
return self.__scheduler.insertTask(task, name)
- def createTask_RunEveryXFromFullHour(self, name, weekMask, hour, minute, second,
- command, arguments, data):
+ def createTask_RunEveryXFromFullHour(self, name, weekMask, hoursBegin,
+ hoursEnd, delay, command, arguments, data):
"""Create a task which start every x delay synchronized with hh:00:00.
- Typically for an alarm task. (Clock gadget start at hour:00, 15, 30, 45)
- The first execution will be at hour begin + delay time.
@param name: Task name.
@param weekMask: Week mask. [True, True, True, True, True, True, True]
- @param hour: <0..23>
- @param minute: <0..59>
- @param second: <0..59>
+ @param hoursBegin: Hours begin. [Hour, Minute, Second]
+ @param hoursEnd: Hours end. [Hour, Minute, Second]
+ @param delay: Delay. [Hour, Minute, Second]
@param command: Command to execute.
@param arguments: Arguments of the command.
@param data: User data.
@return: The task id and the task name or None None.
"""
- task = Task(SCH_LOOP_ABS, weekMask, hour, minute, second, -1, -1, -1,
- command, arguments, data)
+ task = Task(SCH_LOOP_ABS, weekMask, [0, 0, 0], hoursBegin, hoursEnd,
+ delay, command, arguments, data)
return self.__scheduler.insertTask(task, name)
- def createTask_RunDailyAtTime(self, name, weekMask, hour, minute, second,
- command, arguments, data):
+ def createTask_RunDailyAtTime(self, name, weekMask, hoursBegin, command,
+ arguments, data):
"""Create a daily task which run at fixed time.
@param name: Task name.
@param weekMask: Week mask. [True, True, True, True, True, True, True]
- @param hour: <0..23>
- @param minute: <0..59>
- @param second: <0..59>
+ @param hoursBegin: Hours begin. [Hour, Minute, Second]
@param command: Command to execute.
@param arguments: Arguments of the command.
@param data: User data.
@return: The task id and the task name or None None.
"""
- task = Task(SCH_ONCE_ABS, weekMask, hour, minute, second, -1, -1, -1,
- command, arguments, data)
+ task = Task(SCH_ONCE_ABS, weekMask, [0, 0, 0], hoursBegin, [0, 0, 0],
+ [0, 0, 0], command, arguments, data)
return self.__scheduler.insertTask(task, name)
- def createTask_RunOnceAtDateTime(self, name, year, month, day, hour, minute,
- second, command, arguments, data):
+ def createTask_RunOnceAtDateTime(self, name, date, hoursBegin, command,
+ arguments, data):
"""Create a task which run once time at a specific date time.
@param name: Task name.
- @param year: Year.
- @param month: <1..12>
- @param day: <1..31>
- @param hour: <0..23>
- @param minute: <0..59>
- @param second: <0..59>
+ @param date: Date. [Year, Month, Day]
+ @param hoursBegin: Hours begin. [Hour, Minute, Second]
@param command: Command to execute.
@param arguments: Arguments of the command.
@param data: User data.
@return: The task id and the task name or None None.
"""
task = Task(SCH_ONCE_ABS, [True, True, True, True, True, True, True],
- hour, minute, second, year, month, day, command, arguments, data)
+ date, hoursBegin, [0, 0, 0], [0, 0, 0], command, arguments, data)
return self.__scheduler.insertTask(task, name)
- def createTask_RunOnceDelayed(self, name, hour, minute, second, command,
- arguments, data):
+ def createTask_RunOnceDelayed(self, name, delay, command, arguments, data):
"""Create a task which run once time after a delay.
@param name: Task name.
- @param hour: <0..23>
- @param minute: <0..59>
- @param second: <0..59>
+ @param delay: Delay. [Hour, Minute, Second]
@param command: Command to execute.
@param arguments: Arguments of the command.
@param data: User data.
@return: The task id and the task name or None None.
"""
task = Task(SCH_ONCE_REL, [True, True, True, True, True, True, True],
- hour, minute, second, -1, -1, -1, command, arguments, data)
+ [0, 0, 0], [0, 0, 0], [0, 0, 0], delay, command, arguments, data)
return self.__scheduler.insertTask(task, name)
- def createTask(self, command, arguments, taskType, taskName, weekMask, hour,
- minute, second, year, month, day, data):
+ def createTask(self, command, arguments, taskType, taskName, weekMask, date,
+ hoursBegin, hoursEnd, delay, data):
"""Create a task to start a gadget.
@param command: Command to execute.
@param arguments: Arguments of the command.
@@ -220,30 +233,28 @@
ONCE DELAYED>
@param taskName: Task name.
@param weekMask: Week mask. [True, True, True, True, True, True, True]
- @param hour: <0..23>
- @param minute: <0..59>
- @param second: <0..59>
- @param year: Year.
- @param month: <1..12>
- @param day: <1..31>
+ @param date: Date. [Year, Month, Day]
+ @param hoursBegin: Hours begin. [Hour, Minute, Second]
+ @param hoursEnd: Hours end. [Hour, Minute, Second]
+ @param delay: Delay. [Hour, Minute, Second]
@param data: User data.
@return: The task id and the task name or None None.
"""
if taskType == "EVERY X":
- return self.createTask_RunEveryX(taskName, weekMask, hour, minute,
- second, command, arguments, data)
+ return self.createTask_RunEveryX(taskName, weekMask, hoursBegin,
+ hoursEnd, delay, command, arguments, data)
if taskType == "EVERY X FROM FULL HOUR":
return self.createTask_RunEveryXFromFullHour(taskName, weekMask,
- hour, minute, second, command, arguments, data)
+ hoursBegin, hoursEnd, delay, command, arguments, data)
if taskType == "DAILY AT":
- return self.createTask_RunDailyAtTime(taskName, weekMask, hour,
- minute, second, command, arguments, data)
+ return self.createTask_RunDailyAtTime(taskName, weekMask,
+ hoursBegin, command, arguments, data)
if taskType == "ONCE AT":
- return self.createTask_RunOnceAtDateTime(taskName, year, month, day,
- hour, minute, second, command, arguments, data)
+ return self.createTask_RunOnceAtDateTime(taskName, date, hoursBegin,
+ command, arguments, data)
if taskType == "ONCE DELAYED":
- return self.createTask_RunOnceDelayed(taskName, hour, minute,
- second, command, arguments, data)
+ return self.createTask_RunOnceDelayed(taskName, delay,
+ command, arguments, data)
return None, None
def executeTask(self, taskId):
Modified: softwares_suite_v3/kysoh/tuxware/server/trunk/resources/03_advanced_api/resourceTaskCreation.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/trunk/resources/03_advanced_api/resourceTaskCreation.py 2009-04-24 13:24:03 UTC (rev 4591)
+++ softwares_suite_v3/kysoh/tuxware/server/trunk/resources/03_advanced_api/resourceTaskCreation.py 2009-04-24 17:16:03 UTC (rev 4592)
@@ -21,7 +21,7 @@
# --------------------------------------------------------------------------
def createTaskStartGadget(self, gadgetUuid, gadgetCommand, gadgetParameters,
- taskType, taskName, weekMask, hour, minute, second, year, month, day):
+ taskType, taskName, weekMask, date, hoursBegin, hoursEnd, delay):
"""Create a task to start a gadget.
@param gadgetUuid: Gadget uuid.
@param gadgetCommand: Gadget command.
@@ -30,12 +30,10 @@
ONCE DELAYED>
@param taskName: Task name.
@param weekMask: Week mask. [True, True, True, True, True, True, True]
- @param hour: <0..23>
- @param minute: <0..59>
- @param second: <0..59>
- @param year: Year.
- @param month: <1..12>
- @param day: <1..31>
+ @param date: Date. [Year, Month, Day]
+ @param hoursBegin: Hours begin. [Hour, Minute, Second]
+ @param hoursEnd: Hours end. [Hour, Minute, Second]
+ @param delay: Delay. [Hour, Minute, Second]
"""
command = "resourceGadgetFramework.startGadget"
arguments = (gadgetUuid, gadgetCommand, gadgetParameters)
@@ -46,22 +44,20 @@
'parameters' : gadgetParameters,
}
return resourceScheduler.createTask(command, arguments, taskType,
- taskName, weekMask, hour, minute, second, year, month, day, data)
+ taskName, weekMask, date, hoursBegin, hoursEnd, delay, data)
def createTaskStopGadget(self, gadgetUuid, taskType, taskName, weekMask,
- hour, minute, second, year, month, day):
+ date, hoursBegin, hoursEnd, delay):
"""Create a sheduled task to stop a gadget.
@param gadgetUuid: Gadget uuid.
@param taskType: <EVERY X|EVERY X FROM FULL HOUR|DAILY AT|ONCE AT|
ONCE DELAYED>
@param taskName: Task name.
@param weekMask: Week mask. [True, True, True, True, True, True, True]
- @param hour: <0..23>
- @param minute: <0..59>
- @param second: <0..59>
- @param year: Year.
- @param month: <1..12>
- @param day: <1..31>
+ @param date: Date. [Year, Month, Day]
+ @param hoursBegin: Hours begin. [Hour, Minute, Second]
+ @param hoursEnd: Hours end. [Hour, Minute, Second]
+ @param delay: Delay. [Hour, Minute, Second]
"""
command = "resourceGadgetFramework.stopGadget"
arguments = (gadgetUuid,)
@@ -70,22 +66,20 @@
'uuid' : gadgetUuid,
}
return resourceScheduler.createTask(command, arguments, taskType,
- taskName, weekMask, hour, minute, second, year, month, day, data)
+ taskName, weekMask, date, hoursBegin, hoursEnd, delay, data)
def createTaskPlayAttitune(self, attituneName, taskType, taskName, weekMask,
- hour, minute, second, year, month, day):
- """Create a task to start a gadget.
+ date, hoursBegin, hoursEnd, delay):
+ """Create a task to start an attitune.
@param attituneName: Attitune name.
@param taskType: <EVERY X|EVERY X FROM FULL HOUR|DAILY AT|ONCE AT|
ONCE DELAYED>
@param taskName: Task name.
@param weekMask: Week mask. [True, True, True, True, True, True, True]
- @param hour: <0..23>
- @param minute: <0..59>
- @param second: <0..59>
- @param year: Year.
- @param month: <1..12>
- @param day: <1..31>
+ @param date: Date. [Year, Month, Day]
+ @param hoursBegin: Hours begin. [Hour, Minute, Second]
+ @param hoursEnd: Hours end. [Hour, Minute, Second]
+ @param delay: Delay. [Hour, Minute, Second]
"""
command = "resourceAttituneManager.playAttitune"
arguments = (attituneName, 0.0)
@@ -94,7 +88,7 @@
'attituneName' : attituneName,
}
return resourceScheduler.createTask(command, arguments, taskType,
- taskName, weekMask, hour, minute, second, year, month, day, data)
+ taskName, weekMask, date, hoursBegin, hoursEnd, delay, data)
# Create an instance of the resource
resourceTaskCreation = TDSResourceTaskCreation("resourceTaskCreation")
@@ -114,12 +108,10 @@
'task_type' : '<EVERY X|EVERY X FROM FULL HOUR|DAILY AT|ONCE AT|ONCE DELAYED>',
'task_name' : 'string',
'week_mask' : 'string',
- 'hour' : 'uint8',
- 'minute' : 'uint8',
- 'second' : 'uint8',
- 'year' : 'int',
- 'month' : 'int8',
- 'day' : 'int8',
+ 'date' : 'string',
+ 'hoursBegin' : 'string',
+ 'hoursEnd' : 'string',
+ 'delay' : 'string',
}
self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
self.exclusiveExecution = False
@@ -141,15 +133,13 @@
taskType = parameters['task_type']
taskName = parameters['task_name']
weekMask = resourceScheduler.weekMaskStringToList(parameters['week_mask'])
- hour = parameters['hour']
- minute = parameters['minute']
- second = parameters['second']
- year = parameters['year']
- month = parameters['month']
- day = parameters['day']
+ date = resourceScheduler.dateStringToList(parameters['date'])
+ hoursBegin = resourceScheduler.timeStringToList(parameters['hoursBegin'])
+ hoursEnd = resourceScheduler.timeStringToList(parameters['hoursEnd'])
+ delay = resourceScheduler.timeStringToList(parameters['delay'])
id, name = resourceTaskCreation.createTaskStartGadget(gadgetUuid,
- gadgetCommand, gadgetParameters, taskType, taskName, weekMask, hour,
- minute, second, year, month, day)
+ gadgetCommand, gadgetParameters, taskType, taskName, weekMask, date,
+ hoursBegin, hoursEnd, delay)
if id != None:
contentStruct['root']['data'] = {
'id' : id,
@@ -173,12 +163,10 @@
'task_type' : '<EVERY X|EVERY X FROM FULL HOUR|DAILY AT|ONCE AT|ONCE DELAYED>',
'task_name' : 'string',
'week_mask' : 'string',
- 'hour' : 'uint8',
- 'minute' : 'uint8',
- 'second' : 'uint8',
- 'year' : 'int',
- 'month' : 'int8',
- 'day' : 'int8',
+ 'date' : 'string',
+ 'hoursBegin' : 'string',
+ 'hoursEnd' : 'string',
+ 'delay' : 'string',
}
self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
self.exclusiveExecution = False
@@ -193,15 +181,12 @@
taskType = parameters['task_type']
taskName = parameters['task_name']
weekMask = resourceScheduler.weekMaskStringToList(parameters['week_mask'])
- hour = parameters['hour']
- minute = parameters['minute']
- second = parameters['second']
- year = parameters['year']
- month = parameters['month']
- day = parameters['day']
+ date = resourceScheduler.dateStringToList(parameters['date'])
+ hoursBegin = resourceScheduler.timeStringToList(parameters['hoursBegin'])
+ hoursEnd = resourceScheduler.timeStringToList(parameters['hoursEnd'])
+ delay = resourceScheduler.timeStringToList(parameters['delay'])
id, name = resourceTaskCreation.createTaskStopGadget(gadgetUuid,
- taskType, taskName, weekMask, hour, minute, second, year, month,
- day)
+ taskType, taskName, weekMask, date, hoursBegin, hoursEnd, delay)
if id != None:
contentStruct['root']['data'] = {
'id' : id,
@@ -225,12 +210,10 @@
'task_type' : '<EVERY X|EVERY X FROM FULL HOUR|DAILY AT|ONCE AT|ONCE DELAYED>',
'task_name' : 'string',
'week_mask' : 'string',
- 'hour' : 'uint8',
- 'minute' : 'uint8',
- 'second' : 'uint8',
- 'year' : 'int',
- 'month' : 'int8',
- 'day' : 'int8',
+ 'date' : 'string',
+ 'hoursBegin' : 'string',
+ 'hoursEnd' : 'string',
+ 'delay' : 'string',
}
self.minimalUserLevel = TDS_CLIENT_LEVEL_ANONYMOUS
self.exclusiveExecution = False
@@ -245,15 +228,12 @@
taskType = parameters['task_type']
taskName = parameters['task_name']
weekMask = resourceScheduler.weekMaskStringToList(parameters['week_mask'])
- hour = parameters['hour']
- minute = parameters['minute']
- second = parameters['second']
- year = parameters['year']
- month = parameters['month']
- day = parameters['day']
+ date = resourceScheduler.dateStringToList(parameters['date'])
+ hoursBegin = resourceScheduler.timeStringToList(parameters['hoursBegin'])
+ hoursEnd = resourceScheduler.timeStringToList(parameters['hoursEnd'])
+ delay = resourceScheduler.timeStringToList(parameters['delay'])
id, name = resourceTaskCreation.createTaskPlayAttitune(attituneName,
- taskType, taskName, weekMask, hour, minute, second, year, month,
- day)
+ taskType, taskName, weekMask, date, hoursBegin, hoursEnd, delay)
if id != None:
contentStruct['root']['data'] = {
'id' : id,
Modified: softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/Scheduler.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/Scheduler.py 2009-04-24 13:24:03 UTC (rev 4591)
+++ softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/Scheduler.py 2009-04-24 17:16:03 UTC (rev 4592)
@@ -110,6 +110,8 @@
pass
# Store task configurations
for taskInfo in self.__tasksToExecuteStack:
+ if not taskInfo[TASK_OBJECT].isStorable():
+ continue
isFound = False
for file in files:
if taskInfo[TASK_OBJECT].getDescription().getId() == file:
Modified: softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/Task.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/Task.py 2009-04-24 13:24:03 UTC (rev 4591)
+++ softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/Task.py 2009-04-24 17:16:03 UTC (rev 4592)
@@ -19,71 +19,78 @@
# --------------------------------------------------------------------------
# Constructor of the class.
# --------------------------------------------------------------------------
- def __init__(self, ruleType, weekMask, hour, minute, second, year, month,
- day, command, arguments, data):
+ def __init__(self, ruleType, weekMask, date, hoursBegin, hoursEnd, delay,
+ command, arguments, data, storable = True):
"""Constructor of the class.
@param ruleType: <SCH_LOOP_ABS|SCH_LOOP_REL|SCH_ONCE_ABS|SCH_ONCE_REL>
@param weekMask: Week mask. [True, True, True, True, True, True, True]
- @param hour: <hh>
- @param minute: <mm>
- @param second: <ss>
- @param year: <yyyy> or -1
- @param month: <mm> or -1
- @param day: <dd> or -1
+ @param date: Date string as format [YYYY, MM, DD].
+ @param hoursBegin: Hours begin as format [HH, MM, SS]
+ @param hoursEnd: Hours end as format [HH, MM, SS]
+ @param delay: Delay as format [HH, MM, SS]
@param command: Command to execute as string.
@param arguments: Arguments of the command as tuple.
@param data: User data.
+ @param storable: Task is storable or not.
"""
dictionary = {
'type' : ruleType,
'weekMask' : weekMask,
- 'year' : year,
- 'month' : month,
- 'day' : day,
- 'hour' : hour,
- 'minute' : minute,
- 'second' : second,
+ 'date' : date,
+ 'hoursBegin' : hoursBegin,
+ 'hoursEnd' : hoursEnd,
+ 'delay' : delay,
'command' : command,
'arguments' : arguments,
}
self.__data = data
+ self.__storable = storable
self.__description = TaskDescription(self, dictionary)
now = datetime.datetime.now()
self.__monthAtStart = now.month
self.__monthMask = self.__createMonthMask(self.__monthAtStart)
if ruleType == SCH_LOOP_ABS:
- if hour == 0:
- if minute == 0:
+ if delay[0] == 0:
+ if delay[1] == 0:
m = 0
else:
- m = int(now.minute / minute) * minute
+ m = int(now.minute / delay[1]) * delay[1]
self.__startTime = datetime.datetime(now.year, now.month,
- now.day, now.hour - hour, m, second)
- self.__incrementTime = datetime.timedelta(minutes = minute)
+ now.day, now.hour - delay[0], m, delay[2])
+ self.__incrementTime = datetime.timedelta(minutes = delay[1])
else:
self.__startTime = datetime.datetime(now.year, now.month,
- now.day, now.hour - hour, minute, second)
- self.__incrementTime = datetime.timedelta(hours = hour)
+ now.day, now.hour - delay[0], delay[1], delay[2])
+ self.__incrementTime = datetime.timedelta(hours = delay[0])
elif ruleType == SCH_LOOP_REL:
self.__startTime = datetime.datetime.now()
- self.__incrementTime = datetime.timedelta(seconds = second,
- minutes = minute, hours = hour)
+ self.__incrementTime = datetime.timedelta(seconds = delay[2],
+ minutes = delay[1], hours = delay[0])
elif ruleType == SCH_ONCE_ABS:
- if (year != -1) and (month != -1) and (day != -1):
- self.__startTime = datetime.datetime(year, month,
- day, hour, minute, second)
+ if (date[0] != 0) and (date[1] != 0) and (date[2] != 0):
+ self.__startTime = datetime.datetime(date[0], date[1], date[2],
+ hoursBegin[0], hoursBegin[1], hoursBegin[2])
self.__incrementTime = None
else:
self.__startTime = datetime.datetime(now.year, now.month,
- now.day, hour, minute, second)
+ now.day, hoursBegin[0], hoursBegin[1], hoursBegin[2])
self.__incrementTime = datetime.timedelta(days = 1)
elif ruleType == SCH_ONCE_REL:
self.__startTime = datetime.datetime.now()
- self.__incrementTime = datetime.timedelta(hours = hour,
- minutes = minute, seconds = second)
+ self.__incrementTime = datetime.timedelta(hours = delay[0],
+ minutes = delay[1], seconds = delay[2])
self.__lastExecuteTime = None
# --------------------------------------------------------------------------
+ # Get if the task is storable or not.
+ # --------------------------------------------------------------------------
+ def isStorable(self):
+ """Get if the task is storable or not.
+ @return: True or False.
+ """
+ return self.__storable
+
+ # --------------------------------------------------------------------------
# Get the description object of the task.
# --------------------------------------------------------------------------
def getDescription(self):
@@ -99,18 +106,36 @@
"""Get the task informations.
@return: A dictionary.
"""
+ date = {
+ 'year' : self.getDescription().getDate()[0],
+ 'month' : self.getDescription().getDate()[1],
+ 'day' : self.getDescription().getDate()[2],
+ }
+ hoursBegin = {
+ 'hour' : self.getDescription().getHoursBegin()[0],
+ 'minute' : self.getDescription().getHoursBegin()[1],
+ 'second' : self.getDescription().getHoursBegin()[2],
+ }
+ hoursEnd = {
+ 'hour' : self.getDescription().getHoursEnd()[0],
+ 'minute' : self.getDescription().getHoursEnd()[1],
+ 'second' : self.getDescription().getHoursEnd()[2],
+ }
+ delay = {
+ 'hour' : self.getDescription().getDelay()[0],
+ 'minute' : self.getDescription().getDelay()[1],
+ 'second' : self.getDescription().getDelay()[2],
+ }
result = {
'id' : self.getDescription().getId(),
'name' : self.getDescription().getName(),
'taskDesc' : self.getDescription().toString(),
'type' : self.getDescription().getType(),
'weekMaskString' : self.getDescription().getWeekMaskString(),
- 'year' : self.getDescription().getYear(),
- 'month' : self.getDescription().getMonth(),
- 'day' : self.getDescription().getDay(),
- 'hour' : self.getDescription().getHour(),
- 'minute' : self.getDescription().getMinute(),
- 'second' : self.getDescription().getSecond(),
+ 'date' : date,
+ 'hoursBegin' : hoursBegin,
+ 'hoursEnd' : hoursEnd,
+ 'delay' : delay,
'userData' : self.__data,
}
return result
@@ -197,6 +222,9 @@
def execute(self, appGlobals):
"""Execute the task.
"""
+ if self.getDescription().getType() in [SCH_LOOP_ABS, SCH_LOOP_REL]:
+ if not self.getDescription()._checkNowIsInHoursRange():
+ return False
def async():
try:
command = eval(self.__description.getCommand(), appGlobals)
@@ -207,6 +235,7 @@
pass
t = threading.Thread(target = async)
t.start()
+ return True
# --------------------------------------------------------------------------
# Load a task.
@@ -237,23 +266,37 @@
splitedStr = dictionary['weekMaskString'].split(",")
if len(splitedStr) == 7:
for i, value in enumerate(splitedStr):
- if value == "1":
+ if value == "true":
weekMask[i] = True
else:
weekMask[i] = False
- hour = dictionary['hour']
- minute = dictionary['minute']
- second = dictionary['second']
- year = dictionary['year']
- month = dictionary['month']
- day = dictionary['day']
+ date = [
+ dictionary['date']['year'],
+ dictionary['date']['month'],
+ dictionary['date']['day'],
+ ]
+ hoursBegin = [
+ dictionary['hoursBegin']['hour'],
+ dictionary['hoursBegin']['minute'],
+ dictionary['hoursBegin']['second'],
+ ]
+ hoursEnd = [
+ dictionary['hoursEnd']['hour'],
+ dictionary['hoursEnd']['minute'],
+ dictionary['hoursEnd']['second'],
+ ]
+ delay = [
+ dictionary['delay']['hour'],
+ dictionary['delay']['minute'],
+ dictionary['delay']['second'],
+ ]
command = dictionary['command']
arguments = dictionary['arguments']
data = dictionary['userData']
except:
return None
- task = Task(ruleType, weekMask, hour, minute, second, year, month, day,
- command, arguments, data)
+ task = Task(ruleType, weekMask, date, hoursBegin, hoursEnd, delay,
+ command, arguments, data, True)
task.getDescription().setId(id)
task.getDescription().setName(name)
return task
Modified: softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/TaskDescription.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/TaskDescription.py 2009-04-24 13:24:03 UTC (rev 4591)
+++ softwares_suite_v3/kysoh/tuxware/server/trunk/util/scheduler/TaskDescription.py 2009-04-24 17:16:03 UTC (rev 4592)
@@ -3,6 +3,8 @@
# Distributed under the terms of the GNU General Public License
# http://www.gnu.org/copyleft/gpl.html
+import datetime
+
SCH_LOOP_ABS = 0
SCH_LOOP_REL = 1
SCH_ONCE_ABS = 2
@@ -46,6 +48,35 @@
return self.__parent
# --------------------------------------------------------------------------
+ # Check if the current time is in the hours range.
+ # --------------------------------------------------------------------------
+ def _checkNowIsInHoursRange(self):
+ """Check if the current time is in the hours range.
+ @return: True or False.
+ """
+ now = datetime.datetime.now()
+ hB = datetime.datetime(now.year, now.month, now.day,
+ self.getHoursBegin()[0],
+ self.getHoursBegin()[1],
+ self.getHoursBegin()[2])
+ hE = datetime.datetime(now.year, now.month, now.day,
+ self.getHoursEnd()[0],
+ self.getHoursEnd()[1],
+ self.getHoursEnd()[2])
+ if (hB <= hE): # case now in [1h .. 2h]
+ if (now >= hB) and (now < hE):
+ return True
+ else:
+ return False
+ else: # case now in [2h .. 1h]
+ m = datetime.datetime(now.year, now.month, now.day, 23, 59, 59)
+ mm = datetime.datetime(now.year, now.month, now.day, 0, 0, 0)
+ if ((now >= hB) and (now <= m)) or ((now >= mm) and (now < hE)):
+ return True
+ else:
+ return False
+
+ # --------------------------------------------------------------------------
# Get the task name.
# --------------------------------------------------------------------------
def getName(self):
@@ -97,22 +128,28 @@
"""Get the task configuration to string.
@return: A string
"""
- ymd = "%.4d/%.2d/%.2d" % (self.getYear(), self.getMonth(),
- self.getDay())
- hms = "%.2d:%.2d:%.2d" % (self.getHour(), self.getMinute(),
- self.getSecond())
+ ymdDate = "%.4d/%.2d/%.2d" % (self.getDate()[0], self.getDate()[1],
+ self.getDate()[2])
+ hmsHb = "%.2d:%.2d:%.2d" % (self.getHoursBegin()[0],
+ self.getHoursBegin()[1], self.getHoursBegin()[2])
+ hmsHe = "%.2d:%.2d:%.2d" % (self.getHoursEnd()[0],
+ self.getHoursEnd()[1], self.getHoursEnd()[2])
+ hmsDelay = "%.2d:%.2d:%.2d" % (self.getDelay()[0], self.getDelay()[1],
+ self.getDelay()[2])
if self.getType() == SCH_LOOP_REL:
- return "[EVERY X] Delay %s" % hms
+ return "[EVERY X] Delay %s Begin %s End %s" % (hmsDelay, hmsHb,
+ hmsHe)
elif self.getType() == SCH_LOOP_ABS:
- return "[EVERY X FROM FULL HOUR] Delay %s" % hms
+ return "[EVERY X FROM FULL HOUR] Delay %s Begin %s End %s" % (
+ hmsDelay, hmsHb, hmsHe)
elif self.getType() == SCH_ONCE_ABS:
- if (self.getYear() == -1) and (self.getMonth() == -1) and \
- (self.getDay() == -1):
- return "[DAILY AT] Time %s" % hms
+ if (self.getDate()[0] == 0) and (self.getDate()[1] == 0) and \
+ (self.getDate()[2] == 0):
+ return "[DAILY AT] Time %s" % hmsHb
else:
- return "[ONCE AT] Date %s Time %s" % (ymd, hms)
- else: # SCH_ONCE_REL
- return "[ONCE DELAYED] Timeout %s" % hms
+ return "[ONCE AT] Date %s Time %s" % (ymdDate, hmsHb)
+ else:
+ return "[ONCE DELAYED] Timeout %s" % hmsDelay
# --------------------------------------------------------------------------
# Get the week mask.
@@ -135,66 +172,48 @@
if len(result) > 0:
result += ","
if b:
- result += "1"
+ result += "true"
else:
- result += "0"
+ result += "false"
return result
# --------------------------------------------------------------------------
- # Get the year value.
+ # Get the date values.
# --------------------------------------------------------------------------
- def getYear(self):
- """Get the year value.
- @return: An integer or -1.
+ def getDate(self):
+ """Get the date values.
+ @return: A list of integer.
"""
- return self.__dictionary['year']
+ return self.__dictionary['date']
# --------------------------------------------------------------------------
- # Get the month value.
+ # Get the hoursBegin values.
# --------------------------------------------------------------------------
- def getMonth(self):
- """Get the month value.
- @return: An integer or -1.
+ def getHoursBegin(self):
+ """Get the hoursBegin values.
+ @return: A list of integer.
"""
- return self.__dictionary['month']
+ return self.__dictionary['hoursBegin']
# --------------------------------------------------------------------------
- # Get the day value.
+ # Get the hoursEnd values.
# --------------------------------------------------------------------------
- def getDay(self):
- """Get the day value.
- @return: An integer or -1.
+ def getHoursEnd(self):
+ """Get the hoursEnd values.
+ @return: A list of integer.
"""
- return self.__dictionary['day']
+ return self.__dictionary['hoursEnd']
# --------------------------------------------------------------------------
- # Get the hour value.
+ # Get the delay values.
# --------------------------------------------------------------------------
- def getHour(self):
- """Get the hour value.
- @return: An integer.
+ def getDelay(self):
+ """Get the delay values.
+ @return: A list of integer.
"""
- return self.__dictionary['hour']
+ return self.__dictionary['delay']
# --------------------------------------------------------------------------
- # Get the minute value.
- # --------------------------------------------------------------------------
- def getMinute(self):
- """Get the minute value.
- @return: An integer.
- """
- return self.__dictionary['minute']
-
- # --------------------------------------------------------------------------
- # Get the second value.
- # --------------------------------------------------------------------------
- def getSecond(self):
- """Get the second value.
- @return: An integer.
- """
- return self.__dictionary['second']
-
- # --------------------------------------------------------------------------
# Get the command.
# --------------------------------------------------------------------------
def getCommand(self):
|
|
From: jerome <c2m...@c2...> - 2009-04-24 13:24:13
|
Author: jerome Date: 2009-04-24 15:24:03 +0200 (Fri, 24 Apr 2009) New Revision: 4591 Added: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_en.html software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_es.html software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_fr.html software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_nl.html Log: * Added translated help files Added: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_en.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_en.html (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_en.html 2009-04-24 13:24:03 UTC (rev 4591) @@ -0,0 +1,7 @@ +<html> + <body> + <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> This gadget lets Tux Droid read the TV programs on your favorite channel.<br> Drag-and-drop this gadget into "My Favorites" to enable it.<br> <br> <I>The gadget parameters are</I>:<br> <B>Select your channel : </B>Select the channel you want to get the program list from<br> <B>Select time frame : </B>Select period of the day you want to hear the TV program list from<br> <B>Give currently playing program : </B>Tux Droid will read what is now playing and playing next for the selected channel.<br> + </font> + </body> + </html> + \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_en.html ___________________________________________________________________ Name: svn:executable + * Added: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_es.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_es.html (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_es.html 2009-04-24 13:24:03 UTC (rev 4591) @@ -0,0 +1,7 @@ +<html> + <body> + <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Este gadget hará que Tux Droid lea la programación televisiva de su canal de TV favorito.<br> Arrastre el gadget sobre 'Mis Favoritos' para activarlo.<br> <br> <I>Los parametros del gadget son</I>:<br> <B>Seleccione su canal : </B>Seleccione el canal del que quiere optener la programación<br> <B>Seleccione la franja horaria : </B>Seleccione cuando desea escuchar la programación televisiva<br> <B>Dar el programa actualmente en curso : </B>Tux Droid leerá el programa actual y el siguiente para el canal seleccionado.<br> + </font> + </body> + </html> + \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_es.html ___________________________________________________________________ Name: svn:executable + * Added: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_fr.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_fr.html (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_fr.html 2009-04-24 13:24:03 UTC (rev 4591) @@ -0,0 +1,7 @@ +<html> + <body> + <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Ce gadget laisse Tux Droid lire votre programme de télévision pour votre chaîne favorite.<br> Copiez-collez ce gadget dans "Mes Favoris" pour l'activer.<br> <br> <I>Les paramètres du gadget sont</I>:<br> <B>Choisissez votre chaîne : </B>Selectionnez la chaîne dont vous désirez connaître le programme<br> <B>Choisissez une tranche horaire : </B>Choisissez une tranche horaire de la journée pour laquelle vous souhaitez écouter le programme TV.<br> <B>Donner le programme en cours : </B>Tux Droid vous lira le programme en cours et le programme suivant sur la chaîne que vous avez sélectionnée<br> + </font> + </body> + </html> + \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_fr.html ___________________________________________________________________ Name: svn:executable + * Added: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_nl.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_nl.html (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_nl.html 2009-04-24 13:24:03 UTC (rev 4591) @@ -0,0 +1,7 @@ +<html> + <body> + <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> Deze gadget zal Tux Droid jouw Tv programma's laten voorlezen van jouw favoriete kanaal.<br> Sleep de gadget in "Mijn favorieten" om het te activeren.<br> <br> <I>De gadget opties zijn:</I>:<br> <B>Selecteer jouw kanaal : </B>Selecteer het TV kanaal waarvan je de programma lijst wil horen<br> <B>Selecteer periode van de dag : </B>Selecteer de periode van de dag waarvan je de programma lijst wil horen<br> <B>Geef programma dat nu aan het spelen is : </B>Tux Droid zal het huidige en volgende TV programma voorlezen.<br> + </font> + </body> + </html> + \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help_nl.html ___________________________________________________________________ Name: svn:executable + * |
|
From: jerome <c2m...@c2...> - 2009-04-24 13:23:05
|
Author: jerome
Date: 2009-04-24 15:22:54 +0200 (Fri, 24 Apr 2009)
New Revision: 4590
Added:
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po
Log:
* Added translation files
Added: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po (rev 0)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po 2009-04-24 13:22:54 UTC (rev 4590)
@@ -0,0 +1,106 @@
+
+msgid ""
+msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 11:27+0200\nPO-Revision-Date: 2009-04-24 11:27+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: en\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n"
+
+msgid "Belgian Dutch programs"
+msgstr "Belgian Dutch programs"
+
+msgid "This gadget reads your tv programs in Belgium"
+msgstr "This gadget reads your tv programs in Belgium"
+
+msgid "Belgian French Programs"
+msgstr "Belgian French Programs"
+
+msgid "German programs"
+msgstr "German programs"
+
+msgid "This gadget reads your German tv programs"
+msgstr "This gadget reads your German tv programs"
+
+msgid "Netherland programs"
+msgstr "Netherland programs"
+
+msgid "This gadget reads your tv programs in Netherlands"
+msgstr "This gadget reads your tv programs in Netherlands"
+
+msgid "Spanish programs"
+msgstr "Spanish programs"
+
+msgid "This gadget reads your Spanish tv programs"
+msgstr "This gadget reads your Spanish tv programs"
+
+msgid "United Kingdom programs"
+msgstr "United Kingdom programs"
+
+msgid "This gadget reads your tv programs in United Kingdom"
+msgstr "This gadget reads your tv programs in United Kingdom"
+
+msgid "French programs"
+msgstr "French programs"
+
+msgid "This gadget reads your French tv programs"
+msgstr "This gadget reads your French tv programs"
+
+msgid "Select your channel"
+msgstr "Select your channel"
+
+msgid "Select a digital channel"
+msgstr "Select a digital channel"
+
+msgid "Use standard channels"
+msgstr "Use standard channels"
+
+msgid "Use digital channels"
+msgstr "Use digital channels"
+
+msgid "Give program description"
+msgstr "Give program description"
+
+msgid "Morning"
+msgstr "Morning"
+
+msgid "Afternoon"
+msgstr "Afternoon"
+
+msgid "Evening"
+msgstr "Evening"
+
+msgid "Give currently playing program"
+msgstr "Give currently playing program"
+
+msgid "Give the tv program"
+msgstr "Give the tv program"
+
+msgid "No TV program for now"
+msgstr "No TV program for now"
+
+msgid "Now playing on {0}, {1}"
+msgstr "Now playing on {0}, {1}"
+
+msgid "On {0}"
+msgstr "On {0}"
+
+msgid "Your morning TV Programs"
+msgstr "Your morning TV Programs"
+
+msgid "{0}, {1}"
+msgstr "{0}, {1}"
+
+msgid "{0}, {1}, {2}"
+msgstr "{0}, {1}, {2}"
+
+msgid "Your afternoon TV Programs"
+msgstr "Your afternoon TV Programs"
+
+msgid "Your evening TV Programs"
+msgstr "Your evening TV Programs"
+
+msgid "Please re-configure your gadget to get a TV program list."
+msgstr "Please re-configure your gadget to get a TV program list."
+
+msgid "I didn't find any TV programs according to your selected time frame."
+msgstr "I didn't find any TV programs according to your selected time frame."
+
+msgid "Select time frame"
+msgstr "Select time frame"
+
Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/en.po
___________________________________________________________________
Name: svn:executable
+ *
Added: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po (rev 0)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po 2009-04-24 13:22:54 UTC (rev 4590)
@@ -0,0 +1,106 @@
+
+msgid ""
+msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 11:27+0200\nPO-Revision-Date: 2009-04-24 15:05+0200\nLast-Translator: Santiago Perez <san...@gm...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: es\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n"
+
+msgid "Belgian Dutch programs"
+msgstr "Programas en Belga Aleman"
+
+msgid "This gadget reads your tv programs in Belgium"
+msgstr "Este gadget lee sus programa de TV en Belgica."
+
+msgid "Belgian French Programs"
+msgstr "Programas en Belga Frances"
+
+msgid "German programs"
+msgstr "Programas en Aleman"
+
+msgid "This gadget reads your German tv programs"
+msgstr "Este gadget lee sus programa de TV en Aleman."
+
+msgid "Netherland programs"
+msgstr "Programas en Holandes"
+
+msgid "This gadget reads your tv programs in Netherlands"
+msgstr "Este gadget lee sus programa de TV en Holanda."
+
+msgid "Spanish programs"
+msgstr "Programas en Español"
+
+msgid "This gadget reads your Spanish tv programs"
+msgstr "Este gadget lee sus programa de TV en España."
+
+msgid "United Kingdom programs"
+msgstr "Programas en Reino Unido"
+
+msgid "This gadget reads your tv programs in United Kingdom"
+msgstr "Este gadget lee sus programas de TV en Reino Unido"
+
+msgid "French programs"
+msgstr "Programas en Frances"
+
+msgid "This gadget reads your French tv programs"
+msgstr "Este gadget lee sus programas de TV en Frances."
+
+msgid "Select your channel"
+msgstr "Seleccione su canal"
+
+msgid "Select a digital channel"
+msgstr "Seleccione un canal digital"
+
+msgid "Use standard channels"
+msgstr "Usar canales estandar"
+
+msgid "Use digital channels"
+msgstr "Usar canales digitales"
+
+msgid "Give program description"
+msgstr "Dar una descripción del programa"
+
+msgid "Morning"
+msgstr "Mañana"
+
+msgid "Afternoon"
+msgstr "Tarde"
+
+msgid "Evening"
+msgstr "Noche"
+
+msgid "Give currently playing program"
+msgstr "Dar el programa en curso"
+
+msgid "Give the tv program"
+msgstr "Dar la programación de TV"
+
+msgid "No TV program for now"
+msgstr "No dar la programación de TV por ahora"
+
+msgid "Now playing on {0}, {1}"
+msgstr "Dar programa actual de {0} a {1}"
+
+msgid "On {0}"
+msgstr "A las {0}"
+
+msgid "Your morning TV Programs"
+msgstr "Sus programas de TV en la mañana"
+
+msgid "{0}, {1}"
+msgstr "de {0} a {1}"
+
+msgid "{0}, {1}, {2}"
+msgstr "{0},{1},{2}"
+
+msgid "Your afternoon TV Programs"
+msgstr "Sus programas de TV en la tarde"
+
+msgid "Your evening TV Programs"
+msgstr "Sus programas de TV en la noche"
+
+msgid "Please re-configure your gadget to get a TV program list."
+msgstr "Por favor reconfigure su gadget para obtener la programacion de TV."
+
+msgid "I didn't find any TV programs according to your selected time frame."
+msgstr "No se puede encontrar ningún programa dentro de la franja horaria seleccionada."
+
+msgid "Select time frame"
+msgstr "Seleccione una franja horaria"
+
Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/es.po
___________________________________________________________________
Name: svn:executable
+ *
Added: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po (rev 0)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po 2009-04-24 13:22:54 UTC (rev 4590)
@@ -0,0 +1,106 @@
+
+msgid ""
+msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 11:27+0200\nPO-Revision-Date: 2009-04-24 11:28+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n > 1);\nX-Generator: Pootle 1.2.1\n"
+
+msgid "Belgian Dutch programs"
+msgstr "Programmes Flamands"
+
+msgid "This gadget reads your tv programs in Belgium"
+msgstr "Ce gadget vous donne votre programme de télévision en Belgique"
+
+msgid "Belgian French Programs"
+msgstr "Programmes francophones"
+
+msgid "German programs"
+msgstr "Programmes Allemands"
+
+msgid "This gadget reads your German tv programs"
+msgstr "Ce gadget vous donne votre programme de télévision en Allemagne"
+
+msgid "Netherland programs"
+msgstr "Programmes Néerlandais"
+
+msgid "This gadget reads your tv programs in Netherlands"
+msgstr "Ce gadget vous donne votre programme de télévision aux Pays-Bas"
+
+msgid "Spanish programs"
+msgstr "Programmes Espagnols"
+
+msgid "This gadget reads your Spanish tv programs"
+msgstr "Ce gadget vous donne votre programme de télévision en Espagne"
+
+msgid "United Kingdom programs"
+msgstr "Programmes Anglais"
+
+msgid "This gadget reads your tv programs in United Kingdom"
+msgstr "Ce gadget vous donne votre programme de télévision en Angleterre"
+
+msgid "French programs"
+msgstr "Programmes Français"
+
+msgid "This gadget reads your French tv programs"
+msgstr "Ce gadget vous donne votre programme de télévision en Françe"
+
+msgid "Select your channel"
+msgstr "Choisissez votre chaîne"
+
+msgid "Select a digital channel"
+msgstr "Choisissez une chaîne digitale"
+
+msgid "Use standard channels"
+msgstr "Utiliser les chaînes standard"
+
+msgid "Use digital channels"
+msgstr "Utiliser les chaînes digitales"
+
+msgid "Give program description"
+msgstr "Donner la description"
+
+msgid "Morning"
+msgstr "Matin"
+
+msgid "Afternoon"
+msgstr "Après-midi"
+
+msgid "Evening"
+msgstr "Soirée"
+
+msgid "Give currently playing program"
+msgstr "Donner le programme en cours"
+
+msgid "Give the tv program"
+msgstr "Donner le programme TV"
+
+msgid "No TV program for now"
+msgstr "Aucun programme de télévision trouvé pour le moment"
+
+msgid "Now playing on {0}, {1}"
+msgstr "Actuellement sur {0}, {1}"
+
+msgid "On {0}"
+msgstr "Sur {0}"
+
+msgid "Your morning TV Programs"
+msgstr "Votre programme télé du matin"
+
+msgid "{0}, {1}"
+msgstr "{0}, {1}"
+
+msgid "{0}, {1}, {2}"
+msgstr "{0}, {1}, {2}"
+
+msgid "Your afternoon TV Programs"
+msgstr "Votre programme télé pour l'après-midi"
+
+msgid "Your evening TV Programs"
+msgstr "Le programme télé pour votre soirée"
+
+msgid "Please re-configure your gadget to get a TV program list."
+msgstr "S'il vous plait, reconfigurez votre gadget pour obtenir une liste de programmes."
+
+msgid "I didn't find any TV programs according to your selected time frame."
+msgstr "Je n'ai pas trouvé de programme télévision pour la tranche horaire sélectionnée."
+
+msgid "Select time frame"
+msgstr "Choisissez une tranche horaire"
+
Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr.po
___________________________________________________________________
Name: svn:executable
+ *
Added: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po (rev 0)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po 2009-04-24 13:22:54 UTC (rev 4590)
@@ -0,0 +1,106 @@
+
+msgid ""
+msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 11:27+0200\nPO-Revision-Date: 2009-04-24 11:33+0200\nLast-Translator: Sebastiaan Vanpoucke <se...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: nl\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n"
+
+msgid "Belgian Dutch programs"
+msgstr "Vlaamse TV programma's"
+
+msgid "This gadget reads your tv programs in Belgium"
+msgstr "Deze gadget zal de Belgische TV programma's voorlezen"
+
+msgid "Belgian French Programs"
+msgstr "Waalse TV programma's"
+
+msgid "German programs"
+msgstr "Duitse TV programma's"
+
+msgid "This gadget reads your German tv programs"
+msgstr "Deze gadget zal de Duitse TV programma's voorlezen"
+
+msgid "Netherland programs"
+msgstr "Nederlandse TV programma's"
+
+msgid "This gadget reads your tv programs in Netherlands"
+msgstr "Deze gadget zal de Nederlandse TV programma's voorlezen"
+
+msgid "Spanish programs"
+msgstr "Spaanse TV programma's"
+
+msgid "This gadget reads your Spanish tv programs"
+msgstr "Deze gadget zal de Spaanse TV programma's voorlezen"
+
+msgid "United Kingdom programs"
+msgstr "UK TV programma's"
+
+msgid "This gadget reads your tv programs in United Kingdom"
+msgstr "Deze gadget zal de UK programma's voorlezen"
+
+msgid "French programs"
+msgstr "Franse TV programma's"
+
+msgid "This gadget reads your French tv programs"
+msgstr "Deze gadget zal de Franse TV programma's voorlezen"
+
+msgid "Select your channel"
+msgstr "Selecteer jouw kanaal"
+
+msgid "Select a digital channel"
+msgstr "Selecteer een digitaal kanaal"
+
+msgid "Use standard channels"
+msgstr "Gebruik standaard kanalen"
+
+msgid "Use digital channels"
+msgstr "Gebruik digitale kanalen"
+
+msgid "Give program description"
+msgstr "Geef programma beschrijving"
+
+msgid "Morning"
+msgstr "Voormiddag"
+
+msgid "Afternoon"
+msgstr "Namiddag"
+
+msgid "Evening"
+msgstr "Avond"
+
+msgid "Give currently playing program"
+msgstr "Geef programma dat nu aan het spelen is"
+
+msgid "Give the tv program"
+msgstr "Geef het TV programma"
+
+msgid "No TV program for now"
+msgstr "Op het ogenblik is er geen programma aan het spelen"
+
+msgid "Now playing on {0}, {1}"
+msgstr "Na aan het spelen op {0}, {1}"
+
+msgid "On {0}"
+msgstr "Op {0}"
+
+msgid "Your morning TV Programs"
+msgstr "Jouw voormiddag TV programma's"
+
+msgid "{0}, {1}"
+msgstr "{0}, {1}"
+
+msgid "{0}, {1}, {2}"
+msgstr "{0}, {1}, {2}"
+
+msgid "Your afternoon TV Programs"
+msgstr "Jouw namiddag TV programma's"
+
+msgid "Your evening TV Programs"
+msgstr "Jouw avond TV programma's"
+
+msgid "Please re-configure your gadget to get a TV program list."
+msgstr "Gelieve de gadget anders te configureren om een TV programma lijst te verkrijgen."
+
+msgid "I didn't find any TV programs according to your selected time frame."
+msgstr "I kan geen TV programma's vinden voor de periode die je ingesteld hebt."
+
+msgid "Select time frame"
+msgstr "Selecteer periode van de dag"
+
Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl.po
___________________________________________________________________
Name: svn:executable
+ *
|
|
From: jerome <c2m...@c2...> - 2009-04-24 13:20:30
|
Author: jerome Date: 2009-04-24 15:20:17 +0200 (Fri, 24 Apr 2009) New Revision: 4589 Added: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_en.html software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_es.html software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_nl.html Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_fr.html Log: *Added translated help files. Added: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_en.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_en.html (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_en.html 2009-04-24 13:20:17 UTC (rev 4589) @@ -0,0 +1,6 @@ +<html> + <body> + <font size="3" face="Verdana, Arial, Helvetica, sans-serif">The Max Light gadget will make Tux Droid rotate towards the brightest light source. Drag-and-drop the gadget into "My Favorites" to enable it. Also, make sure to unplug the charger so Tux Droid can spin while searching for the light source. <br> + </font> + </body> + </html> \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_en.html ___________________________________________________________________ Name: svn:executable + * Added: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_es.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_es.html (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_es.html 2009-04-24 13:20:17 UTC (rev 4589) @@ -0,0 +1,6 @@ +<html> + <body> + <font size="3" face="Verdana, Arial, Helvetica, sans-serif">El gadget de Luz Maxima hará que Tux Droid gire hacia la fuente de luz mas brillante. Arrastre el gadget dentro de 'Mis Favoritos' para activarlo. Asegurese tambien de desconectar el cargador para que Tux Droid pueda girar en busca de la fuente de luz. <br> + </font> + </body> + </html> \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_es.html ___________________________________________________________________ Name: svn:executable + * Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_fr.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_fr.html 2009-04-24 13:17:13 UTC (rev 4588) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_fr.html 2009-04-24 13:20:17 UTC (rev 4589) @@ -1,10 +1,6 @@ -<html> -<body> -<font size="3" face="Verdana, Arial, Helvetica, sans-serif">Ce gadget permet à Tux Droïd -de rechercher le maximum de lumière. Pour activer ce gadget, faites un glisser-déposer dans "Mes Favoris" ou "Mes Alertes", - en s'assurant d'avoir débranché le chargeur. -<br> -</font> -</body> -</html> - +<html> + <body> + <font size="3" face="Verdana, Arial, Helvetica, sans-serif">Le gadget lumière maximum fait tourner Tux Droid pour trouver l'endroit le plus lumineux. Copiez-Collez le gadget dans "Mes Favoris" pour l'utiliser. Assurez vous d'avoir déconnecté le chargeur pour que Tux Droid puisse tourner. <br> + </font> + </body> + </html> \ No newline at end of file Added: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_nl.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_nl.html (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_nl.html 2009-04-24 13:20:17 UTC (rev 4589) @@ -0,0 +1,6 @@ +<html> + <body> + <font size="3" face="Verdana, Arial, Helvetica, sans-serif">De Max Light gadget zal Tux Droid laten draaien in de richting van de helderste lichtbron. Sleep de gadget in "Mijn favorieten" om het te activeren. Vergeet niet de oplader los te koppelen zodat Tux Droid kan ronddraaien om de lichtbron te zoeken. <br> + </font> + </body> + </html> \ No newline at end of file Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help_nl.html ___________________________________________________________________ Name: svn:executable + * |
|
From: jerome <c2m...@c2...> - 2009-04-24 13:17:22
|
Author: jerome Date: 2009-04-24 15:17:13 +0200 (Fri, 24 Apr 2009) New Revision: 4588 Added: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/en.po software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/es.po software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/n.po software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/nl.po Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/fr.po Log: *Added translation files. Added: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/en.po =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/en.po (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/en.po 2009-04-24 13:17:13 UTC (rev 4588) @@ -0,0 +1,19 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 10:01+0200\nPO-Revision-Date: 2009-04-24 10:03+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: en\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Max Light Gadget" +msgstr "Max Light Gadget" + +msgid "The Max Light gadget will make Tux Droid rotate towards the direction of the brightest light source." +msgstr "The Max Light gadget will make Tux Droid rotate towards the direction of the brightest light source." + +msgid "I think most of the light is coming from this direction." +msgstr "I think most of the light is coming from this direction." + +msgid "Unplug my charger first and try again." +msgstr "Unplug my charger first and try again." + +msgid "Looking for the brightest light source" +msgstr "Looking for the brightest light source" + Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/en.po ___________________________________________________________________ Name: svn:executable + * Added: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/es.po =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/es.po (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/es.po 2009-04-24 13:17:13 UTC (rev 4588) @@ -0,0 +1,19 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 10:01+0200\nPO-Revision-Date: 2009-04-24 13:20+0200\nLast-Translator: Santiago Perez <san...@gm...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: es\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Max Light Gadget" +msgstr "Gadget Luz Maxima" + +msgid "The Max Light gadget will make Tux Droid rotate towards the direction of the brightest light source." +msgstr "El gadget de Luz Maxima hara que Tux Droid gire en la direccion desde se encuentre la fuente de luz mas brillante." + +msgid "I think most of the light is coming from this direction." +msgstr "Creo que la fuente de luz mas brillante viene de esta dirección." + +msgid "Unplug my charger first and try again." +msgstr "Desconecte primero mi cargador e intentelo de nuevo." + +msgid "Looking for the brightest light source" +msgstr "Buscando la fuente de luz mas brillante." + Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/es.po ___________________________________________________________________ Name: svn:executable + * Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/fr.po =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/fr.po 2009-04-24 12:42:18 UTC (rev 4587) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/fr.po 2009-04-24 13:17:13 UTC (rev 4588) @@ -1,11 +1,19 @@ -msgid "Max light gadget" + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 10:01+0200\nPO-Revision-Date: 2009-04-24 10:08+0200\nLast-Translator: jerome <jer...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: fr\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n > 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Max Light Gadget" msgstr "Gadget lumière maximum" -msgid "Tux seeks maximum light" -msgstr "Tux cherche la lumière maximum" +msgid "The Max Light gadget will make Tux Droid rotate towards the direction of the brightest light source." +msgstr "Le gadget maxlight fera tourner Tux Droid pour trouver l'endroit le plus lumineux." -msgid "Light up is here" -msgstr "La lumière maximum est ici" +msgid "I think most of the light is coming from this direction." +msgstr "Je pense que l'endroit le plus lumineux est ici." -msgid "Unplug the charger and restart the program" -msgstr "Déconnectez le chargeur et relancez le programme" +msgid "Unplug my charger first and try again." +msgstr "Débranchez mon chargeur et essayez à nouveau." + +msgid "Looking for the brightest light source" +msgstr "Je cherche l'endroit le plus lumineux." + Added: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/n.po =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/n.po (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/n.po 2009-04-24 13:17:13 UTC (rev 4588) @@ -0,0 +1 @@ + Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/n.po ___________________________________________________________________ Name: svn:executable + * Added: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/nl.po =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/nl.po (rev 0) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/nl.po 2009-04-24 13:17:13 UTC (rev 4588) @@ -0,0 +1,19 @@ + +msgid "" +msgstr "Project-Id-Version: PACKAGE VERSION\nReport-Msgid-Bugs-To: \nPOT-Creation-Date: 2009-04-24 10:01+0200\nPO-Revision-Date: 2009-04-24 10:18+0200\nLast-Translator: Sebastiaan Vanpoucke <se...@ky...>\nLanguage-Team: LANGUAGE <LL...@li...>\nLanguage: nl\nMIME-Version: 1.0\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 8bit\nPlural-Forms: nplurals=2; plural=(n != 1);\nX-Generator: Pootle 1.2.1\n" + +msgid "Max Light Gadget" +msgstr "Max Light Gadget" + +msgid "The Max Light gadget will make Tux Droid rotate towards the direction of the brightest light source." +msgstr "De Max Light gadget zal Tux Droid laten draaien in de richting van de helderste lichtbron." + +msgid "I think most of the light is coming from this direction." +msgstr "Ik denk dat het licht uit deze richting komt." + +msgid "Unplug my charger first and try again." +msgstr "Koppel eerst de oplader los en probeer dan opnieuw." + +msgid "Looking for the brightest light source" +msgstr "Ik ben nu aan het zoeken naar de helderste lichtbron." + Property changes on: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/nl.po ___________________________________________________________________ Name: svn:executable + * |
|
From: remi <c2m...@c2...> - 2009-04-24 12:42:26
|
Author: remi
Date: 2009-04-24 14:42:18 +0200 (Fri, 24 Apr 2009)
New Revision: 4587
Modified:
softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/Gadget.py
Log:
* fixed a bad method name
Modified: softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/Gadget.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/Gadget.py 2009-04-24 09:55:31 UTC (rev 4586)
+++ softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/Gadget.py 2009-04-24 12:42:18 UTC (rev 4587)
@@ -256,7 +256,7 @@
# --------------------------------------------------------------------------
# Get a task object by it name.
# --------------------------------------------------------------------------
- def getCommand(self, taskName):
+ def getTask(self, taskName):
"""Get a task object by it name.
@param taskName: The name of the task.
@return: The task object as GadgetTask or None.
|
|
From: remi <c2m...@c2...> - 2009-04-24 09:55:51
|
Author: remi
Date: 2009-04-24 11:55:31 +0200 (Fri, 24 Apr 2009)
New Revision: 4586
Added:
softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/GadgetTask.py
Modified:
softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/Gadget.py
Log:
* added GadgetTask class to store "alert" informations from a "gadget -> plugin"
* added alerts "tasks" referencing in the Gadget object.
Modified: softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/Gadget.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/Gadget.py 2009-04-24 09:25:57 UTC (rev 4585)
+++ softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/Gadget.py 2009-04-24 09:55:31 UTC (rev 4586)
@@ -17,6 +17,7 @@
from GadgetDescription import GadgetDescription
from GadgetParameter import GadgetParameter
from GadgetToken import GadgetToken
+from GadgetTask import GadgetTask
# Default list of the supported language.
SUPPORTED_LANGUAGES_LIST = ["en", "fr", "nl", "es", "it", "pt", "ar", "da",
@@ -132,6 +133,12 @@
self.__defaultCheckCommandName = "check"
else:
self.__defaultCheckCommandName = self.__defaultRunCommandName
+ # Create tasks
+ self.__tasks = []
+ if dictionary.has_key('defaultScheduling'):
+ for key in dictionary['defaultScheduling'].keys():
+ self.__tasks.append(GadgetTask(self,
+ dictionary['defaultScheduling'][key]))
# Define interpreter
interpreterClass = GadgetInterpreter
if dictionary['interpreter']['kind'] == 'python':
@@ -238,6 +245,40 @@
return result
# --------------------------------------------------------------------------
+ # Get the gadget tasks objects list.
+ # --------------------------------------------------------------------------
+ def getTasks(self):
+ """Get the gadget tasks objects list.
+ @return: The gadget tasks objects list.
+ """
+ return self.__tasks
+
+ # --------------------------------------------------------------------------
+ # Get a task object by it name.
+ # --------------------------------------------------------------------------
+ def getCommand(self, taskName):
+ """Get a task object by it name.
+ @param taskName: The name of the task.
+ @return: The task object as GadgetTask or None.
+ """
+ for task in self.__tasks:
+ if task.getName() == taskName:
+ return task
+ return None
+
+ # --------------------------------------------------------------------------
+ # Get the tasks name list.
+ # --------------------------------------------------------------------------
+ def getTasksName(self):
+ """Get the tasks name list.
+ @return: A list of strings.
+ """
+ result = []
+ for task in self.__tasks:
+ result.append(task.getName())
+ return result
+
+ # --------------------------------------------------------------------------
# Get the default check command name.
# --------------------------------------------------------------------------
def getDefaultCheckCommandName(self):
Added: softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/GadgetTask.py
===================================================================
--- softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/GadgetTask.py (rev 0)
+++ softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/GadgetTask.py 2009-04-24 09:55:31 UTC (rev 4586)
@@ -0,0 +1,372 @@
+# Copyright (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
+
+# ------------------------------------------------------------------------------
+# Gadget task.
+# ------------------------------------------------------------------------------
+class GadgetTask(object):
+ """Gadget task.
+ """
+
+ # --------------------------------------------------------------------------
+ # Constructor of the class.
+ # --------------------------------------------------------------------------
+ def __init__(self, parent, dictionary):
+ """Constructor of the class.
+ @param parent: Parent Gadget.
+ @param dictionary: Description as dictionary.
+ """
+ self.__parent = parent
+ self.__dictionary = dictionary
+ self.__name = None
+ self.__description = None
+ self.__command = None
+ self.__type = None
+ self.__activated = None
+ self.__weekMask = None
+ self.__weekMaskType = None
+ self.__weekMaskVisible = None
+ self.__date = None
+ self.__dateVisible = None
+ self.__hoursBegin = None
+ self.__hoursBeginMask = None
+ self.__hoursBeginVisible = None
+ self.__hoursEnd = None
+ self.__hoursEndMask = None
+ self.__hoursEndVisible = None
+ self.__delay = None
+ self.__delayMask = None
+ self.__delayVisible = None
+ self.__update(dictionary)
+
+ # --------------------------------------------------------------------------
+ # Get the parent gadget.
+ # --------------------------------------------------------------------------
+ def getParent(self):
+ """Get the parent gadget.
+ @return: A Gadget object.
+ """
+ return self.__parent
+
+ # --------------------------------------------------------------------------
+ # Get the dictionary.
+ # --------------------------------------------------------------------------
+ def getDictionary(self):
+ """Get the dictionary.
+ @return: A dictionary.
+ """
+ return self.__dictionary
+
+ # --------------------------------------------------------------------------
+ # Update the description.
+ # --------------------------------------------------------------------------
+ def __update(self, dictionary):
+ """Update the description.
+ """
+ # Save the dictionary
+ self.__dictionary = dictionary
+ # Get the descriptor values
+ # Mandatory values
+ self.__name = dictionary['name']
+ self.__description = dictionary['description']
+ self.__command = dictionary['command'].upper()
+ self.__type = dictionary['type']
+ self.__activated = dictionary['activated']
+ # Optional values
+ self.__weekMask = "true,true,true,true,true,true,true"
+ if dictionary.has_key('weekMask'):
+ self.__weekMask = dictionary['weekMask']
+ self.__weekMaskType = "weekMaskType"
+ if dictionary.has_key('weekMaskType'):
+ self.__weekMaskType = dictionary['weekMaskType'].lower()
+ self.__weekMaskVisible = "false"
+ if dictionary.has_key('weekMaskVisible'):
+ self.__weekMaskVisible = dictionary['weekMaskVisible'].lower()
+ self.__date = "0000/00/00"
+ if dictionary.has_key('date'):
+ self.__date = dictionary['date']
+ self.__dateVisible = "false"
+ if dictionary.has_key('dateVisible'):
+ self.__dateVisible = dictionary['dateVisible'].lower()
+ self.__hoursBegin = "00:00:00"
+ if dictionary.has_key('hoursBegin'):
+ self.__hoursBegin = dictionary['hoursBegin']
+ self.__hoursBeginMask = "false,false,false"
+ if dictionary.has_key('hoursBeginMask'):
+ self.__hoursBeginMask = dictionary['hoursBeginMask'].lower()
+ self.__hoursBeginVisible = "false"
+ if dictionary.has_key('hoursBeginVisible'):
+ self.__hoursBeginVisible = dictionary['hoursBeginVisible'].lower()
+ self.__hoursEnd = "00:00:00"
+ if dictionary.has_key('hoursEnd'):
+ self.__hoursEnd = dictionary['hoursEnd']
+ self.__hoursEndMask = "false,false,false"
+ if dictionary.has_key('hoursEndMask'):
+ self.__hoursEndMask = dictionary['hoursEndMask'].lower()
+ self.__hoursEndVisible = "false"
+ if dictionary.has_key('hoursEndVisible'):
+ self.__hoursEndVisible = dictionary['hoursEndVisible'].lower()
+ self.__delay = "00:01:00"
+ if dictionary.has_key('delay'):
+ self.__delay = dictionary['delay']
+ self.__delayMask = "false,false,false"
+ if dictionary.has_key('delayMask'):
+ self.__delayMask = dictionary['delayMask'].lower()
+ self.__delayVisible = "false"
+ if dictionary.has_key('delayVisible'):
+ self.__delayVisible = dictionary['delayVisible'].lower()
+
+ # --------------------------------------------------------------------------
+ # Get the task name.
+ # --------------------------------------------------------------------------
+ def getName(self):
+ """Get the task name.
+ @return: A string.
+ """
+ return self.__name
+
+ # --------------------------------------------------------------------------
+ # Get the translated name of the task.
+ # --------------------------------------------------------------------------
+ def getTranslatedName(self, language = None):
+ """Get the translated name of the task.
+ @return: A string.
+ """
+ if language == None:
+ return self.__parent.tr(self.__name)
+ else:
+ return self.__parent.tr2(language, self.__name)
+
+ # --------------------------------------------------------------------------
+ # Get the translated description of the gadget.
+ # --------------------------------------------------------------------------
+ def getDescription(self, language = None):
+ """Get the translated description of the gadget.
+ @return: A string.
+ """
+ if language == None:
+ return self.__parent.tr(self.__description)
+ else:
+ return self.__parent.tr2(language, self.__description)
+
+ # --------------------------------------------------------------------------
+ # Get the command.
+ # --------------------------------------------------------------------------
+ def getCommand(self):
+ """Get the command.
+ @return: A string.
+ """
+ return self.__command
+
+ # --------------------------------------------------------------------------
+ # Get the task type.
+ # --------------------------------------------------------------------------
+ def getType(self):
+ """Get the task type.
+ @return: A string.
+ """
+ return self.__type
+
+ # --------------------------------------------------------------------------
+ # Get if the task is activated or not.
+ # --------------------------------------------------------------------------
+ def isActivated(self):
+ """Get if the task is activated or not.
+ @return: A boolean.
+ """
+ if self.__activated.lower() == "true":
+ return True
+ else:
+ return False
+
+ # --------------------------------------------------------------------------
+ # Set if the task is activated or not.
+ # --------------------------------------------------------------------------
+ def setActivated(self, scheduler, isActivated):
+ """Set if the task is activated or not.
+ * Activation will create a task in the scheduler.
+ * Deactivation will create the task from the scheduler.
+ @param scheduler: Scheduler object.
+ @param isActivated: Boolean.
+ """
+ #TODO: Complete this after the scheduler updating.
+ pass
+
+ # --------------------------------------------------------------------------
+ # Get the week mask.
+ # --------------------------------------------------------------------------
+ def getWeekMask(self):
+ """Get if the week mask.
+ @return: A list of 7 booleans.
+ """
+ tmpList = self.__weekMask.split(",")
+ result = []
+ for value in tmpList:
+ if value.lower() == "true":
+ result.append(True)
+ else:
+ result.append(False)
+ if len(result) != 7:
+ result = [True, True, True, True, True, True, True]
+ return result
+
+ # --------------------------------------------------------------------------
+ # Get the week mask type.
+ # --------------------------------------------------------------------------
+ def getWeekMaskType(self):
+ """Get the week mask type.
+ @return: A string <"flat"|"weekpart"|"exclusive">.
+ """
+ return self.__weekMaskType
+
+ # --------------------------------------------------------------------------
+ # Get if the week mask is visible or not.
+ # --------------------------------------------------------------------------
+ def getWeekMaskIsVisible(self):
+ """Get if the week mask is visible or not.
+ @return: A boolean.
+ """
+ if self.__weekMaskVisible.lower() == "true":
+ return True
+ else:
+ return False
+
+ # --------------------------------------------------------------------------
+ # Get the date.
+ # --------------------------------------------------------------------------
+ def getDate(self):
+ """Get the date.
+ @return: A string "YYYY/MM/DD".
+ """
+ return self.__date
+
+ # --------------------------------------------------------------------------
+ # Get if the date is visible or not.
+ # --------------------------------------------------------------------------
+ def getDateIsVisible(self):
+ """Get if the week mask is visible or not.
+ @return: A boolean.
+ """
+ if self.__dateVisible.lower() == "true":
+ return True
+ else:
+ return False
+
+ # --------------------------------------------------------------------------
+ # Get the hours begin.
+ # --------------------------------------------------------------------------
+ def getHoursBegin(self):
+ """Get the hours begin.
+ @return: A string "HH:MM:SS".
+ """
+ return self.__hoursBegin
+
+ # --------------------------------------------------------------------------
+ # Get the hours begin mask.
+ # --------------------------------------------------------------------------
+ def getHoursBeginMask(self):
+ """Get the hours begin mask.
+ @return: A string.
+ """
+ tmpList = self.__hoursBeginMask.split(",")
+ result = []
+ for value in tmpList:
+ if value.lower() == "true":
+ result.append(True)
+ else:
+ result.append(False)
+ if len(result) != 3:
+ result = [True, True, True]
+ return result
+
+ # --------------------------------------------------------------------------
+ # Get if the hours begin is visible or not.
+ # --------------------------------------------------------------------------
+ def getHoursBeginIsVisible(self):
+ """Get if the hours begin is visible or not.
+ @return: A boolean.
+ """
+ if self.__hoursBeginVisible.lower() == "true":
+ return True
+ else:
+ return False
+
+ # --------------------------------------------------------------------------
+ # Get the hours end.
+ # --------------------------------------------------------------------------
+ def getHoursEnd(self):
+ """Get the hours end.
+ @return: A string "HH:MM:SS".
+ """
+ return self.__hoursEnd
+
+ # --------------------------------------------------------------------------
+ # Get the hours end mask.
+ # --------------------------------------------------------------------------
+ def getHoursEndMask(self):
+ """Get the hours end mask.
+ @return: A string.
+ """
+ tmpList = self.__hoursEndMask.split(",")
+ result = []
+ for value in tmpList:
+ if value.lower() == "true":
+ result.append(True)
+ else:
+ result.append(False)
+ if len(result) != 3:
+ result = [True, True, True]
+ return result
+
+ # --------------------------------------------------------------------------
+ # Get if the hours end is visible or not.
+ # --------------------------------------------------------------------------
+ def getHoursEndIsVisible(self):
+ """Get if the hours end is visible or not.
+ @return: A boolean.
+ """
+ if self.__hoursEndVisible.lower() == "true":
+ return True
+ else:
+ return False
+
+ # --------------------------------------------------------------------------
+ # Get the delay.
+ # --------------------------------------------------------------------------
+ def getDelay(self):
+ """Get the delay.
+ @return: A string "HH:MM:SS".
+ """
+ return self.__delay
+
+ # --------------------------------------------------------------------------
+ # Get the delay mask.
+ # --------------------------------------------------------------------------
+ def getDelayMask(self):
+ """Get the delay mask.
+ @return: A string.
+ """
+ tmpList = self.__delayMask.split(",")
+ result = []
+ for value in tmpList:
+ if value.lower() == "true":
+ result.append(True)
+ else:
+ result.append(False)
+ if len(result) != 3:
+ result = [True, True, True]
+ return result
+
+ # --------------------------------------------------------------------------
+ # Get if the delay is visible or not.
+ # --------------------------------------------------------------------------
+ def getDelayIsVisible(self):
+ """Get if the delay is visible or not.
+ @return: A boolean.
+ """
+ if self.__delayVisible.lower() == "true":
+ return True
+ else:
+ return False
Property changes on: softwares_suite_v3/kysoh/tuxware/server/trunk/util/applicationserver/gadget/GadgetTask.py
___________________________________________________________________
Name: svn:keywords
+ Id
|
|
From: jerome <c2m...@c2...> - 2009-04-24 09:26:02
|
Author: jerome Date: 2009-04-24 11:25:57 +0200 (Fri, 24 Apr 2009) New Revision: 4585 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help.html Log: * Last strings update. Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-24 09:06:51 UTC (rev 4584) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-24 09:25:57 UTC (rev 4585) @@ -97,3 +97,6 @@ msgid "I didn't find any TV programs according to your selected time frame." msgstr "" +msgid "Select time frame" +msgstr "" + Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help.html 2009-04-24 09:06:51 UTC (rev 4584) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help.html 2009-04-24 09:25:57 UTC (rev 4585) @@ -6,10 +6,7 @@ <br> <I>The gadget parameters are</I>:<br> <B>Select your channel : </B>Select the channel you want to get the program list from<br> -<B>Give program description : </B>Tux Droid will read a short program description.<br> -<B>Give morning programs : </B>Tux Droid will read the morning programs.<br> -<B>Give afternoon programs : </B>Tux Droid will read the afternoon programs.<br> -<B>Give evening programs : </B>Tux Droid will read the evening programs.<br> +<B>Select time frame : </B>Select period of the day you want to hear the TV program list from<br> <B>Give currently playing program : </B>Tux Droid will read what is now playing and playing next for the selected channel.<br> </font> </body> |
|
From: jerome <c2m...@c2...> - 2009-04-24 09:07:03
|
Author: jerome Date: 2009-04-24 11:06:51 +0200 (Fri, 24 Apr 2009) New Revision: 4584 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help.html Log: * Updated help file. Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help.html =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help.html 2009-04-24 08:17:02 UTC (rev 4583) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/help.html 2009-04-24 09:06:51 UTC (rev 4584) @@ -1,16 +1,16 @@ <html> <body> <font size="2" face="Verdana, Arial, Helvetica, sans-serif"> -This gadget lets Tux Droid read your favorite channels Tv Programs.<br> +This gadget lets Tux Droid read the TV programs on your favorite channel.<br> Drag-and-drop this gadget into "My Favorites" to enable it.<br> <br> <I>The gadget parameters are</I>:<br> -<B>Select your channel : </B>Select the channel you want to get the program<br> +<B>Select your channel : </B>Select the channel you want to get the program list from<br> <B>Give program description : </B>Tux Droid will read a short program description.<br> -<B>Give morning program : </B>Tux Droid will read the program at morning.<br> -<B>Give afternoon program : </B>Tux Droid will read the program at afternoon.<br> -<B>Give evening program : </B>Tux Droid will read the program at evening.<br> -<B>Give current played program : </B>Tux Droid will read what is now playing at selected channel.<br> +<B>Give morning programs : </B>Tux Droid will read the morning programs.<br> +<B>Give afternoon programs : </B>Tux Droid will read the afternoon programs.<br> +<B>Give evening programs : </B>Tux Droid will read the evening programs.<br> +<B>Give currently playing program : </B>Tux Droid will read what is now playing and playing next for the selected channel.<br> </font> </body> </html> |
Author: jerome Date: 2009-04-24 10:17:02 +0200 (Fri, 24 Apr 2009) New Revision: 4583 Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_du/resources/gadget.xml software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_fr/resources/gadget.xml software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/ge/resources/gadget.xml software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl/resources/gadget.xml software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/sp/resources/gadget.xml software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/uk/resources/gadget.xml Log: * Fixed now playing parameter description. Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_du/resources/gadget.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_du/resources/gadget.xml 2009-04-24 07:50:04 UTC (rev 4582) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_du/resources/gadget.xml 2009-04-24 08:17:02 UTC (rev 4583) @@ -37,7 +37,7 @@ <parameter category="Options" name="giveNowPlaying" - description="Give current played program" + description="Give currently playing program" type="boolean" defaultValue="true" /> </parameters> Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_fr/resources/gadget.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_fr/resources/gadget.xml 2009-04-24 07:50:04 UTC (rev 4582) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/be_fr/resources/gadget.xml 2009-04-24 08:17:02 UTC (rev 4583) @@ -36,7 +36,7 @@ <parameter category="Options" name="giveNowPlaying" - description="Give current played program" + description="Give currently playing program" type="boolean" defaultValue="true" /> </parameters> Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml 2009-04-24 07:50:04 UTC (rev 4582) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/fr/resources/gadget.xml 2009-04-24 08:17:02 UTC (rev 4583) @@ -58,7 +58,7 @@ <parameter category="Options" name="giveNowPlaying" - description="Give current played program" + description="Give currently playing program" type="boolean" defaultValue="true" /> </parameters> Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/ge/resources/gadget.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/ge/resources/gadget.xml 2009-04-24 07:50:04 UTC (rev 4582) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/ge/resources/gadget.xml 2009-04-24 08:17:02 UTC (rev 4583) @@ -35,7 +35,7 @@ <parameter category="Options" name="giveNowPlaying" - description="Give current played program" + description="Give currently playing program" type="boolean" defaultValue="true" /> </parameters> Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl/resources/gadget.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl/resources/gadget.xml 2009-04-24 07:50:04 UTC (rev 4582) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/nl/resources/gadget.xml 2009-04-24 08:17:02 UTC (rev 4583) @@ -37,7 +37,7 @@ <parameter category="Options" name="giveNowPlaying" - description="Give current played program" + description="Give currently playing program" type="boolean" defaultValue="true" /> </parameters> Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/sp/resources/gadget.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/sp/resources/gadget.xml 2009-04-24 07:50:04 UTC (rev 4582) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/sp/resources/gadget.xml 2009-04-24 08:17:02 UTC (rev 4583) @@ -36,7 +36,7 @@ <parameter category="Options" name="giveNowPlaying" - description="Give current played program" + description="Give currently playing program" type="boolean" defaultValue="true" /> </parameters> Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/uk/resources/gadget.xml =================================================================== --- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/uk/resources/gadget.xml 2009-04-24 07:50:04 UTC (rev 4582) +++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/uk/resources/gadget.xml 2009-04-24 08:17:02 UTC (rev 4583) @@ -36,7 +36,7 @@ <parameter category="Options" name="giveNowPlaying" - description="Give current played program" + description="Give currently playing program" type="boolean" defaultValue="true" /> </parameters> |
|
From: jerome <c2m...@c2...> - 2009-04-24 07:50:06
|
Author: jerome
Date: 2009-04-24 09:50:04 +0200 (Fri, 24 Apr 2009)
New Revision: 4582
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/gadget.pot
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/gadget.xml
software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help.html
Log:
* Updated strings.
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py 2009-04-24 07:37:41 UTC (rev 4581)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/executables/tuxdroid-gadget-maxlight.py 2009-04-24 07:50:04 UTC (rev 4582)
@@ -123,7 +123,7 @@
tux.spinning.off()
break
- GadgetHelper.throwMessage("Light up is here {0}", str(int(lum)) + "%%")
+ GadgetHelper.throwMessage("I think most of the light is coming from this direction.")
tgp_language = "en"
@@ -147,7 +147,7 @@
# Test if charger are plugged
if tux.status.requestOne('charger_state')[0] == 'UNPLUGGED':
- GadgetHelper.throwMessage("I begun the research")
+ GadgetHelper.throwMessage("Looking for the brightest light source")
tux.eyes.open()
tux.flippers.up()
light = search() # search light up
@@ -155,7 +155,7 @@
tux.flippers.down()
else:
- GadgetHelper.throwMessage("Unplug the charger and restart the program")
+ GadgetHelper.throwMessage("Unplug my charger first and try again.")
tux.access.release()
tux.server.disconnect()
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/gadget.pot
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/gadget.pot 2009-04-24 07:37:41 UTC (rev 4581)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/gadget.pot 2009-04-24 07:50:04 UTC (rev 4582)
@@ -1,15 +1,15 @@
-msgid "Max light gadget"
+msgid "Max Light Gadget"
msgstr ""
-msgid "Tux seeks maximum light"
+msgid "The Max Light gadget will make Tux Droid rotate towards the direction of the brightest light source."
msgstr ""
-msgid "Light up is here"
+msgid "I think most of the light is coming from this direction."
msgstr ""
-msgid "Unplug the charger and restart the gadget"
+msgid "Unplug my charger first and try again."
msgstr ""
-msgid "I begun the research"
+msgid "Looking for the brightest light source"
msgstr ""
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/gadget.xml
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/gadget.xml 2009-04-24 07:37:41 UTC (rev 4581)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/gadget.xml 2009-04-24 07:50:04 UTC (rev 4582)
@@ -4,13 +4,13 @@
<executable>executables/tuxdroid-gadget-maxlight.py</executable>
</interpreter>
<description>
- <name>Max light gadget</name>
- <description>Tux seeks maximum light</description>
+ <name>Max Light Gadget</name>
+ <description>The Max Light gadget will make Tux Droid rotate towards the direction of the brightest light source.</description>
<author>Eric Lescaudron</author>
<version>0.5</version>
<iconFile>resources/light.png</iconFile>
<executionMode>command</executionMode>
- <uuid>f7b98f96-12c7-11de-9757-00030d81164d</uuid>
+ <uuid>c8a41dd3-ae21-4b1f-aea3-ba151bcbd903</uuid>
</description>
<parameters>
</parameters>
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help.html
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help.html 2009-04-24 07:37:41 UTC (rev 4581)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-maxlight/trunk/resources/help.html 2009-04-24 07:50:04 UTC (rev 4582)
@@ -1,8 +1,8 @@
<html>
<body>
-<font size="3" face="Verdana, Arial, Helvetica, sans-serif">This gadget will make Tux Droïd
-seeks maximum light. Drag-and-drop this gadget into "My Favorites" or "My alerts" to enable it,
- make sure to unplug charger <br>
+<font size="3" face="Verdana, Arial, Helvetica, sans-serif">The Max Light gadget will make Tux Droid rotate towards the brightest light source.
+Drag-and-drop the gadget into "My Favorites" to enable it. Also, make sure to unplug
+the charger so Tux Droid can spin while searching for the light source. <br>
</font>
</body>
</html>
|
|
From: jerome <c2m...@c2...> - 2009-04-24 07:37:49
|
Author: jerome
Date: 2009-04-24 09:37:41 +0200 (Fri, 24 Apr 2009)
New Revision: 4581
Modified:
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramTV.java
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java
software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/programs/SimplePrograms.java
Log:
* Filter out program in case of frame time doesn't match with the system time.
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-23 11:50:31 UTC (rev 4580)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/resources/gadget.pot 2009-04-24 07:37:41 UTC (rev 4581)
@@ -61,7 +61,7 @@
msgid "Evening"
msgstr ""
-msgid "Give current played program"
+msgid "Give currently playing program"
msgstr ""
msgid "Give the tv program"
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java 2009-04-23 11:50:31 UTC (rev 4580)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/Configuration.java 2009-04-24 07:37:41 UTC (rev 4581)
@@ -25,7 +25,7 @@
public class Configuration extends SimpleGadgetConfiguration{
- private String channel = "Eén";
+ private String channel = "VTM";
private boolean giveProgramDescription = true;
private boolean giveMorning = false;
private boolean giveAfternoon = false;
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java 2009-04-23 11:50:31 UTC (rev 4580)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/FrenchConfiguration.java 2009-04-24 07:37:41 UTC (rev 4581)
@@ -33,7 +33,7 @@
private boolean giveMorning = false;
private boolean giveAfternoon = false;
private boolean giveEvening = false;
- private boolean giveNowPlaying = false;
+ private boolean giveNowPlaying = true;
private String tHour = "Morning";
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramTV.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramTV.java 2009-04-23 11:50:31 UTC (rev 4580)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramTV.java 2009-04-24 07:37:41 UTC (rev 4581)
@@ -43,6 +43,14 @@
if(nowPlaying != null)
{
gadget.throwMessage("Now playing on {0}, {1}", nowPlaying.getChannel(), nowPlaying.getTitle());
+
+ Program nextPlaying = SimplePrograms.getNextPlaying(programme, nowPlaying);
+
+ if(nextPlaying != null)
+ {
+ gadget.throwMessage("Next playing {0} at {1}", nextPlaying.getTitle(), nextPlaying.getStartTime());
+ }
+
}
else
{
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java 2009-04-23 11:50:31 UTC (rev 4580)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/gadget/GadgetProgramsTvFr.java 2009-04-24 07:37:41 UTC (rev 4581)
@@ -114,6 +114,13 @@
if(nowPlaying != null)
{
throwMessage("Now playing on {0}, {1}", nowPlaying.getChannel(), nowPlaying.getTitle());
+
+ Program nextPlaying = SimplePrograms.getNextPlaying(programme, nowPlaying);
+
+ if(nextPlaying != null)
+ {
+ throwMessage("Next playing {0} at {1}", nextPlaying.getTitle(), nextPlaying.getStartTime());
+ }
}
else
{
Modified: software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/programs/SimplePrograms.java
===================================================================
--- software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/programs/SimplePrograms.java 2009-04-23 11:50:31 UTC (rev 4580)
+++ software_suite_v2/software/gadgets/tuxdroid-gadget-programsTV/trunk/tuxdroid-gadget-programsTV/src/com/kysoh/tvPrograms/programs/SimplePrograms.java 2009-04-24 07:37:41 UTC (rev 4581)
@@ -510,7 +510,22 @@
*/
public static Vector<Program> sortMorning(Vector<Program> program)
{
- return SimplePrograms.sortPrograms(program, SimplePrograms.MORNING);
+ Vector<Program> progr = new Vector<Program>();
+ Vector<Program> programme = SimplePrograms.sortPrograms(program, SimplePrograms.MORNING);
+
+ int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
+
+ for(Program p : programme)
+ {
+ int pHour = Integer.valueOf(p.getStartTime().substring(0, 2)).intValue();
+
+ if(pHour >= hour)
+ {
+ progr.add(p);
+ }
+ }
+
+ return progr;
}
@@ -521,7 +536,23 @@
*/
public static Vector<Program> sortAfternoon(Vector<Program> program)
{
- return SimplePrograms.sortPrograms(program, SimplePrograms.AFTERNOON);
+ Vector<Program> progr = new Vector<Program>();
+
+ Vector<Program> programme = SimplePrograms.sortPrograms(program, SimplePrograms.AFTERNOON);
+
+ int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
+
+ for(Program p : programme)
+ {
+ int pHour = Integer.valueOf(p.getStartTime().substring(0, 2)).intValue();
+
+ if(pHour >= hour)
+ {
+ progr.add(p);
+ }
+ }
+
+ return progr;
}
@@ -532,7 +563,22 @@
*/
public static Vector<Program> sortEvening(Vector<Program> program)
{
- return SimplePrograms.sortPrograms(program, SimplePrograms.EVENING);
+ Vector<Program> progr = new Vector<Program>();
+ Vector<Program> programme = SimplePrograms.sortPrograms(program, SimplePrograms.EVENING);
+
+ int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
+
+ for(Program p : programme)
+ {
+ int pHour = Integer.valueOf(p.getStartTime().substring(0, 2)).intValue();
+
+ if(pHour >= hour)
+ {
+ progr.add(p);
+ }
+ }
+
+ return progr;
}
@@ -599,6 +645,33 @@
/**
+ * Give the next playing program.
+ * @return
+ */
+ public static Program getNextPlaying(Vector<Program> program, Program nowPlaying)
+ {
+ int npIndex = program.indexOf(nowPlaying);
+
+ if( (npIndex != -1) && (program.size() - 1 >= npIndex) )
+ {
+ Program next = null;
+
+ try
+ {
+ next = program.get( npIndex + 1 );
+ return next;
+ }
+ catch(Exception error)
+ {
+ return null;
+ }
+ }
+ else
+ return null;
+ }
+
+
+ /**
* Check backward for matching program.
* @param hour
* @return
|