diff --git a/epydial/data/themes/blackwhite/gps_status.edc b/epydial/data/themes/blackwhite/gps_status.edc index 9f078f8..f670a8d 100644 --- a/epydial/data/themes/blackwhite/gps_status.edc +++ b/epydial/data/themes/blackwhite/gps_status.edc @@ -12,10 +12,10 @@ data { item: "version" "prototype"; item: "name" "epydial_blackwhite"; } -/* + images { image: "bg.png" COMP; -}*/ +} color_classes { color_class { @@ -38,6 +38,20 @@ color_classes { } } +styles { + style { + name: "textblock_style"; + base: "font=sans.bold font_size=20 align=left valign=top color=#fff wrap=word"; + tag: "h1" "+ font_size=28"; + tag: "/h1" "- \n"; + tag: "p" "+"; + tag: "/p" "- \n"; + tag: "em" "+ style=underline underline_color=#000A underline2_color=#0005"; + tag: "/em" "-"; + tag: "br" "\n"; + } +} + #define BUTTON(button_number, rel1x, rel1y, rel2x, rel2y, button_caption) \ part { \ name: "button_"button_number; \ @@ -113,11 +127,12 @@ collections { parts { part { name: "background"; - type: RECT; + type: IMAGE; description { - color_class: "black"; + state: "default" 0; rel1 { relative: 0 0; offset: 0 0; }; rel2 { relative: 1 1; offset: 0 0; }; + image { normal: "bg.png"; }; } } part { @@ -138,15 +153,19 @@ collections { } } part { - name: "fix_caption"; - type: TEXT; + name: "gps_caption"; + type: TEXTBLOCK; mouse_events: 0; description { color_class: "button_inactive"; - state: "default" 0.0; + align: 0.5 0.5; + fixed: 1 1; rel1 { relative: 0 3/20; } - rel2 { relative: 1/3 4/20; } - text { text, "fix"; font: "Sans"; size, 1; align, 0 0.5; fit, 0 1; } + rel2 { relative: 1 10/20; } + text { + text: "gps"; + style: "textblock_style"; + } } } /* end fix_caption */ BUTTON(11, 1/3, 58/70, 2/3, 68/70, "on"); diff --git a/epydial/data/themes/blackwhite/gps_status.edj b/epydial/data/themes/blackwhite/gps_status.edj index d61820c..8df71d5 100644 Binary files a/epydial/data/themes/blackwhite/gps_status.edj and b/epydial/data/themes/blackwhite/gps_status.edj differ diff --git a/epydial/epydial.py b/epydial/epydial.py index 2fb4eeb..0b39ac2 100755 --- a/epydial/epydial.py +++ b/epydial/epydial.py @@ -67,7 +67,7 @@ class GpsStatusScreen(EdjeGroup): def register_pyneo_callbacks(self): PyneoController.register_callback("gps_power_status", self.on_gps_power_status) - PyneoController.register_callback("gps_fix_change", self.on_gps_fix_change) + PyneoController.register_callback("gps_position_change", self.on_gps_position_change) def on_gps_power_status(self, status): if status: p_status = "on" @@ -75,8 +75,8 @@ class GpsStatusScreen(EdjeGroup): print '--- gps device is ', p_status self.part_text_set("button_11_caption", p_status) - def on_gps_fix_change(self, status): - self.part_text_set("fix_caption", "fix: %s"%status) + def on_gps_position_change(self, status): + self.part_text_set("gps_caption", "fix: %s
longitude: %s
latitude: %s
altitude: %s"%(status['fix'], status['longitude'], status['latitude'], status['altitude'])) @edje.decorators.signal_callback("gps_send", "*") def on_edje_signal_dialer_status_triggered(self, emission, source): @@ -410,7 +410,7 @@ class PyneoController(object): print "GPS Status: " + str(status) if status.has_key('fix'): - class_.notify_callbacks("gps_fix_change", status['fix']) + class_.notify_callbacks("gps_position_change", status) @classmethod def on_gsm_wireless_status(class_, status_map):