5351: Focus on eventref and sourecref editors (patches by Michiel, MathieuMD); consistent editeventref.glade file (romjerome)
svn: r18471
This commit is contained in:
parent
f58ec21ec8
commit
68e7025c4e
@ -10,15 +10,22 @@
|
|||||||
<object class="GtkVBox" id="dialog-vbox11">
|
<object class="GtkVBox" id="dialog-vbox11">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkVPaned" id="vpaned1">
|
<object class="GtkLabel" id="label1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="xalign">0</property>
|
||||||
<child>
|
<property name="xpad">6</property>
|
||||||
<object class="GtkExpander" id="expander1">
|
<property name="ypad">3</property>
|
||||||
<property name="visible">True</property>
|
<property name="label" translatable="yes"><b>Reference information</b></property>
|
||||||
<property name="can_focus">True</property>
|
<property name="use_markup">True</property>
|
||||||
<property name="expanded">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="spacing">6</property>
|
<property name="justify">center</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkNotebook" id="notebook_ref">
|
<object class="GtkNotebook" id="notebook_ref">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -80,50 +87,18 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="tab">
|
<child type="tab">
|
||||||
<object class="GtkHBox" id="hbox128">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="spacing">6</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage" id="image2688">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="stock">gtk-file</property>
|
|
||||||
<property name="icon-size">1</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="label618">
|
<object class="GtkLabel" id="label618">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes"><b>General</b></property>
|
<property name="label" translatable="yes"><b>General</b></property>
|
||||||
<property name="use_markup">True</property>
|
<property name="use_markup">True</property>
|
||||||
<property name="justify">center</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="tab_fill">False</property>
|
<property name="tab_fill">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
|
||||||
<child type="label">
|
|
||||||
<object class="GtkLabel" id="label1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes"><b>Reference information</b></property>
|
|
||||||
<property name="use_markup">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
<packing>
|
||||||
<property name="resize">True</property>
|
<property name="position">2</property>
|
||||||
<property name="shrink">True</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -486,13 +461,7 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="resize">True</property>
|
<property name="position">3</property>
|
||||||
<property name="shrink">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child internal-child="action_area">
|
<child internal-child="action_area">
|
||||||
@ -554,9 +523,9 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
<action-widget response="-11">help</action-widget>
|
<action-widget response="0">help</action-widget>
|
||||||
<action-widget response="-6">cancel</action-widget>
|
<action-widget response="0">cancel</action-widget>
|
||||||
<action-widget response="-5">ok</action-widget>
|
<action-widget response="0">ok</action-widget>
|
||||||
</action-widgets>
|
</action-widgets>
|
||||||
</object>
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
@ -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'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user