[tuxdroid-svn] r950 - in software/gadgets/skype_controller: . skype_controller skype_controller/Scr
Status: Beta
Brought to you by:
ks156
From: jerome <c2m...@c2...> - 2008-03-26 13:03:42
|
Author: jerome Date: 2008-03-26 14:03:40 +0100 (Wed, 26 Mar 2008) New Revision: 950 Modified: software/gadgets/skype_controller/skype_controller.tgf software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/conf/other.glade software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/manage_pseudo/other.glade software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/manage_pseudo/other.pyp software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/skype/other.glade software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/skype/other.pyp software/gadgets/skype_controller/skype_controller/Scripts/Python/_misc_.py software/gadgets/skype_controller/skype_controller/Scripts/Python/infos.py software/gadgets/skype_controller/skype_controller/Scripts/Python/init.pyp software/gadgets/skype_controller/skype_controller/Scripts/Python/sk_commands.py software/gadgets/skype_controller/skype_controller/Scripts/Python/skype_dbus.py software/gadgets/skype_controller/skype_controller/Scripts/Python/tux_skype.py software/gadgets/skype_controller/skype_controller/Strings/fr_ALL.xml software/gadgets/skype_controller/skype_controller/settings.xml software/gadgets/skype_controller/skype_controller/strings.xml Log: * Fixed bugs Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/conf/other.glade =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/conf/other.glade 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/conf/other.glade 2008-03-26 13:03:40 UTC (rev 950) @@ -420,58 +420,66 @@ </child> <child> - <widget class="GtkButton" id="button2"> - <property name="width_request">78</property> - <property name="height_request">29</property> + <widget class="GtkFrame" id="frame7"> + <property name="width_request">353</property> + <property name="height_request">149</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"/> + <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="alignment4"> + <widget class="GtkAlignment" id="alignment11"> <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="xscale">1</property> + <property name="yscale">1</property> <property name="top_padding">0</property> <property name="bottom_padding">0</property> - <property name="left_padding">0</property> + <property name="left_padding">12</property> <property name="right_padding">0</property> <child> - <widget class="GtkHBox" id="hbox2"> + <widget class="GtkFixed" id="fixed10"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">2</property> <child> - <widget class="GtkImage" id="image2"> + <widget class="GtkLabel" id="label17"> + <property name="width_request">168</property> + <property name="height_request">16</property> <property name="visible">True</property> - <property name="stock">gtk-apply</property> - <property name="icon_size">4</property> + <property name="label" translatable="yes">Tux Droid</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="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="x">8</property> + <property name="y">8</property> </packing> </child> <child> - <widget class="GtkLabel" id="label5"> + <widget class="GtkLabel" id="label18"> + <property name="width_request">299</property> + <property name="height_request">17</property> <property name="visible">True</property> - <property name="label" translatable="yes">Accept</property> - <property name="use_underline">True</property> + <property name="label" translatable="yes">Tux Droid remote control</property> + <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> + <property name="wrap">True</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -483,34 +491,117 @@ <property name="angle">0</property> </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="x">8</property> + <property name="y">50</property> </packing> </child> + + <child> + <widget class="GtkCheckButton" id="cb_remote_t9"> + <property name="width_request">311</property> + <property name="height_request">21</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Search contact with T9 function</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">24</property> + <property name="y">90</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="cb_tux_wings"> + <property name="width_request">303</property> + <property name="height_request">21</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Search contacts with Tux Droid wings</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">24</property> + <property name="y">25</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="cb_remote_np"> + <property name="width_request">303</property> + <property name="height_request">21</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Search contact with next/previous buttons</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">24</property> + <property name="y">68</property> + </packing> + </child> </widget> </child> </widget> </child> + + <child> + <widget class="GtkLabel" id="label16"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Search method</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">280</property> - <property name="y">372</property> + <property name="x">4</property> + <property name="y">216</property> </packing> </child> <child> - <widget class="GtkButton" id="button3"> - <property name="width_request">78</property> + <widget class="GtkButton" id="button2"> + <property name="width_request">86</property> <property name="height_request">29</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"/> + <signal name="clicked" handler="on_accept_clicked" last_modification_time="Wed, 11 Jul 2007 19:53:32 GMT"/> <child> - <widget class="GtkAlignment" id="alignment5"> + <widget class="GtkAlignment" id="alignment4"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -522,15 +613,15 @@ <property name="right_padding">0</property> <child> - <widget class="GtkHBox" id="hbox3"> + <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"> + <widget class="GtkImage" id="image2"> <property name="visible">True</property> - <property name="stock">gtk-cancel</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> @@ -545,9 +636,9 @@ </child> <child> - <widget class="GtkLabel" id="label6"> + <widget class="GtkLabel" id="label5"> <property name="visible">True</property> - <property name="label" translatable="yes">Cancel</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> @@ -574,72 +665,64 @@ </child> </widget> <packing> - <property name="x">196</property> + <property name="x">271</property> <property name="y">372</property> </packing> </child> <child> - <widget class="GtkFrame" id="frame7"> - <property name="width_request">353</property> - <property name="height_request">149</property> + <widget class="GtkButton" id="button3"> + <property name="width_request">86</property> + <property name="height_request">29</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> + <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="alignment11"> + <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">1</property> - <property name="yscale">1</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">12</property> + <property name="left_padding">0</property> <property name="right_padding">0</property> <child> - <widget class="GtkFixed" id="fixed10"> + <widget class="GtkHBox" id="hbox3"> <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> <child> - <widget class="GtkLabel" id="label17"> - <property name="width_request">168</property> - <property name="height_request">16</property> + <widget class="GtkImage" id="image3"> <property name="visible">True</property> - <property name="label" translatable="yes">Tux Droid</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="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> - <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">8</property> - <property name="y">8</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkLabel" id="label18"> - <property name="width_request">299</property> - <property name="height_request">17</property> + <widget class="GtkLabel" id="label6"> <property name="visible">True</property> - <property name="label" translatable="yes">Tux Droid remote control</property> - <property name="use_underline">False</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">True</property> + <property name="wrap">False</property> <property name="selectable">False</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -651,102 +734,19 @@ <property name="angle">0</property> </widget> <packing> - <property name="x">8</property> - <property name="y">50</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> - - <child> - <widget class="GtkCheckButton" id="cb_remote_t9"> - <property name="width_request">311</property> - <property name="height_request">21</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Search contact with T9 function</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">24</property> - <property name="y">90</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="cb_tux_wings"> - <property name="width_request">303</property> - <property name="height_request">21</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Search contacts with Tux Droid wings</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">24</property> - <property name="y">25</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="cb_remote_np"> - <property name="width_request">303</property> - <property name="height_request">21</property> - <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Search contact with next/previous buttons</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">24</property> - <property name="y">68</property> - </packing> - </child> </widget> </child> </widget> </child> - - <child> - <widget class="GtkLabel" id="label16"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Search method</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">4</property> - <property name="y">216</property> + <property name="x">182</property> + <property name="y">372</property> </packing> </child> </widget> Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/manage_pseudo/other.glade =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/manage_pseudo/other.glade 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/manage_pseudo/other.glade 2008-03-26 13:03:40 UTC (rev 950) @@ -203,6 +203,86 @@ <property name="y">416</property> </packing> </child> + + <child> + <widget class="GtkButton" id="button1"> + <property name="width_request">68</property> + <property name="height_request">29</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_test_clicked" last_modification_time="Fri, 07 Mar 2008 12:59:17 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="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-execute</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="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes">Test</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">416</property> + </packing> + </child> </widget> </child> </widget> Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/manage_pseudo/other.pyp =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/manage_pseudo/other.pyp 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/manage_pseudo/other.pyp 2008-03-26 13:03:40 UTC (rev 950) @@ -154,3 +154,21 @@ Attached event to the cancel button of the pseudo manager. """ self.get_widget('window1').destroy() + + + def on_test_clicked(self, widget, *args): + """ + Test current selected pseudo_phonetic name. + """ + name_to_test = None + selection = self.TreeV.get_selection() + result = selection.get_selected() + model, iter = result + + if iter != None: + path = model.get_path(iter) + name_to_test = model[path][2] + + if name_to_test != None: + tux.tts.stop() + tux.tts.speak_free(name_to_test) Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/skype/other.glade =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/skype/other.glade 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/skype/other.glade 2008-03-26 13:03:40 UTC (rev 950) @@ -104,8 +104,122 @@ </child> <child> + <widget class="GtkFrame" id="frame3"> + <property name="width_request">334</property> + <property name="height_request">66</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="alignment4"> + <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="fixed4"> + <property name="visible">True</property> + + <child> + <widget class="GtkLabel" id="label7"> + <property name="width_request">126</property> + <property name="height_request">17</property> + <property name="visible">True</property> + <property name="label" translatable="yes">Change state for :</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">12</property> + </packing> + </child> + + <child> + <widget class="GtkFixed" id="fixed5"> + <property name="width_request">168</property> + <property name="height_request">50</property> + <property name="visible">True</property> + </widget> + <packing> + <property name="x">144</property> + <property name="y">0</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>User status</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="GtkButton" id="bhangup"> + <property name="width_request">82</property> + <property name="height_request">32</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">End</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_babort_clicked" last_modification_time="Wed, 13 Feb 2008 09:17:57 GMT"/> + </widget> + <packing> + <property name="x">3</property> + <property name="y">408</property> + </packing> + </child> + + <child> <widget class="GtkButton" id="bcancel"> - <property name="width_request">78</property> + <property name="width_request">82</property> <property name="height_request">32</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -185,7 +299,7 @@ <child> <widget class="GtkButton" id="bout"> - <property name="width_request">78</property> + <property name="width_request">82</property> <property name="height_request">32</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -196,14 +310,14 @@ <signal name="clicked" handler="on_bout_clicked" last_modification_time="Wed, 13 Feb 2008 09:14:30 GMT"/> </widget> <packing> - <property name="x">153</property> + <property name="x">173</property> <property name="y">408</property> </packing> </child> <child> <widget class="GtkButton" id="bcall"> - <property name="width_request">72</property> + <property name="width_request">82</property> <property name="height_request">32</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -214,124 +328,10 @@ <signal name="clicked" handler="on_bcall_clicked" last_modification_time="Wed, 13 Feb 2008 09:18:04 GMT"/> </widget> <packing> - <property name="x">78</property> + <property name="x">88</property> <property name="y">408</property> </packing> </child> - - <child> - <widget class="GtkButton" id="bhangup"> - <property name="width_request">72</property> - <property name="height_request">32</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">End</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_babort_clicked" last_modification_time="Wed, 13 Feb 2008 09:17:57 GMT"/> - </widget> - <packing> - <property name="x">3</property> - <property name="y">408</property> - </packing> - </child> - - <child> - <widget class="GtkFrame" id="frame3"> - <property name="width_request">334</property> - <property name="height_request">66</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="alignment4"> - <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="fixed4"> - <property name="visible">True</property> - - <child> - <widget class="GtkLabel" id="label7"> - <property name="width_request">126</property> - <property name="height_request">17</property> - <property name="visible">True</property> - <property name="label" translatable="yes">Change state for :</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">12</property> - </packing> - </child> - - <child> - <widget class="GtkFixed" id="fixed5"> - <property name="width_request">168</property> - <property name="height_request">50</property> - <property name="visible">True</property> - </widget> - <packing> - <property name="x">144</property> - <property name="y">0</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - - <child> - <widget class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>User status</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> </widget> </child> </widget> Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/skype/other.pyp =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/skype/other.pyp 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/GUI/skype/other.pyp 2008-03-26 13:03:40 UTC (rev 950) @@ -308,7 +308,7 @@ """ user = _me.get_param('skype_object').current_remote_user liste = _me.get_param('list_users') - + for i in range(len(liste)): if user == liste[i][0]: #highlight corresponding line. @@ -324,3 +324,11 @@ break else: iter = model.iter_next(iter) + + + + + + + + Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/_misc_.py =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/_misc_.py 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/_misc_.py 2008-03-26 13:03:40 UTC (rev 950) @@ -234,8 +234,8 @@ """ Insert a new entry. """ - print self.__insert_into(values, new_entry=True) - print self.__list_phon + self.__insert_into(values, new_entry=True) + self.__list_phon def clear(self): @@ -292,34 +292,41 @@ -class t9_search(object): +class t9_tux_remote_template(object): """ - Class how manage some t9 research. + Class how manage a t9 contacts search. """ - def __inti__(self): + def __init__(self): """ - Class constructor) + Constructor. """ pass - - -class multitap_search(object): - """ - Class how manage multi tap option. - """ - def __init__(self): + + + def inject(self): """ - Class how manage multitap search. + Inject list into current database. """ pass - - -class history_search(object): - """ - Class how manage history list. - """ - def __init__(self): + + + def goto_next(self): """ - Class constructor + Go to next mactching word. """ pass + + + def goto_previous(self): + """ + Go to previous atching word. + """ + pass + + + def delete_item(self): + """ + delete an item from the current. + """ + pass + Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/infos.py =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/infos.py 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/infos.py 2008-03-26 13:03:40 UTC (rev 950) @@ -296,13 +296,16 @@ """ Return a string how contain the skype user name to call """ - if self._current_user_in_list != -1: - if self._all_users_friendly_names[self._current_user_in_list] == '': - return self._connected_users[self._current_user_in_list] + try: + if self._current_user_in_list != -1: + if self._all_users_friendly_names[self._current_user_in_list] == '': + return self._connected_users[self._current_user_in_list] + else: + return self._all_users_friendly_names[self._current_user_in_list] else: - return self._all_users_friendly_names[self._current_user_in_list] - else: - return None + return None + except: + pass def get_skype_match_user(self): """ @@ -334,7 +337,6 @@ if sk_name != None: result = self._skype_connection.send_command("GET USER %s ONLINESTATUS" % sk_name) - print name, sk_name, result return (result.encode('utf-8')).replace("USER %s ONLINESTATUS " % sk_name, '') else: return 'undefined' Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/init.pyp =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/init.pyp 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/init.pyp 2008-03-26 13:03:40 UTC (rev 950) @@ -2,6 +2,17 @@ import sys sys.path.append(_me.get_path('libs')) import Skype4Py +#importing personnals modules. +import api_constants +api_constants.lib_path = _me.get_path('libs') +import skype_dbus +import sk_commands +import infos +import tux_skype +import _misc_ +import time +import os +import commands # ---------------------------------------------------------------------------- # Definition and initialization of the shared parameters @@ -10,6 +21,8 @@ _me.set_param('clicked', 0) _me.set_param('posxy', (0, 0)) _me.set_param('dimentions', (0, 0)) +_me.set_param('api_error_quit_flag', False) +head_pof = None # ---------------------------------------------------------------------------- # Definition of the functions @@ -41,28 +54,17 @@ tux_skype.SOUND = _me.get_path('data') + "/sound.wav" tux_skype.CONNECTION_LOST = _me.string('connection_lost') + tux_skype.on_skype_connection_lost = _me.get_funct('skype_connection_lost') def quit_gadget(): """ Assign a remote control button to quit gadget. """ - if _me.get_param('skype_object') != None: - _me.get_param('skype_object').close_active_call() - _me.get_param('skype_object').destroy() - _me.set_param('skype_object', '') - + _me.get_funct('disconnect_from_skype')() _me.exit_main_loop() -#importing personnals modules. -import api_constants -api_constants.lib_path = _me.get_path('libs') -import skype_dbus -import sk_commands -import infos -import tux_skype -import _misc_ #Create specificals events. def show_gadget_in_thread(): @@ -83,7 +85,7 @@ """ tux.tts.speak_free(_me.string('no_skype')) time.sleep(2.0) - _me.exit_main_loop() + _me.get_funct('quit_gadget')() def on_no_rf(): @@ -92,8 +94,23 @@ path = _me.get_path('data') + '/no_rf.wav' cmd = "aplay %s" % path tux.sys.shell(cmd) + _me.get_funct('quit_gadget')() +def disconnect_from_skype(): + """ + Get disconnect from skype. + """ + try: + if _me.get_param('skype_object') != None: + _me.get_param('skype_object').close_active_call() + _me.get_param('skype_object').destroy() + _me.set_param('skype_object', '') + except: + pass + + + def connect_to_skype(): """ Connect to skype api. @@ -115,6 +132,35 @@ _me.set_param('skype_object', skype) +def my_timeout(): + """ + Create a timeout. + """ + time1 = time.time() + while not sk_commands.skype_connected(): + time.sleep(0.2) + if (time.time() - time1) >= 12.0: + if _me.gui('skype').showed(): + _me.gui('skype').hide_from_main() + _me.get_funct('quit_gadget')() + return + + + +def skype_connection_lost(): + """ + Quit gadget if skype connection's broken. + """ + if not _me.get_param('api_error_quit_flag'): + head_pof = tux.event.on_head_bt_pushed + time.sleep(0.2) + _me.set_param('api_error_quit_flag', True) + tux.event.on_head_bt_pushed = sk_commands.launch_skype + tux.tts.speak_free(_me.string('relaunch_skype')) + thread.start_new_thread(_me.get_funct('my_timeout'), ()) + + + # ---------------------------------------------------------------------------- # Initialization and finalization shared functions # ---------------------------------------------------------------------------- @@ -143,3 +189,6 @@ _me.insert_funct('connect_to_skype', connect_to_skype) _me.insert_funct('on_no_skype', on_no_skype) _me.insert_funct('on_no_rf', on_no_rf) +_me.insert_funct('skype_connection_lost', skype_connection_lost) +_me.insert_funct('disconnect_from_skype', disconnect_from_skype) +_me.insert_funct('my_timeout', my_timeout) Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/sk_commands.py =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/sk_commands.py 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/sk_commands.py 2008-03-26 13:03:40 UTC (rev 950) @@ -19,16 +19,16 @@ def launch_skype(): """ - Lauch skype + Launch skype """ if os.path.isfile('/usr/bin/skype'): result = commands.getoutput("skype") return len(result) > 0 else: return False + - class pointers_contexts(object): """ """ Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/skype_dbus.py =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/skype_dbus.py 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/skype_dbus.py 2008-03-26 13:03:40 UTC (rev 950) @@ -64,15 +64,21 @@ """ if type(self.connection) != Skype4Py.skype.ISkype: self.connection = Skype4Py.Skype() - try: - cmd_obj = self.connection.Command( command, Block=True ) - if self.connection_state: + if Skype4Py.apiAttachSuccess == 0: + self.connection_state = True + else: + self.connection_state = False + + if self.connection_state: + try: + cmd_obj = self.connection.Command( command, Block=True ) self.connection.SendCommand( cmd_obj ) result = str((cmd_obj.Reply).encode('utf-8')) return result - else: + except: return api_constants.BAD_COMMAND - except: + else: + print 'Not connected to skype' return api_constants.BAD_COMMAND Modified: software/gadgets/skype_controller/skype_controller/Scripts/Python/tux_skype.py =================================================================== --- software/gadgets/skype_controller/skype_controller/Scripts/Python/tux_skype.py 2008-03-25 09:51:00 UTC (rev 949) +++ software/gadgets/skype_controller/skype_controller/Scripts/Python/tux_skype.py 2008-03-26 13:03:40 UTC (rev 950) @@ -3,6 +3,8 @@ import sys sys.path.append('/opt/tuxdroid/api/python') +sys.path.append('/opt/tuxdroid/apps/tux_framework/libs') +import t9 import tuxapi_const import infos import sk_commands @@ -56,9 +58,9 @@ on_no_radio = None on_no_skype = None on_api_attach_success = None +on_skype_connection_lost = None T9_needed = False - class controler(object): """ Object how set tux in skype mode. @@ -126,6 +128,7 @@ #publics variables. self.on_contact_change_state = None + self.__on_screen = None self.current_remote_user = None self.connection_state = False @@ -143,12 +146,15 @@ elif not self.connection_state and (on_no_skype != None): on_no_skype() + if self.__remote_t9: - self.init_T9() + self.my_T9 = t9.tuxdroid_t9() + self.my_T9.clear_database() + self.init_touchs() + except: - pass + pass - def __destroy(self): """ @@ -169,7 +175,7 @@ self.__tux.event.on_remote_bt[tuxapi_const.K_LEFT] = None self.__tux.event.on_remote_bt[tuxapi_const.K_RIGHT] = None self.__tux.event.on_remote_bt[tuxapi_const.K_HANGUP] = None - self.__tux.event.on_remote_bt[tuxapi_const.K_RECEIVECALL] = None + self.__tux.event.on_remote_bt[tuxapi_const.K_OK] = None self.__tux.event.on_remote_bt[tuxapi_const.K_GREEN] = None self.__tux.event.on_remote_bt[tuxapi_const.K_BLUE] = None self.__tux.event.on_remote_bt[tuxapi_const.K_RED] = None @@ -233,7 +239,8 @@ try: self.__tux.tts.stop() self.__tux.tts.speak(CONNECTION_LOST) - self.__destroy() + if on_skype_connection_lost != None: + on_skype_connection_lost() except: pass return @@ -267,7 +274,8 @@ try: self.__tux.tts.stop() self.__tux.tts.speak_free(CONNECTION_LOST) - self.destroy() + if on_skype_connection_lost != None: + on_skype_connection_lost() except: pass return @@ -311,6 +319,11 @@ self.__my_online_list = self.__get_my_list_online_contacts() self.__local_user.refresh_contact_list() + if self.__remote_t9: + self.my_T9 = t9.tuxdroid_t9() + self.my_T9.clear_database() + self.init_touchs() + def get_my_list_partner(self, call_partner_handle): @@ -337,7 +350,8 @@ try: self.__tux.tts.stop() self.__tux.tts.speak_free(CONNECTION_LOST) - self.destroy() + if on_skype_connection_lost != None: + on_skype_connection_lost() except: pass return @@ -369,7 +383,7 @@ self.__tux.event.on_remote_bt[tuxapi_const.K_LEFT] = None self.__tux.event.on_remote_bt[tuxapi_const.K_RIGHT] = None self.__tux.event.on_remote_bt[tuxapi_const.K_HANGUP] = None - self.__tux.event.on_remote_bt[tuxapi_const.K_RECEIVECALL] = None + self.__tux.event.on_remote_bt[tuxapi_const.K_OK] = None def prepare_tux(): @@ -394,7 +408,7 @@ """ put_context() self.__tux.event.on_rwing_bt_pushed = Answer - self.__tux.event.on_remote_bt[tuxapi_const.K_RECEIVECALL] = Answer + self.__tux.event.on_remote_bt[tuxapi_const.K_OK] = Answer def restore_context(): """ @@ -416,7 +430,7 @@ self.__tux.event.on_remote_bt[tuxapi_const.K_RIGHT] = None - self.__tux.event.on_remote_bt[tuxapi_const.K_RECEIVECALL] = self.__context.pof_head + self.__tux.event.on_remote_bt[tuxapi_const.K_OK] = self.__context.pof_head self.__tux.event.on_remote_bt[tuxapi_const.K_HANGUP] = None self.__tux.cmd.flippers_down() self.__tux.cmd.mouth_close() @@ -446,11 +460,13 @@ self.__tux.tts.speak_free(CALL_GOT) elif Status == "UNPLACED": delete_context() + self.__tux.event.on_head_bt_pushed = self.close_active_call elif Status == "ROUTING": #Prepare Tux to make a call. if not self.__context.call_inprogress: try: + self.__tux.event.on_head_bt_pushed = self.close_active_call if self.__my_list == None: name = str(Call.PartnerDisplayName).encode('utf-8') else: @@ -519,12 +535,14 @@ self.__tux.event.on_lwing_bt_pushed = Finish elif Status == "UNPLACED": delete_context() + self.__tux.event.on_head_bt_pushed = self.close_active_call elif Status == "ROUTING": #Prepare Tux to make a call. if not self.__context.call_inprogress: delete_context() try: + self.__tux.event.on_head_bt_pushed = self.close_active_call if self.__my_list == None: name = str(Call.PartnerDisplayName).encode('utf-8') if name.find('+') == 0: @@ -710,14 +728,32 @@ self.__tux.tts.speak(text.encode('utf-8')) except: pass + + def __communicate(self): + """ + Communicate if necessary the current user. + """ + try: + if self.__on_screen != None: + if self.__my_list == None: + self.current_remote_user = self.__local_user.get_skype_match_user() + else: + self.current_remote_user = self.__my_online_list[self.__my_list_index][0] + + self.__on_screen() + except: + pass + + def __previous(self): """ """ + communicate = True if self.__local_user.have_connected_users: - if self.__my_list != None: + if (self.__my_list != None) and (len(self.__my_online_list) != 0): #use list of user. if self.__my_list_index > 0: self.__my_list_index -= 1 @@ -726,31 +762,23 @@ arg = self.__my_online_list[self.__my_list_index][2].replace('_', ' ') else: + try: + self.__local_user.previous_online_contact() + arg = self.__local_user.get_contact_to_call().replace('_', '') + except: + communicate = False - self.__local_user.previous_online_contact() - arg = self.__local_user.get_contact_to_call().replace('_', '') - - - if self.__on_screen != None: - self.current_remote_user = self.__local_user.get_skype_match_user() - else: - self.current_remote_user = self.__my_online_list[self.__my_list_index][0] - - self.__on_screen() - - - self.__context.flag_fast = True - t = threading.Thread(target=self.__toofast,\ - args=(arg, )) - t.start() + if communicate: + self.__communicate() + self.__send(args=arg) def __next(self): """ """ + communicate = True if self.__local_user.have_connected_users: - - if self.__my_list != None: + if (self.__my_list != None) and (len(self.__my_online_list) != 0): #use list of user. if self.__my_list_index < len(self.__my_online_list) - 1: self.__my_list_index += 1 @@ -759,34 +787,40 @@ arg = self.__my_online_list[self.__my_list_index][2].replace('_', ' ') else: + try: + self.__local_user.next_online_contact() + arg = self.__local_user.get_contact_to_call().replace('_', '') + except: + communicate = False - self.__local_user.next_online_contact() - arg = self.__local_user.get_contact_to_call().replace('_', '') + if communicate: + self.__communicate() + self.__send(args=arg) - if self.__on_screen != None: - if self.__my_list == None: - self.current_remote_user = self.__local_user.get_skype_match_user() - else: - self.current_remote_user = self.__my_online_list[self.__my_list_index][0] - - self.__on_screen() - + + + def __send(self, args=None): + """ + """ + if args != None: self.__context.flag_fast = True - t = threading.Thread(target=self.__toofast,\ - args=(arg, )) + t = threading.Thread(target=self.__toofast, args=(args, )) t.start() + def __call(self, option=False): """ """ if not sk_commands.skype_connected(): - try: - if not self.__tux.tts.sound_on: - self.__tux.tts.speak_free(CONNECTION_LOST) - self.destroy() - except: - pass + #try: + if on_skype_connection_lost != None: + on_skype_connection_lost() + + elif not self.__tux.tts.sound_on: + self.__tux.tts.speak_free(CONNECTION_LOST) + #except: + #pass return if self.__local_user.have_connected_users: @@ -811,25 +845,26 @@ - def test(self): + def __test(self): """ """ if not sk_commands.skype_connected(): try: - if not self.__tux.tts.sound_on: + if on_skype_connection_lost != None: + on_skype_connection_lost() + + elif not self.__tux.tts.sound_on: self.__tux.tts.speak_free(CONNECTION_LOST) - self.destroy() except: pass - return - - temp = time.time() - self.__tux.event.wait_head_bt_released(9999) - temp2 = time.time() - if (temp2 - temp) > 1.5: - thread.start_new_thread(self.__launch_skype, ()) - else: - self.__call() + else: + temp1 = time.time() + self.__tux.event.wait_head_bt_released(10) + if (time.time() - temp1) >= 1.5: + thread.start_new_thread(self.__launch_skype, ()) + time.sleep(1.0) + else: + self.__call() @@ -839,16 +874,18 @@ """ if not sk_commands.skype_connected(): try: - if not self.__tux.tts.sound_on: + if on_skype_connection_lost != None: + on_skype_connection_lost() + + elif not self.__tux.tts.sound_on: self.__tux.tts.speak_free(CONNECTION_LOST) - self.destroy() except: pass return #Tux buttons events. - self.__tux.event.on_head_bt_pushed = self.__call - self.__tux.event.on_remote_bt[tuxapi_const.K_RECEIVECALL] = self.__call + self.__tux.event.on_head_bt_pushed = self.__test + self.__tux.event.on_remote_bt[tuxapi_const.K_OK] = self.__tux.event.on_head_bt_pushed if self.tux_wings: self.__tux.event.on_lwing_bt_pushed = self.__previous self.__tux.event.on_rwing_bt_pushed = self.__next @@ -857,7 +894,7 @@ self.__tux.event.on_rwing_bt_pushed = None #saving pof - self.__context.pof_head = self.__call + self.__context.pof_head = self.__test self.__context.pof_lwing = self.__tux.event.on_lwing_bt_pushed self.__context.pof_rwing = self.__tux.event.on_rwing_bt_pushed @@ -895,6 +932,10 @@ """ self.__my_list = my_list self.__my_online_list = self.__get_my_list_online_contacts() + if self.__remote_t9: + self.my_T9 = t9.tuxdroid_t9() + self.my_T9.clear_database() + self.init_touchs() def refresh_personnal_list(self): @@ -908,14 +949,14 @@ """ Search for active calls and exit """ - if not sk_commands.skype_connected(): - - if not self.__tux.tts.sound_on: - self.__tux.tts.speak_free(CONNECTION_LOST) - self.destroy() - - return - self.__skype.abort_all_calls() + try: + if not sk_commands.skype_connected(): + if on_skype_connection_lost != None: + on_skype_connection_lost() + return + self.__skype.abort_all_calls() + except: + pass def make_pstn_call(self, number): @@ -923,9 +964,11 @@ """ ... [truncated message content] |