diff --git a/ChangeLog b/ChangeLog index 4d29be1b1..9213b53c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-06-20 Don Allingham + * src/Editors/_EditEvent.py: focus on date on open + * src/Editors/_EditEventRef.py: focus on date on open + * src/UndoHistory.py: don't attempt to unregister with the window + manager, since not registered to begin with + 2006-06-20 Martin Hawlisch * src/DisplayState.py (modify_statusbar): Only calc relationship of active person if active person is set diff --git a/src/Editors/_EditEvent.py b/src/Editors/_EditEvent.py index 398bfd1c3..bd4ec81ca 100644 --- a/src/Editors/_EditEvent.py +++ b/src/Editors/_EditEvent.py @@ -144,13 +144,15 @@ class EditEvent(EditPrimary): self.obj.get_type, custom_values=self.get_custom_events()) + date_entry = self.top.get_widget("eventDate") self.date_field = MonitoredDate( - self.top.get_widget("eventDate"), + date_entry, self.top.get_widget("date_stat"), self.obj.get_date_object(), self.uistate, self.track, self.db.readonly) + date_entry.grab_focus() def _create_tabbed_pages(self): """ diff --git a/src/Editors/_EditEventRef.py b/src/Editors/_EditEventRef.py index a58871838..82a0a3426 100644 --- a/src/Editors/_EditEventRef.py +++ b/src/Editors/_EditEventRef.py @@ -143,14 +143,17 @@ class EditEventRef(EditReference): self.source.get_type, custom_values=self.get_custom_events()) + date_entry = self.top.get_widget("eer_date") self.date_check = MonitoredDate( - self.top.get_widget("eer_date"), + date_entry, self.top.get_widget("eer_date_stat"), self.source.get_date_object(), self.uistate, self.track, self.db.readonly) + date_entry.grab_focus() + def _create_tabbed_pages(self): """ Creates the notebook tabs and inserts them into the main diff --git a/src/UndoHistory.py b/src/UndoHistory.py index 9103d7887..8ac6cc4d2 100644 --- a/src/UndoHistory.py +++ b/src/UndoHistory.py @@ -103,13 +103,13 @@ class UndoHistory(ManagedWindow.ManagedWindow): self._build_model() self._update_ui() - self.db_change_key = dbstate.connect('database-changed',self._close) + self.db_change_key = dbstate.connect('database-changed',self.close) self.selection.connect('changed',self._selection_changed) self.show() - def _close(self,obj): + def close(self,obj=None): self.dbstate.disconnect(self.db_change_key) - self.close() + self.window.destroy() def _selection_changed(self,obj): (model,node) = self.selection.get_selected() @@ -146,7 +146,7 @@ class UndoHistory(ManagedWindow.ManagedWindow): def _response(self,obj,response_id): if response_id == gtk.RESPONSE_CLOSE: - self.close() + self.close(obj) elif response_id == gtk.RESPONSE_REJECT: (model,node) = self.selection.get_selected() if not node: @@ -169,6 +169,8 @@ class UndoHistory(ManagedWindow.ManagedWindow): self._move(nsteps) elif response_id == gtk.RESPONSE_APPLY: self._clear_clicked() + elif response_id == gtk.RESPONSE_DELETE_EVENT: + self.close(obj) def build_menu_names(self,obj): return (self.title,None)