add operator and signal strength
git-svn-id: http://www.neo1973-germany.de/svn@128 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
parent
6b9a7d964f
commit
90fb77598d
3 changed files with 49 additions and 2 deletions
|
@ -165,6 +165,42 @@ collections {
|
||||||
image { normal: "bg.png"; };
|
image { normal: "bg.png"; };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
part {
|
||||||
|
name: "operater_text";
|
||||||
|
type: TEXT;
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
color_class: "button_inactive";
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 { relative: 0 0; }
|
||||||
|
rel2 { relative: 1/3 1/20; }
|
||||||
|
text { text, "operator"; font: "Sans"; size, 1; align, 0 0.5; fit, 0 1; }
|
||||||
|
}
|
||||||
|
} /* end operator_text */
|
||||||
|
part {
|
||||||
|
name: "time_text";
|
||||||
|
type: TEXT;
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
color_class: "button_inactive";
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 { relative: 1/3 0; }
|
||||||
|
rel2 { relative: 2/3 1/20; }
|
||||||
|
text { text, "time"; font: "sans.bold"; size, 1; align, 0.5 0.5; fit, 0 1; }
|
||||||
|
}
|
||||||
|
} /* end time_text */
|
||||||
|
part {
|
||||||
|
name: "signalq_text";
|
||||||
|
type: TEXT;
|
||||||
|
mouse_events: 0;
|
||||||
|
description {
|
||||||
|
color_class: "button_inactive";
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1 { relative: 2/3 0; }
|
||||||
|
rel2 { relative: 1 1/20; }
|
||||||
|
text { text, "signal"; font: "Sans"; size, 1; align, 1 0.5; fit, 0 1; }
|
||||||
|
}
|
||||||
|
} /* end signalq_text */
|
||||||
part {
|
part {
|
||||||
name: "numberdisplay_background";
|
name: "numberdisplay_background";
|
||||||
type: RECT;
|
type: RECT;
|
||||||
|
|
Binary file not shown.
|
@ -16,7 +16,7 @@ FULLSCREEN = True
|
||||||
APP_TITLE = "epydial"
|
APP_TITLE = "epydial"
|
||||||
WM_INFO = ("epydial", "epydial")
|
WM_INFO = ("epydial", "epydial")
|
||||||
|
|
||||||
EDJE_FILE_PATH = "data/themes/default/"
|
EDJE_FILE_PATH = "data/themes/blackwhite/"
|
||||||
|
|
||||||
MAIN_SCREEN_NAME = "pyneo/dialer/main"
|
MAIN_SCREEN_NAME = "pyneo/dialer/main"
|
||||||
INCALL_SCREEN_NAME = "pyneo/dialer/incall"
|
INCALL_SCREEN_NAME = "pyneo/dialer/incall"
|
||||||
|
@ -86,7 +86,9 @@ class MainScreen(EdjeGroup):
|
||||||
PyneoController.register_callback("gsm_registering", self.on_gsm_registering)
|
PyneoController.register_callback("gsm_registering", self.on_gsm_registering)
|
||||||
PyneoController.register_callback("gsm_registered", self.on_gsm_registered)
|
PyneoController.register_callback("gsm_registered", self.on_gsm_registered)
|
||||||
PyneoController.register_callback("gsm_dialing", self.on_gsm_dialing)
|
PyneoController.register_callback("gsm_dialing", self.on_gsm_dialing)
|
||||||
|
PyneoController.register_callback("gsm_operator_change", self.on_gsm_operator_change)
|
||||||
|
PyneoController.register_callback("gsm_signal_strength_change", self.on_gsm_signal_strength_change)
|
||||||
|
|
||||||
def on_sim_key_required(self, key_type):
|
def on_sim_key_required(self, key_type):
|
||||||
print '---', 'opening keyring'
|
print '---', 'opening keyring'
|
||||||
self.part_text_set("numberdisplay_text", "Enter " + key_type)
|
self.part_text_set("numberdisplay_text", "Enter " + key_type)
|
||||||
|
@ -105,6 +107,12 @@ class MainScreen(EdjeGroup):
|
||||||
def on_gsm_dialing(self):
|
def on_gsm_dialing(self):
|
||||||
print '---', 'dial number'
|
print '---', 'dial number'
|
||||||
self.part_text_set("numberdisplay_text", "Dialing ...")
|
self.part_text_set("numberdisplay_text", "Dialing ...")
|
||||||
|
|
||||||
|
def on_gsm_operator_change(self, operator):
|
||||||
|
self.part_text_set("operater_text", operator)
|
||||||
|
|
||||||
|
def on_gsm_signal_strength_change(self, rssi):
|
||||||
|
self.part_text_set("signalq_text", "%s dBm"%str(rssi))
|
||||||
|
|
||||||
@edje.decorators.signal_callback("dialer_send", "*")
|
@edje.decorators.signal_callback("dialer_send", "*")
|
||||||
def on_edje_signal_numberkey_triggered(self, emission, source):
|
def on_edje_signal_numberkey_triggered(self, emission, source):
|
||||||
|
@ -303,6 +311,9 @@ class PyneoController(object):
|
||||||
|
|
||||||
if status.has_key('rssi'):
|
if status.has_key('rssi'):
|
||||||
class_.notify_callbacks("gsm_signal_strength_change", status['rssi'])
|
class_.notify_callbacks("gsm_signal_strength_change", status['rssi'])
|
||||||
|
|
||||||
|
if status.has_key('oper'):
|
||||||
|
class_.notify_callbacks("gsm_operator_change", status['oper'])
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def on_gsm_keyring_status(class_, status_map):
|
def on_gsm_keyring_status(class_, status_map):
|
||||||
|
|
Loading…
Reference in a new issue