diff --git a/epydial/data/themes/blackwhite/dialer_incall.edc b/epydial/data/themes/blackwhite/dialer_incall.edc index 452322b..e8be484 100644 --- a/epydial/data/themes/blackwhite/dialer_incall.edc +++ b/epydial/data/themes/blackwhite/dialer_incall.edc @@ -3,10 +3,9 @@ // // TODO: make the font colors shinier :) // -// Signal1: "dialer_send" -// Parameter1.1: $"keynumber" -// Parameter1.2: "backspace" -// Parameter1.2: "dial" +// Signal1: "dialer_incall_send" +// Parameter1.1: "Accept Call" +// Parameter1.2: "Hangup Call" data { item: "author" "thomasg [thomas (a) gstaedtner (.) net]"; @@ -14,6 +13,12 @@ data { item: "name" "epydial_default"; } +images { + image: "yes.png" COMP; + image: "no.png" COMP; + image: "caller.png" COMP; +} + color_classes { color_class { name: "button_inactive"; @@ -27,6 +32,12 @@ color_classes { color2: 0 0 0 255; color3: 0 0 0 255; } + color_class { + name: "active"; + color: 255 255 255 128; + color2: 128 128 128 255; + color3: 128 128 128 255; + } } spectra { @@ -170,34 +181,87 @@ collections { parts { part { name: "background"; - type: GRADIENT; + type: RECT; description { + color_class: "active"; state: "default" 0; - gradient { - spectrum: "background"; - rel1 { relative: 0 0; offset: 0 0; }; - rel2 { relative: 0 1; offset: 0 0; }; - } - fill { - spread: 1; - angle: 1; - size { relative: 1 0; offset: 0 0; }; - } - rel1 { relative: 0 0; offset: 0 0; }; - rel2 { relative: 1 1; offset: 0 0; }; + rel1 { relative: 0 6/20; }; + rel2 { relative: 1 14/20; }; } } + part { + name: "number_incall_text"; + type: TEXT; + description { + color_class: "button_inactive"; + state: "default" 0; + rel1 { relative: 0 6/20; } + rel2 { relative: 1 8/20; } + text { text, "number"; font: "Sans"; size, 1; align, 0.5 0.5; fit, 0 1; } + } + } + part { + name: "image_incall"; + type: IMAGE; + description { + rel1 { relative: 1/2 1/2; + offset: -80 -80; + } + rel2 { relative: 1/2 1/2; + offset: 80 80; + } + image { normal: "caller.png"; } + } + } + part { + name: "incall_yes"; + type: IMAGE; + description { + rel1 { + relative: 1/8 0.7; + offset: -50 -110; + } + rel2 { + relative: 1/8 0.7; + offset: 50 -10; + } + image { normal: "yes.png"; } + } + } + program { \ + name: "button_incall_yes_signal_emit"; \ + signal: "mouse,down,*"; \ + source: "incall_yes"; \ + action: SIGNAL_EMIT "dialer_incall_send" "Accept Call"; \ + } \ + part { + name: "incall_no"; + type: IMAGE; + description { + rel1 { + relative: 7/8 0.7; + offset: -50 -110; + } + rel2 { + relative: 7/8 0.7; + offset: 50 -10; + } + image { normal: "no.png"; } + } + } + program { \ + name: "button_incall_no_signal_emit"; \ + signal: "mouse,down,*"; \ + source: "incall_no"; \ + action: SIGNAL_EMIT "dialer_incall_send" "Hangup Call"; \ + } \ - /* stripes - just for design :) */ -/* DESIGN_STRIPE(1, 1/2, 0.18, 1, 0.18); - DESIGN_STRIPE(2, 1/2, 0.22, 1, 0.22); - DESIGN_STRIPE(3, 1/2, 0.26, 1, 0.26); */ - +/* BUTTON(1, 0.1, 0.2, 0.9, 0.4, "End Call"); BUTTON(2, 0.1, 0.45, 0.9, 0.65, "Back To Dialer"); BUTTON(3, 0.1, 0.7, 0.9, 0.9, "Hold Call"); -/* DESIGN_SEPERATOR(1, 1/3, 25/70, 1/3, 35/70); */ -/* DESIGN_SEPERATOR(2, 2/3, 25/70, 2/3, 35/70); */ + DESIGN_SEPERATOR(1, 1/3, 25/70, 1/3, 35/70); + DESIGN_SEPERATOR(2, 2/3, 25/70, 2/3, 35/70); */ } } } diff --git a/epydial/data/themes/blackwhite/dialer_incall.edj b/epydial/data/themes/blackwhite/dialer_incall.edj index 6ca896c..77b1ff3 100644 Binary files a/epydial/data/themes/blackwhite/dialer_incall.edj and b/epydial/data/themes/blackwhite/dialer_incall.edj differ diff --git a/epydial/epydial.py b/epydial/epydial.py index f3b67ea..ea7188b 100755 --- a/epydial/epydial.py +++ b/epydial/epydial.py @@ -16,7 +16,7 @@ FULLSCREEN = True APP_TITLE = "epydial" WM_INFO = ("epydial", "epydial") -EDJE_FILE_PATH = "data/themes/default/" +EDJE_FILE_PATH = "data/themes/blackwhite/" MAIN_SCREEN_NAME = "pyneo/dialer/main" INCALL_SCREEN_NAME = "pyneo/dialer/incall" @@ -69,9 +69,12 @@ class InCallScreen(EdjeGroup): @edje.decorators.signal_callback("dialer_incall_send", "*") def on_edje_signal_dialer_incall_triggered(self, emission, source): - if source == "End Call": + if source == "Hangup Call": print source PyneoController.gsm_hangup() + if source == "Accept Call": + print source + class MainScreen(EdjeGroup): text = None @@ -146,7 +149,7 @@ class MainScreen(EdjeGroup): self.part_text_set("numberdisplay_text", "".join(self.text)) elif source == "dial": PyneoController.gsm_dial("".join(self.text)) - + class PyneoController(object): _dbus_timer = None @@ -311,7 +314,7 @@ class PyneoController(object): if ph_status == 0: class_.notify_callbacks("gsm_phone_call_end") if ph_status == 3: - class_.notify_callbacks("gsm_phone_ringing") + class_.notify_callbacks("gsm_phone_call_start") if ph_status == 4: class_.notify_callbacks("gsm_phone_call_start")