* src/DataViews/_MediaView.py: tool tips

* src/DataViews/_RepositoryView.py: tool tips
	* src/DataViews/_SourceView.py: tool tips
	* src/DataViews/_EventView.py: tool tips
	* src/DataViews/_PedigreeView.py: tool tips
	* src/DataViews/_PlaceView.py: tool tips
	* src/DataViews/_PersonView.py: tool tips
	* src/ViewManager.py: tool tips
	* src/QuestionDialog.py: add info dialog
	* src/PageView.py: tool tips


svn: r6574
This commit is contained in:
Don Allingham 2006-05-08 01:15:19 +00:00
parent eeab44a8d7
commit 0aaaa45ca1
15 changed files with 128 additions and 23 deletions

View File

@ -1,4 +1,14 @@
2006-05-07 Don Allingham <don@gramps-project.org>
* src/DataViews/_MediaView.py: tool tips
* src/DataViews/_RepositoryView.py: tool tips
* src/DataViews/_SourceView.py: tool tips
* src/DataViews/_EventView.py: tool tips
* src/DataViews/_PedigreeView.py: tool tips
* src/DataViews/_PlaceView.py: tool tips
* src/DataViews/_PersonView.py: tool tips
* src/ViewManager.py: tool tips
* src/QuestionDialog.py: add info dialog
* src/PageView.py: tool tips
* src/DataViews/_PersonView.py: rebuild tree on surname change,
don't attempt to delete/insert, since this can cause things to
hang.

View File

@ -27,6 +27,18 @@
</locale>
</schema>
<schema>
<key>/schemas/apps/gramps/preferences/hide-ep-msg</key>
<applyto>/apps/gramps/preferences/hide-ep-msg</applyto>
<owner>gramps</owner>
<type>bool</type>
<default>0</default>
<locale name="C">
<short>Display informational message when editing a person</short>
<long>If set to True, an informational dialog will be displayed whenever the user edits a person.</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gramps/preferences/last-view</key>
<applyto>/apps/gramps/preferences/last-view</applyto>

View File

