NewCall makes some noise
git-svn-id: http://www.neo1973-germany.de/svn@242 46df4e5c-bc4e-4628-a0fc-830ba316316d
This commit is contained in:
parent
3bd20cc995
commit
150ca000ad
2 changed files with 11 additions and 2 deletions
|
@ -24,7 +24,7 @@ DB_PATH = "/media/card/epydialdb/"
|
||||||
PIX_WEATHER_FILE_PATH = "data/themes_data/blackwhite/images/stardock_weather/"
|
PIX_WEATHER_FILE_PATH = "data/themes_data/blackwhite/images/stardock_weather/"
|
||||||
MP3_FILE_PATH = "/media/card/mp3/"
|
MP3_FILE_PATH = "/media/card/mp3/"
|
||||||
COVER_FILE_PATH = "/media/card/epydial/cover/"
|
COVER_FILE_PATH = "/media/card/epydial/cover/"
|
||||||
RINGTONE_FILE = "/usr/share/epydial/data/sounds/ringtone_simple02.mp3"
|
RINGTONE_FILE = "/usr/share/epydial/data/sounds/ring-ring.mp3"
|
||||||
|
|
||||||
DIALER_SCREEN_NAME = "pyneo/dialer/main"
|
DIALER_SCREEN_NAME = "pyneo/dialer/main"
|
||||||
INCALL_SCREEN_NAME = "pyneo/dialer/incall"
|
INCALL_SCREEN_NAME = "pyneo/dialer/incall"
|
||||||
|
@ -432,6 +432,7 @@ class PyneoController(object):
|
||||||
print '---', 'CallRing'
|
print '---', 'CallRing'
|
||||||
|
|
||||||
def CallEnd(newmap):
|
def CallEnd(newmap):
|
||||||
|
class_.mp3.StopRingtone(dbus_interface='org.pyneo.Music')
|
||||||
class_.notify_callbacks("gsm_phone_call_end")
|
class_.notify_callbacks("gsm_phone_call_end")
|
||||||
os.system('alsactl -f /usr/share/openmoko/scenarios/stereoout.state restore')
|
os.system('alsactl -f /usr/share/openmoko/scenarios/stereoout.state restore')
|
||||||
newmap = dedbusmap(newmap)
|
newmap = dedbusmap(newmap)
|
||||||
|
@ -443,7 +444,7 @@ class PyneoController(object):
|
||||||
|
|
||||||
newmap = dedbusmap(newmap)
|
newmap = dedbusmap(newmap)
|
||||||
print '---', 'CallNew'
|
print '---', 'CallNew'
|
||||||
os.system('alsactl -f /usr/share/openmoko/scenarios/gsmhandset.state restore')
|
class_.mp3.PlayRingtone(dbus_interface='org.pyneo.Music')
|
||||||
for n, v in newmap.items():
|
for n, v in newmap.items():
|
||||||
# print '\t', n, ':', v
|
# print '\t', n, ':', v
|
||||||
class_.call = object_by_url(n)
|
class_.call = object_by_url(n)
|
||||||
|
@ -546,6 +547,10 @@ class PyneoController(object):
|
||||||
def set_ringtone(class_, sound_file):
|
def set_ringtone(class_, sound_file):
|
||||||
class_.mp3.SetRingtone(sound_file, dbus_interface='org.pyneo.Music')
|
class_.mp3.SetRingtone(sound_file, dbus_interface='org.pyneo.Music')
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def set_ringtone_volume(class_, status):
|
||||||
|
class_.mp3.SetRingtoneVolume(status, dbus_interface='org.pyneo.Music')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def play_ringtone(class_):
|
def play_ringtone(class_):
|
||||||
class_.mp3.PlayRingtone(dbus_interface='org.pyneo.Music')
|
class_.mp3.PlayRingtone(dbus_interface='org.pyneo.Music')
|
||||||
|
@ -623,6 +628,8 @@ class Dialer(object):
|
||||||
|
|
||||||
PyneoController.db_check()
|
PyneoController.db_check()
|
||||||
PyneoController.set_playlist_from_dir()
|
PyneoController.set_playlist_from_dir()
|
||||||
|
PyneoController.set_ringtone(RINGTONE_FILE)
|
||||||
|
PyneoController.set_ringtone_volume(0.6)
|
||||||
PyneoController.power_up_gsm()
|
PyneoController.power_up_gsm()
|
||||||
PyneoController.get_gsm_keyring()
|
PyneoController.get_gsm_keyring()
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,9 @@ class InCallScreen(EdjeGroup):
|
||||||
@edje.decorators.signal_callback("dialer_incall_send", "*")
|
@edje.decorators.signal_callback("dialer_incall_send", "*")
|
||||||
def on_edje_signal_dialer_incall_triggered(self, emission, source):
|
def on_edje_signal_dialer_incall_triggered(self, emission, source):
|
||||||
if source == "Hangup Call":
|
if source == "Hangup Call":
|
||||||
|
PyneoController.stop_ringtone()
|
||||||
PyneoController.gsm_hangup()
|
PyneoController.gsm_hangup()
|
||||||
if source == "Accept Call":
|
if source == "Accept Call":
|
||||||
|
PyneoController.stop_ringtone()
|
||||||
PyneoController.gsm_accept()
|
PyneoController.gsm_accept()
|
||||||
print source
|
print source
|
||||||
|
|
Loading…
Reference in a new issue