0005351: Focus on event window should be set to "Event type" by default. Discussion also suggests focus for EditSourceRef. This patch applies that focus algorithm to EditCitation, since this, in effect, takes the place of EditSourceRef.

svn: r18715
This commit is contained in:
Tim G L Lyons 2012-01-07 00:10:03 +00:00
parent 9cfdeaa8ab
commit 86ce952db5

View File

@ -207,6 +207,13 @@ class EditCitation(EditPrimary):
self.primtab = RefTab(self.dbstate, self.uistate, self.track,
_('General'), tblref)
def _post_init(self):
title = self.glade.get_object('title')
volume = self.glade.get_object('volume')
if not title.get_text_length():
title.grab_focus();
elif not volume.get_text_length():
volume.grab_focus();
def _connect_signals(self):
"""Connects any signals that need to be connected.