# Number, or DTMF send
# Name/number (time-of-call)
# Keypad:
-#
+#
# 1 2 3 BS
# 4 5 6 BS
# 7 8 9 Ca
l = ""
return l.strip()
-
sel_number = None
clips = {}
def clip_get_data(clip, sel, info, data):
c.set_with_data([(gtk.gdk.SELECTION_TYPE_STRING, 0, 0)],
clip_get_data, clip_clear_data, None)
-
class Dialer(gtk.Window):
def __init__(self):
gtk.Window.__init__(self)
self.cb.set_with_data(self.targets, self.get, self.got_clip, None)
self.present()
+ def get(self, sel,deldata, info, data):
+ seldata.set_text("Number Please")
+
def incoming(self, num):
self.BS.child.set_text("En")
n = recall('incoming')
self.set_incoming(n)
- def get(self, sel, info, data):
- sel.set_text("Number Please")
-
def check_status(self, f):
l = recall('status')
if l == 'INCOMING':
self.nfont_size = s
self.num.modify_font(self.nfont)
-
def check_callee_font(self):
n = self.callee.get_text()
l = len(n)
self.cfont_size = s
self.callee.modify_font(self.cfont)
-
def makecall(self):
n = self.num.get_text()
self.num.select_region(0,-1)
def do_dtmf(self, ch):
record('dtmf',ch)
-
import dnotify
class incoming_list:
# present as a list of received calls
self.notify = notify
self.watch = dnotify.dir("/var/log")
self.fwatch = self.watch.watch(file, self.changed)
- self.changed()
+ self.changed(None)
def __len__(self):
return len(self.list)
def __getitem__(self, ind):
def flush_one(self, start, end, number):
if start:
self.lst.append((start, end, number))
- def changed(self):
+ def changed(self, f1):
self.lst = []
try:
def __init__(self, notify = None):
incoming_list.__init__(self, notify, file='outgoing')
- def changed(self):
+ def changed(self, f1):
self.lst = []
try:
f = open("/var/log/outgoing")
if self.notify:
self.notify()
-
-
o = Dialer()
gtk.main()