From 9ec87fc160e0c97f3f0be31b312a5a1b70108704 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 19 Nov 2003 18:00:58 +0000 Subject: [PATCH] * src/Sources.py: (SourceSelector.on_help_clicked, SourceEditor.on_help_clicked): Add functions. * src/srcsel.glade: Add Help buttons to dialogs. * src/places.glade: Add Help buttons to dialogs. * src/EditSource.py (on_help_clicked): Add function. * src/EditPlace.py (on_help_clicked): Add function; (__init__): Make the dialog modal and a transient for its parent; * src/PlaceView.py: Pass the window to the EditPlace class. svn: r2352 --- ChangeLog | 11 ++++++++++- NEWS | 2 ++ TODO | 4 ---- src/EditPlace.py | 20 ++++++++++++++------ src/EditSource.py | 11 +++++++++-- src/PlaceView.py | 3 ++- src/Sources.py | 25 ++++++++++++++++++++----- src/places.glade | 13 +++++++++++++ src/srcsel.glade | 26 ++++++++++++++++++++++++++ 9 files changed, 96 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0c81e2ed8..74da9d83e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2003-11-19 Alex Roitman +2003-11-18 Alex Roitman * src/NameEdit.py (on_help_clicked): Add function. * src/UrlEdit.py (on_help_clicked): Add function. * src/gramps.glade: Add hot keys to the family view list labels. @@ -8,6 +8,15 @@ transient for its parent; (ChooseParents.on_help_clicked): Add function. * src/FamilyView.py: Pass the window to the ChooseParents classes. + * src/Sources.py: (SourceSelector.on_help_clicked, + SourceEditor.on_help_clicked): Add functions. + * src/srcsel.glade: Add Help buttons to dialogs. + * src/places.glade: Add Help buttons to dialogs. + * src/EditSource.py (on_help_clicked): Add function. + * src/EditPlace.py (on_help_clicked): Add function; + (__init__): Make the dialog modal and a transient for its parent; + * src/PlaceView.py: Pass the window to the EditPlace class. + * NEWS, TODO: Update status. 2003-11-17 Alex Roitman * src/gramps.glade: Add Help buttons to dialogs. diff --git a/NEWS b/NEWS index 8ff4b8ab5..436f7681f 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ Version 0.98.0 * Children are enumerated in Family View. * ZODB backend is removed. Reald database backend is being worked on and will appear in post-1.0 releases. +* Tab labels in tabbed dialogs reflect the presence of data (bold). +* Help button available in most dialogs. * Bugfixes. Version 0.9.5 -- the "Fix me up" release diff --git a/TODO b/TODO index 3f653f4a1..92ed4203e 100644 --- a/TODO +++ b/TODO @@ -24,9 +24,5 @@ see http://sourceforge.net/mailarchive/forum.php?thread_id=3127454&forum_id=1993 and http://sourceforge.net/mailarchive/forum.php?thread_id=3134932&forum_id=1993 for the details. -* Presense of Notes for a person/event/whatever_else. RFE 747527 suggested - either a column in the People View or something like boldfaces "Notes" - tab title. I like the latter because it can be uniformly applied to - any notes, not only people's. Not so hard to implement. * Make Date parsing locale dependent, like relationship calculator * And a whole lot more.... diff --git a/src/EditPlace.py b/src/EditPlace.py index d6bf77b53..19fb9dd4b 100644 --- a/src/EditPlace.py +++ b/src/EditPlace.py @@ -35,6 +35,7 @@ import pickle import gobject import gtk import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -63,7 +64,7 @@ pycode_tgts = [('url', 0, 0)] #------------------------------------------------------------------------- class EditPlace: - def __init__(self,parent,place,func=None): + def __init__(self,parent,place,func=None,parent_window=None): self.place = place self.db = parent.db self.parent = parent @@ -150,7 +151,6 @@ class EditPlace: Utils.bold_label(self.notes_label) self.top_window.signal_autoconnect({ - "destroy_passed_object" : self.close, "on_switch_page" : self.on_switch_page, "on_addphoto_clicked" : self.glry.on_add_photo_clicked, "on_deletephoto_clicked" : self.glry.on_delete_photo_clicked, @@ -163,7 +163,7 @@ class EditPlace: "on_delete_loc_clicked" : self.on_delete_loc_clicked, "on_update_loc_clicked" : self.on_update_loc_clicked, "on_web_go_clicked" : self.on_web_go_clicked, - "on_apply_clicked" : self.on_place_apply_clicked + "on_help_clicked" : self.on_help_clicked, }) self.sourcetab = Sources.SourceTab(self.srcreflist,self, @@ -188,11 +188,19 @@ class EditPlace: self.redraw_url_list() self.redraw_location_list() self.display_references() - - def close(self,obj): + if parent_window: + self.top.set_transient_for(parent_window) + self.val = self.top.run() + if self.val == gtk.RESPONSE_OK: + self.on_place_apply_clicked() self.glry.close() self.top.destroy() - + + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','adv-plc') + self.val = self.top.run() + def build_columns(self,tree,list): cnum = 0 for name in list: diff --git a/src/EditSource.py b/src/EditSource.py index fedcf8249..014bc12d5 100644 --- a/src/EditSource.py +++ b/src/EditSource.py @@ -26,6 +26,7 @@ # #------------------------------------------------------------------------- import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -86,6 +87,7 @@ class EditSource: "on_addphoto_clicked" : self.gallery.on_add_photo_clicked, "on_deletephoto_clicked" : self.gallery.on_delete_photo_clicked, "on_edit_properties_clicked": self.gallery.popup_change_description, + "on_sourceEditor_help_clicked" : self.on_help_clicked, }) if self.source.getId() == "": @@ -97,11 +99,16 @@ class EditSource: self.display_references() self.top.show() - val = self.top.run() - if val == gtk.RESPONSE_OK: + self.val = self.top.run() + if self.val == gtk.RESPONSE_OK: self.on_source_apply_clicked() self.top.destroy() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','adv-src') + self.val = self.top.run() + def close(self,obj): self.gallery.close() self.top.destroy() diff --git a/src/PlaceView.py b/src/PlaceView.py index 9f4d64533..9d90bf340 100644 --- a/src/PlaceView.py +++ b/src/PlaceView.py @@ -97,6 +97,7 @@ class PlaceView: self.list.get_column(0).clicked() self.selection = self.list.get_selection() self.list.connect('button-press-event',self.button_press) + self.topWindow = self.glade.get_widget("gramps") def change_db(self,db): self.db = db @@ -157,7 +158,7 @@ class PlaceView: mlist = [] self.selection.selected_foreach(self.blist,mlist) if mlist: - EditPlace.EditPlace(self,mlist[0],self.update_display) + EditPlace.EditPlace(self,mlist[0],self.update_display,self.topWindow) return 1 elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 3: self.build_context_menu(event) diff --git a/src/Sources.py b/src/Sources.py index 8d7228d97..1b961d2d3 100644 --- a/src/Sources.py +++ b/src/Sources.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000 Donald N. Allingham +# Copyright (C) 2000-2003 Donald N. Allingham # # 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 @@ -18,6 +18,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# $Id$ + #------------------------------------------------------------------------- # # GTK/Gnome modules @@ -26,6 +28,7 @@ import gobject import gtk import gtk.glade +import gnome #------------------------------------------------------------------------- # @@ -62,6 +65,7 @@ class SourceSelector: "on_add_src_clicked" : self.add_src_clicked, "on_del_src_clicked" : self.del_src_clicked, "on_edit_src_clicked" : self.edit_src_clicked, + "on_help_srcsel_clicked" : self.on_help_clicked, }) self.slist = self.top.get_widget("slist") @@ -92,11 +96,16 @@ class SourceSelector: self.window.set_transient_for(self.parent.window) self.window.show() - val = self.window.run() - if val == gtk.RESPONSE_OK: + self.val = self.window.run() + if self.val == gtk.RESPONSE_OK: self.src_ok_clicked() self.window.destroy() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','adv-si') + self.val = self.window.run() + def selection_changed(self,obj): (store,iter) = self.selection.get_selected() if iter: @@ -245,6 +254,7 @@ class SourceEditor: self.showSource.signal_autoconnect({ "on_source_changed" : self.on_source_changed, "on_add_src_clicked" : self.add_src_clicked, + "on_help_srcDisplay_clicked" : self.on_help_clicked, }) self.source_field = self.get_widget("sourceList") self.title_menu = self.get_widget("source_title") @@ -271,11 +281,16 @@ class SourceEditor: self.sourceDisplay.show() if self.parent: self.sourceDisplay.set_transient_for(self.parent.window) - val = self.sourceDisplay.run() - if val == gtk.RESPONSE_OK: + self.val = self.sourceDisplay.run() + if self.val == gtk.RESPONSE_OK: self.on_sourceok_clicked() self.sourceDisplay.destroy() + def on_help_clicked(self,obj): + """Display the relevant portion of GRAMPS manual""" + gnome.help_display('gramps-manual','adv-si') + self.val = self.sourceDisplay.run() + def set_button(self): if self.active_source: self.ok.set_sensitive(1) diff --git a/src/places.glade b/src/places.glade index 336a59590..b72c2973a 100644 --- a/src/places.glade +++ b/src/places.glade @@ -55,6 +55,19 @@ + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 diff --git a/src/srcsel.glade b/src/srcsel.glade index 7ce89a3cf..b568fa0b4 100644 --- a/src/srcsel.glade +++ b/src/srcsel.glade @@ -51,6 +51,19 @@ -5 + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0 @@ -757,6 +770,19 @@ -5 + + + + True + True + True + gtk-help + True + GTK_RELIEF_NORMAL + -11 + + + 0