5351: Focus on eventref and sourecref editors (patches by Michiel, MathieuMD); consistent editeventref.glade file and accessibilty improvement #5301 (romjerome)

svn: r18472
This commit is contained in:
Jérôme Rapinat 2011-11-21 10:45:19 +00:00
parent a76cea3fae
commit fb2e585278
3 changed files with 482 additions and 498 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@
#
# Copyright (C) 2000-2006 Donald N. Allingham
# 2009 Gary Burton
# 2011 Michiel D. Nauta
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -82,6 +83,11 @@ class EditEventRef(EditReference):
self.primtab = RefTab(self.dbstate, self.uistate, self.track,
_('_General'), tblref)
def _post_init(self):
date = self.top.get_object('eer_date_entry')
if not date.get_text_length():
date.grab_focus();
def _init_event(self):
if not self.db.readonly:
self.commit_event = self.db.commit_personal_event

View File

@ -3,6 +3,7 @@
#
# Copyright (C) 2000-2006 Donald N. Allingham
# 2009 Gary Burton
# 2011 Michiel D. Nauta / MathieuMD
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -80,6 +81,14 @@ class EditSourceRef(EditReference):
self.primtab = RefTab(self.dbstate, self.uistate, self.track,
_('General'), tblref)
def _post_init(self):
title = self.top.get_object('title')
volume = self.top.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):
self.define_ok_button(self.top.get_object('ok'),self.ok_clicked)
self.define_cancel_button(self.top.get_object('cancel'))