tux-droid-svn Mailing List for Tux Droid CE (Page 205)
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: Paul_R <c2m...@c2...> - 2008-02-10 10:40:38
|
Author: Paul_R Date: 2008-02-10 11:40:30 +0100 (Sun, 10 Feb 2008) New Revision: 906 Modified: software/gadgets/calculator/trunk/Calculator.tgf software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.glade software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.pyp Log: * Activated the "." button. Now, the dot can be used with a mouse click on the button. Modified: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.glade =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.glade 2008-02-09 17:52:32 UTC (rev 905) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.glade 2008-02-10 10:40:30 UTC (rev 906) @@ -232,24 +232,6 @@ </child> <child> - <widget class="GtkButton" id="button13"> - <property name="width_request">55</property> - <property name="height_request">30</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">7</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <signal name="clicked" handler="on_button13_clicked" last_modification_time="Wed, 12 Sep 2007 12:12:58 GMT"/> - </widget> - <packing> - <property name="x">72</property> - <property name="y">120</property> - </packing> - </child> - - <child> <widget class="GtkButton" id="button4"> <property name="width_request">55</property> <property name="height_request">30</property> @@ -494,6 +476,24 @@ </child> <child> + <widget class="GtkButton" id="button13"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">7</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button13_clicked" last_modification_time="Wed, 12 Sep 2007 12:12:58 GMT"/> + </widget> + <packing> + <property name="x">72</property> + <property name="y">120</property> + </packing> + </child> + + <child> <widget class="GtkButton" id="button17"> <property name="width_request">55</property> <property name="height_request">30</property> @@ -503,6 +503,7 @@ <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button17_clicked" last_modification_time="Sun, 10 Feb 2008 10:33:49 GMT"/> </widget> <packing> <property name="x">72</property> Modified: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.pyp =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.pyp 2008-02-09 17:52:32 UTC (rev 905) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.pyp 2008-02-10 10:40:30 UTC (rev 906) @@ -58,6 +58,9 @@ def on_button15_clicked(self, widget, *args): tux.misc.simulate_remote_key(K_9) + def on_button17_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_STAR) + def on_button18_clicked(self, widget, *args): tux.misc.simulate_remote_key(K_0) Modified: software/gadgets/calculator/trunk/Calculator.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2008-02-09 17:52:39
|
Author: Paul_R Date: 2008-02-09 18:52:32 +0100 (Sat, 09 Feb 2008) New Revision: 905 Added: software/gadgets/calculator/trunk/Calculator/Pictures/ software/gadgets/calculator/trunk/Calculator/Pictures/Icons/ software/gadgets/calculator/trunk/Calculator/Pictures/Icons/gadget.png software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_blue.png software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_green.png software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_red.png software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_yellow.png software/gadgets/calculator/trunk/Calculator/Scripts/ software/gadgets/calculator/trunk/Calculator/Scripts/Python/ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.glade software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.pyp software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/other.glade software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/other.pyp software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/pixmaps/ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/pixmaps/gadget.png software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/widget/ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/widget/other.glade software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/widget/other.pyp software/gadgets/calculator/trunk/Calculator/Scripts/Python/init.pyp software/gadgets/calculator/trunk/Calculator/Scripts/Python/main.pyp software/gadgets/calculator/trunk/Calculator/Scripts/Python/notify.pyp software/gadgets/calculator/trunk/Calculator/Strings/ software/gadgets/calculator/trunk/Calculator/Strings/fr_ALL.xml software/gadgets/calculator/trunk/Calculator/about.xml software/gadgets/calculator/trunk/Calculator/parts.xml software/gadgets/calculator/trunk/Calculator/settings.xml software/gadgets/calculator/trunk/Calculator/strings.xml Modified: software/gadgets/calculator/trunk/Calculator.tgf Log: * Bug fixes : - Added some function to obtain a result as float. now, 7/2 = 3.5 ! - Implemented the K_STAR to enter a fractional number. * version++ (0.0.2 -> 0.03) Added: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/gadget.png =================================================================== (Binary files differ) Property changes on: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/gadget.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_blue.png =================================================================== (Binary files differ) Property changes on: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_blue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_green.png =================================================================== (Binary files differ) Property changes on: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_green.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_red.png =================================================================== (Binary files differ) Property changes on: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_red.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_yellow.png =================================================================== (Binary files differ) Property changes on: software/gadgets/calculator/trunk/Calculator/Pictures/Icons/rc_yellow.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.glade =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.glade (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.glade 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,523 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="width_request">266</property> + <property name="visible">True</property> + <property name="title" translatable="yes">window1</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <signal name="destroy" handler="on_window1_destroy" last_modification_time="Wed, 12 Sep 2007 12:36:49 GMT"/> + + <child> + <widget class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFixed" id="fixed3"> + <property name="border_width">5</property> + <property name="visible">True</property> + + <child> + <widget class="GtkEntry" id="entry1"> + <property name="width_request">249</property> + <property name="height_request">29</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes">0</property> + <property name="has_frame">True</property> + <property name="invisible_char">●</property> + <property name="activates_default">False</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">16</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed4"> + <property name="height_request">14</property> + <property name="visible">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed2"> + <property name="width_request">298</property> + <property name="height_request">205</property> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="button16"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_button16_clicked" last_modification_time="Wed, 12 Sep 2007 12:58:43 GMT"/> + + <child> + <widget class="GtkImage" id="image5"> + <property name="visible">True</property> + <property name="stock">gtk-yes</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + </child> + </widget> + <packing> + <property name="x">8</property> + <property name="y">160</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button12"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button12_clicked" last_modification_time="Wed, 12 Sep 2007 12:58:32 GMT"/> + + <child> + <widget class="GtkImage" id="image4"> + <property name="visible">True</property> + <property name="stock">gtk-cancel</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + </child> + </widget> + <packing> + <property name="x">8</property> + <property name="y">120</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button8"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button8_clicked" last_modification_time="Wed, 12 Sep 2007 12:58:24 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="stock">gtk-go-forward</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">8</property> + <property name="y">80</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button9"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">4</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button9_clicked" last_modification_time="Wed, 12 Sep 2007 12:11:28 GMT"/> + </widget> + <packing> + <property name="x">72</property> + <property name="y">80</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button13"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">7</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button13_clicked" last_modification_time="Wed, 12 Sep 2007 12:12:58 GMT"/> + </widget> + <packing> + <property name="x">72</property> + <property name="y">120</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button4"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button4_clicked" last_modification_time="Wed, 12 Sep 2007 12:58:16 GMT"/> + + <child> + <widget class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="stock">gtk-add</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + </child> + </widget> + <packing> + <property name="x">8</property> + <property name="y">40</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button5"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">1</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button5_clicked" last_modification_time="Wed, 12 Sep 2007 12:03:50 GMT"/> + </widget> + <packing> + <property name="x">72</property> + <property name="y">40</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button6"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">2</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button6_clicked" last_modification_time="Wed, 12 Sep 2007 12:09:02 GMT"/> + </widget> + <packing> + <property name="x">136</property> + <property name="y">40</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button10"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">5</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button10_clicked" last_modification_time="Wed, 12 Sep 2007 12:11:55 GMT"/> + </widget> + <packing> + <property name="x">136</property> + <property name="y">80</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button14"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">8</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button14_clicked" last_modification_time="Wed, 12 Sep 2007 12:13:24 GMT"/> + </widget> + <packing> + <property name="x">136</property> + <property name="y">120</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button18"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">0</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button18_clicked" last_modification_time="Wed, 12 Sep 2007 12:14:58 GMT"/> + </widget> + <packing> + <property name="x">136</property> + <property name="y">160</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button2"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">CE</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button2_clicked" last_modification_time="Wed, 12 Sep 2007 13:31:24 GMT"/> + </widget> + <packing> + <property name="x">136</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button3"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">C</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button3_clicked" last_modification_time="Wed, 12 Sep 2007 13:31:31 GMT"/> + </widget> + <packing> + <property name="x">200</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button7"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">3</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button7_clicked" last_modification_time="Wed, 12 Sep 2007 12:10:43 GMT"/> + </widget> + <packing> + <property name="x">200</property> + <property name="y">40</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button11"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">6</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button11_clicked" last_modification_time="Wed, 12 Sep 2007 12:12:26 GMT"/> + </widget> + <packing> + <property name="x">200</property> + <property name="y">80</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button15"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">9</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button15_clicked" last_modification_time="Wed, 12 Sep 2007 12:13:48 GMT"/> + </widget> + <packing> + <property name="x">200</property> + <property name="y">120</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button19"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">=</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button19_clicked" last_modification_time="Wed, 12 Sep 2007 12:22:35 GMT"/> + </widget> + <packing> + <property name="x">200</property> + <property name="y">160</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button1"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Back</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button1_clicked" last_modification_time="Wed, 12 Sep 2007 13:31:18 GMT"/> + </widget> + <packing> + <property name="x">72</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button17"> + <property name="width_request">55</property> + <property name="height_request">30</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">.</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="x">72</property> + <property name="y">160</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.pyp =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.pyp (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/calc_interface/other.pyp 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,103 @@ +bindtextdomain("params", "") + +class Window(SimpleGladeApp): + + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/calc_interface/other.glade', + root="window1", + domain="params", **kwargs): + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + + self.get_widget("window1").set_title(_me.string('name_to_read')) + + red_icon = gtk.gdk.pixbuf_new_from_file(_me.get_icon('rc_red.png')) + self.get_widget("image2").set_from_pixbuf(red_icon) + + green_icon = gtk.gdk.pixbuf_new_from_file(_me.get_icon('rc_green.png')) + self.get_widget("image3").set_from_pixbuf(green_icon) + + blue_icon = gtk.gdk.pixbuf_new_from_file(_me.get_icon('rc_blue.png')) + self.get_widget("image4").set_from_pixbuf(blue_icon) + + yellow_icon = gtk.gdk.pixbuf_new_from_file(_me.get_icon('rc_yellow.png')) + self.get_widget("image5").set_from_pixbuf(yellow_icon) + + thread.start_new_thread(self.update, ()) + + def update(self): + _me.update_informations() + + #Affected events to numeric buttons# + ######################################## + def on_button5_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_1) + + def on_button6_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_2) + + def on_button7_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_3) + + def on_button9_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_4) + + def on_button10_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_5) + + def on_button11_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_6) + + def on_button13_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_7) + + def on_button14_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_8) + + def on_button15_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_9) + + def on_button18_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_0) + + #Affected events to operator Buttons# + ##################################### + + def on_button19_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_SHARP) + #thread.start_new_thread(_me._print_debug, ('K_SHARP', )) + + def on_button4_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_RED) + + def on_button8_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_GREEN) + + def on_button12_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_BLUE) + + def on_button16_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_YELLOW) + + #Affected events to controls Buttons# + ##################################### + def on_button1_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_RECEIVECALL) + + def on_button2_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_STARTVOIP) + + def on_button3_clicked(self, widget, *args): + tux.misc.simulate_remote_key(K_HANGUP) + + + #Affected events when one user ask to close the main window# + ################################################################ + def on_window1_destroy(self, widget, *args): + _me.exit_main_loop() + + def update_entry(self): + gtk.gdk.threads_enter() + self.get_widget("entry1").set_text(_me.get_param('formul')) + gtk.gdk.threads_leave() Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/other.glade =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/other.glade (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/other.glade 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,308 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="height_request">120</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Parameters</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">True</property> + <property name="icon_name"></property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + + <child> + <widget class="GtkVBox" id="vbox1"> + <property name="height_request">120</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame4"> + <property name="border_width">5</property> + <property name="height_request">65</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed5"> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="button_remote"> + <property name="width_request">62</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Set</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button_remote_clicked" last_modification_time="Sat, 22 Sep 2007 00:55:36 GMT"/> + </widget> + <packing> + <property name="x">256</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label_remote"> + <property name="width_request">336</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Current : None</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">0</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label11"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Remote</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed3"> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="button2"> + <property name="width_request">96</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_accept_clicked" last_modification_time="Wed, 11 Jul 2007 19:53:32 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="stock">gtk-apply</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="label" translatable="yes">Accept</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">256</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button3"> + <property name="width_request">96</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_cancel_clicked" last_modification_time="Thu, 09 Aug 2007 13:50:03 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox3"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="stock">gtk-cancel</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="label" translatable="yes">Cancel</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">152</property> + <property name="y">0</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/other.pyp =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/other.pyp (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/other.pyp 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,91 @@ +bindtextdomain("params", "") + +class Window(SimpleGladeApp): + + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/conf/other.glade', + root="window1", + domain="params", **kwargs): + """ + Constructor + """ + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + """ + On new window + """ + self.updates_commons() + self.updates_specifics() + + def updates_commons(self): + """ + Updates common widgets + """ + # Window title + txt = "%s : %s" % (_me.string('name_to_read'), + _me.string('gui_conf_window_title')) + self.get_widget("window1").set_title(txt) + + # About labels + txt = _me.string('gui_conf_about_title') + self.get_widget("label7").set_text(txt) + + txt = "%s : %s" % (_me.string('gui_conf_description_lb'), + _me.get_description()) + self.get_widget("label_description").set_text(txt) + + txt = "%s : %s" % (_me.string('gui_conf_author_lb'), + _me.get_author()) + self.get_widget("label_author").set_text(txt) + + txt = "%s : %s" % (_me.string('gui_conf_version_lb'), + _me.get_version()) + self.get_widget("label_version").set_text(txt) + + # Remote Frame + txt = _me.string('gui_conf_remote_title') + self.get_widget("label11").set_text(txt) + + txt = "%s : None" % _me.string('gui_conf_current_bind_lb') + self.get_widget("label_remote").set_text(txt) + + txt = _me.string('gui_conf_remote_set_bt') + self.get_widget("button_remote").set_label(txt) + + # Bottom buttons + txt = _me.string('gui_conf_cancel_bt') + self.get_widget("label6").set_text(txt) + + txt = _me.string('gui_conf_accept_bt') + self.get_widget("label5").set_text(txt) + + def updates_specifics(self): + """ + Updates specific widgets + """ + pass + + def on_button_remote_clicked(self, widget, *args): + """ + On button 'set' remote clicked + """ + def remote_set_caption(): + tux.sys.wait(0.1) + gadgets['Manager'].gui('remote').window.set_captions(gadgets[_me.get_name()]) + if gadgets.has_key('Manager'): + if not gadgets['Manager'].gui('remote').showed(): + gadgets['Manager'].gui('remote').show() + thread.start_new_thread(remote_set_caption, ()) + + def on_accept_clicked(self, widget, *args): + """ + On button 'accept' clicked + """ + self.get_widget("window1").destroy() + + def on_cancel_clicked(self, widget, *args): + """ + On button 'cancel' clicked + """ + self.get_widget("window1").destroy() Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/pixmaps/gadget.png =================================================================== (Binary files differ) Property changes on: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/conf/pixmaps/gadget.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/widget/other.glade (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/widget/other.glade 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,101 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="visible">True</property> + <property name="title" translatable="yes">Widget</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + + <child> + <widget class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed1"> + <property name="visible">True</property> + + <child> + <widget class="GtkLabel" id="label2"> + <property name="width_request">192</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">...</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">8</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b></b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/widget/other.pyp (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/GUI/widget/other.pyp 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,16 @@ +bindtextdomain("params", "") + +class Window(SimpleGladeApp): + + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/widget/other.glade', + root="window1", + domain="params", **kwargs): + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + self.get_widget("window1").set_title(_me.string('name_to_read')) + thread.start_new_thread(self.update, ()) + + def update(self): + _me.update_informations() Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/init.pyp =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/init.pyp (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/init.pyp 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,4 @@ +def testFunct(): + tux.cmd.eyes_on(2) + +_me.insert_funct("open_eyes", testFunct) Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/main.pyp =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/main.pyp (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/main.pyp 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,188 @@ +import math + +global lexem_list, lexem_buf +global last_lexem_to_speak + +SND_CHECK = 13 +SND_BEEP = 11 + +lexem_list = [] +lexem_buf = '' + +DOT = '.' +PLUS = '+' +MINUS = '-' +TIMES = '*' +DIVIDE = '/' +LPAREN = '(' +RPAREN = ')' + +K_DOT = K_STAR +K_PLUS = K_RED +K_MINUS = K_GREEN +K_TIMES = K_BLUE +K_DIVIDE = K_YELLOW +K_EQUAL = K_SHARP +K_LPAR = K_LEFT +K_RPAR = K_RIGHT +K_EONUM = K_OK +K_BACK = K_RECEIVECALL +K_CE = K_STARTVOIP +K_C = K_HANGUP + +def to_digit(key_pressed): + if key_pressed < 10 : + return(str(key_pressed)) + elif key_pressed == K_DOT : + return (DOT) + else: + return('') + +def to_legal_lexem(key_pressed): + if key_pressed == K_LPAR : + return(LPAREN) + elif key_pressed == K_RPAR : + return(RPAREN) + elif key_pressed == K_PLUS : + return(PLUS) + elif key_pressed == K_MINUS : + return(MINUS) + elif key_pressed == K_TIMES : + return(TIMES) + elif key_pressed == K_DIVIDE : + return(DIVIDE) +# elif key_pressed == K_DOT: +# return(DOT) + else : + return('') + +def speak_the_lexem(lexem): + global last_lexem_to_speak + + if lexem == TIMES: + last_lexem_to_speak = _me.string("VC_time") + elif lexem == DIVIDE: + last_lexem_to_speak = _me.string("VC_div") + elif lexem == PLUS: + last_lexem_to_speak = _me.string("VC_plus") + elif lexem == MINUS: + last_lexem_to_speak = _me.string("VC_minus") + else: + last_lexem_to_speak = lexem + + current_lexem_to_speak = last_lexem_to_speak + tux.tts.stop() + tux.sys.wait(0.5) + if current_lexem_to_speak == last_lexem_to_speak: + _me.speak_free(current_lexem_to_speak) + +def update_formul(): + global lexem_list + global lexem_buf + + formul = '' + for lexem in lexem_list: formul = formul + lexem + formul = formul + lexem_buf + _me.set_param('formul', formul) + _me.gui('calc_interface').window.update_entry() + + +def speak_evaluation(): + global lexem_list + + if len(lexem_list) == 0: return + formula = '' + disp_formula = '' + for lexem in lexem_list: + disp_formula = disp_formula + lexem + if lexem == TIMES or lexem == DIVIDE or lexem == PLUS or lexem == MINUS: + pass + else: + fract, integer = math.modf(float(lexem)) + if (fract == 0): + lexem = lexem + ".0" + formula = formula + lexem + + try: + value = eval(formula) + fract, integer = math.modf(value) + if fract == 0.0: + value = int(value) + _me.speak_free(_me.string("VC_result_is") % str(value)) + _me.set_param('formul', '%s = %s' % (disp_formula, str(value))) + _me.gui('calc_interface').window.update_entry() + except: + _me.speak_free(_me.string("VC_syntax_error")) + _me.set_param('formul', _me.string("VC_syntax_error")) + _me.gui('calc_interface').window.update_entry() + +def play_flash(sound): + tux.cmd.sound_play(sound) + tux.sys.wait(0.2) + +def reduce_lexems(lexem_buf, key_pressed): + global lexem_list + + speak_lexem = False + speak_buffer = False + if to_legal_lexem(key_pressed) != '': + if len(lexem_buf) != 0: + lexem_list.append(lexem_buf) + lexem_buf = '' + play_flash(SND_BEEP) + lexem_list.append(to_legal_lexem(key_pressed)) + speak_lexem = True + elif to_digit(key_pressed) != '': + lexem_buf = lexem_buf + to_digit(key_pressed) + play_flash(SND_BEEP) + speak_buffer = True + elif key_pressed == K_EQUAL: + if len(lexem_buf) != 0: + play_flash(SND_CHECK) + lexem_list.append(lexem_buf) + lexem_buf = '' + return (lexem_buf, speak_lexem, speak_buffer) + +def parse_stream(key_pressed): + global lexem_buf, lexem_list + + lexem_buf, speak_lexem, speak_buffer = reduce_lexems(lexem_buf,key_pressed) + if key_pressed == K_EQUAL: + lexem_buf = '' + speak_evaluation() + lexem_list = [] + return + if key_pressed == K_BACK: + play_flash(SND_BEEP) + if lexem_buf != '': + lexem_buf = lexem_buf[:-1] + if lexem_buf != '': + speak_buffer = True + if key_pressed == K_C: + play_flash(SND_BEEP) + if lexem_buf != '': + lexem_buf = '' + else: + if len(lexem_list) > 0: + lexem_list.pop() + if key_pressed == K_CE: + play_flash(SND_BEEP) + lexem_buf = '' + lexem_list = [] + update_formul() + if speak_lexem: + speak_the_lexem(lexem_list[len(lexem_list)-1]) + if speak_buffer: + speak_the_lexem(lexem_buf) + +def on_standby(): + _me.gui('calc_interface').hide_from_main() + _me.exit_main_loop() + + +tux.event.on_remote = parse_stream + +_me.gui('calc_interface').show_from_main() +tux.event.on_remote_bt[K_STANDBY] = on_standby +_me.run_main_loop() + Added: software/gadgets/calculator/trunk/Calculator/Scripts/Python/notify.pyp =================================================================== --- software/gadgets/calculator/trunk/Calculator/Scripts/Python/notify.pyp (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Scripts/Python/notify.pyp 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,15 @@ +def notify_checker(): + + # if _me.get_param("switcher") == True: + # _me.speak(_me.string("name_to_read")) + # _me.set_param("switcher", False) + # return False + + # else: + # _me.set_param("switcher", True) + # return True + pass + +def notify_actuator(): + # _me.speak_notification(_me.string("NulString")) + pass Added: software/gadgets/calculator/trunk/Calculator/Strings/fr_ALL.xml =================================================================== --- software/gadgets/calculator/trunk/Calculator/Strings/fr_ALL.xml (rev 0) +++ software/gadgets/calculator/trunk/Calculator/Strings/fr_ALL.xml 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,39 @@ +<?xml version='1.0' encoding='UTF-8'?> +<strings> + <VC_back type='str'>arrière</VC_back> + <VC_c type='str'>effacer</VC_c> + <VC_ce type='str'>effacer tout</VC_ce> + <VC_div type='str'>divisé par</VC_div> + <VC_minus type='str'>moin</VC_minus> + <VC_plus type='str'>plusse</VC_plus> + <VC_result_is type='str'>La réponse est, %s</VC_result_is> + <VC_syntax_error type='str'>Erreur de syntaxe dans votre formule</VC_syntax_error> + <VC_time type='str'>fois</VC_time> + <gui_conf_about_title type='str'>A propos</gui_conf_about_title> + <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> + <gui_conf_author_lb type='str'>Kysoh</gui_conf_author_lb> + <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> + <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> + <gui_conf_delay_lb type='str'>Délai (sec)</gui_conf_delay_lb> + <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> + <gui_conf_remote_title type='str'>Télécommande</gui_conf_remote_title> + <gui_conf_update_title type='str'>Mise à jour</gui_conf_update_title> + <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> + <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> + <help_text type='str'>- Ce gadget résoud de simples opérations + mathématiques. + +- Il annonce vocalement les nombres + entrés, l'opérateur et le résultat. + +Pour entrer vos données, vous pouvez +soit utiliser la télécommande, soit votre +pavé numérique, ou encore les deux +simultanément. + Touches spécifiques: + - flèche gauche: parenthèse ouverte + - flèche droite: prentèse fermée</help_text> + <name_to_read type='str'>Calculatrice</name_to_read> + <speaker_name type='str'>Bruno8k</speaker_name> +</strings> Added: software/gadgets/calculator/trunk/Calculator/about.xml =================================================================== --- software/gadgets/calculator/trunk/Calculator/about.xml (rev 0) +++ software/gadgets/calculator/trunk/Calculator/about.xml 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<about> + <gadget_author type='str'>Kysoh</gadget_author> + <gadget_description type='str'>Voice calculator gadget for Tux Droid.</gadget_description> + <gadget_name type='str'>Calculator</gadget_name> + <gadget_version type='str'>0.0.3</gadget_version> +</about> Added: software/gadgets/calculator/trunk/Calculator/parts.xml =================================================================== --- software/gadgets/calculator/trunk/Calculator/parts.xml (rev 0) +++ software/gadgets/calculator/trunk/Calculator/parts.xml 2008-02-09 17:52:32 UTC (rev 905) @@ -0,0 +1,6 @@ +<?xml version='1.0' ... [truncated message content] |
From: Paul_R <c2m...@c2...> - 2008-02-08 10:12:16
|
Author: Paul_R Date: 2008-02-08 11:12:08 +0100 (Fri, 08 Feb 2008) New Revision: 904 Modified: firmware/fuxusb/branches/0.3/config.h firmware/fuxusb/branches/0.3/global.c firmware/fuxusb/branches/0.3/global.h firmware/fuxusb/branches/0.3/modules/usb/usb_task.c Log: * Improved the status and commands endpoints (CMD_IN_EP and CMD_OUT_EP). Modified: firmware/fuxusb/branches/0.3/config.h =================================================================== --- firmware/fuxusb/branches/0.3/config.h 2008-02-07 09:57:59 UTC (rev 903) +++ firmware/fuxusb/branches/0.3/config.h 2008-02-08 10:12:08 UTC (rev 904) @@ -30,6 +30,7 @@ //#define MAIN_DEBUG //#define USB_TASK_DEBUG //#define BOOTLOAD_DEBUG +//#define FIFO_DEBUG #define DEBUG_1 P3_6 #define DEBUG_2 P4_0 Modified: firmware/fuxusb/branches/0.3/global.c =================================================================== --- firmware/fuxusb/branches/0.3/global.c 2008-02-07 09:57:59 UTC (rev 903) +++ firmware/fuxusb/branches/0.3/global.c 2008-02-08 10:12:08 UTC (rev 904) @@ -39,7 +39,7 @@ bit usb_connected_Flag; bit CMD_OUT_usb_Bank; // To store the number of the Bank used for the CMD_OUT Endpoint -char CMD_IN_Bank_Nb; +unsigned char CMD_IN_Bank_Nb; bit USB_ParserProcess_Permit_Flag; bit USB_StatusProcess_Permit_Flag; Modified: firmware/fuxusb/branches/0.3/global.h =================================================================== --- firmware/fuxusb/branches/0.3/global.h 2008-02-07 09:57:59 UTC (rev 903) +++ firmware/fuxusb/branches/0.3/global.h 2008-02-08 10:12:08 UTC (rev 904) @@ -48,7 +48,7 @@ extern bit usb_connected_Flag; extern bit CMD_OUT_usb_Bank; // To store the number of the Bank used for the CMD_OUT Endpoint -extern char CMD_IN_Bank_Nb; +extern unsigned char CMD_IN_Bank_Nb; extern bit USB_ParserProcess_Permit_Flag; extern bit USB_StatusProcess_Permit_Flag; Modified: firmware/fuxusb/branches/0.3/modules/usb/usb_task.c =================================================================== --- firmware/fuxusb/branches/0.3/modules/usb/usb_task.c 2008-02-07 09:57:59 UTC (rev 903) +++ firmware/fuxusb/branches/0.3/modules/usb/usb_task.c 2008-02-08 10:12:08 UTC (rev 904) @@ -91,6 +91,12 @@ Configure_led(0,LED_PORT_10MA); Led_0_off(); + + Usb_select_ep(EP_CMD_IN); + UEPRST |= 0x10; + Usb_clear_tx_complete(); + Usb_clear_tx_ready(); + UEPRST &= ~0x10; ReadStatus_USBRequest_Flag = 0; @@ -125,51 +131,58 @@ *****************************************************************************/ void usb_Satus_command_process_task(void) { - data Uchar i; - - - - if((USB_Status_NewCmd_Flag)&&(USB_StatusProcess_Permit_Flag)&&(!(spi_master_config & RF_2FRAMES_HDR)) ) + + if((USB_Status_NewCmd_Flag) && (CMD_IN_Bank_Nb < 2)&&(!(spi_master_config & RF_2FRAMES_HDR)) && (USB_StatusProcess_Permit_Flag)) { + // + /* + * If the bank number == 2, that means that both banks has been filled. + */ + //if(CMD_IN_Bank_Nb < 2) + //{ +#ifdef FIFO_DEBUG +// printf("bank : %BX\n", CMD_IN_Bank_Nb); +#endif + /* + * Bank == 2 --> Bank 0 && Bank 1 full. + * So, we cant fill the fifo + */ + Usb_select_ep(EP_CMD_IN); + Usb_write_byte(0); + + if (RF_OFFLINE) + Usb_write_byte(0); + else + Usb_write_byte(1); - if(CMD_IN_Bank_Nb<2) - { - //Led_0_off(); - Usb_select_ep(EP_CMD_IN); - Usb_write_byte(0); - - if(RF_OFFLINE) - Usb_write_byte(0); - else - Usb_write_byte(1); - - Usb_write_byte(RF_Status); - - Usb_write_byte((FifoIn_STT_Idx/4)); - - //printf ("USB Request::Read Status from RF :: Sent\n"); + Usb_write_byte(RF_Status); + if (FifoIn_STT_Idx) + Usb_write_byte ((FifoIn_STT_Idx/4)); + else + Usb_write_byte (0); + - for(i=0;i<FifoIn_STT_Idx;i++) - Usb_write_byte(FIFO_STT_get()); - - if(FifoIn_STT_Idx!=60) - for(i=FifoIn_STT_Idx;i<60;i++) - Usb_write_byte(0); - - CMDIN_ToSend_Flag = 1; // Synchronize the Sending command With USB - ReadStatus_USBRequest_Flag = 0; - FIFO_STT_flush(); - RF_Status = 0; -// CMD_IN_Bank_Nb ++; - //Led_0_on(); - USB_Status_NewCmd_Flag = FALSE; - } - else + for(i=0;i<FifoIn_STT_Idx;i++) { - CMD_IN_Bank_Nb = 0; - FIFO_STT_flush(); + Usb_write_byte(FIFO_STT_get()); } + + //if(FifoIn_STT_Idx!=60) + //{ + for(i=FifoIn_STT_Idx;i<60;i++) + Usb_write_byte(i); + //} +#ifdef FIFO_DEBUG +// printf("sent : %BX\n", i); +#endif + CMDIN_ToSend_Flag = 1; // Synchronize the Sending command With USB + CMD_IN_Bank_Nb ++; // Increase the bank number + ReadStatus_USBRequest_Flag = 0; + FIFO_STT_flush(); + RF_Status = 0; + USB_Status_NewCmd_Flag = FALSE; + //} } } @@ -264,15 +277,6 @@ if (commands[i] == INFO_FUXUSB_CMD) // { - //Usb_select_ep(EP_CMD_IN); - FIFO_STT_put(0); - if(RF_OFFLINE) - FIFO_STT_put(0); - else - FIFO_STT_put(1); - FIFO_STT_put(RF_Status); - FIFO_STT_put((3)); - // VERSION_CMD //------------------------------------- FIFO_STT_put(info_version.version_cmd); @@ -293,11 +297,6 @@ FIFO_STT_put((info_author.author_id&0xFF00)>>8); FIFO_STT_put((info_author.author_id&0x00FF)); FIFO_STT_put(info_author.variation); - - - //CMDIN_ToSend_Flag = 1; // Synchronize the Sending command With USB - //ReadStatus_USBRequest_Flag = 0; - } i+=4; @@ -408,28 +407,23 @@ //-------------------------------------------------------------------------- if (Usb_sof()) { - Usb_clear_sof(); + Usb_clear_sof(); usb_sof_counter ++; // == 0xFF == 250ms - + /* + * If CMDIN_ToSend_Flag is set, that means that some data must be sent over USB + * So, the tx ready flag is set. + */ if ((CMDIN_ToSend_Flag == 1)) - { - if(CMD_IN_Bank_Nb<2) - { -#ifdef USB_TASK_DEBUG - printf ("SOF:: CMD_IN_Bank_Nb::%BX Usb_set_tx_ready \n",CMD_IN_Bank_Nb); - printf ("HIDCommand Sent \n"); -#endif + { Usb_select_ep(EP_CMD_IN); - Usb_set_tx_ready(); + if (!Usb_tx_ready()) + { + Usb_set_tx_ready(); + CMDIN_ToSend_Flag = 0; + } + } - CMDIN_ToSend_Flag = 0; - } -#ifdef USB_TASK_DEBUG - else - printf ("CMD_IN_Bank_Nb %B Full \n",CMD_IN_Bank_Nb); -#endif - } if(spi_watchdog_ctr) { @@ -496,8 +490,6 @@ } } } - - } //-------------------------------------------------------------------------- @@ -552,24 +544,31 @@ // -> Usb_clear_tx_complete() // -> CMDIN_ToSend_Flag = 0; // -> Authorize a new loading of the FIFO + // + // When the EP complete flag is set, if the other bank has been filled, the + // CMDIN_ToSend_Flag is set to indicate that the other bank can be sent. + // + // If the CMD_IN_Bank_Nb is equal to 0, no more data has to be sent. + // + // The TX ready flag is set on the SOF part. //-------------------------------------------------------------------------- if (Usb_test_it_ep(EP_CMD_IN)) { - Usb_select_ep(EP_CMD_IN); if(Usb_tx_complete()) { +#ifdef FIFO_DEBUG +// printf("TX complete\n"); +#endif Usb_clear_tx_complete(); - // printf ("LIBUSB EP:: clear_tx:: CMD_IN_Bank_Nb::%BX ",CMD_IN_Bank_Nb); - if (CMD_IN_Bank_Nb == 0) - CMD_IN_Bank_Nb = 1; - else - CMD_IN_Bank_Nb = 0; - //CMD_IN_Bank_Nb--; - //if (CMD_IN_Bank_Nb<0) CMD_IN_Bank_Nb = 0; - // printf ("Dec CMD_IN_Bank_Nb => %BX \n",CMD_IN_Bank_Nb); - // CMDIN_ToSend_Flag = 0; - //Led_1_off(); + CMD_IN_Bank_Nb --; + if (CMD_IN_Bank_Nb) + { +#ifdef FIFO_DEBUG +// printf("Other bank\n"); +#endif + CMDIN_ToSend_Flag = 1; + } } } @@ -674,9 +673,14 @@ // //-------------------------------------------------------------------------- if(USB_ParserProcess_Permit_Flag) + { if(Usb_test_it_ep(EP_CMD_OUT)) { +#ifdef FIFO_DEBUG +printf("CMD OUT\n"); +#endif + // printf ("if(Usb_test_it_ep(EP_CMD_OUT)) \n"); if(!USBCommand_NewRequest_Flag) /* XXX can lock in case the RF is not responding, check this for bootloader */ { @@ -699,7 +703,8 @@ if(USBCommand_Header == LIBUSB_TUX_CMD_HDR) { // printf (" LIBUSB_TUX_CMD_HDR \n"); - USBCommand_NewRequest_Flag = 1; // to inform SPI_task that a new command is arrived + if (!RF_OFFLINE) + USBCommand_NewRequest_Flag = 1; // to inform SPI_task that a new command is arrived for(i=0;i<(USBCommand_Ctr-1);i++) USBCommand_ForRF[i] = Usb_read_byte(); tux_command_parser(USBCommand_ForRF, USBCommand_Ctr); @@ -713,7 +718,9 @@ { for(i=0;i<(USBCommand_Ctr-1);i++) USBCommand_ForDongle[i] = Usb_read_byte(); - +#ifdef FIFO_DEBUG +printf("usb command parser\n"); +#endif usb_command_parser(); USBCommand_NewRequest_Flag = 0; /* re-enable USB to get the next value */ } @@ -818,7 +825,7 @@ } } } //if(Usb_endpoint_interrupt()) - + } } @@ -963,9 +970,12 @@ { if (USBCommand_NewRequest_Flag) // { + spi_slave_config = RF_CMD_HDR; // Config byte SPDAT = spi_slave_config; // Header byte -// printf ("CMD For RF \n"); +#ifdef FIFO_DEBUG + printf ("CMD For RF \n"); +#endif } else { @@ -1117,6 +1127,7 @@ } else // if RF_OFFLINE { +// USBCommand_NewRequest_Flag = 0; if (Cpu_reset) { Cpu_reset=0; @@ -1125,6 +1136,7 @@ while(tc) tc--; rf_reset_signal = 1; + } } } |
From: Paul_R <c2m...@c2...> - 2008-02-07 09:58:07
|
Author: Paul_R Date: 2008-02-07 10:57:59 +0100 (Thu, 07 Feb 2008) New Revision: 903 Modified: firmware/fuxusb/branches/0.3/modules/usb/usb_task.c Log: * Changed the banks on the CMD_IN endpoint. The banks were relatively badly managed, and in some cases, the USB communication was corrupted (error: USB: can't read on device: Resource temporarily unavailable (11)) In addition to this problem, the way to send the dongle versions were bad. Modified: firmware/fuxusb/branches/0.3/modules/usb/usb_task.c =================================================================== --- firmware/fuxusb/branches/0.3/modules/usb/usb_task.c 2008-02-05 11:07:00 UTC (rev 902) +++ firmware/fuxusb/branches/0.3/modules/usb/usb_task.c 2008-02-07 09:57:59 UTC (rev 903) @@ -128,13 +128,12 @@ data Uchar i; - - - + if((USB_Status_NewCmd_Flag)&&(USB_StatusProcess_Permit_Flag)&&(!(spi_master_config & RF_2FRAMES_HDR)) ) { - if(CMD_IN_Bank_Nb<=2) + + if(CMD_IN_Bank_Nb<2) { //Led_0_off(); Usb_select_ep(EP_CMD_IN); @@ -162,14 +161,16 @@ ReadStatus_USBRequest_Flag = 0; FIFO_STT_flush(); RF_Status = 0; - CMD_IN_Bank_Nb ++; +// CMD_IN_Bank_Nb ++; //Led_0_on(); USB_Status_NewCmd_Flag = FALSE; } - + else + { + CMD_IN_Bank_Nb = 0; + FIFO_STT_flush(); + } } - - } @@ -260,43 +261,46 @@ while (data_length > i) { + if (commands[i] == INFO_FUXUSB_CMD) // { - Usb_select_ep(EP_CMD_IN); - Usb_write_byte(0); + //Usb_select_ep(EP_CMD_IN); + FIFO_STT_put(0); if(RF_OFFLINE) - Usb_write_byte(0); + FIFO_STT_put(0); else - Usb_write_byte(1); - Usb_write_byte(RF_Status); - Usb_write_byte((3)); + FIFO_STT_put(1); + FIFO_STT_put(RF_Status); + FIFO_STT_put((3)); // VERSION_CMD //------------------------------------- - Usb_write_byte(info_version.version_cmd); - Usb_write_byte(info_version.cpu_ver_maj); - Usb_write_byte(info_version.ver_minor); - Usb_write_byte(info_version.ver_update); + FIFO_STT_put(info_version.version_cmd); + FIFO_STT_put(info_version.cpu_ver_maj); + FIFO_STT_put(info_version.ver_minor); + FIFO_STT_put(info_version.ver_update); // REVISION_CMD //------------------------------------- - Usb_write_byte(info_revision.revision_cmd); - Usb_write_byte((info_revision.revision&0xFF00)>>8); - Usb_write_byte((info_revision.revision&0x00FF)); - Usb_write_byte(info_revision.release_type); + FIFO_STT_put(info_revision.revision_cmd); + FIFO_STT_put((info_revision.revision&0xFF00)>>8); + FIFO_STT_put((info_revision.revision&0x00FF)); + FIFO_STT_put(info_revision.release_type); // AUTHOR_CMD //------------------------------------- - Usb_write_byte(info_author.author_cmd); - Usb_write_byte((info_author.author_id&0xFF00)>>8); - Usb_write_byte((info_author.author_id&0x00FF)); - Usb_write_byte(info_author.variation); + FIFO_STT_put(info_author.author_cmd); + FIFO_STT_put((info_author.author_id&0xFF00)>>8); + FIFO_STT_put((info_author.author_id&0x00FF)); + FIFO_STT_put(info_author.variation); - CMDIN_ToSend_Flag = 1; // Synchronize the Sending command With USB - ReadStatus_USBRequest_Flag = 0; + //CMDIN_ToSend_Flag = 1; // Synchronize the Sending command With USB + //ReadStatus_USBRequest_Flag = 0; + } i+=4; + } } @@ -410,13 +414,12 @@ if ((CMDIN_ToSend_Flag == 1)) { - if(CMD_IN_Bank_Nb<=2) + if(CMD_IN_Bank_Nb<2) { #ifdef USB_TASK_DEBUG printf ("SOF:: CMD_IN_Bank_Nb::%BX Usb_set_tx_ready \n",CMD_IN_Bank_Nb); printf ("HIDCommand Sent \n"); #endif - Usb_select_ep(EP_CMD_IN); Usb_set_tx_ready(); @@ -552,13 +555,18 @@ //-------------------------------------------------------------------------- if (Usb_test_it_ep(EP_CMD_IN)) { + Usb_select_ep(EP_CMD_IN); if(Usb_tx_complete()) { Usb_clear_tx_complete(); // printf ("LIBUSB EP:: clear_tx:: CMD_IN_Bank_Nb::%BX ",CMD_IN_Bank_Nb); - CMD_IN_Bank_Nb--; - if (CMD_IN_Bank_Nb<0) CMD_IN_Bank_Nb = 0; + if (CMD_IN_Bank_Nb == 0) + CMD_IN_Bank_Nb = 1; + else + CMD_IN_Bank_Nb = 0; + //CMD_IN_Bank_Nb--; + //if (CMD_IN_Bank_Nb<0) CMD_IN_Bank_Nb = 0; // printf ("Dec CMD_IN_Bank_Nb => %BX \n",CMD_IN_Bank_Nb); // CMDIN_ToSend_Flag = 0; //Led_1_off(); @@ -668,6 +676,7 @@ if(USB_ParserProcess_Permit_Flag) if(Usb_test_it_ep(EP_CMD_OUT)) { + // printf ("if(Usb_test_it_ep(EP_CMD_OUT)) \n"); if(!USBCommand_NewRequest_Flag) /* XXX can lock in case the RF is not responding, check this for bootloader */ { |
Author: Paul_R Date: 2008-02-05 12:07:00 +0100 (Tue, 05 Feb 2008) New Revision: 902 Added: software/gadgets/tux_controller/tags/0.1.2/ software/gadgets/tux_controller/tags/0.1.2/TuxController.tgf software/gadgets/tux_controller/tags/0.1.2/TuxController/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Data/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Data/rc_dict software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/battery.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/beak_closed.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/beak_open.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/down.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/eye_closed.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/eyel_close.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/eyer_close.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/gadget.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/gear-off.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/led_off.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/led_on.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledl_off.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledl_on.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledr_off.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledr_on.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/left.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/light.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/microphone.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/right.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/run.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_left.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_off.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_off_charging.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_right.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/up.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/wings_down.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/wings_up.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/conf/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/conf/other.glade software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/conf/other.pyp software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/widget/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/widget/other.glade software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/widget/other.pyp software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/widget/pixmaps/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/widget/pixmaps/Diagram1.png software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/init.pyp software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/main.pyp software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/notify.pyp software/gadgets/tux_controller/tags/0.1.2/TuxController/Strings/ software/gadgets/tux_controller/tags/0.1.2/TuxController/Strings/fr_ALL.xml software/gadgets/tux_controller/tags/0.1.2/TuxController/about.xml software/gadgets/tux_controller/tags/0.1.2/TuxController/parts.xml software/gadgets/tux_controller/tags/0.1.2/TuxController/settings.xml software/gadgets/tux_controller/tags/0.1.2/TuxController/strings.xml Log: * Tagged the version 0.1.2 which is the same as 0.1.1, except the tooltips. I've added the tooltips compatibility with pygtk 2.10 Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Data/rc_dict =================================================================== --- software/gadgets/tux_controller/tags/0.1.2/TuxController/Data/rc_dict (rev 0) +++ software/gadgets/tux_controller/tags/0.1.2/TuxController/Data/rc_dict 2008-02-05 11:07:00 UTC (rev 902) @@ -0,0 +1 @@ +words=[['Eyes', []], ['Mouth', []], ['Wings', []], ['Flash', []], ['Leds', []], ['Hide', []], ['Show', []], ['Panel', []]] \ No newline at end of file Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/battery.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/battery.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/beak_closed.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/beak_closed.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/beak_open.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/beak_open.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/down.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/down.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/eye_closed.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/eye_closed.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/eyel_close.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/eyel_close.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/eyer_close.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/eyer_close.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/gadget.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/gadget.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/gear-off.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/gear-off.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/led_off.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/led_off.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/led_on.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/led_on.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledl_off.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledl_off.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledl_on.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledl_on.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledr_off.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledr_off.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledr_on.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/ledr_on.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/left.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/left.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/light.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/light.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/microphone.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/microphone.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/right.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/right.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/run.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/run.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_left.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_left.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_off.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_off.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_off_charging.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_off_charging.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_right.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/spin_right.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/up.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/up.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/wings_down.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/wings_down.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/wings_up.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/tags/0.1.2/TuxController/Pictures/Icons/wings_up.png ___________________________________________________________________ Name: svn:mime-type + image/png Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/conf/other.glade =================================================================== --- software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/conf/other.glade (rev 0) +++ software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/conf/other.glade 2008-02-05 11:07:00 UTC (rev 902) @@ -0,0 +1,305 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="height_request">102</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Parameters</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + + <child> + <widget class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFrame" id="frame4"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed5"> + <property name="visible">True</property> + + <child> + <widget class="GtkLabel" id="label_remote"> + <property name="width_request">336</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Current : None</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button_remote"> + <property name="width_request">62</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Set</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button_remote_clicked" last_modification_time="Sat, 22 Sep 2007 00:55:36 GMT"/> + </widget> + <packing> + <property name="x">256</property> + <property name="y">0</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label11"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Remote</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed3"> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="button2"> + <property name="width_request">96</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_accept_clicked" last_modification_time="Wed, 11 Jul 2007 19:53:32 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="stock">gtk-apply</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="label" translatable="yes">Accept</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">256</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button3"> + <property name="width_request">96</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_cancel_clicked" last_modification_time="Thu, 09 Aug 2007 13:50:03 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox3"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="stock">gtk-cancel</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="label" translatable="yes">Cancel</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">152</property> + <property name="y">0</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/conf/other.pyp =================================================================== --- software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/conf/other.pyp (rev 0) +++ software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/conf/other.pyp 2008-02-05 11:07:00 UTC (rev 902) @@ -0,0 +1,75 @@ +bindtextdomain("params", "") + +class Window(SimpleGladeApp): + + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/conf/other.glade', + root="window1", + domain="params", **kwargs): + """ + Constructor + """ + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + """ + On new window + """ + self.updates_commons() + self.updates_specifics() + + def updates_commons(self): + """ + Updates common widgets + """ + # Window title + txt = "%s : %s" % (_me.string('name_to_read'), + _me.string('gui_conf_window_title')) + self.get_widget("window1").set_title(txt) + + # Remote Frame + txt = _me.string('gui_conf_remote_title') + self.get_widget("label11").set_text(txt) + + txt = "%s : None" % _me.string('gui_conf_current_bind_lb') + self.get_widget("label_remote").set_text(txt) + + txt = _me.string('gui_conf_remote_set_bt') + self.get_widget("button_remote").set_label(txt) + + # Bottom buttons + txt = _me.string('gui_conf_cancel_bt') + self.get_widget("label6").set_text(txt) + + txt = _me.string('gui_conf_accept_bt') + self.get_widget("label5").set_text(txt) + + def updates_specifics(self): + """ + Updates specific widgets + """ + pass + + def on_button_remote_clicked(self, widget, *args): + """ + On button 'set' remote clicked + """ + def remote_set_caption(): + tux.sys.wait(0.1) + gadgets['Manager'].gui('remote').window.set_captions(gadgets[_me.get_name()]) + if gadgets.has_key('Manager'): + if not gadgets['Manager'].gui('remote').showed(): + gadgets['Manager'].gui('remote').show() + thread.start_new_thread(remote_set_caption, ()) + + def on_accept_clicked(self, widget, *args): + """ + On button 'accept' clicked + """ + self.get_widget("window1").destroy() + + def on_cancel_clicked(self, widget, *args): + """ + On button 'cancel' clicked + """ + self.get_widget("window1").destroy() Added: software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/widget/other.glade (rev 0) +++ software/gadgets/tux_controller/tags/0.1.2/TuxController/Scripts/Python/GUI/widget/other.glade 2008-02-05 11:07:00 UTC (rev 902) @@ -0,0 +1,2705 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="visible">True</property> + <property name="title" translatable="yes">Widget</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + <signal name="destroy" handler="on_window1_destroy" last_modification_time="Thu, 15 Nov 2007 14:17:58 GMT"/> + + <child> + <widget class="GtkVBox" id="vbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkHBox" id="hbox18"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkTable" id="table1"> + <property name="border_width">2</property> + <property name="visible">True</property> + <property name="n_rows">7</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">0</property> + <property name="column_spacing">0</property> + + <child> + <widget class="GtkFixed" id="fixed13"> + <property name="height_request">57</property> + <property name="visible">True</property> + + <child> + <widget class="GtkCheckButton" id="chkShow"> + <property name="width_request">216</property> + <property name="height_request">24</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_chkShow_toggled" last_modification_time="Thu, 06 Dec 2007 12:55:43 GMT"/> + </widget> + <packing> + <property name="x">8</property> + <property name="y">15</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed25"> + <property name="visible">True</property> + + <child> + <widget class="GtkImage" id="imgSpin"> + <property name="width_request">367</property> + <property name="height_request">83</property> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="x">40</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSpinLeft"> + <property name="width_request">34</property> + <property name="height_request">34</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">False</property> + <signal name="pressed" handler="on_btnSpinLeft_pressed" last_modification_time="Wed, 14 Nov 2007 15:46:35 GMT"/> + <signal name="released" handler="on_btnSpinLeft_released" last_modification_time="Wed, 14 Nov 2007 15:46:38 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment9"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox9"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="imgSpinLeft"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="stock">gtk-go-back</property> + <property name="icon_size">4</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="label" translatable="yes"> +</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">0</property> + <property name="y">24</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnSpinRight"> + <property name="width_request">34</property> + <property name="height_request">34</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">False</property> + <signal name="pressed" handler="on_btnSpinRight_pressed" last_modification_time="Wed, 14 Nov 2007 15:46:46 GMT"/> + <signal name="released" handler="on_btnSpinRight_released" last_modification_time="Wed, 14 Nov 2007 15:46:50 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment8"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox8"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="imgSpinRight"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="stock">gtk-go-forward</property> + <property name="icon_size">4</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label8"> + <property name="visible">True</property> + <property name="label" translatable="yes"> +</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">26</property> + <property name="y">24</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed24"> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="btnWingsDown"> + <property name="width_request">34</property> + <property name="height_request">34</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_btnWingsDown_released" last_modification_time="Thu, 06 Dec 2007 14:43:04 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox7"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="imgWingsDown"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="stock">gtk-go-down</property> + <property name="icon_size">4</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="label" translatable="yes"> +</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">16</property> + <property name="y">56</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnWingsUp"> + <property name="width_request">34</property> + <property name="height_request">34</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_btnWingsUp_released" last_modification_time="Thu, 06 Dec 2007 14:42:55 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment6"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox6"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="imgWingsUp"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="stock">gtk-go-up</property> + <property name="icon_size">4</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="label" translatable="yes"> +</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">16</property> + <property name="y">24</property> + </packing> + </child> + + <child> + <widget class="GtkImage" id="imgWings"> + <property name="width_request">367</property> + <property name="height_request">142</property> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="x">40</property> + <property name="y">0</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed23"> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="btnMouthOpen"> + <property name="width_request">34</property> + <property name="height_request">34</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_btnMouthOpen_released" last_modification_time="Thu, 06 Dec 2007 14:29:34 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox5"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="imgMouthOpen"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="stock">gtk-go-down</property> + <property name="icon_size">4</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="label" translatable="yes"> +</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">16</property> + <property name="y">28</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnMouthClose"> + <property name="width_request">34</property> + <property name="height_request">34</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_btnMouthClose_released" last_modification_time="Thu, 06 Dec 2007 14:29:07 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment12"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox12"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="imgMouthClose"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="stock">gtk-go-up</property> + <property name="icon_size">4</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label12"> + <property name="visible">True</property> + <property name="label" translatable="yes"> +</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">16</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkImage" id="imgMouth"> + <property name="width_request">367</property> + <property name="height_request">62</property> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="x">40</property> + <property name="y">0</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fix1"> + <property name="height_request">21</property> + <property name="visible">True</property> + + <child> + <widget class="GtkSpinButton" id="spinLED"> + <property name="width_request">70</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 0 127 1 10 10</property> + </widget> + <packing> + <property name="x">70</property> + <property name="y">15</property> + </packing> + </child> + + <child> + <widget class="GtkVSeparator" id="vseparator19"> + <property name="width_request">16</property> + <property name="height_request">50</property> + <property name="visible">True</property> + </widget> + <packing> + <property name="x">20</property> + <property name="y">4</property> + </packing> + </child> + + <child> + <widget class="GtkVSeparator" id="vseparator18"> + <property name="width_request">16</property> + <property name="height_request">50</property> + <property name="visible">True</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">4</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="lblLED"> + <property name="width_request">16</property> + <property name="height_request">51</property> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">True</property> + <property name="angle">90</property> + </widget> + <packing> + <property name="x">9</property> + <property name="y">3</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="btnLEDRun"> + <property name="width_request">36</property> + <property name="height_request">36</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_btnLEDRun_clicked" last_modification_time="Thu, 15 Nov 2007 10:50:39 GMT"/> + + <child> + <widget class="GtkAlignment" id="alignment16"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox16"> + <property name="visible">True</property> + ... [truncated message content] |
From: Paul_R <c2m...@c2...> - 2008-02-05 10:29:37
|
Author: Paul_R Date: 2008-02-05 11:29:30 +0100 (Tue, 05 Feb 2008) New Revision: 901 Modified: software/gadgets/tux_controller/trunk/TuxController.tgf software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp Log: * Fixed another bug with the tooltips ... Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2008-02-05 10:18:05 UTC (rev 900) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2008-02-05 10:29:30 UTC (rev 901) @@ -771,7 +771,7 @@ tooltips.set_tip(self.get_widget('slideLED'), _me.string('toolLEDslide')) tooltips.set_tip(self.get_widget('spinLED'),_me.string('toolLEDspin')) - tooltips.set_tip(self.get_widget('imgEyesRun'),_me.string('toolEyesRun'), True) + tooltips.set_tip(self.get_widget('imgEyesRun'),_me.string('toolEyesRun')) tooltips.set_tip(self.get_widget('spinEyes'),_me.string('toolMove')) tooltips.set_tip(self.get_widget('imgMouthRun'),_me.string('toolMouthRun')) Modified: software/gadgets/tux_controller/trunk/TuxController.tgf =================================================================== (Binary files differ) |
From: Paul_R <c2m...@c2...> - 2008-02-05 10:18:13
|
Author: Paul_R Date: 2008-02-05 11:18:05 +0100 (Tue, 05 Feb 2008) New Revision: 900 Modified: software/gadgets/tux_controller/trunk/TuxController.tgf software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp Log: * Fixed a bug Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2008-02-01 16:38:55 UTC (rev 899) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2008-02-05 10:18:05 UTC (rev 900) @@ -767,7 +767,7 @@ def create_tooltips(self): tooltips = gtk.Tooltips() - tooltips.set_tip(self.get_widget('imgLEDRun'), _me.string('toolLEDRun'), False) + tooltips.set_tip(self.get_widget('imgLEDRun'), _me.string('toolLEDRun')) tooltips.set_tip(self.get_widget('slideLED'), _me.string('toolLEDslide')) tooltips.set_tip(self.get_widget('spinLED'),_me.string('toolLEDspin')) Modified: software/gadgets/tux_controller/trunk/TuxController.tgf =================================================================== (Binary files differ) |
From: jaguarondi <c2m...@c2...> - 2008-02-01 16:38:53
|
Author: jaguarondi Date: 2008-02-01 17:38:55 +0100 (Fri, 01 Feb 2008) New Revision: 899 Modified: firmware/tuxcore/trunk/Makefile Log: * Typo in the Makefile. Modified: firmware/tuxcore/trunk/Makefile =================================================================== --- firmware/tuxcore/trunk/Makefile 2008-02-01 16:30:24 UTC (rev 898) +++ firmware/tuxcore/trunk/Makefile 2008-02-01 16:38:55 UTC (rev 899) @@ -58,7 +58,7 @@ ifdef windir CDEBUG = -gdwarf-2 else -CDEBUG = -g +CDEBUG = -gstabs endif CWARN = -Wall -Wstrict-prototypes CTUNING = -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums @@ -86,8 +86,8 @@ HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 ## All source and header files -CSOURCE = $(wildcards *.c) -HEADERS = $(wildcards *.h) +CSOURCE = $(wildcard *.c) +HEADERS = $(wildcard *.h) ## Objects that must be built in order to link OBJECTS = main.o adc.o sensors.o motors.o global.o led.o communication.o \ |
From: Paul_R <c2m...@c2...> - 2008-02-01 16:30:35
|
Author: Paul_R Date: 2008-02-01 17:30:24 +0100 (Fri, 01 Feb 2008) New Revision: 898 Modified: software/gadgets/tux_controller/trunk/TuxController.tgf software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp software/gadgets/tux_controller/trunk/TuxController/settings.xml software/gadgets/tux_controller/trunk/TuxDroidController.tgf Log: * Compatibility with gtk < 2.12 Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade 2008-01-29 11:38:59 UTC (rev 897) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade 2008-02-01 16:30:24 UTC (rev 898) @@ -2813,7 +2813,7 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">100 100 330 1 10 10</property> + <property name="adjustment">100 50 330 1 10 10</property> <signal name="changed" handler="on_spinPitch_changed" last_modification_time="Tue, 11 Dec 2007 12:18:41 GMT"/> </widget> <packing> Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2008-01-29 11:38:59 UTC (rev 897) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2008-02-01 16:30:24 UTC (rev 898) @@ -31,7 +31,7 @@ thread.start_new_thread(self.update,()) self.average = 0 - self.count = 9 + self.count = 0 rules = [ [['none', 'none', 'Eyes'], self.on_btnEyesRun_clicked, (None,)], @@ -53,7 +53,8 @@ self.cb_voice.set_spk(speaker) def on_comboboxentry1_changed(self, widget, *args): - spk_id, skp_lang = self.cb_voice.get_current_spk_conf() + spk_id, spk_lang = self.cb_voice.get_current_spk_conf() + if spk_id == None: return tux.tts.select_voice(spk_id, self.get_widget('spinPitch').get_value()) _me.set_param('speaker', spk_id) _me.set_param('pitch', self.get_widget('spinPitch').get_value()) @@ -61,8 +62,8 @@ _me.set_var('pitch', self.get_widget('spinPitch').get_value()) def on_spinPitch_changed(self, widget, *args): - - spk_id, skp_lang = self.cb_voice.get_current_spk_conf() + spk_id, spk_lang = self.cb_voice.get_current_spk_conf() + if spk_id == None: return tux.tts.select_voice(spk_id, widget.get_value()) _me.set_param('speaker', spk_id) _me.set_param('pitch', widget.get_value()) @@ -206,7 +207,6 @@ tux.cmd.ledl_off() def on_right_led_on(self): - print 'right on' global __led_toggled_by_event __led_toggled_by_event = True self.get_widget('chkLEDRight').set_active(True) @@ -214,7 +214,6 @@ __led_toggled_by_event = False def on_right_led_off(self): - print 'right off' global __led_toggled_by_event __led_toggled_by_event = True self.get_widget('chkLEDRight').set_active(False) @@ -498,7 +497,6 @@ tux.cmd.spin_speed(widget.get_value()) def __wait(self, time): - print time tux.sys.wait(time) thread.start_new_thread(self.refresh_picture, ('imgSpin', self.spin_off)) @@ -599,19 +597,24 @@ _me.set_var('pitch', _me.get_param('pitch')) _me.set_var('speaker', _me.get_param('speaker')) - self.cb_voice = voice_cb.VoiceComboBoxAdd(tux, self.get_widget("comboboxentry1")) - self.cb_voice.set_spk(_me.get_var('speaker')) - self.get_widget('spinPitch').set_value(_me.get_param('pitch')) - - self.cb_voice.update() - self.cb_voice.set_spk(_me.get_param('speaker')) + self.get_widget('SoundLevel').set_fraction(0) + self.get_widget('BatteryLevel').set_fraction(0) + self.get_widget('LightLevel').set_fraction(0) + self.update_labels() self.update_pix() self.update_status() self.binding() + + self.cb_voice = voice_cb.VoiceComboBoxAdd(tux, self.get_widget("comboboxentry1")) + self.cb_voice.set_spk(_me.get_var('speaker')) + self.get_widget('spinPitch').set_value(_me.get_param('pitch')) + + self.cb_voice.update() + self.cb_voice.set_spk(_me.get_param('speaker')) tux.sys.wait(1) @@ -763,57 +766,60 @@ self.get_widget('imgSpin').set_from_pixbuf(self.spin_off) def create_tooltips(self): - self.get_widget('imgLEDRun').set_tooltip_text(_me.string('toolLEDRun')) - self.get_widget('slideLED').set_tooltip_text(_me.string('toolLEDslide')) - self.get_widget('spinLED').set_tooltip_text(_me.string('toolLEDspin')) + tooltips = gtk.Tooltips() + tooltips.set_tip(self.get_widget('imgLEDRun'), _me.string('toolLEDRun'), False) + tooltips.set_tip(self.get_widget('slideLED'), _me.string('toolLEDslide')) + tooltips.set_tip(self.get_widget('spinLED'),_me.string('toolLEDspin')) - self.get_widget('imgEyesRun').set_tooltip_text(_me.string('toolEyesRun')) - self.get_widget('spinEyes').set_tooltip_text(_me.string('toolMove')) + tooltips.set_tip(self.get_widget('imgEyesRun'),_me.string('toolEyesRun'), True) + tooltips.set_tip(self.get_widget('spinEyes'),_me.string('toolMove')) - self.get_widget('imgMouthRun').set_tooltip_text(_me.string('toolMouthRun')) - self.get_widget('spinMouth').set_tooltip_text(_me.string('toolMove')) + tooltips.set_tip(self.get_widget('imgMouthRun'),_me.string('toolMouthRun')) + tooltips.set_tip(self.get_widget('spinMouth'),_me.string('toolMove')) - self.get_widget('imgWingsRun').set_tooltip_text(_me.string('toolWingsRun')) - self.get_widget('spinWings').set_tooltip_text(_me.string('toolMove')) - self.get_widget('slideWings').set_tooltip_text(_me.string('toolPWM')) + tooltips.set_tip(self.get_widget('imgWingsRun'),_me.string('toolWingsRun')) + tooltips.set_tip(self.get_widget('spinWings'),_me.string('toolMove')) + tooltips.set_tip(self.get_widget('slideWings'),_me.string('toolPWM')) - self.get_widget('imgSpinRun').set_tooltip_text(_me.string('toolSpinRun')) - self.get_widget('spinSpin').set_tooltip_text(_me.string('toolMove')) - self.get_widget('slideSpin').set_tooltip_text(_me.string('toolPWM')) - self.get_widget('radSpinDirLeft').set_tooltip_text(_me.string('toolSpinDir')) - self.get_widget('radSpinDirRight').set_tooltip_text(_me.string('toolSpinDir')) + tooltips.set_tip(self.get_widget('imgSpinRun'),_me.string('toolSpinRun')) + tooltips.set_tip(self.get_widget('spinSpin'),_me.string('toolMove')) + tooltips.set_tip(self.get_widget('slideSpin'),_me.string('toolPWM')) + tooltips.set_tip(self.get_widget('radSpinDirLeft'),_me.string('toolSpinDir')) + tooltips.set_tip(self.get_widget('radSpinDirRight'),_me.string('toolSpinDir')) - self.get_widget('imgStopAll').set_tooltip_text(_me.string('toolStopAll')) + tooltips.set_tip(self.get_widget('imgStopAll'),_me.string('toolStopAll')) - self.get_widget('chkShow').set_tooltip_text(_me.string('toolAdvanced')) + tooltips.set_tip(self.get_widget('chkShow'),_me.string('toolAdvanced')) - self.get_widget('chkLEDRight').set_tooltip_text(_me.string('toolLEDRight')) - self.get_widget('chkLEDLeft').set_tooltip_text(_me.string('toolLEDLeft')) + tooltips.set_tip(self.get_widget('chkLEDRight'),_me.string('toolLEDRight')) + tooltips.set_tip(self.get_widget('chkLEDLeft'),_me.string('toolLEDLeft')) - self.get_widget('btnEyesOpen').set_tooltip_text(_me.string('toolEyesOpen')) - self.get_widget('btnEyesClose').set_tooltip_text(_me.string('toolEyesClose')) + tooltips.set_tip(self.get_widget('btnEyesOpen'),_me.string('toolEyesOpen')) + tooltips.set_tip(self.get_widget('btnEyesClose'),_me.string('toolEyesClose')) - self.get_widget('btnMouthOpen').set_tooltip_text(_me.string('toolMouthOpen')) - self.get_widget('btnMouthClose').set_tooltip_text(_me.string('toolMouthClose')) + tooltips.set_tip(self.get_widget('btnMouthOpen'),_me.string('toolMouthOpen')) + tooltips.set_tip(self.get_widget('btnMouthClose'),_me.string('toolMouthClose')) - self.get_widget('btnWingsUp').set_tooltip_text(_me.string('toolWingsUp')) - self.get_widget('btnWingsDown').set_tooltip_text(_me.string('toolWingsDown')) + tooltips.set_tip(self.get_widget('btnWingsUp'),_me.string('toolWingsUp')) + tooltips.set_tip(self.get_widget('btnWingsDown'),_me.string('toolWingsDown')) - self.get_widget('btnSpinRight').set_tooltip_text(_me.string('toolSpinRight')) - self.get_widget('btnSpinLeft').set_tooltip_text(_me.string('toolSpinLeft')) + tooltips.set_tip(self.get_widget('btnSpinRight'),_me.string('toolSpinRight')) + tooltips.set_tip(self.get_widget('btnSpinLeft'),_me.string('toolSpinLeft')) - self.get_widget('imgLight').set_tooltip_text(_me.string('toolLight')) - self.get_widget('imgBattery').set_tooltip_text(_me.string('toolBattery')) - self.get_widget('imgSound').set_tooltip_text(_me.string('toolSound')) + tooltips.set_tip(self.get_widget('imgLight'),_me.string('toolLight')) + tooltips.set_tip(self.get_widget('imgBattery'),_me.string('toolBattery')) + tooltips.set_tip(self.get_widget('imgSound'),_me.string('toolSound')) - self.get_widget('comboboxentry1').set_tooltip_text(_me.string('toolLang')) - self.get_widget('spinPitch').set_tooltip_text(_me.string('toolPitch')) + tooltips.set_tip(self.get_widget('comboboxentry1'),_me.string('toolLang')) + tooltips.set_tip(self.get_widget('spinPitch'),_me.string('toolPitch')) - self.get_widget('btnTTS').set_tooltip_text(_me.string('toolTTS')) - self.get_widget('btnTTSClear').set_tooltip_text(_me.string('toolTTSClear')) - self.get_widget('scrolledwindow1').set_tooltip_text(_me.string('toolTTSText')) + tooltips.set_tip(self.get_widget('btnTTS'),_me.string('toolTTS')) + tooltips.set_tip(self.get_widget('btnTTSClear'),_me.string('toolTTSClear')) + tooltips.set_tip(self.get_widget('scrolledwindow1'),_me.string('toolTTSText')) + tooltips.enable() + def hide_tab(self): self.get_widget('fix1').hide() self.get_widget('fix1').set_size_request(2,0) Modified: software/gadgets/tux_controller/trunk/TuxController/settings.xml =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/settings.xml 2008-01-29 11:38:59 UTC (rev 897) +++ software/gadgets/tux_controller/trunk/TuxController/settings.xml 2008-02-01 16:30:24 UTC (rev 898) @@ -8,6 +8,8 @@ </conf> <widget> <visible type='bool'>True</visible> + <x type='int'>169</x> + <y type='int'>104</y> </widget> </gui_state> <have_main_part type='bool'>True</have_main_part> Modified: software/gadgets/tux_controller/trunk/TuxController.tgf =================================================================== (Binary files differ) Modified: software/gadgets/tux_controller/trunk/TuxDroidController.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-29 11:38:58
|
Author: jerome Date: 2008-01-29 12:38:59 +0100 (Tue, 29 Jan 2008) New Revision: 897 Modified: software/gadgets/xmms_player/trunk/xmms_player.tgf Log: * Changed label text. Modified: software/gadgets/xmms_player/trunk/xmms_player.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-29 10:52:50
|
Author: jerome Date: 2008-01-29 11:52:46 +0100 (Tue, 29 Jan 2008) New Revision: 896 Modified: software/gadgets/PC_monitor/trunk/pc_monitor.tgf Log: * Increase version number Modified: software/gadgets/PC_monitor/trunk/pc_monitor.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-28 10:28:45
|
Author: jerome Date: 2008-01-28 11:28:43 +0100 (Mon, 28 Jan 2008) New Revision: 895 Modified: software/gadgets/PC_monitor/trunk/pc_monitor.tgf Log: * Change threshold Modified: software/gadgets/PC_monitor/trunk/pc_monitor.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-28 07:49:36
|
Author: jerome Date: 2008-01-28 08:49:37 +0100 (Mon, 28 Jan 2008) New Revision: 894 Modified: software/gadgets/PC_monitor/trunk/pc_monitor.tgf software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/conf/other.glade software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/conf/other.pyp software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/widget/other.glade software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/widget/other.pyp software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/init.pyp software/gadgets/PC_monitor/trunk/pc_monitor/settings.xml Log: * Change check method Modified: software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/conf/other.glade =================================================================== --- software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/conf/other.glade 2008-01-28 07:48:27 UTC (rev 893) +++ software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/conf/other.glade 2008-01-28 07:49:37 UTC (rev 894) @@ -132,7 +132,7 @@ <child> <widget class="GtkFrame" id="frame5"> <property name="border_width">5</property> - <property name="height_request">87</property> + <property name="height_request">65</property> <property name="visible">True</property> <property name="label_xalign">0</property> <property name="label_yalign">0.5</property> @@ -155,26 +155,6 @@ <property name="visible">True</property> <child> - <widget class="GtkSpinButton" id="spin_update"> - <property name="width_request">48</property> - <property name="height_request">24</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 1 60 1 10 10</property> - </widget> - <packing> - <property name="x">184</property> - <property name="y">0</property> - </packing> - </child> - - <child> <widget class="GtkSpinButton" id="spin_notification"> <property name="width_request">48</property> <property name="height_request">24</property> @@ -189,8 +169,8 @@ <property name="adjustment">1 1 60 1 10 10</property> </widget> <packing> - <property name="x">184</property> - <property name="y">32</property> + <property name="x">176</property> + <property name="y">4</property> </packing> </child> @@ -216,32 +196,6 @@ </widget> <packing> <property name="x">0</property> - <property name="y">40</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="update_interval_label"> - <property name="width_request">336</property> - <property name="height_request">16</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Update interval (sec) :</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="x">0</property> <property name="y">8</property> </packing> </child> Modified: software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/conf/other.pyp =================================================================== --- software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/conf/other.pyp 2008-01-28 07:48:27 UTC (rev 893) +++ software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/conf/other.pyp 2008-01-28 07:49:37 UTC (rev 894) @@ -63,12 +63,6 @@ txt = _me.string('gui_conf_update_title') self.get_widget("label12").set_text(txt) - txt = "%s" % _me.string('gui_conf_delay_lb') - self.get_widget("update_interval_label").set_text(txt) - - value = _me.get_var('notify_delay') - self.get_widget("spin_update").set_value(value) - txt = _me.string('gui_conf_notification_label') self.get_widget('label_notification').set_text(txt) @@ -82,6 +76,7 @@ txt = _me.string('gui_conf_accept_bt') self.get_widget("label5").set_text(txt) + def updates_specifics(self): """ Updates specific widgets @@ -178,13 +173,7 @@ value = self.get_widget('spin_notification').get_value() _me.set_param('spin_notif', int(value)) - value2 = self.get_widget('spin_update').get_value() - if value < value2: - _me.set_var('notify_delay', int(value)) - else: - _me.set_var('notify_delay', int(value2)) - value = self.get_widget('cpu_spin_threshold').get_value() _me.set_param('spin_cpu_seuil', int(value)) Modified: software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/widget/other.glade 2008-01-28 07:48:27 UTC (rev 893) +++ software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/widget/other.glade 2008-01-28 07:49:37 UTC (rev 894) @@ -4,6 +4,8 @@ <glade-interface> <widget class="GtkWindow" id="window1"> + <property name="width_request">445</property> + <property name="height_request">182</property> <property name="visible">True</property> <property name="title" translatable="yes">Widget</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> @@ -20,80 +22,8 @@ <property name="urgency_hint">False</property> <child> - <widget class="GtkFrame" id="frame1"> + <widget class="GtkFixed" id="fixed1"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_IN</property> - - <child> - <widget class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkFixed" id="fixed1"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="label2"> - <property name="width_request">192</property> - <property name="height_request">16</property> - <property name="visible">True</property> - <property name="label" translatable="yes">...</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="x">0</property> - <property name="y">8</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b></b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> </widget> </child> </widget> Modified: software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/widget/other.pyp 2008-01-28 07:48:27 UTC (rev 893) +++ software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/GUI/widget/other.pyp 2008-01-28 07:49:37 UTC (rev 894) @@ -10,7 +10,7 @@ def new(self): self.get_widget("window1").set_title(_me.string('name_to_read')) - thread.start_new_thread(self.update, ()) + thread.start_new_thread(self.update, ()) def update(self): _me.update_informations() Modified: software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/init.pyp =================================================================== --- software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/init.pyp 2008-01-28 07:48:27 UTC (rev 893) +++ software/gadgets/PC_monitor/trunk/pc_monitor/Scripts/Python/init.pyp 2008-01-28 07:49:37 UTC (rev 894) @@ -30,19 +30,28 @@ verite_ram.append(True) else: verite_ram.append(False) - _me.get_funct('delete_buffer')() - + _me.get_funct('delete_buffer')() + + j = 0 for i in verite_cpu: - if i != False: - notify[0] = True - + if i: + j += 1 + if j == len(liste): + notify[0] = True + else: + notify[0] = False + + j = 0 for i in verite_ram: - if i != False: - notify[1] = True + if i: + j += 1 + if j == len(liste): + notify[1] = True + else: + notify[1] = False _me.set_param('cpu_tag', notify[0]) _me.set_param('ram_tag', notify[1]) - return notify[0] or notify[1] else: Modified: software/gadgets/PC_monitor/trunk/pc_monitor/settings.xml =================================================================== --- software/gadgets/PC_monitor/trunk/pc_monitor/settings.xml 2008-01-28 07:48:27 UTC (rev 893) +++ software/gadgets/PC_monitor/trunk/pc_monitor/settings.xml 2008-01-28 07:49:37 UTC (rev 894) @@ -8,34 +8,32 @@ </conf> <widget> <visible type='bool'>True</visible> - <x type='int'>32</x> - <y type='int'>512</y> </widget> </gui_state> <have_main_part type='bool'>True</have_main_part> <have_settings_part type='bool'>True</have_settings_part> <have_widget_part type='bool'>False</have_widget_part> <language type='str'>en_US</language> - <main_priority type='int'>4</main_priority> + <main_priority type='int'>3</main_priority> <menu_active type='bool'>True</menu_active> <notified type='bool'>True</notified> - <notify_delay type='int'>6</notify_delay> + <notify_delay type='int'>1</notify_delay> <notify_priority type='int'>4</notify_priority> <pitch type='int'>100</pitch> <speaker type='int'>3</speaker> </general> <parameters> - <cpu_behavior_file type='str'>empty</cpu_behavior_file> - <cpu_load type='str'>00</cpu_load> + <cpu_behavior_file type='str'>/tmp/pc_monitor.0.0.2/Data/cpu_behavior.py</cpu_behavior_file> + <cpu_load type='str'>1.9801980198</cpu_load> <cpu_tag type='bool'>False</cpu_tag> <cpu_tts_message type='str'>CPU overload!</cpu_tts_message> - <first_cpu type='bool'>True</first_cpu> - <first_ram type='bool'>True</first_ram> - <ram_behavior_file type='str'>empty</ram_behavior_file> - <ram_load type='str'>00</ram_load> + <first_cpu type='bool'>False</first_cpu> + <first_ram type='bool'>False</first_ram> + <ram_behavior_file type='str'>/tmp/pc_monitor.0.0.2/Data/ram_behavior.py</ram_behavior_file> + <ram_load type='str'>41.9483101392</ram_load> <ram_tag type='bool'>False</ram_tag> <ram_tts_message type='str'>Memory is up!</ram_tts_message> - <spin_cpu_seuil type='int'>95</spin_cpu_seuil> + <spin_cpu_seuil type='int'>14</spin_cpu_seuil> <spin_notif type='int'>6</spin_notif> <spin_ram_seuil type='int'>95</spin_ram_seuil> <timer_busy type='bool'>False</timer_busy> Modified: software/gadgets/PC_monitor/trunk/pc_monitor.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-28 07:48:24
|
Author: jerome Date: 2008-01-28 08:48:27 +0100 (Mon, 28 Jan 2008) New Revision: 893 Modified: software/gadgets/totem_player/trunk/totem_player.tgf Log: * Add function to auto Modified: software/gadgets/totem_player/trunk/totem_player.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-28 07:46:31
|
Author: jerome Date: 2008-01-28 08:46:33 +0100 (Mon, 28 Jan 2008) New Revision: 892 Modified: software/gadgets/amarok_player/trunk/amarok_player.tgf Log: Modified: software/gadgets/amarok_player/trunk/amarok_player.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-28 07:45:18
|
Author: jerome Date: 2008-01-28 08:45:17 +0100 (Mon, 28 Jan 2008) New Revision: 891 Modified: software/gadgets/audacious_player/trunk/audacious_player.tgf Log: * Add function to automaticly stop audacious * Modified some labels. Modified: software/gadgets/audacious_player/trunk/audacious_player.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-28 07:43:35
|
Author: jerome Date: 2008-01-28 08:43:32 +0100 (Mon, 28 Jan 2008) New Revision: 890 Added: software/gadgets/xmms_player/trunk/xmms_player/Pictures/ software/gadgets/xmms_player/trunk/xmms_player/Scripts/ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/conf/ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/conf/other.glade software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/conf/other.pyp software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/widget/ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/widget/other.glade software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/widget/other.pyp software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/init.pyp software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/main.pyp software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/notify.pyp software/gadgets/xmms_player/trunk/xmms_player/Strings/ software/gadgets/xmms_player/trunk/xmms_player/Strings/fr_ALL.xml software/gadgets/xmms_player/trunk/xmms_player/about.xml software/gadgets/xmms_player/trunk/xmms_player/parts.xml software/gadgets/xmms_player/trunk/xmms_player/settings.xml software/gadgets/xmms_player/trunk/xmms_player/strings.xml Log: Added: software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/conf/other.glade =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/conf/other.glade (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/conf/other.glade 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,468 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="width_request">355</property> + <property name="height_request">212</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Parameters</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_CENTER</property> + <property name="modal">False</property> + <property name="resizable">True</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + + <child> + <widget class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkFixed" id="fixed9"> + <property name="height_request">212</property> + <property name="visible">True</property> + + <child> + <widget class="GtkButton" id="button3"> + <property name="width_request">96</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_cancel_clicked"/> + + <child> + <widget class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox3"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="stock">gtk-cancel</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label6"> + <property name="visible">True</property> + <property name="label" translatable="yes">Cancel</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">156</property> + <property name="y">175</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button2"> + <property name="width_request">96</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_accept_clicked"/> + + <child> + <widget class="GtkAlignment" id="alignment4"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="stock">gtk-apply</property> + <property name="icon_size">4</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label5"> + <property name="visible">True</property> + <property name="label" translatable="yes">Accept</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </widget> + <packing> + <property name="x">256</property> + <property name="y">175</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame4"> + <property name="border_width">5</property> + <property name="width_request">356</property> + <property name="height_request">64</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment9"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed8"> + <property name="height_request">1</property> + <property name="visible">True</property> + + <child> + <widget class="GtkLabel" id="label_remote"> + <property name="width_request">334</property> + <property name="height_request">33</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Current : None</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="button_remote"> + <property name="width_request">62</property> + <property name="height_request">27</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Set</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <signal name="clicked" handler="on_button_remote_clicked"/> + </widget> + <packing> + <property name="x">264</property> + <property name="y">0</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label11"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Remote</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="x">0</property> + <property name="y">0</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame5"> + <property name="border_width">5</property> + <property name="width_request">356</property> + <property name="height_request">118</property> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment8"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed6"> + <property name="border_width">1</property> + <property name="height_request">66</property> + <property name="visible">True</property> + + <child> + <widget class="GtkSpinButton" id="spinTimer"> + <property name="width_request">56</property> + <property name="height_request">25</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 1 120 1 10 10</property> + </widget> + <packing> + <property name="x">150</property> + <property name="y">56</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="play_location_cb"> + <property name="width_request">148</property> + <property name="height_request">24</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Play location</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">True</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">8</property> + </packing> + </child> + + <child> + <widget class="GtkFileChooserButton" id="filechooserbutton1"> + <property name="width_request">175</property> + <property name="height_request">29</property> + <property name="visible">True</property> + <property name="title" translatable="yes">/my_music_file</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> + </widget> + <packing> + <property name="x">150</property> + <property name="y">8</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="cbTimer"> + <property name="width_request">154</property> + <property name="height_request">23</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Close in (mins)</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">56</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="auto_play_cb"> + <property name="width_request">264</property> + <property name="height_request">22</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Auto play</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">32</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label13"> + <property name="visible">True</property> + <property name="label" translatable="yes">Audio player</property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="x">0</property> + <property name="y">56</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> Added: software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/conf/other.pyp =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/conf/other.pyp (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/conf/other.pyp 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,106 @@ +bindtextdomain("params", "") + +class Window(SimpleGladeApp): + + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/conf/other.glade', + root="window1", + domain="params", **kwargs): + """ + Constructor + """ + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + """ + On new window + """ + self.updates_commons() + self.updates_specifics() + + def updates_commons(self): + """ + Updates common widgets + """ + # Window title + txt = "%s : %s" % (_me.string('name_to_read'), + _me.string('gui_conf_window_title')) + self.get_widget("window1").set_title(txt) + + # Remote Frame + txt = _me.string('gui_conf_remote_title') + self.get_widget("label11").set_text(txt) + + txt = "%s : None" % _me.string('gui_conf_current_bind_lb') + self.get_widget("label_remote").set_text(txt) + + txt = _me.string('gui_conf_remote_set_bt') + self.get_widget("button_remote").set_label(txt) + + + # Bottom buttons + txt = _me.string('gui_conf_cancel_bt') + self.get_widget("label6").set_text(txt) + + txt = _me.string('gui_conf_accept_bt') + self.get_widget("label5").set_text(txt) + + #set the defaul directory to open. + directory = _me.get_param("current_directory") + self.get_widget("filechooserbutton1").set_current_folder(directory) + + # auto - play and play location + txt = _me.string('gui_conf_auto_play') + self.get_widget('auto_play_cb').set_label(txt) + + txt = _me.string('gui_conf_play_location_label') + self.get_widget('play_location_cb').set_label(txt) + + self.get_widget('auto_play_cb').set_active(_me.get_param('auto_play')) + self.get_widget('play_location_cb').set_active(_me.get_param('play_location')) + + self.get_widget('spinTimer').set_value(_me.get_param('spin_timer')) + self.get_widget('cbTimer').set_active(_me.get_param('flag_timer')) + + + def updates_specifics(self): + """ + Updates specific widgets + """ + pass + + def on_button_remote_clicked(self, widget, *args): + """ + On button 'set' remote clicked + """ + def remote_set_caption(): + tux.sys.wait(0.1) + gadgets['Manager'].gui('remote').window.set_captions(gadgets[_me.get_name()]) + if gadgets.has_key('Manager'): + if not gadgets['Manager'].gui('remote').showed(): + gadgets['Manager'].gui('remote').show() + thread.start_new_thread(remote_set_caption, ()) + + def on_accept_clicked(self, widget, *args): + """ + On button 'accept' clicked + """ + current_directory = self.get_widget("filechooserbutton1").get_current_folder() + current_directory = current_directory.replace('%20', ' ') + _me.set_param("current_directory", current_directory) + + _me.set_param('auto_play', self.get_widget('auto_play_cb').get_active()) + _me.set_param('play_location', self.get_widget('play_location_cb').get_active()) + + _me.set_param('flag_timer', self.get_widget('cbTimer').get_active()) + _me.set_param('spin_timer', self.get_widget('spinTimer').get_value()) + + + self.get_widget("window1").destroy() + + def on_cancel_clicked(self, widget, *args): + """ + On button 'cancel' clicked + """ + #On cancel clicked, no action implemented + self.get_widget("window1").destroy() Added: software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/widget/other.glade (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/widget/other.glade 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,101 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="window1"> + <property name="visible">True</property> + <property name="title" translatable="yes">Widget</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + <property name="focus_on_map">True</property> + <property name="urgency_hint">False</property> + + <child> + <widget class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + + <child> + <widget class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkFixed" id="fixed1"> + <property name="visible">True</property> + + <child> + <widget class="GtkLabel" id="label2"> + <property name="width_request">192</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">...</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">8</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b></b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> Added: software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/widget/other.pyp (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/GUI/widget/other.pyp 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,16 @@ +bindtextdomain("params", "") + +class Window(SimpleGladeApp): + + def __init__(self, + path=_me.get_path('root') + '/Scripts/Python/GUI/widget/other.glade', + root="window1", + domain="params", **kwargs): + SimpleGladeApp.__init__(self, path, root, domain, **kwargs) + + def new(self): + self.get_widget("window1").set_title(_me.string('name_to_read')) + thread.start_new_thread(self.update, ()) + + def update(self): + _me.update_informations() Added: software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/init.pyp =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/init.pyp (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/init.pyp 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1 @@ +_me.set_param('timer_var', 0) Added: software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/main.pyp =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/main.pyp (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/main.pyp 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,185 @@ +import threading +import time + + +def update_informations(): + pass + + +def _xmms_command(command): + """ + launch a shell command + """ + tux.cmd.sound_play(10) + tux.sys.shell_free("xmms '%s'" % command) + + +def error_dialog(message): + """ + Create an error Dialog Box with an error occured + """ + + def on_click_okcancel(obj): + dialogue.destroy() + + dialogue = gtk.Dialog("Music player widget error", None, gtk.DIALOG_MODAL, ()) + bt_alone = dialogue.add_button("Ok/Cancel", gtk.RESPONSE_APPLY) + bt_alone.connect("clicked", on_click_okcancel) + box = gtk.HBox(spacing = 5) + box.set_border_width(5) + box.show() + dialogue.vbox.pack_start(box) + identified_error = gtk.Label(message) + identified_error.show() + box.pack_start(identified_error) + dialogue.run() + + +# procedure witch initialize the audio player # +def _init_player(): + _xmms_command("") + +# function to check mp3 and ogg files into current directory # +def check_file(directory): + try: + dir_files = os.listdir(directory) + except OSError: + return False + sound_list = [] + for m_file in dir_files: + if m_file.lower().find('.mp3') != -1: + sound_list.append(m_file) + if m_file.lower().find('.ogg') != -1: + sound_list.append(m_file) + if m_file.lower().find('.wav') != -1: + sound_list.append(m_file) + if len(sound_list) > 0: + return True + else: + return False + + +# function to verify if xmms is present to this computer # +def check_xmms(directory): + return os.path.exists('/usr/bin/xmms') + +# Attached event's remote control # +def on_standby(): + _me.exit_main_loop() + +def play_pressed(): + _xmms_command("-t") + + +def stop_pressed(): + #_xmms_command("-s") + _xmms_command("--quit") + +def previous_pressed(): + _xmms_command("-r") + +def next_pressed(): + _xmms_command("-f") + +def menu_pressed(): + correct_playlist = check_file(current_directory) + if correct_playlist: + current_dir = "'%s'" % _me.get_param("current_directory") + _xmms_command(current_dir) + else: + gtk.gdk.threads_enter() + error_dialog(_me.string("err_no_file_to_read")) + gtk.gdk.threads_leave() + + + +def volume_mute(): + """ + Set the current value of the volume to mute or unmute. + """ + mute = _me.get_param('muted') + if mute: + mute = False + tux.sys.shell('amixer sset PCM unmute') + else: + mute = True + tux.sys.shell('amixer sset PCM mute') + _me.set_param('muted', mute) + +def volume_plus(): + """ + Set the current value of the volume up to 5% + """ + tux.sys.shell('amixer sset PCM 5%+') + +def volume_minus(): + """ + Set the current value of the volume down to 5% + """ + tux.sys.shell('amixer sset PCM 5%-') + + +tux.event.on_remote_bt[K_STANDBY] = on_standby +tux.event.on_remote_bt[K_PLAYPAUSE] = play_pressed +tux.event.on_remote_bt[K_STOP] = stop_pressed +tux.event.on_remote_bt[K_PREVIOUS] = previous_pressed +tux.event.on_remote_bt[K_NEXT] = next_pressed +tux.event.on_remote_bt[K_UP] = previous_pressed +tux.event.on_remote_bt[K_DOWN] = next_pressed +tux.event.on_remote_bt[K_OK] = play_pressed +tux.event.on_remote_bt[K_MENU] = menu_pressed +tux.event.on_remote_bt[K_MUTE] = volume_mute +tux.event.on_remote_bt[K_VOLUMEPLUS] = volume_plus +tux.event.on_remote_bt[K_VOLUMEMINUS] = volume_minus + +# initialisation of xmms player, auto-play and wait for an exit signal # +current_directory = _me.get_param("current_directory") + +#flag wich allow the main loop to run +allow_main_loop = True + +# check that the remote can working +if not tux.daemon.connected or not tux.status.rf_state(): + gtk.gdk.threads_enter() + error_dialog(_me.string("err_remote_not_work")) + gtk.gdk.threads_leave() + allow_main_loop = False + +# check xmms presence on the system +can_launch = check_xmms(current_directory) +if not can_launch: + gtk.gdk.threads_enter() + error_dialog(_me.string("err_no_xmms_found")) + gtk.gdk.threads_leave() + allow_main_loop = False + +# Look for auto_play enable. +def auto_play_asked(): + if not _me.get_param('auto_play'): + return False + _xmms_command("-p") + +def play_location_asked(): + if not _me.get_param('play_location'): + return False + menu_pressed() + + +def TimerFunct(): + """ + Will be launch to exit xmms player. + """ + stop_pressed() + on_standby() + + +# run the main loop +if allow_main_loop: + #If the timer is activated. + if _me.get_param('flag_timer'): + t = threading.Timer(float(_me.get_param('spin_timer') * 60.0), TimerFunct) + t.start() + + play_location_asked() + auto_play_asked() + _me.run_main_loop() Added: software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/notify.pyp =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/notify.pyp (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/Scripts/Python/notify.pyp 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,5 @@ +def notify_checker(): + return False + +def notify_actuator(): + pass Added: software/gadgets/xmms_player/trunk/xmms_player/Strings/fr_ALL.xml =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/Strings/fr_ALL.xml (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/Strings/fr_ALL.xml 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,50 @@ +<?xml version='1.0' encoding='UTF-8'?> +<strings> + <at_gui_conf_auto_play_cb type='str'>Lancement automatique</at_gui_conf_auto_play_cb> + <at_gui_conf_button_remote type='str'>Set</at_gui_conf_button_remote> + <at_gui_conf_cbTimer type='str'>Fermer dans (mins)</at_gui_conf_cbTimer> + <at_gui_conf_label11 type='str'>Telecommande</at_gui_conf_label11> + <at_gui_conf_label13 type='str'>Lecteur de musique</at_gui_conf_label13> + <at_gui_conf_label5 type='str'>Accepter</at_gui_conf_label5> + <at_gui_conf_label6 type='str'>Quitter</at_gui_conf_label6> + <at_gui_conf_label_remote type='str'>Current : None</at_gui_conf_label_remote> + <at_gui_conf_play_location_cb type='str'>Lire emplacement</at_gui_conf_play_location_cb> + <err_no_file_to_read type='str'>Désolé, je ne peux trouver de fichiers a lire ici. Vérifiez votre configuration</err_no_file_to_read> + <err_no_xmms_found type='str'>Désolé, je ne peux ouvrir xmms</err_no_xmms_found> + <err_remote_not_work type='str'>Vous devez connecter le dongle pour utiliser ce gadget</err_remote_not_work> + <gui_conf_about_title type='str'>A propos</gui_conf_about_title> + <gui_conf_accept_bt type='str'>Valider</gui_conf_accept_bt> + <gui_conf_author_lb type='str'>Auteur</gui_conf_author_lb> + <gui_conf_auto_play type='str'>Lancement automatique</gui_conf_auto_play> + <gui_conf_cancel_bt type='str'>Annuler</gui_conf_cancel_bt> + <gui_conf_current_bind_lb type='str'>Assignation</gui_conf_current_bind_lb> + <gui_conf_delay_lb type='str'>Délai (sec)</gui_conf_delay_lb> + <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <gui_conf_play_location_label type='str'>Lire le dossier</gui_conf_play_location_label> + <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> + <gui_conf_remote_title type='str'>Télécommande</gui_conf_remote_title> + <gui_conf_update_title type='str'>Mise à jour</gui_conf_update_title> + <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> + <gui_conf_window_title type='str'>Paramètres</gui_conf_window_title> + <help_text type='str'>Ce gadget controle xmms player avec la télécommande. +Dans la fenêtre de configuration vous pouvez sélectionner le chemin des fichiers musicaux +que vous voulez lire. Additionnellement, vous pouvez égelement activer l'option 'auto-play'. +Celà va automatiquement lancer la play-list du média player +de la session précédente ou lancer la lecture du chemin sélectionné. L'option +fermer quittera le média player après un nombre de minutes spécifié +Remote control: +=> OK/play-pause : play ou pause. +=> Menu : lance le répertoire sélectionné. +=> Next/arrow down : fichier suivant. +=> Previous/ arrow up: fichier précédent. +=> Stop: quitter le player. +=> Standby: retour à manager. + +Les touches suiventes ne fonctionnent pas quand tux est le périphérique audio +Seuelement quand votre PC est le périphérique audio. +=> Mute : coupe ou restaure le volume +=> Vol+ : augmente le volume +=> Vol- : diminue volume</help_text> + <name_to_read type='str'>lecteur xmms</name_to_read> + <speaker_name type='str'>Bruno8k</speaker_name> +</strings> Added: software/gadgets/xmms_player/trunk/xmms_player/about.xml =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/about.xml (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/about.xml 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='UTF-8'?> +<about> + <gadget_author type='str'>jer...@ky...</gadget_author> + <gadget_description type='str'>A little controller for XMMS player.</gadget_description> + <gadget_name type='str'>xmms_player</gadget_name> + <gadget_version type='str'>0.0.4</gadget_version> +</about> Added: software/gadgets/xmms_player/trunk/xmms_player/parts.xml =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/parts.xml (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/parts.xml 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,6 @@ +<?xml version='1.0' encoding='UTF-8'?> +<parts> + <notifications type='bool'>True</notifications> + <parameters_GUI type='bool'>True</parameters_GUI> + <widget_GUI type='bool'>True</widget_GUI> +</parts> Added: software/gadgets/xmms_player/trunk/xmms_player/settings.xml =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/settings.xml (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/settings.xml 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,34 @@ +<?xml version='1.0' encoding='UTF-8'?> +<settings> + <general> + <framework_version type='str'>0.0.0</framework_version> + <gui_state> + <conf> + <visible type='bool'>False</visible> + </conf> + <widget> + <visible type='bool'>False</visible> + </widget> + </gui_state> + <have_main_part type='bool'>True</have_main_part> + <have_settings_part type='bool'>True</have_settings_part> + <have_widget_part type='bool'>False</have_widget_part> + <language type='str'>fr_ALL</language> + <main_priority type='int'>4</main_priority> + <menu_active type='bool'>True</menu_active> + <notified type='bool'>True</notified> + <notify_delay type='int'>60</notify_delay> + <notify_priority type='int'>4</notify_priority> + <pitch type='int'>100</pitch> + <speaker type='int'>2</speaker> + </general> + <parameters> + <auto_play type='bool'>True</auto_play> + <current_directory type='str'>/home</current_directory> + <flag_player type='bool'>False</flag_player> + <flag_timer type='bool'>False</flag_timer> + <muted type='bool'>False</muted> + <play_location type='bool'>True</play_location> + <spin_timer type='int'>60</spin_timer> + </parameters> +</settings> Added: software/gadgets/xmms_player/trunk/xmms_player/strings.xml =================================================================== --- software/gadgets/xmms_player/trunk/xmms_player/strings.xml (rev 0) +++ software/gadgets/xmms_player/trunk/xmms_player/strings.xml 2008-01-28 07:43:32 UTC (rev 890) @@ -0,0 +1,51 @@ +<?xml version='1.0' encoding='UTF-8'?> +<strings> + <at_gui_conf_auto_play_cb type='str'>Auto play</at_gui_conf_auto_play_cb> + <at_gui_conf_button_remote type='str'>Set</at_gui_conf_button_remote> + <at_gui_conf_cbTimer type='str'>Close in (mins)</at_gui_conf_cbTimer> + <at_gui_conf_label11 type='str'>Remote</at_gui_conf_label11> + <at_gui_conf_label13 type='str'>Audio player</at_gui_conf_label13> + <at_gui_conf_label5 type='str'>Accept</at_gui_conf_label5> + <at_gui_conf_label6 type='str'>Cancel</at_gui_conf_label6> + <at_gui_conf_label_remote type='str'>Current : None</at_gui_conf_label_remote> + <at_gui_conf_play_location_cb type='str'>Play location</at_gui_conf_play_location_cb> + <err_no_file_to_read type='str'>Sorry, I can't find any music file to play here. Better check your configuration</err_no_file_to_read> + <err_no_xmms_found type='str'>Sorry, I can't start xmms player</err_no_xmms_found> + <err_remote_not_work type='str'>You need to connect the dongle to use this gadget</err_remote_not_work> + <gui_conf_about_title type='str'>About</gui_conf_about_title> + <gui_conf_accept_bt type='str'>Accept</gui_conf_accept_bt> + <gui_conf_author_lb type='str'>Author</gui_conf_author_lb> + <gui_conf_auto_play type='str'>Auto play</gui_conf_auto_play> + <gui_conf_cancel_bt type='str'>Cancel</gui_conf_cancel_bt> + <gui_conf_current_bind_lb type='str'>Current</gui_conf_current_bind_lb> + <gui_conf_delay_lb type='str'>Delay (sec)</gui_conf_delay_lb> + <gui_conf_description_lb type='str'>Description</gui_conf_description_lb> + <gui_conf_play_location_label type='str'>Play location</gui_conf_play_location_label> + <gui_conf_remote_set_bt type='str'>Set</gui_conf_remote_set_bt> + <gui_conf_remote_title type='str'>Remote</gui_conf_remote_title> + <gui_conf_update_title type='str'>Update</gui_conf_update_title> + <gui_conf_version_lb type='str'>Version</gui_conf_version_lb> + <gui_conf_window_title type='str'>Parameters</gui_conf_window_title> + <help_text type='str'>This gadget controls xmms player with the remote control. +In the settings window you can select the path of the music files you +want to play. Additionally, you can also enable the auto play option. +This will automatically start the play list from the media player's +previous session or start the playback of the selected path. The close +option will exit the media application after the specified number of +minutes. +Remote control buttons: +=> OK/play-pause : play or pause song +=> Menu : refresh selected directory +=> Next/arrow down : Next song +=> Previous/ arrow up: Previous song +=> Stop: stop song +=> Standby: back to manager + +The ones below do not work when Tux is set as audio device. +Only when using the audio device in your computer. +=> Mute : mute or unmute volume +=> Vol+ : increase volume +=> Vol- : decrease volume</help_text> + <name_to_read type='str'>xmms player</name_to_read> + <speaker_name type='str'>Ryan8k</speaker_name> +</strings> |
From: jerome <c2m...@c2...> - 2008-01-28 07:42:19
|
Author: jerome Date: 2008-01-28 08:42:11 +0100 (Mon, 28 Jan 2008) New Revision: 889 Modified: software/gadgets/xmms_player/trunk/xmms_player.tgf Log: * Add function to automaticly close xmms. * Modified some labels. Modified: software/gadgets/xmms_player/trunk/xmms_player.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-25 15:39:37
|
Author: jerome Date: 2008-01-25 16:39:33 +0100 (Fri, 25 Jan 2008) New Revision: 888 Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager.tgf software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/init.pyp software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Strings/fr_ALL.xml software/gadgets/shortcuts_manager/trunk/shortcuts_manager/strings.xml Log: * Add a tts notification when no shortcuts into list Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/init.pyp =================================================================== --- software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/init.pyp 2008-01-25 15:37:33 UTC (rev 887) +++ software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/init.pyp 2008-01-25 15:39:33 UTC (rev 888) @@ -40,6 +40,8 @@ +_me.set_param('allow', True) + _me.set_param('shortcut', '') _me.set_param('name', '') Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp =================================================================== --- software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp 2008-01-25 15:37:33 UTC (rev 887) +++ software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp 2008-01-25 15:39:33 UTC (rev 888) @@ -6,6 +6,13 @@ language = _me.get_var('language') _me.set_param('last_language', language) list = _me.get_param('list_of_shortcuts') + +if len(list) <= 0: + tux.tts.speak(_me.string('nothing')) + _me.set_param('allow', False) +else: + _me.set_param('allow', True) + tmp_list = [] availables_buttons_en = {'0':0, '1': 1, '2':2, '3':3, '4':4,\ @@ -57,4 +64,5 @@ _me.get_funct('assign_keys')() tux.event.on_remote_bt[K_STANDBY] = _me.exit_main_loop -_me.run_main_loop() +if _me.get_param('allow'): + _me.run_main_loop() Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Strings/fr_ALL.xml =================================================================== --- software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Strings/fr_ALL.xml 2008-01-25 15:37:33 UTC (rev 887) +++ software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Strings/fr_ALL.xml 2008-01-25 15:39:33 UTC (rev 888) @@ -45,6 +45,7 @@ :'thunderbird | firefox http://www.slashdot.org | xmms -p | pidgin'</help_text> <modify type='str'>raccourcis '%s' modifié</modify> <name_to_read type='str'>Manageur de raccourcis</name_to_read> + <nothing type='str'>Vous n'avez pas configuré de raccourcis. S'il vous plait, ajoutez un raccourcis dans la fenêtre de configuration.</nothing> <remote_key_name type='str'>Télécommande</remote_key_name> <shortcut_name type='str'>Nom</shortcut_name> <speaker_name type='str'>Bruno8k</speaker_name> Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager/strings.xml =================================================================== --- software/gadgets/shortcuts_manager/trunk/shortcuts_manager/strings.xml 2008-01-25 15:37:33 UTC (rev 887) +++ software/gadgets/shortcuts_manager/trunk/shortcuts_manager/strings.xml 2008-01-25 15:39:33 UTC (rev 888) @@ -47,6 +47,7 @@ :'thunderbird | firefox http://www.slashdot.org | xmms -p | pidgin'</help_text> <modify type='str'>'%s' shortcut modified</modify> <name_to_read type='str'>Shortcuts manager</name_to_read> + <nothing type='str'>You have no shortcuts configured. Please add a shortcut in the settings window</nothing> <remote_key_name type='str'>Remote key</remote_key_name> <shortcut_name type='str'>Name</shortcut_name> <speaker_name type='str'>Ryan8k</speaker_name> Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager.tgf =================================================================== (Binary files differ) |
From: jaguarondi <c2m...@c2...> - 2008-01-25 15:37:33
|
Author: jaguarondi Date: 2008-01-25 16:37:33 +0100 (Fri, 25 Jan 2008) New Revision: 887 Modified: firmware/fuxusb/trunk/global.h firmware/fuxusb/trunk/modules/usb/usb_task.c Log: * Get it compiling with the updated common files. Modified: firmware/fuxusb/trunk/global.h =================================================================== --- firmware/fuxusb/trunk/global.h 2008-01-25 12:35:03 UTC (rev 886) +++ firmware/fuxusb/trunk/global.h 2008-01-25 15:37:33 UTC (rev 887) @@ -15,6 +15,8 @@ #define _GLOBAL_H_ #include "common\commands.h" +#include "common/api.h" +#include "common\defines.h" /*_____ M A C R O S ________________________________________________________*/ Modified: firmware/fuxusb/trunk/modules/usb/usb_task.c =================================================================== --- firmware/fuxusb/trunk/modules/usb/usb_task.c 2008-01-25 12:35:03 UTC (rev 886) +++ firmware/fuxusb/trunk/modules/usb/usb_task.c 2008-01-25 15:37:33 UTC (rev 887) @@ -366,14 +366,14 @@ FIFO_STT_put(info_revision.revision_cmd); FIFO_STT_put((info_revision.revision & 0xFF00) >> 8); FIFO_STT_put((info_revision.revision & 0x00FF)); - FIFO_STT_put(info_revision._undefined_); + FIFO_STT_put(info_revision.release_type); // AUTHOR_CMD //------------------------------------- FIFO_STT_put(info_author.author_cmd); FIFO_STT_put((info_author.author_id & 0xFF00) >> 8); FIFO_STT_put((info_author.author_id & 0x00FF)); - FIFO_STT_put(info_author._undefined_); + FIFO_STT_put(info_author.variation); } } |
From: Paul_R <c2m...@c2...> - 2008-01-25 12:35:17
|
Author: Paul_R Date: 2008-01-25 13:35:03 +0100 (Fri, 25 Jan 2008) New Revision: 886 Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/eyel_close.png software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/eyer_close.png software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledl_off.png software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledl_on.png software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledr_off.png software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledr_on.png Modified: software/gadgets/tux_controller/trunk/TuxController.tgf software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/main.pyp software/gadgets/tux_controller/trunk/TuxController/Strings/fr_ALL.xml software/gadgets/tux_controller/trunk/TuxController/about.xml software/gadgets/tux_controller/trunk/TuxController/strings.xml Log: * Movements improvements : - Added, for each movements's type, a checkbox which allow to command the movement with a defined number of movements, or for a defined duration. - The 'speed' slide bar of the spinning and the flippers allow to change the speed everytime, even if a movement is being executed. * LEDs improvements : - Added 3 radio buttons to choose the LEDs effect. (No effect, Fading, Gradient). The parameters for each effect are the frequency, and the number of blinks - Added a slide bar to set the LEDs intensity. (10 levels are available). * Graphics improvements : - The LEDs are displayed separately. - The flippers part is refreshed when the flippers are moving. - I've changed the way to refresh the run/stop buttons icons. There is less of problems now. * Note : This gadget requires the following versions : - API >= SVN rev. 869 - Daemon >= SVN rev. 884 - Tuxcore >= SVN rev. 868 Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/eyel_close.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/eyel_close.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/eyer_close.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/eyer_close.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledl_off.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledl_off.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledl_on.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledl_on.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledr_off.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledr_off.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledr_on.png =================================================================== (Binary files differ) Property changes on: software/gadgets/tux_controller/trunk/TuxController/Pictures/Icons/ledr_on.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade 2008-01-25 11:57:24 UTC (rev 885) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.glade 2008-01-25 12:35:03 UTC (rev 886) @@ -44,7 +44,7 @@ <child> <widget class="GtkFixed" id="fixed13"> - <property name="height_request">57</property> + <property name="height_request">77</property> <property name="visible">True</property> <child> @@ -82,22 +82,6 @@ <property name="visible">True</property> <child> - <widget class="GtkImage" id="imgSpin"> - <property name="width_request">367</property> - <property name="height_request">83</property> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="x">40</property> - <property name="y">0</property> - </packing> - </child> - - <child> <widget class="GtkButton" id="btnSpinLeft"> <property name="width_request">34</property> <property name="height_request">34</property> @@ -264,6 +248,22 @@ <property name="y">24</property> </packing> </child> + + <child> + <widget class="GtkImage" id="imgSpin"> + <property name="width_request">367</property> + <property name="height_request">83</property> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="x">40</property> + <property name="y">0</property> + </packing> + </child> </widget> <packing> <property name="left_attach">0</property> @@ -669,7 +669,8 @@ <child> <widget class="GtkFixed" id="fix1"> - <property name="height_request">21</property> + <property name="width_request">360</property> + <property name="height_request">77</property> <property name="visible">True</property> <child> @@ -685,42 +686,42 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 127 1 10 10</property> + <property name="adjustment">1 1 127 1 10 10</property> </widget> <packing> <property name="x">70</property> - <property name="y">15</property> + <property name="y">25</property> </packing> </child> <child> - <widget class="GtkVSeparator" id="vseparator19"> + <widget class="GtkVSeparator" id="vseparator18"> <property name="width_request">16</property> - <property name="height_request">50</property> + <property name="height_request">71</property> <property name="visible">True</property> </widget> <packing> - <property name="x">20</property> - <property name="y">4</property> + <property name="x">0</property> + <property name="y">3</property> </packing> </child> <child> - <widget class="GtkVSeparator" id="vseparator18"> + <widget class="GtkVSeparator" id="vseparator19"> <property name="width_request">16</property> - <property name="height_request">50</property> + <property name="height_request">71</property> <property name="visible">True</property> </widget> <packing> - <property name="x">0</property> - <property name="y">4</property> + <property name="x">20</property> + <property name="y">3</property> </packing> </child> <child> <widget class="GtkLabel" id="lblLED"> <property name="width_request">16</property> - <property name="height_request">51</property> + <property name="height_request">71</property> <property name="visible">True</property> <property name="label" translatable="yes"> </property> <property name="use_underline">False</property> @@ -822,11 +823,73 @@ </widget> <packing> <property name="x">30</property> - <property name="y">11</property> + <property name="y">21</property> </packing> </child> <child> + <widget class="GtkRadioButton" id="radLEDGradient"> + <property name="width_request">88</property> + <property name="height_request">22</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Gradient</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="x">144</property> + <property name="y">47</property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="radLEDFading"> + <property name="width_request">88</property> + <property name="height_request">22</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Fading</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radLEDGradient</property> + </widget> + <packing> + <property name="x">144</property> + <property name="y">27</property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="radLEDNone"> + <property name="width_request">88</property> + <property name="height_request">22</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">None</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radLEDGradient</property> + </widget> + <packing> + <property name="x">144</property> + <property name="y">8</property> + </packing> + </child> + + <child> <widget class="GtkLabel" id="lblFrequency"> <property name="width_request">144</property> <property name="height_request">16</property> @@ -847,8 +910,8 @@ <property name="angle">0</property> </widget> <packing> - <property name="x">160</property> - <property name="y">7</property> + <property name="x">230</property> + <property name="y">0</property> </packing> </child> @@ -867,21 +930,21 @@ <signal name="value_changed" handler="on_slideLED_value_changed" last_modification_time="Thu, 15 Nov 2007 08:37:21 GMT"/> </widget> <packing> - <property name="x">160</property> - <property name="y">15</property> + <property name="x">230</property> + <property name="y">6</property> </packing> </child> <child> - <widget class="GtkLabel" id="label27"> - <property name="width_request">73</property> + <widget class="GtkLabel" id="lblIntensity"> + <property name="width_request">144</property> <property name="height_request">16</property> <property name="visible">True</property> - <property name="label" translatable="yes">Cycles</property> + <property name="label" translatable="yes">label19</property> <property name="use_underline">False</property> <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -893,10 +956,30 @@ <property name="angle">0</property> </widget> <packing> - <property name="x">63</property> - <property name="y">0</property> + <property name="x">230</property> + <property name="y">33</property> </packing> </child> + + <child> + <widget class="GtkHScale" id="slideLEDintensity"> + <property name="width_request">160</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="draw_value">True</property> + <property name="value_pos">GTK_POS_RIGHT</property> + <property name="digits">0</property> + <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> + <property name="inverted">False</property> + <property name="adjustment">10 0 11 1 1 1</property> + <signal name="change_value" handler="on_slideLEDintensity_change_value" last_modification_time="Fri, 25 Jan 2008 09:32:02 GMT"/> + </widget> + <packing> + <property name="x">230</property> + <property name="y">39</property> + </packing> + </child> </widget> <packing> <property name="left_attach">1</property> @@ -909,6 +992,7 @@ <child> <widget class="GtkFixed" id="fix2"> + <property name="width_request">360</property> <property name="height_request">79</property> <property name="visible">True</property> @@ -924,7 +1008,7 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 127 1 10 10</property> + <property name="adjustment">1 1 127 1 10 10</property> </widget> <packing> <property name="x">72</property> @@ -945,18 +1029,6 @@ </child> <child> - <widget class="GtkVSeparator" id="vseparator10"> - <property name="width_request">16</property> - <property name="height_request">73</property> - <property name="visible">True</property> - </widget> - <packing> - <property name="x">0</property> - <property name="y">3</property> - </packing> - </child> - - <child> <widget class="GtkLabel" id="lblEyes"> <property name="width_request">16</property> <property name="height_request">73</property> @@ -1066,30 +1138,59 @@ </child> <child> - <widget class="GtkLabel" id="label26"> - <property name="width_request">73</property> - <property name="height_request">16</property> + <widget class="GtkRadioButton" id="radEyesCycles"> + <property name="width_request">66</property> + <property name="height_request">22</property> <property name="visible">True</property> - <property name="label" translatable="yes">Cycles</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">cycles +</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_radEyesCycles_toggled" last_modification_time="Thu, 24 Jan 2008 09:02:18 GMT"/> </widget> <packing> - <property name="x">63</property> - <property name="y">11</property> + <property name="x">144</property> + <property name="y">17</property> </packing> </child> + + <child> + <widget class="GtkRadioButton" id="radEyesSec"> + <property name="width_request">66</property> + <property name="height_request">22</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">sec.</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radEyesCycles</property> + </widget> + <packing> + <property name="x">144</property> + <property name="y">37</property> + </packing> + </child> + + <child> + <widget class="GtkVSeparator" id="vseparator10"> + <property name="width_request">16</property> + <property name="height_request">73</property> + <property name="visible">True</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">3</property> + </packing> + </child> </widget> <packing> <property name="left_attach">1</property> @@ -1103,6 +1204,7 @@ <child> <widget class="GtkFixed" id="fix3"> + <property name="width_request">360</property> <property name="height_request">62</property> <property name="visible">True</property> @@ -1118,11 +1220,11 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 127 1 10 10</property> + <property name="adjustment">1 1 127 1 10 10</property> </widget> <packing> <property name="x">70</property> - <property name="y">23</property> + <property name="y">16</property> </packing> </child> @@ -1255,35 +1357,53 @@ </widget> <packing> <property name="x">30</property> - <property name="y">18</property> + <property name="y">12</property> </packing> </child> <child> - <widget class="GtkLabel" id="label25"> - <property name="width_request">73</property> - <property name="height_request">16</property> + <widget class="GtkRadioButton" id="radMouthCycles"> + <property name="width_request">66</property> + <property name="height_request">22</property> <property name="visible">True</property> - <property name="label" translatable="yes">Cycles</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">cycles +</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_radMouthCycles_toggled" last_modification_time="Thu, 24 Jan 2008 09:20:35 GMT"/> </widget> <packing> - <property name="x">63</property> - <property name="y">8</property> + <property name="x">144</property> + <property name="y">7</property> </packing> </child> + + <child> + <widget class="GtkRadioButton" id="radMouthSec"> + <property name="width_request">66</property> + <property name="height_request">22</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">sec. +</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radMouthCycles</property> + </widget> + <packing> + <property name="x">144</property> + <property name="y">27</property> + </packing> + </child> </widget> <packing> <property name="left_attach">1</property> @@ -1297,6 +1417,7 @@ <child> <widget class="GtkFixed" id="fix4"> + <property name="width_request">360</property> <property name="height_request">142</property> <property name="visible">True</property> @@ -1312,7 +1433,7 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 127 1 10 10</property> + <property name="adjustment">1 1 127 1 10 10</property> </widget> <packing> <property name="x">70</property> @@ -1454,26 +1575,48 @@ </child> <child> - <widget class="GtkHScale" id="slideWings"> - <property name="width_request">160</property> - <property name="height_request">32</property> + <widget class="GtkRadioButton" id="radWingsCycles"> + <property name="width_request">66</property> + <property name="height_request">22</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="draw_value">True</property> - <property name="value_pos">GTK_POS_RIGHT</property> - <property name="digits">0</property> - <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> - <property name="inverted">False</property> - <property name="adjustment">5 1 5 1 0 0</property> - <signal name="value_changed" handler="on_slideWings_value_changed" last_modification_time="Thu, 15 Nov 2007 08:42:15 GMT"/> + <property name="label" translatable="yes">cycles</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_radWingsCycles_toggled" last_modification_time="Thu, 24 Jan 2008 09:38:21 GMT"/> </widget> <packing> - <property name="x">160</property> - <property name="y">55</property> + <property name="x">144</property> + <property name="y">49</property> </packing> </child> <child> + <widget class="GtkRadioButton" id="radWingsSec"> + <property name="width_request">66</property> + <property name="height_request">22</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">sec.</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radWingsCycles</property> + </widget> + <packing> + <property name="x">144</property> + <property name="y">69</property> + </packing> + </child> + + <child> <widget class="GtkLabel" id="lblWingsPWM"> <property name="width_request">144</property> <property name="height_request">16</property> @@ -1494,34 +1637,28 @@ <property name="angle">0</property> </widget> <packing> - <property name="x">160</property> + <property name="x">230</property> <property name="y">47</property> </packing> </child> <child> - <widget class="GtkLabel" id="label24"> - <property name="width_request">73</property> - <property name="height_request">16</property> + <widget class="GtkHScale" id="slideWings"> + <property name="width_request">160</property> + <property name="height_request">32</property> <property name="visible">True</property> - <property name="label" translatable="yes">Cycles</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="can_focus">True</property> + <property name="draw_value">True</property> + <property name="value_pos">GTK_POS_RIGHT</property> + <property name="digits">0</property> + <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> + <property name="inverted">False</property> + <property name="adjustment">5 1 5 1 0 0</property> + <signal name="value_changed" handler="on_slideWings_value_changed" last_modification_time="Thu, 15 Nov 2007 08:42:15 GMT"/> </widget> <packing> - <property name="x">63</property> - <property name="y">43</property> + <property name="x">232</property> + <property name="y">56</property> </packing> </child> </widget> @@ -1537,6 +1674,7 @@ <child> <widget class="GtkFixed" id="fix5"> + <property name="width_request">360</property> <property name="height_request">83</property> <property name="visible">True</property> @@ -1552,7 +1690,7 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">1 0 127 1 10 10</property> + <property name="adjustment">1 1 127 1 10 10</property> </widget> <packing> <property name="x">70</property> @@ -1694,6 +1832,32 @@ </child> <child> + <widget class="GtkLabel" id="lblCyclesSpin"> + <property name="width_request">73</property> + <property name="height_request">16</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Cycles</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">True</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="x">63</property> + <property name="y">14</property> + </packing> + </child> + + <child> <widget class="GtkRadioButton" id="radSpinDirLeft"> <property name="width_request">136</property> <property name="height_request">24</property> @@ -1709,7 +1873,7 @@ </widget> <packing> <property name="x">60</property> - <property name="y">58</property> + <property name="y">62</property> </packing> </child> @@ -1730,31 +1894,53 @@ </widget> <packing> <property name="x">204</property> - <property name="y">58</property> + <property name="y">62</property> </packing> </child> <child> - <widget class="GtkHScale" id="slideSpin"> - <property name="width_request">160</property> - <property name="height_request">32</property> + <widget class="GtkRadioButton" id="radSpinSec"> + <property name="width_request">66</property> + <property name="height_request">22</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="draw_value">True</property> - <property name="value_pos">GTK_POS_RIGHT</property> - <property name="digits">0</property> - <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> - <property name="inverted">False</property> - <property name="adjustment">5 1 5 1 0 0</property> - <signal name="value_changed" handler="on_slideSpin_value_changed" last_modification_time="Thu, 15 Nov 2007 08:42:21 GMT"/> + <property name="label" translatable="yes">sec.</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> </widget> <packing> - <property name="x">160</property> - <property name="y">26</property> + <property name="x">144</property> + <property name="y">41</property> </packing> </child> <child> + <widget class="GtkRadioButton" id="radSpinCycles"> + <property name="width_request">66</property> + <property name="height_request">22</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">cycles</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radSpinSec</property> + <signal name="toggled" handler="on_radSpinCycles_toggled" last_modification_time="Thu, 24 Jan 2008 10:02:29 GMT"/> + </widget> + <packing> + <property name="x">144</property> + <property name="y">21</property> + </packing> + </child> + + <child> <widget class="GtkLabel" id="lblSpinPWM"> <property name="width_request">144</property> <property name="height_request">16</property> @@ -1775,34 +1961,28 @@ <property name="angle">0</property> </widget> <packing> - <property name="x">160</property> + <property name="x">230</property> <property name="y">18</property> </packing> </child> <child> - <widget class="GtkLabel" id="lblCyclesSpin"> - <property name="width_request">73</property> - <property name="height_request">16</property> + <widget class="GtkHScale" id="slideSpin"> + <property name="width_request">160</property> + <property name="height_request">32</property> <property name="visible">True</property> - <property name="label" translatable="yes">Cycles</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">True</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="can_focus">True</property> + <property name="draw_value">True</property> + <property name="value_pos">GTK_POS_RIGHT</property> + <property name="digits">0</property> + <property name="update_policy">GTK_UPDATE_CONTINUOUS</property> + <property name="inverted">False</property> + <property name="adjustment">5 1 5 1 0 0</property> + <signal name="value_changed" handler="on_slideSpin_value_changed" last_modification_time="Thu, 15 Nov 2007 08:42:21 GMT"/> </widget> <packing> - <property name="x">63</property> - <property name="y">14</property> + <property name="x">230</property> + <property name="y">26</property> </packing> </child> </widget> @@ -2012,229 +2192,271 @@ <property name="spacing">0</property> <child> - <widget class="GtkFixed" id="fixed34"> + <widget class="GtkHBox" id="hbox21"> <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> <child> - <widget class="GtkCheckButton" id="chkLEDLeft"> - <property name="width_request">20</property> - <property name="height_request">20</property> + <widget class="GtkFixed" id="fixed34"> + <property name="width_request">220</property> + <property name="height_request">79</property> <property name="visible">True</property> - <property name="label" translatable="yes"> + + <child> + <widget class="GtkCheckButton" id="chkLEDLeft"> + <property name="width_request">20</property> + <property name="height_request">20</property> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chkLEDLeft_toggled" last_modification_time="Thu, 15 Nov 2007 10:15:58 GMT"/> - </widget> - <packing> - <property name="x">100</property> - <property name="y">24</property> - </packing> - </child> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_chkLEDLeft_toggled" last_modification_time="Thu, 15 Nov 2007 10:15:58 GMT"/> + </widget> + <packing> + <property name="x">100</property> + <property name="y">24</property> + </packing> + </child> - <child> - <widget class="GtkCheckButton" id="chkLEDRight"> - <property name="width_request">20</property> - <property name="height_request">20</property> - <property name="visible">True</property> - <property name="label" translatable="yes"></property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="on_chkLEDRight_toggled" last_modification_time="Thu, 15 Nov 2007 10:15:35 GMT"/> - </widget> - <packing> - <property name="x">73</property> - <property name="y">24</property> - </packing> - </child> - - <child> - <widget class="GtkButton" id="btnEyesClose"> - <property name="width_request">34</property> - <property name="height_request">34</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="focus_on_click">False</property> - <signal name="clicked" handler="on_btnEyesClose_released" last_modification_time="Thu, 06 Dec 2007 14:29:18 GMT"/> - <child> - <widget class="GtkAlignment" id="alignment3"> + <widget class="GtkButton" id="btnEyesClose"> + <property name="width_request">34</property> + <property name="height_request">34</property> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_btnEyesClose_released" last_modification_time="Thu, 06 Dec 2007 14:29:18 GMT"/> <child> - <widget class="GtkHBox" id="hbox3"> + <widget class="GtkAlignment" id="alignment3"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> <child> - <widget class="GtkImage" id="imgEyesClose"> + <widget class="GtkHBox" id="hbox3"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="has_focus">True</property> - <property name="stock">gtk-go-down</property> - <property name="icon_size">4</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">2</property> - <child> - <widget class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="label" translatable="yes"> + <child> + <widget class="GtkImage" id="imgEyesClose"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="stock">gtk-go-down</property> + <property name="icon_size">4</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> </child> </widget> </child> </widget> + <packing> + <property name="x">16</property> + <property name="y">40</property> + </packing> </child> - </widget> - <packing> - <property name="x">16</property> - <property name="y">40</property> - </packing> - </child> - <child> - <widget class="GtkButton" id="btnEyesOpen"> - <property name="width_request">34</property> - <property name="height_request">34</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="relief">GTK_RELIEF_NONE</property> - <property name="focus_on_click">False</property> - <signal name="clicked" handler="on_btnEyesOpen_released" last_modification_time="Thu, 06 Dec 2007 14:42:38 GMT"/> - <child> - <widget class="GtkAlignment" id="alignment1"> + <widget class="GtkButton" id="btnEyesOpen"> + <property name="width_request">34</property> + <property name="height_request">34</property> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">0</property> - <property name="yscale">0</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">0</property> - <property name="right_padding">0</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">False</property> + <signal name="clicked" handler="on_btnEyesOpen_released" last_modification_time="Thu, 06 Dec 2007 14:42:38 GMT"/> <child> - <widget class="GtkHBox" id="hbox1"> + <widget class="GtkAlignment" id="alignment1"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> <child> - <widget class="GtkImage" id="imgEyesOpen"> + <widget class="GtkHBox" id="hbox1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="has_focus">True</property> - <property name="stock">gtk-go-up</property> - <property name="icon_size">4</property> - <property name="xalign">0</property> - <property name="yalign">0</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">2</property> - <child> - <widget class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes"> + <child> + <widget class="GtkImage" id="imgEyesOpen"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_focus">True</property> + <property name="stock">gtk-go-up</property> + <property name="icon_size">4</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="label" translatable="yes"> </property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> </child> </widget> </child> </widget> + <packing> + <property name="x">16</property> + <property name="y">8</property> + </packing> </child> + + <child> + <widget class="GtkCheckButton" id="chkLEDRight"> + <property name="width_request">20</property> + <property name="height_request">20</property> + <property name="visible">True</property> + <property name="label" translatable="yes"></property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <signal name="toggled" handler="on_chkLEDRight_toggled" last_modification_time="Thu, 15 Nov 2007 10:15:35 GMT"/> + </widget> + <packing> + <property name="x">73</property> + <property name="y">24</property> + </packing> + </child> + + <child> + <widget class="GtkImage" id="imgLedR"> + <property name="width_request">180</property> + <property name="height_request">79</property> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="x">40</property> + <property name="y">0</property> + </packing> + </child> </widget> <packing> - <property name="x">16</property> - <property name="y">8</property> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> <child> - <widget class="GtkImage" id="imgLed"> - <property name="width_request">367</property> - <property name="height_request">79</property> + <widget class="GtkFixed" id="fixed36"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + + <child> + <widget class="GtkImage" id="imgLedL"> + <property name="width_request">187</property> + <property name="height_request">79</property> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="x">0</property> + <property name="y">0</property> + </packing> + </child> </widget> <packing> - <property name="x">40</property> - <property name="y">0</property> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> </widget> @@ -2378,6 +2600,7 @@ <child> <widget class="GtkFixed" id="fix6"> + <property name="width_request">360</property> <property name="visible">True</property> <child> @@ -2551,6 +2774,7 @@ <child> <widget class="GtkFixed" id="fix7"> + <property name="width_request">400</property> <property name="visible">True</property> <child> @@ -2696,7 +2920,28 @@ </child> <child> - <placeholder/> + <widget class="GtkHBox" id="hbox22"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <placeholder/> + </child> + + <child> + <placeholder/> + </child> + + <child> + <placeholder/> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> </child> </widget> </child> Modified: software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp =================================================================== --- software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2008-01-25 11:57:24 UTC (rev 885) +++ software/gadgets/tux_controller/trunk/TuxController/Scripts/Python/GUI/widget/other.pyp 2008-01-25 12:35:03 UTC (rev 886) @@ -31,7 +31,7 @@ thread.start_new_thread(self.update,()) self.average = 0 - self.count = 0 + self.count = 9 rules = [ [['none', 'none', 'Eyes'], self.on_btnEyesRun_clicked, (None,)], @@ -139,9 +139,27 @@ def refresh_picture(self, widget, picture): self.get_widget(widget).set_from_pixbuf(picture) + def manage_spin_button(self, radio, spin): + if radio.get_active(): + self.get_widget(spin).set_digits(0) + self.get_widget(spin).set_range(1, 127) + self.get_widget(spin).set_increments(1, 5) + self.get_widget(spin).set_value(1) + else: + self.get_widget(spin).set_digits(2) + self.get_widget(spin).set_range(0.01, 10) + self.get_widget(spin).set_increments(0.01, 0.1) + self.get_widget(spin).set_value(0.05) + + def wait_for_events(self, time, param1, param2): + tux.sys.wait(time) + param1 = None + param2 = None + + ############################################################################### # -# LEDs part +# LEDs part # ############################################################################### def on_btnLEDRun_clicked(self, widget, *args): @@ -149,7 +167,14 @@ freq = 256 - freq value = self.get_widget('spinLED').get_value() value = value * 2 - tux.cmd.leds_blink(int(value), int(freq)) + if self.get_widget('radLEDNone').get_active(): + tux.cmd.leds_blink(int(value), int(freq)) + elif self.get_widget('radLEDFading').get_active(): + freq = float(freq) * 0.004 + tux.cmd.led_pulse(leds = BOTH, pulse_count = value, effect_type = FADE_RATE, effect_speed = freq) + else: + freq = float(freq) * 0.004 + tux.cmd.led_pulse(leds = BOTH, pulse_count = value, effect_type = GRADIENT_NBR, effect_speed = freq, effect_step = 3) def on_chkLEDRight_toggled(self, widget, *args): ''' @@ -165,56 +190,55 @@ return if widget.get_active(): tux.cmd.ledr_on() - thread.start_new_thread(self.refresh_picture, ('imgLed', self.led_on)) + #thread.start_new_thread(self.refresh_picture, ('imgLedR', self.ledr_on)) else: tux.cmd.ledr_off() - thread.start_new_thread(self.refresh_picture, ('imgLed', self.led_off)) + #thread.start_new_thread(self.refresh_picture, ('imgLedR', self.ledr_off)) ## chkLEDLeft def on_chkLEDLeft_toggled(self, widget, *args): global __led_toggled_by_event if __led_toggled_by_event: return - if widget.get_active(): tux.cmd.ledl_on() - thread.start_new_thread(self.refresh_picture, ('imgLed', self.led_on)) else: tux.cmd.ledl_off() - thread.start_new_thread(self.refresh_picture, ('imgLed', self.led_off)) def on_right_led_on(self): + print 'right on' global __led_toggled_by_event __led_toggled_by_event = True - self.get_widget('chkLEDLeft').set_active(True) - thread.start_new_thread(self.refresh_picture, ('imgLed', self.led_on)) - + self.get_widget('chkLEDRight').set_active(True) + thread.start_new_thread(self.refresh_picture, ('imgLedR', self.ledr_on)) __led_toggled_by_event = False def on_right_led_off(self): + print 'right off' global __led_toggled_by_event __led_toggled_by_event = True - self.get_widget('chkLEDLeft').set_active(False) - thread.start_new_thread(self.refresh_picture, ('imgLed', self.led_off)) - + self.get_widget('chkLEDRight').set_active(False) + thread.start_new_thread(self.refresh_picture, ('imgLedR', self.ledr_off)) __led_toggled_by_event = False def on_left_led_on(self): global __led_toggled_by_event __led_toggled_by_event = True - self.get_widget('chkLEDRight').set_active(True) - thread.start_new_thread(self.refresh_picture, ('imgLed', self.led_on)) - + self.get_widget('chkLEDLeft').set_active(True) + thread.start_new_thread(self.refresh_picture, ('imgLedL', self.ledl_on)) __led_toggled_by_event = False def on_left_led_off(self... [truncated message content] |
From: jaguarondi <c2m...@c2...> - 2008-01-25 11:57:21
|
Author: jaguarondi Date: 2008-01-25 12:57:24 +0100 (Fri, 25 Jan 2008) New Revision: 885 Added: firmware/fuxusb/branches/0.3/ Log: 0.3.x branch to apply some patches. 0.3.1 is the current released version. Copied: firmware/fuxusb/branches/0.3 (from rev 884, firmware/fuxusb/tags/0.3.1) |
From: Paul_R <c2m...@c2...> - 2008-01-25 11:51:53
|
Author: Paul_R Date: 2008-01-25 12:51:54 +0100 (Fri, 25 Jan 2008) New Revision: 884 Modified: daemon/trunk/libs/USBDaemon_command_tux.c daemon/trunk/libs/USBDaemon_status_table.c daemon/trunk/status.c daemon/trunk/status.h Log: * Added two functions to write the LEDs on/off status in the status table Modified: daemon/trunk/libs/USBDaemon_command_tux.c =================================================================== --- daemon/trunk/libs/USBDaemon_command_tux.c 2008-01-25 11:30:28 UTC (rev 883) +++ daemon/trunk/libs/USBDaemon_command_tux.c 2008-01-25 11:51:54 UTC (rev 884) @@ -621,10 +621,10 @@ result[1] = portc.bits.PB1; break; case DATA_STATUS_LED_LEFT_INTENSITY: - result[1] = portc.bits.PB2; + result[1] = tux_status.led.left.on; break; case DATA_STATUS_LED_RIGHT_INTENSITY: - result[1] = portc.bits.PB3; + result[1] = tux_status.led.right.on; break; case DATA_STATUS_HEAD_MOTOR_FOR_MOUTH: result[1] = portd.bits.PB1; Modified: daemon/trunk/libs/USBDaemon_status_table.c =================================================================== --- daemon/trunk/libs/USBDaemon_status_table.c 2008-01-25 11:30:28 UTC (rev 883) +++ daemon/trunk/libs/USBDaemon_status_table.c 2008-01-25 11:51:54 UTC (rev 884) @@ -247,8 +247,10 @@ static void update_leds(uint8_t const * led_status) { - set_led_left_intensity(*led_status++); - set_led_right_intensity(*led_status++); + set_led_left_intensity(*led_status); + set_led_left_on(*led_status++); + set_led_right_intensity(*led_status); + set_led_right_on(*led_status++); set_led_left_fading(*led_status & 0x01 ? true : false); set_led_left_pulsing(*led_status & 0x02 ? true : false); set_led_right_fading(*led_status & 0x04 ? true : false); @@ -275,9 +277,9 @@ tcp_server_send_raw(tcp_frame); } -static void leds_status_changed(uint8_t left_led, uint8_t right_led) +static void leds_status_changed(void) { - //XXX find a better way to send the LEDs status + static bool prev_right_status, prev_left_status; tcp_frame_t tcp_frame; tcp_frame_zero(&tcp_frame); @@ -286,37 +288,24 @@ tcp_frame[1] = SS_DEFAULT; tcp_frame[2] = DATA_TP_RSP; tcp_frame[3] = SUBDATA_TP_STATUS; + // Only send the news statuses if the eyes are not closed. if (!(tux_status.led.mask)) { - if ((left_led <= 0x20) && (tux_status.led.left.on)) + if (prev_left_status != tux_status.led.left.on) { - tux_status.led.left.on = false; tcp_frame[4] = DATA_STATUS_LED_LEFT_INTENSITY; tcp_frame[5] = tux_status.led.left.on; tcp_server_send_raw(tcp_frame); } - else if ((left_led > 0x20) && !(tux_status.led.left.on)) - { - tux_status.led.left.on = true; - tcp_frame[4] = DATA_STATUS_LED_LEFT_INTENSITY; - tcp_frame[5] = tux_status.led.left.on; - tcp_server_send_raw(tcp_frame); - } - if ((right_led <= 0x20) && (tux_status.led.right.on)) + if (prev_right_status != tux_status.led.right.on) { - tux_status.led.right.on = false; tcp_frame[4] = DATA_STATUS_LED_RIGHT_INTENSITY; tcp_frame[5] = tux_status.led.right.on; tcp_server_send_raw(tcp_frame); } - else if ((right_led > 0x20) && !(tux_status.led.right.on)) - { - tux_status.led.right.on = true; - tcp_frame[4] = DATA_STATUS_LED_RIGHT_INTENSITY; - tcp_frame[5] = tux_status.led.right.on; - tcp_server_send_raw(tcp_frame); - } + prev_left_status = tux_status.led.left.on; + prev_right_status = tux_status.led.right.on; } } /* TODO Add functions to get the average battery voltage and status */ @@ -760,7 +749,7 @@ case STATUS_LED_CMD: update_leds(&new_status[1]); - leds_status_changed(new_status[1], new_status[2]); + leds_status_changed(); break; case PONG_CMD: Modified: daemon/trunk/status.c =================================================================== --- daemon/trunk/status.c 2008-01-25 11:30:28 UTC (rev 883) +++ daemon/trunk/status.c 2008-01-25 11:51:54 UTC (rev 884) @@ -41,8 +41,30 @@ /* * LEDs */ +/** + * Set the on/off status of the left LED. + */ +void set_led_left_on(int intensity) +{ + if ((intensity <= 0x20) && (tux_status.led.left.on)) + tux_status.led.left.on = false; + else if ((intensity > 0x20) && !(tux_status.led.left.on)) + tux_status.led.left.on = true; +} /** + * Set the on/off status of the right LED. + */ +void set_led_right_on(int intensity) +{ + if ((intensity <= 0x20) && (tux_status.led.right.on)) + tux_status.led.right.on = false; + else if ((intensity > 0x20) && !(tux_status.led.right.on)) + tux_status.led.right.on = true; +} + + +/** * Set the intensity status of the left LED. */ void set_led_left_intensity(int intensity) Modified: daemon/trunk/status.h =================================================================== --- daemon/trunk/status.h 2008-01-25 11:30:28 UTC (rev 883) +++ daemon/trunk/status.h 2008-01-25 11:51:54 UTC (rev 884) @@ -217,6 +217,8 @@ /** * \name LEDs accessors and mutators. * @{ */ +extern void set_led_left_on(int intensity); +extern void set_led_right_on(int intensity); extern void set_led_left_intensity(int intensity); extern int get_led_left_intensity(void); extern void set_led_left_fading(bool fading); |
From: jerome <c2m...@c2...> - 2008-01-25 11:30:36
|
Author: jerome Date: 2008-01-25 12:30:28 +0100 (Fri, 25 Jan 2008) New Revision: 883 Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager.tgf software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp Log: * fixed a bug in main part switching english to another language. Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp =================================================================== --- software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp 2008-01-25 11:10:21 UTC (rev 882) +++ software/gadgets/shortcuts_manager/trunk/shortcuts_manager/Scripts/Python/main.pyp 2008-01-25 11:30:28 UTC (rev 883) @@ -1,13 +1,13 @@ # 'Voiceget' part of the gadget. This code is executed when the # gadget is launched in the gadgets manager. + +_me.get_funct('translate')() language = _me.get_var('language') _me.set_param('last_language', language) list = _me.get_param('list_of_shortcuts') tmp_list = [] -_me.get_funct('translate')() - availables_buttons_en = {'0':0, '1': 1, '2':2, '3':3, '4':4,\ '5':5, '6':6, '7':7, '8':8, '9':9,\ 'mute':K_MUTE, 'volume plus':K_VOLUMEPLUS, 'volume minus':K_VOLUMEMINUS,\ Modified: software/gadgets/shortcuts_manager/trunk/shortcuts_manager.tgf =================================================================== (Binary files differ) |
From: jerome <c2m...@c2...> - 2008-01-25 11:10:26
|
Author: jerome Date: 2008-01-25 12:10:21 +0100 (Fri, 25 Jan 2008) New Revision: 882 Modified: software/gadgets/firmware_updater/trunk/firmware_updater.tgf Log: * removed temporarly flash rf Modified: software/gadgets/firmware_updater/trunk/firmware_updater.tgf =================================================================== (Binary files differ) |