@ -1,5 +1,6 @@
FAMILY_DETAILS = ('preferences','family-details', 0)
FAMILY_WARN = ('preferences','family-warn', 0)
HIDE_EP_MSG = ('preferences','hide-ep-msg', 0)
LAST_VIEW = ('preferences','last-view', 1)
FAMILY_SIBLINGS = ('preferences','family-siblings', 0)
AUTOLOAD = ('behavior','autoload', 0)
@ -50,6 +51,7 @@ WEBSITE_DIRECTORY = ('paths','website-directory', 2)
default_value = {
FAMILY_DETAILS : True,
FAMILY_WARN : True,
HIDE_EP_MSG : False,
LAST_VIEW : 0,
FAMILY_SIBLINGS : True,
AUTOLOAD : False,

View File

@ -67,6 +67,11 @@ column_names = [
#
#-------------------------------------------------------------------------
class EventView(PageView.ListView):
ADD_MSG = _("Add a new event")
EDIT_MSG = _("Edit the selected event")
DEL_MSG = _("Delete the selected event")
def __init__(self,dbstate,uistate):
signal_map = {

View File

@ -61,6 +61,11 @@ column_names = [
#
#-------------------------------------------------------------------------
class FamilyListView(PageView.ListView):
ADD_MSG = _("Add a new family")
EDIT_MSG = _("Edit the selected family")
DEL_MSG = _("Delete the selected family")
def __init__(self,dbstate,uistate):
signal_map = {

View File

@ -63,6 +63,11 @@ column_names = [
#
#-------------------------------------------------------------------------
class MediaView(PageView.ListView):
ADD_MSG = _("Add a new media object")
EDIT_MSG = _("Edit the selected media object")
DEL_MSG = _("Delete the selected media object")
def __init__(self,dbstate,uistate):
signal_map = {

View File

@ -525,7 +525,7 @@ class PedigreeView(PageView.PersonNavView):
PageView.PersonNavView.define_actions(self)
self.add_action('HomePerson',gtk.STOCK_HOME,_("_Home"),
callback=self.home)
tip=_("Go to the default person"), callback=self.home)
def build_tree(self):
"""

View File

@ -117,10 +117,11 @@ class PersonView(PageView.PersonNavView):
PageView.PersonNavView.define_actions(self)
self.add_action('Add', gtk.STOCK_ADD, _("_Add"),
callback=self.add)
tip=_("Add a new person"), callback=self.add)
self.add_action('Edit', gtk.STOCK_EDIT, _("_Edit"),
callback=self.edit)
tip=_("Edit the selected person"), callback=self.edit)
self.add_action('Remove', gtk.STOCK_REMOVE, _("_Remove"),
tip=_("Remove the selected person"),
callback=self.remove)
self.add_action('OpenAllNodes', None, _("Expand all nodes"),
callback=self.open_all_nodes)
@ -129,8 +130,10 @@ class PersonView(PageView.PersonNavView):
self.add_action('Jump', None, _("_Jump"),
accel="<control>j",callback=self.jumpto)
self.add_toggle_action('Filter', None, _('_Show filter sidebar'), None, None,
self.add_toggle_action('Filter', None, _('_Show filter sidebar'),
None, None,
self.filter_toggle, Config.get(Config.FILTER))
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
_('_Column Editor'), callback=self.column_editor,)

View File

@ -70,6 +70,11 @@ column_names = [
#
#-------------------------------------------------------------------------
class PlaceView(PageView.ListView):
ADD_MSG = _("Add a new place")
EDIT_MSG = _("Edit the selected place")
DEL_MSG = _("Delete the selected place")
def __init__(self,dbstate,uistate):
signal_map = {

View File

@ -72,6 +72,11 @@ column_names = [
#
#-------------------------------------------------------------------------
class RepositoryView(PageView.ListView):
ADD_MSG = _("Add a new repository")
EDIT_MSG = _("Edit the selected repository")
DEL_MSG = _("Delete the selected repository")
def __init__(self,dbstate,uistate):
signal_map = {

View File

@ -65,6 +65,11 @@ column_names = [
#
#-------------------------------------------------------------------------
class SourceView(PageView.ListView):
ADD_MSG = _("Add a new source")
EDIT_MSG = _("Edit the selected source")
DEL_MSG = _("Delete the selected source")
def __init__(self,dbstate,uistate):
signal_map = {

View File

@ -60,9 +60,10 @@ import Utils
import Mime
import RelLib
import GrampsWidgets
import Config
from _EditPrimary import EditPrimary
from QuestionDialog import WarningDialog, ErrorDialog, QuestionDialog2
from QuestionDialog import *
from DisplayTabs import \
PersonEventEmbedList,NameEmbedList,SourceEmbedList,AttrEmbedList,\
AddrEmbedList,NoteTab,GalleryTab,WebEmbedList,PersonRefEmbedList, \
@ -134,6 +135,16 @@ class EditPerson(EditPrimary):
self.load_person_image()
self.surname_field.grab_focus()
# if not Config.get(Config.HIDE_EP_MSG):
# MessageHideDialog(
# _('Editing a person'),
# _('This window allows you to enter information about '
# 'a person. You can add events, including birth and '
# 'death information under the Events tab. Similarly, '
# 'you can add additional information, such as sources, '
# 'names, and images on other tabs.'),
# Config.HIDE_EP_MSG)
def _connect_signals(self):
"""
Connects any signals that need to be connected. Called by the

View File

@ -271,18 +271,20 @@ class PersonNavView(BookMarkView):
self.fwd_action = gtk.ActionGroup(self.title + '/Forward')
self.fwd_action.add_actions([
('Forward',gtk.STOCK_GO_FORWARD,_("_Forward"),
None, None, self.fwd_clicked)
None, _("Go to the next person in the history"),
self.fwd_clicked)
])
# add the Backward action group to handle the Forward button
self.back_action = gtk.ActionGroup(self.title + '/Backward')
self.back_action.add_actions([
('Back',gtk.STOCK_GO_BACK,_("_Back"),
None, None, self.back_clicked)
None, _("Go to the previous person in the history"),
self.back_clicked)
])
self.add_action('HomePerson', gtk.STOCK_HOME, _("_Home"),
callback=self.home)
tip=_("Go to the default person"), callback=self.home)
self.add_action('SetActive', gtk.STOCK_HOME, _("Set _Home Person"),
callback=self.set_default_person)
@ -418,6 +420,10 @@ class PersonNavView(BookMarkView):
#----------------------------------------------------------------
class ListView(BookMarkView):
ADD_MSG = ""
EDIT_MSG = ""
DEL_MSG = ""
def __init__(self, title, dbstate, uistate, columns, handle_col,
make_model, signal_map, get_bookmarks, bm_type):
@ -649,10 +655,13 @@ class ListView(BookMarkView):
BookMarkView.define_actions(self)
self.add_action('Add', gtk.STOCK_ADD, _("_Add"), callback=self.add)
self.add_action('Edit', gtk.STOCK_EDIT,_("_Edit"), callback=self.edit)
self.add_action('Add', gtk.STOCK_ADD, _("_Add"), tip=self.ADD_MSG,
callback=self.add)
self.add_action('Edit', gtk.STOCK_EDIT,_("_Edit"), tip=self.EDIT_MSG,
callback=self.edit)
self.add_action('Remove',gtk.STOCK_REMOVE,_("_Remove"),
callback=self.remove)
tip=self.DEL_MSG, callback=self.remove)
self.add_toggle_action('Filter', None, _('_Filter'),
callback=self.filter_toggle)

View File

@ -253,3 +253,30 @@ class MissingMediaDialog:
"Instead select one of the available options"),
self.top)
return True
class MessageHideDialog(gtk.MessageDialog):
def __init__(self, title, message, key, parent=None):
gtk.MessageDialog.__init__(self, parent,
flags=gtk.DIALOG_MODAL,
type=gtk.MESSAGE_INFO,
buttons=gtk.BUTTONS_CLOSE)
self.set_markup('<span weight="bold" size="larger">%s</span>' % title)
self.format_secondary_markup(message)
checkbox = gtk.CheckButton(_("Do not display again"))
checkbox.set_active(Config.get(key))
checkbox.connect('toggled',self.update_checkbox, key)
checkbox.show()
align = gtk.Alignment(0.5,0.0)
align.add(checkbox)
align.show()
self.vbox.add(align)
self.set_icon(ICON)
self.show()
self.run()
self.destroy()
def update_checkbox(self, obj, constant):
Config.set(constant, obj.get_active())

