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:
parent
a76cea3fae
commit
fb2e585278
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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'))
|
||||
|
Loading…
Reference in New Issue
Block a user