~nherriot/bcm/gudev-branch

« back to all changes in this revision

Viewing changes to src/gui/vmc/wader/vmc/contacts/contact_kdepim.py

  • Committer: andrewbird
  • Date: 2009-12-17 13:50:17 UTC
  • Revision ID: svn-v4:302e0824-f0b9-4af8-b993-bc22a3d40462:trunk:483
Exclude contact search matches that have no number set

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
    """
81
81
    Contacts manager
82
82
    """
 
83
 
83
84
    def device_reqd(self):
84
85
        return False
85
86
 
96
97
        for contact in self.get_contacts():
97
98
            # XXX: O(N) here!
98
99
            # I can't find a way to do a LIKE comparison
99
 
            if pattern.lower() in contact.get_name().lower():
 
100
            if (pattern.lower() in contact.get_name().lower()) and contact.get_number():
100
101
                yield contact
101
102
 
102
103
    def get_contacts(self):
136
137
 
137
138
    def name(self):
138
139
        return _('KDE PIM')
139