View File

@ -289,15 +289,16 @@ class ViewManager:
def _init_lists(self):
self._file_action_list = [
('FileMenu', None, _('_File')),
('New', gtk.STOCK_NEW, _('_New'), "<control>n", None,
self.new_activate),
('Open', gtk.STOCK_OPEN, _('_Open'), "<control>o", None,
self.open_activate),
('OpenRecent', None, _('Open _Recent')),
('New', gtk.STOCK_NEW, _('_New'), "<control>n",
_("Create a new database"), self.new_activate),
('Open', gtk.STOCK_OPEN, _('_Open'), "<control>o",
_("Open an existing database"), self.open_activate),
('OpenRecent', None, _('Open _Recent'), None,
_("Open an existing database")),
('Quit', gtk.STOCK_QUIT, _('_Quit'), "<control>q",None,self.quit),
('ViewMenu', None, _('_View')),
('EditMenu', None, _('_Edit')),
('Preferences', gtk.STOCK_PREFERENCES,_('_Preferences'),None,None,
('Preferences', gtk.STOCK_PREFERENCES,_('_Preferences'),None, None,
self.preferences_activate),
('HelpMenu', None, _('_Help')),
('HomePage', None, _('GRAMPS _home page'), None, None,
@ -324,14 +325,14 @@ class ViewManager:
_('_Abandon changes and quit'), None, None, self.abort),
('CmpMerge', None, _('_Compare and merge')),
('FastMerge', None, _('_Fast merge')),
('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), "", None,
self.scratchpad),
('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), "",
_("Open the ScratchPad dialog"), self.scratchpad),
('Import', gtk.STOCK_CONVERT, _('_Import'), "<control>i", None,
self.import_data),
('Reports', gtk.STOCK_DND_MULTIPLE, _('_Reports'), None, None,
self.reports_clicked),
('Tools', gtk.STOCK_EXECUTE, _('_Tools'), None, None,
self.tools_clicked),
('Reports', gtk.STOCK_DND_MULTIPLE, _('_Reports'), None,
_("Open the reports dialog"), self.reports_clicked),
('Tools', gtk.STOCK_EXECUTE, _('_Tools'), None,
_("Open the tools dialog"), self.tools_clicked),
('EditMenu', None, _('_Edit')),
('ColumnEdit', gtk.STOCK_PROPERTIES, _('_Column Editor')),
('GoMenu', None, _('_Go')),