Hi, Joachim Breitner <[EMAIL PROTECTED]> writes: > Paul, one feature request: If the number is _not_ known, could to avoid > showing it twice? You probably also need to improve the .edj file so > that the sublabel is not visible (not even as an empty white bar) in > that case.
Done. BTW, Joachim, you've seen the thread about proper modem restarting? I hope you'll either package a new version of stabilization/milestone4 (or at least cherry-pick afa83bf037dcf207eac706c3dbd092f9aa67e9bf) or make a dependency to have killall automatically installed.
>From 036d61bb9393b81afb6c48b16f4c5050a76a3539 Mon Sep 17 00:00:00 2001 From: Paul Fertser <[EMAIL PROTECTED]> Date: Sun, 30 Nov 2008 01:13:21 +0300 Subject: [PATCH] Further improved current call display --- data/themes/toby/zhone_call.edc | 47 +++++++++++++++++++++++++++++++++++--- src/zhone | 11 ++++++-- 2 files changed, 51 insertions(+), 7 deletions(-) diff --git a/data/themes/toby/zhone_call.edc b/data/themes/toby/zhone_call.edc index 08c7dd9..1ff7cee 100644 --- a/data/themes/toby/zhone_call.edc +++ b/data/themes/toby/zhone_call.edc @@ -39,10 +39,36 @@ parts { to: "swallow_main"; } rel2 { + relative: 1.0 0.4; + offset: -1 -1; + to: "swallow_main"; + } + color: 255 255 255 64; + } + } + part { + name: "sublabel_background"; + type: RECT; + mouse_events: 0; + clip_to: "swallow_clip"; + description { + state: "default" 0.0; + visible: 0; + rel1 { + relative: 0.0 0.4; + offset: 0 0; + to: "swallow_main"; + } + rel2 { relative: 1.0 0.6; offset: -1 -1; to: "swallow_main"; } + } + description { + state: "shown" 0.0; + inherit: "default" 0.0; + visible: 1; color: 255 255 255 64; } } @@ -60,7 +86,7 @@ parts { to: "label_background"; } rel2 { - relative: 1.0 0.5; + relative: 1.0 1.0; offset: -1 -1; to: "label_background"; } @@ -81,14 +107,14 @@ parts { description { state: "default" 0.0; rel1 { - relative: 0.0 0.5; + relative: 0.0 0.0; offset: 0 0; - to: "label_background"; + to: "sublabel_background"; } rel2 { relative: 1.0 1.0; offset: -1 -1; - to: "label_background"; + to: "sublabel_background"; } text { font: FONT_NAME; @@ -200,6 +226,19 @@ programs { EMIT_CALL_BUTTON_PRESSED("button_left"); EMIT_CALL_BUTTON_PRESSED("button_right"); + + program { + name: "show_sublabel"; + signal: "show_sublabel"; + action: STATE_SET "shown" 0.0; + target: "sublabel_background"; + } + program { + name: "hide_sublabel"; + signal: "hide_sublabel"; + action: STATE_SET "default" 0.0; + target: "sublabel_background"; + } TRANSITION(); } diff --git a/src/zhone b/src/zhone index 0bc26e7..feeeb9c 100755 --- a/src/zhone +++ b/src/zhone @@ -216,9 +216,14 @@ class pyphone_call(edje_group): 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" ] ) - + contact_name = self.main.groups["contacts"].tryNumberToName( properties[ "peer" ] ) + self.part_text_set( "label", u"".join( contact_name )+u" " ) + if contact_name == properties[ "peer" ]: + self.signal_emit( "hide_sublabel", "" ) + self.part_text_set( "sublabel", "") + else: + self.signal_emit( "show_sublabel", "" ) + self.part_text_set( "sublabel", u"".join( properties[ "peer" ] )+u" " ) except KeyError: pass -- 1.5.2.2
-- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:[EMAIL PROTECTED]
_______________________________________________ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland