Changeset 9324 for trunk/src/gajim.py

Show
Ignore:
Timestamp:
02/13/08 08:14:06 (9 months ago)
Author:
asterix
Message:

[Goedson] use timeout_add_seconds instead of timeout_add, more efficient. fixes #3734

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/gajim.py

    r9319 r9324  
    534534                        # this prevents from getting the roster items as 'just signed in' 
    535535                        # contacts. 30 seconds should be enough time 
    536                         gobject.timeout_add(30000, self.unblock_signed_in_notifications, account) 
     536                        gobject.timeout_add_seconds(30, self.unblock_signed_in_notifications, account) 
    537537                        # sensitivity for this menuitem 
    538538                        model[self.roster.status_message_menuitem_iter][3] = True 
     
    649649                                        if contact1.jid in gajim.to_be_removed[account]: 
    650650                                                gajim.to_be_removed[account].remove(contact1.jid) 
    651                                         gobject.timeout_add(5000, self.roster.remove_newly_added, 
     651                                        gobject.timeout_add_seconds(5, self.roster.remove_newly_added, 
    652652                                                contact1.jid, account) 
    653653                                elif old_show > 1 and new_show == 0 and gajim.connections[account].\ 
     
    658658                                                gajim.newly_added[account].remove(contact1.jid) 
    659659                                        self.roster.draw_contact(contact1.jid, account) 
    660                                         gobject.timeout_add(5000, self.roster.really_remove_contact, 
     660                                        gobject.timeout_add_seconds(5, self.roster.really_remove_contact, 
    661661                                                contact1, account) 
    662662                        contact1.show = array[1] 
     
    685685                                account_ji = account + '/' + ji 
    686686                                gajim.block_signed_in_notifications[account_ji] = True 
    687                                 gobject.timeout_add(30000, self.unblock_signed_in_notifications, 
     687                                gobject.timeout_add_seconds(30, self.unblock_signed_in_notifications, 
    688688                                        account_ji) 
    689689                        locations = (self.instances, self.instances[account]) 
     
    29492949                        gobject.timeout_add(200, self.process_connections) 
    29502950                else: 
    2951                         gobject.timeout_add(2000, self.process_connections) 
    2952                 gobject.timeout_add(10000, self.read_sleepy) 
     2951                        gobject.timeout_add_seconds(2, self.process_connections) 
     2952                gobject.timeout_add_seconds(10, self.read_sleepy) 
    29532953 
    29542954if __name__ == '__main__':