self.view_button = self.add_button(h, 'View', self.view)
self.reply = self.add_button(h, 'New', self.open)
+
+ fd = pango.FontDescription("sans 8")
+ fd.set_absolute_size(25*pango.SCALE)
h = gtk.HBox() ; h.show()
v.pack_start(h, expand=False)
- b = gtk.Button("clr") ; b.show()
+ b = gtk.Button(" clear ")
+ b.child.modify_font(fd)
+ b.show()
b.connect('clicked', self.clear_search)
h.pack_end(b, expand=False)
- l = gtk.Label('search:') ; l.show()
+ l = gtk.Label('Search:') ; l.show()
+ l.modify_font(fd)
h.pack_start(l, expand=False)
e = gtk.Entry() ; e.show()
+ e.modify_font(fd)
self.search_entry = e
h.pack_start(e)
while now and len(l) < lines:
(now, l2) = self.store.lookup(now)
for e in l2:
- if patn and patn not in e.correspondent:
+ if target == 'Sent' and e.source != 'LOCAL':
continue
- if target == 'All':
- l.append(e)
- elif target == 'Sent' and e.source == 'LOCAL':
- l.append(e)
- elif target == 'Recv' and e.source != 'LOCAL':
- l.append(e)
+ if target == 'Recv' and e.source == 'LOCAL':
+ continue
+ if patn and patn not in e.correspondent:
+ if not self.book:
+ continue
+ n = book_name(self.book, e.correspondent)
+ if not n or not n[0]:
+ continue
+ if patn.lower() not in n[0].lower():
+ continue
+ l.append(e)
return l
def rotate_list(self, w=None, ev=None, which = None, target=None):
self.listview.reset_list()
def clear_search(self, *a):
- pass
+ self.search_entry.set_text('')
def got_new(self):
self.rotate_list(self, target = 'New')