[pkg-fso-commits] [SCM] freesmartphone.org demo GUI branch, master, updated. milestone4-28-g19ac3e4

Jan Luebbe jluebbe at debian.org
Mon Feb 2 18:44:25 UTC 2009


The following commit has been merged in the master branch:
commit 55dddb8a9a581f485b5dd6b7cb231798694d6d49
Author: Jan Luebbe <jluebbe at debian.org>
Date:   Tue Jan 27 15:43:13 2009 +0100

    correctly handle a missing "peer" field in the CallStatus message

diff --git a/src/zhone b/src/zhone
index 0bbd3d4..0f9b873 100755
--- a/src/zhone
+++ b/src/zhone
@@ -239,12 +239,13 @@ class pyphone_call(edje_group):
     def onCallStatus( self, id, status, properties ):
         self.call = id
         self.update_status(status)
-        try:
-            self.part_text_set( "label", self.main.groups["contacts"].tryNumberToName( properties[ "peer" ] ) )
-            self.part_text_set( "sublabel", properties[ "peer" ] )
-
-        except KeyError:
-            pass
+        if not status in ["release"]:
+            if "peer" in properties:
+                self.part_text_set( "label", self.main.groups["contacts"].tryNumberToName( properties[ "peer" ] ) )
+                self.part_text_set( "sublabel", properties[ "peer" ] )
+            else:
+                self.part_text_set( "label", _("unknown number") )
+                self.part_text_set( "sublabel", "" )
 
     @edje.decorators.signal_callback("call_button_pressed", "button_left")
     def on_edje_signal_call_button_left_pressed(self, emission, source):

-- 
freesmartphone.org demo GUI



More information about the pkg-fso-commits mailing list