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:
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||||
# 2009 Gary Burton
|
# 2009 Gary Burton
|
||||||
|
# 2011 Michiel D. Nauta
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# 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,
|
self.primtab = RefTab(self.dbstate, self.uistate, self.track,
|
||||||
_('_General'), tblref)
|
_('_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):
|
def _init_event(self):
|
||||||
if not self.db.readonly:
|
if not self.db.readonly:
|
||||||
self.commit_event = self.db.commit_personal_event
|
self.commit_event = self.db.commit_personal_event
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
# Copyright (C) 2000-2006 Donald N. Allingham
|
||||||
# 2009 Gary Burton
|
# 2009 Gary Burton
|
||||||
|
# 2011 Michiel D. Nauta / MathieuMD
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# 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,
|
self.primtab = RefTab(self.dbstate, self.uistate, self.track,
|
||||||
_('General'), tblref)
|
_('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):
|
def _connect_signals(self):
|
||||||
self.define_ok_button(self.top.get_object('ok'),self.ok_clicked)
|
self.define_ok_button(self.top.get_object('ok'),self.ok_clicked)
|
||||||
self.define_cancel_button(self.top.get_object('cancel'))
|
self.define_cancel_button(self.top.get_object('cancel'))
|
||||||
|
Reference in New Issue
Block a user