* 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:
parent
426f451a0c
commit
b2af7f20dd
@ -1,4 +1,14 @@
|
|||||||
2006-05-07 Don Allingham <don@gramps-project.org>
|
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,
|
* src/DataViews/_PersonView.py: rebuild tree on surname change,
|
||||||
don't attempt to delete/insert, since this can cause things to
|
don't attempt to delete/insert, since this can cause things to
|
||||||
hang.
|
hang.
|
||||||
|
@ -27,6 +27,18 @@
|
|||||||
</locale>
|
</locale>
|
||||||
</schema>
|
</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>
|
<schema>
|
||||||
<key>/schemas/apps/gramps/preferences/last-view</key>
|
<key>/schemas/apps/gramps/preferences/last-view</key>
|
||||||
<applyto>/apps/gramps/preferences/last-view</applyto>
|
<applyto>/apps/gramps/preferences/last-view</applyto>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
FAMILY_DETAILS = ('preferences','family-details', 0)
|
FAMILY_DETAILS = ('preferences','family-details', 0)
|
||||||
FAMILY_WARN = ('preferences','family-warn', 0)
|
FAMILY_WARN = ('preferences','family-warn', 0)
|
||||||
|
HIDE_EP_MSG = ('preferences','hide-ep-msg', 0)
|
||||||
LAST_VIEW = ('preferences','last-view', 1)
|
LAST_VIEW = ('preferences','last-view', 1)
|
||||||
FAMILY_SIBLINGS = ('preferences','family-siblings', 0)
|
FAMILY_SIBLINGS = ('preferences','family-siblings', 0)
|
||||||
AUTOLOAD = ('behavior','autoload', 0)
|
AUTOLOAD = ('behavior','autoload', 0)
|
||||||
@ -50,6 +51,7 @@ WEBSITE_DIRECTORY = ('paths','website-directory', 2)
|
|||||||
default_value = {
|
default_value = {
|
||||||
FAMILY_DETAILS : True,
|
FAMILY_DETAILS : True,
|
||||||
FAMILY_WARN : True,
|
FAMILY_WARN : True,
|
||||||
|
HIDE_EP_MSG : False,
|
||||||
LAST_VIEW : 0,
|
LAST_VIEW : 0,
|
||||||
FAMILY_SIBLINGS : True,
|
FAMILY_SIBLINGS : True,
|
||||||
AUTOLOAD : False,
|
AUTOLOAD : False,
|
||||||
|
@ -67,6 +67,11 @@ column_names = [
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class EventView(PageView.ListView):
|
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):
|
def __init__(self,dbstate,uistate):
|
||||||
|
|
||||||
signal_map = {
|
signal_map = {
|
||||||
|
@ -61,6 +61,11 @@ column_names = [
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class FamilyListView(PageView.ListView):
|
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):
|
def __init__(self,dbstate,uistate):
|
||||||
|
|
||||||
signal_map = {
|
signal_map = {
|
||||||
|
@ -63,6 +63,11 @@ column_names = [
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class MediaView(PageView.ListView):
|
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):
|
def __init__(self,dbstate,uistate):
|
||||||
|
|
||||||
signal_map = {
|
signal_map = {
|
||||||
|
@ -525,7 +525,7 @@ class PedigreeView(PageView.PersonNavView):
|
|||||||
|
|
||||||
PageView.PersonNavView.define_actions(self)
|
PageView.PersonNavView.define_actions(self)
|
||||||
self.add_action('HomePerson',gtk.STOCK_HOME,_("_Home"),
|
self.add_action('HomePerson',gtk.STOCK_HOME,_("_Home"),
|
||||||
callback=self.home)
|
tip=_("Go to the default person"), callback=self.home)
|
||||||
|
|
||||||
def build_tree(self):
|
def build_tree(self):
|
||||||
"""
|
"""
|
||||||
|
@ -117,10 +117,11 @@ class PersonView(PageView.PersonNavView):
|
|||||||
PageView.PersonNavView.define_actions(self)
|
PageView.PersonNavView.define_actions(self)
|
||||||
|
|
||||||
self.add_action('Add', gtk.STOCK_ADD, _("_Add"),
|
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"),
|
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"),
|
self.add_action('Remove', gtk.STOCK_REMOVE, _("_Remove"),
|
||||||
|
tip=_("Remove the selected person"),
|
||||||
callback=self.remove)
|
callback=self.remove)
|
||||||
self.add_action('OpenAllNodes', None, _("Expand all nodes"),
|
self.add_action('OpenAllNodes', None, _("Expand all nodes"),
|
||||||
callback=self.open_all_nodes)
|
callback=self.open_all_nodes)
|
||||||
@ -129,8 +130,10 @@ class PersonView(PageView.PersonNavView):
|
|||||||
self.add_action('Jump', None, _("_Jump"),
|
self.add_action('Jump', None, _("_Jump"),
|
||||||
accel="<control>j",callback=self.jumpto)
|
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.filter_toggle, Config.get(Config.FILTER))
|
||||||
|
|
||||||
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
self.add_action('ColumnEdit', gtk.STOCK_PROPERTIES,
|
||||||
_('_Column Editor'), callback=self.column_editor,)
|
_('_Column Editor'), callback=self.column_editor,)
|
||||||
|
|
||||||
|
@ -70,6 +70,11 @@ column_names = [
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class PlaceView(PageView.ListView):
|
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):
|
def __init__(self,dbstate,uistate):
|
||||||
|
|
||||||
signal_map = {
|
signal_map = {
|
||||||
|
@ -72,6 +72,11 @@ column_names = [
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class RepositoryView(PageView.ListView):
|
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):
|
def __init__(self,dbstate,uistate):
|
||||||
|
|
||||||
signal_map = {
|
signal_map = {
|
||||||
|
@ -65,6 +65,11 @@ column_names = [
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
class SourceView(PageView.ListView):
|
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):
|
def __init__(self,dbstate,uistate):
|
||||||
|
|
||||||
signal_map = {
|
signal_map = {
|
||||||
|
@ -60,9 +60,10 @@ import Utils
|
|||||||
import Mime
|
import Mime
|
||||||
import RelLib
|
import RelLib
|
||||||
import GrampsWidgets
|
import GrampsWidgets
|
||||||
|
import Config
|
||||||
|
|
||||||
from _EditPrimary import EditPrimary
|
from _EditPrimary import EditPrimary
|
||||||
from QuestionDialog import WarningDialog, ErrorDialog, QuestionDialog2
|
from QuestionDialog import *
|
||||||
from DisplayTabs import \
|
from DisplayTabs import \
|
||||||
PersonEventEmbedList,NameEmbedList,SourceEmbedList,AttrEmbedList,\
|
PersonEventEmbedList,NameEmbedList,SourceEmbedList,AttrEmbedList,\
|
||||||
AddrEmbedList,NoteTab,GalleryTab,WebEmbedList,PersonRefEmbedList, \
|
AddrEmbedList,NoteTab,GalleryTab,WebEmbedList,PersonRefEmbedList, \
|
||||||
@ -134,6 +135,16 @@ class EditPerson(EditPrimary):
|
|||||||
self.load_person_image()
|
self.load_person_image()
|
||||||
self.surname_field.grab_focus()
|
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):
|
def _connect_signals(self):
|
||||||
"""
|
"""
|
||||||
Connects any signals that need to be connected. Called by the
|
Connects any signals that need to be connected. Called by the
|
||||||
|
@ -271,18 +271,20 @@ class PersonNavView(BookMarkView):
|
|||||||
self.fwd_action = gtk.ActionGroup(self.title + '/Forward')
|
self.fwd_action = gtk.ActionGroup(self.title + '/Forward')
|
||||||
self.fwd_action.add_actions([
|
self.fwd_action.add_actions([
|
||||||
('Forward',gtk.STOCK_GO_FORWARD,_("_Forward"),
|
('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
|
# add the Backward action group to handle the Forward button
|
||||||
self.back_action = gtk.ActionGroup(self.title + '/Backward')
|
self.back_action = gtk.ActionGroup(self.title + '/Backward')
|
||||||
self.back_action.add_actions([
|
self.back_action.add_actions([
|
||||||
('Back',gtk.STOCK_GO_BACK,_("_Back"),
|
('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"),
|
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"),
|
self.add_action('SetActive', gtk.STOCK_HOME, _("Set _Home Person"),
|
||||||
callback=self.set_default_person)
|
callback=self.set_default_person)
|
||||||
|
|
||||||
@ -418,6 +420,10 @@ class PersonNavView(BookMarkView):
|
|||||||
#----------------------------------------------------------------
|
#----------------------------------------------------------------
|
||||||
class ListView(BookMarkView):
|
class ListView(BookMarkView):
|
||||||
|
|
||||||
|
ADD_MSG = ""
|
||||||
|
EDIT_MSG = ""
|
||||||
|
DEL_MSG = ""
|
||||||
|
|
||||||
def __init__(self, title, dbstate, uistate, columns, handle_col,
|
def __init__(self, title, dbstate, uistate, columns, handle_col,
|
||||||
make_model, signal_map, get_bookmarks, bm_type):
|
make_model, signal_map, get_bookmarks, bm_type):
|
||||||
|
|
||||||
@ -649,10 +655,13 @@ class ListView(BookMarkView):
|
|||||||
|
|
||||||
BookMarkView.define_actions(self)
|
BookMarkView.define_actions(self)
|
||||||
|
|
||||||
self.add_action('Add', gtk.STOCK_ADD, _("_Add"), callback=self.add)
|
self.add_action('Add', gtk.STOCK_ADD, _("_Add"), tip=self.ADD_MSG,
|
||||||
self.add_action('Edit', gtk.STOCK_EDIT,_("_Edit"), callback=self.edit)
|
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"),
|
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'),
|
self.add_toggle_action('Filter', None, _('_Filter'),
|
||||||
callback=self.filter_toggle)
|
callback=self.filter_toggle)
|
||||||
|
|
||||||
|
@ -253,3 +253,30 @@ class MissingMediaDialog:
|
|||||||
"Instead select one of the available options"),
|
"Instead select one of the available options"),
|
||||||
self.top)
|
self.top)
|
||||||
return True
|
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())
|
||||||
|
@ -289,15 +289,16 @@ class ViewManager:
|
|||||||
def _init_lists(self):
|
def _init_lists(self):
|
||||||
self._file_action_list = [
|
self._file_action_list = [
|
||||||
('FileMenu', None, _('_File')),
|
('FileMenu', None, _('_File')),
|
||||||
('New', gtk.STOCK_NEW, _('_New'), "<control>n", None,
|
('New', gtk.STOCK_NEW, _('_New'), "<control>n",
|
||||||
self.new_activate),
|
_("Create a new database"), self.new_activate),
|
||||||
('Open', gtk.STOCK_OPEN, _('_Open'), "<control>o", None,
|
('Open', gtk.STOCK_OPEN, _('_Open'), "<control>o",
|
||||||
self.open_activate),
|
_("Open an existing database"), self.open_activate),
|
||||||
('OpenRecent', None, _('Open _Recent')),
|
('OpenRecent', None, _('Open _Recent'), None,
|
||||||
|
_("Open an existing database")),
|
||||||
('Quit', gtk.STOCK_QUIT, _('_Quit'), "<control>q",None,self.quit),
|
('Quit', gtk.STOCK_QUIT, _('_Quit'), "<control>q",None,self.quit),
|
||||||
('ViewMenu', None, _('_View')),
|
('ViewMenu', None, _('_View')),
|
||||||
('EditMenu', None, _('_Edit')),
|
('EditMenu', None, _('_Edit')),
|
||||||
('Preferences', gtk.STOCK_PREFERENCES,_('_Preferences'),None,None,
|
('Preferences', gtk.STOCK_PREFERENCES,_('_Preferences'),None, None,
|
||||||
self.preferences_activate),
|
self.preferences_activate),
|
||||||
('HelpMenu', None, _('_Help')),
|
('HelpMenu', None, _('_Help')),
|
||||||
('HomePage', None, _('GRAMPS _home page'), None, None,
|
('HomePage', None, _('GRAMPS _home page'), None, None,
|
||||||
@ -324,14 +325,14 @@ class ViewManager:
|
|||||||
_('_Abandon changes and quit'), None, None, self.abort),
|
_('_Abandon changes and quit'), None, None, self.abort),
|
||||||
('CmpMerge', None, _('_Compare and merge')),
|
('CmpMerge', None, _('_Compare and merge')),
|
||||||
('FastMerge', None, _('_Fast merge')),
|
('FastMerge', None, _('_Fast merge')),
|
||||||
('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), "", None,
|
('ScratchPad', gtk.STOCK_PASTE, _('_ScratchPad'), "",
|
||||||
self.scratchpad),
|
_("Open the ScratchPad dialog"), self.scratchpad),
|
||||||
('Import', gtk.STOCK_CONVERT, _('_Import'), "<control>i", None,
|
('Import', gtk.STOCK_CONVERT, _('_Import'), "<control>i", None,
|
||||||
self.import_data),
|
self.import_data),
|
||||||
('Reports', gtk.STOCK_DND_MULTIPLE, _('_Reports'), None, None,
|
('Reports', gtk.STOCK_DND_MULTIPLE, _('_Reports'), None,
|
||||||
self.reports_clicked),
|
_("Open the reports dialog"), self.reports_clicked),
|
||||||
('Tools', gtk.STOCK_EXECUTE, _('_Tools'), None, None,
|
('Tools', gtk.STOCK_EXECUTE, _('_Tools'), None,
|
||||||
self.tools_clicked),
|
_("Open the tools dialog"), self.tools_clicked),
|
||||||
('EditMenu', None, _('_Edit')),
|
('EditMenu', None, _('_Edit')),
|
||||||
('ColumnEdit', gtk.STOCK_PROPERTIES, _('_Column Editor')),
|
('ColumnEdit', gtk.STOCK_PROPERTIES, _('_Column Editor')),
|
||||||
('GoMenu', None, _('_Go')),
|
('GoMenu', None, _('_Go')),
|
||||||
|
Loading…
Reference in New Issue
Block a user