~brunobord/gwibber/dates-and-locales

« back to all changes in this revision

Viewing changes to gwibber/client.py

  • Committer: Ryan Paul
  • Author(s): James Westby
  • Date: 2009-01-13 08:12:49 UTC
  • mfrom: (178.1.1 gwibber)
  • Revision ID: segphault@arstechnica.com-20090113081249-mly9kdi9n77x0rv0
Eliminate duplicate notifications caused by clock discrepancies

Show diffs side-by-side

added added

removed removed

Lines of Context:
827
827
    def process():
828
828
      try:
829
829
 
 
830
        next_update = mx.DateTime.gmt()
830
831
        if not self.target_tabs:
831
832
          self.target_tabs = self.tabs.get_children()
832
833
 
833
834
        for tab in self.target_tabs:
834
835
          view = tab.get_child()
835
836
          view.message_store = [m for m in
836
 
            view.data_retrieval_handler() if m.time > self.last_clear]
 
837
            view.data_retrieval_handler() if m.time > self.last_clear
 
838
            and m.time <= mx.DateTime.gmt()]
837
839
          self.flag_duplicates(view.message_store)
838
840
          self.show_notification_bubbles(view.message_store)
839
841
 
846
848
 
847
849
        self.statusbar.pop(0)
848
850
        self.statusbar.push(0, _("Last update: %s") % time.strftime(_("%I:%M:%S %p")))
849
 
        self.last_update = mx.DateTime.gmt()
 
851
        self.last_update = next_update
850
852
        
851
853
      finally: gobject.idle_add(self.throbber.clear)
852
854