Merge lp:~asac/gwibber/dead-to-races into lp:gwibber/1.2

Proposed by Alexander Sack
Status: Merged
Merged at revision: not available
Proposed branch: lp:~asac/gwibber/dead-to-races
Merge into: lp:gwibber/1.2
Diff against target: None lines
To merge this branch: bzr merge lp:~asac/gwibber/dead-to-races
Reviewer Review Type Date Requested Status
gwibber-committers Pending
Review via email: mp+8572@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexander Sack (asac) wrote :

fix some threading issues by using idle handlers :).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gwibber/client.py'
2--- gwibber/client.py 2009-06-21 01:17:53 +0000
3+++ gwibber/client.py 2009-07-10 00:40:29 +0000
4@@ -1116,8 +1116,16 @@
5 self.indicator_items[msg.gId] = indicator
6 indicator.show()
7
8- def update_view_contents(self, view):
9+ def update_view_contents(self, view, indicate, tab):
10 view.load_messages()
11+ if indicate and hasattr(view, "add_indicator") and view.add_indicator:
12+ self.manage_indicator_items(view.message_store, tab_num=self.tabs.page_num(tab))
13+ if tab.show_notifications: self.show_notification_bubbles(view.message_store)
14+
15+ def status_bar_update_finished(self, next_update):
16+ self.statusbar.pop(0)
17+ self.statusbar.push(0, _("Last update: %s") % time.strftime("%X"))
18+ self.last_update = next_update
19
20 def update(self, tabs = None):
21 self.throbber.set_from_animation(
22@@ -1138,17 +1146,10 @@
23 and m.time <= mx.DateTime.gmt()]
24 self.flag_duplicates(view.message_store)
25 gtk.gdk.threads_enter()
26- gobject.idle_add(self.update_view_contents, view)
27-
28- if indicate and hasattr(view, "add_indicator") and view.add_indicator:
29- self.manage_indicator_items(view.message_store, tab_num=self.tabs.page_num(tab))
30-
31+ gobject.idle_add(self.update_view_contents, view, indicate, tab)
32 gtk.gdk.threads_leave()
33- if tab.show_notifications: self.show_notification_bubbles(view.message_store)
34
35- self.statusbar.pop(0)
36- self.statusbar.push(0, _("Last update: %s") % time.strftime("%X"))
37- self.last_update = next_update
38+ gobject.idle_add(self.status_bar_update_finished, next_update)
39
40 finally: gobject.idle_add(self.throbber.clear)
41

Subscribers

People subscribed via source and target branches