@@ -184,10 +184,10 @@ def set_focus(self, pos):
184184
185185 def focus_first (self ):
186186 """set focus to first message of thread"""
187- self .body . set_focus (self ._nested_tree .root )
187+ self .set_focus (self ._nested_tree .root )
188188
189189 def focus_last (self ):
190- self .body . set_focus (next (self ._nested_tree .positions (reverse = True )))
190+ self .set_focus (next (self ._nested_tree .positions (reverse = True )))
191191
192192 def _sanitize_position (self , pos ):
193193 return self ._nested_tree ._sanitize_position (pos ,
@@ -204,31 +204,31 @@ def focus_parent(self):
204204 newpos = self ._tree .parent_position (mid )
205205 if newpos is not None :
206206 newpos = self ._sanitize_position ((newpos ,))
207- self .body . set_focus (newpos )
207+ self .set_focus (newpos )
208208
209209 def focus_first_reply (self ):
210210 """move focus to first reply to currently focussed message"""
211211 mid = self .get_selected_mid ()
212212 newpos = self ._tree .first_child_position (mid )
213213 if newpos is not None :
214214 newpos = self ._sanitize_position ((newpos ,))
215- self .body . set_focus (newpos )
215+ self .set_focus (newpos )
216216
217217 def focus_last_reply (self ):
218218 """move focus to last reply to currently focussed message"""
219219 mid = self .get_selected_mid ()
220220 newpos = self ._tree .last_child_position (mid )
221221 if newpos is not None :
222222 newpos = self ._sanitize_position ((newpos ,))
223- self .body . set_focus (newpos )
223+ self .set_focus (newpos )
224224
225225 def focus_next_sibling (self ):
226226 """focus next sibling of currently focussed message in thread tree"""
227227 mid = self .get_selected_mid ()
228228 newpos = self ._tree .next_sibling_position (mid )
229229 if newpos is not None :
230230 newpos = self ._sanitize_position ((newpos ,))
231- self .body . set_focus (newpos )
231+ self .set_focus (newpos )
232232
233233 def focus_prev_sibling (self ):
234234 """
@@ -243,15 +243,15 @@ def focus_prev_sibling(self):
243243 else :
244244 newpos = localroot
245245 if newpos is not None :
246- self .body . set_focus (newpos )
246+ self .set_focus (newpos )
247247
248248 def focus_next (self ):
249249 """focus next message in depth first order"""
250250 mid = self .get_selected_mid ()
251251 newpos = self ._tree .next_position (mid )
252252 if newpos is not None :
253253 newpos = self ._sanitize_position ((newpos ,))
254- self .body . set_focus (newpos )
254+ self .set_focus (newpos )
255255
256256 def focus_prev (self ):
257257 """focus previous message in depth first order"""
@@ -264,7 +264,7 @@ def focus_prev(self):
264264 else :
265265 newpos = localroot
266266 if newpos is not None :
267- self .body . set_focus (newpos )
267+ self .set_focus (newpos )
268268
269269 def focus_property (self , prop , direction ):
270270 """does a walk in the given direction and focuses the
@@ -275,7 +275,7 @@ def focus_property(self, prop, direction):
275275 MT = self ._tree [newpos ]
276276 if prop (MT ):
277277 newpos = self ._sanitize_position ((newpos ,))
278- self .body . set_focus (newpos )
278+ self .set_focus (newpos )
279279 break
280280 newpos = direction (newpos )
281281
@@ -341,7 +341,7 @@ def unfold_matching(self, querystring, focus_first=True):
341341 MT .expand (MT .root )
342342 if first is None :
343343 first = (self ._tree .position_of_messagetree (MT ), MT .root )
344- self .body . set_focus (first )
344+ self .set_focus (first )
345345 else :
346346 MT .collapse (MT .root )
347347 self .body .refresh ()
0 commit comments