diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index cdeef461f..8cbdb50d1 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,17 @@ +2006-03-04 Don Allingham + * src/DataViews/Makefile.in: added + * src/DataViews/__init__.py: added + * src/DataViews/_MapView.py: moved to DataViews directory + * src/DataViews/_MediaView.py: moved to DataViews directory + * src/DataViews/_RepositoryView.py: moved to DataViews directory + * src/DataViews/_SourceView.py: moved to DataViews directory + * src/DataViews/_FamilyView.py: moved to DataViews directory + * src/DataViews/_FamilyList.py: moved to DataViews directory + * src/DataViews/_PlaceView.py: moved to DataViews directory + * src/DataViews/_PersonView.py: moved to DataViews directory + * src/DataViews/_PedView.py: moved to DataViews directory + * src/DataViews/_RepositoryView.py: moved to DataViews directory + 2006-03-04 Martin Hawlisch * src/Models/Makefile.am: Added file * Editors/__init__.py: Added file diff --git a/gramps2/configure.in b/gramps2/configure.in index e52985b8a..74eeff7a8 100644 --- a/gramps2/configure.in +++ b/gramps2/configure.in @@ -239,6 +239,7 @@ src/GrampsDb/Makefile src/docgen/Makefile src/Models/Makefile src/Editors/Makefile +src/DataViews/Makefile src/plugins/Makefile src/dates/Makefile src/data/Makefile diff --git a/gramps2/src/EventView.py b/gramps2/src/DataViews/EventView.py similarity index 100% rename from gramps2/src/EventView.py rename to gramps2/src/DataViews/EventView.py diff --git a/gramps2/src/FamilyList.py b/gramps2/src/DataViews/FamilyList.py similarity index 100% rename from gramps2/src/FamilyList.py rename to gramps2/src/DataViews/FamilyList.py diff --git a/gramps2/src/FamilyView.py b/gramps2/src/DataViews/FamilyView.py similarity index 100% rename from gramps2/src/FamilyView.py rename to gramps2/src/DataViews/FamilyView.py diff --git a/gramps2/src/DataViews/Makefile.am b/gramps2/src/DataViews/Makefile.am new file mode 100644 index 000000000..03554461a --- /dev/null +++ b/gramps2/src/DataViews/Makefile.am @@ -0,0 +1,28 @@ +# This is the src/DataViews level Makefile for Gramps +# We could use GNU make's ':=' syntax for nice wildcard use, +# but that is not necessarily portable. +# If not using GNU make, then list all .py files individually + +pkgdatadir = $(datadir)/@PACKAGE@/DataViews + +pkgdata_PYTHON = \ + __init__.py\ + PersonView.py\ + FamilyView.py\ + FamilyList.py\ + PedView.py\ + EventView.py\ + SourceView.py\ + PlaceView.py\ + MediaView.py\ + MapView.py\ + RepositoryView.py + +pkgpyexecdir = @pkgpyexecdir@/DataViews +pkgpythondir = @pkgpythondir@/DataViews + +GRAMPS_PY_MODPATH = "../" + +pycheck: + (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ + pychecker $(pkgdata_PYTHON)); diff --git a/gramps2/src/MapView.py b/gramps2/src/DataViews/MapView.py similarity index 100% rename from gramps2/src/MapView.py rename to gramps2/src/DataViews/MapView.py diff --git a/gramps2/src/MediaView.py b/gramps2/src/DataViews/MediaView.py similarity index 100% rename from gramps2/src/MediaView.py rename to gramps2/src/DataViews/MediaView.py diff --git a/gramps2/src/PedView.py b/gramps2/src/DataViews/PedView.py similarity index 100% rename from gramps2/src/PedView.py rename to gramps2/src/DataViews/PedView.py diff --git a/gramps2/src/PersonView.py b/gramps2/src/DataViews/PersonView.py similarity index 100% rename from gramps2/src/PersonView.py rename to gramps2/src/DataViews/PersonView.py diff --git a/gramps2/src/PlaceView.py b/gramps2/src/DataViews/PlaceView.py similarity index 100% rename from gramps2/src/PlaceView.py rename to gramps2/src/DataViews/PlaceView.py diff --git a/gramps2/src/RepositoryView.py b/gramps2/src/DataViews/RepositoryView.py similarity index 100% rename from gramps2/src/RepositoryView.py rename to gramps2/src/DataViews/RepositoryView.py diff --git a/gramps2/src/SourceView.py b/gramps2/src/DataViews/SourceView.py similarity index 100% rename from gramps2/src/SourceView.py rename to gramps2/src/DataViews/SourceView.py diff --git a/gramps2/src/DataViews/__init__.py b/gramps2/src/DataViews/__init__.py new file mode 100644 index 000000000..6677d64a3 --- /dev/null +++ b/gramps2/src/DataViews/__init__.py @@ -0,0 +1,36 @@ +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2001-2005 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# $Id: __init__.py 6067 2006-03-04 05:24:16Z dallingham $ + +from PersonView import PersonView +from FamilyView import FamilyView +from FamilyList import FamilyListView +from PedView import PedView +from EventView import EventView +from SourceView import SourceView +from PlaceView import PlaceView +from MediaView import MediaView +from MapView import MapView +from RepositoryView import RepositoryView + +def get_views(): + return [PersonView, FamilyView, FamilyListView, PedView, + EventView, SourceView, PlaceView, MediaView, + MapView, RepositoryView] diff --git a/gramps2/src/Makefile.am b/gramps2/src/Makefile.am index 0dded1288..b06dc1f83 100644 --- a/gramps2/src/Makefile.am +++ b/gramps2/src/Makefile.am @@ -2,21 +2,22 @@ # This is the src level Makefile for Gramps SUBDIRS = \ - docgen \ - plugins \ - dates \ - data \ - po \ - GrampsDb \ - RelLib \ - ObjectSelector \ - GrampsLogger \ - TreeViews \ Config \ + DataViews \ + Editors \ + GrampsDb \ + GrampsLogger \ Mime \ Models \ + ObjectSelector \ + RelLib \ + TreeViews \ + data \ + dates \ + docgen \ images \ - Editors + plugins \ + po # For intl. support, how do we compile? MOSTLYCLEANFILES = @@ -58,10 +59,7 @@ gdir_PYTHON = \ DisplayTabs.py\ DisplayTrace.py\ Errors.py\ - EventView.py\ Exporter.py\ - FamilyList.py\ - FamilyView.py\ FontScale.py\ GenericFilter.py\ GrampsCfg.py\ @@ -73,19 +71,13 @@ gdir_PYTHON = \ ImgManip.py\ latin_ansel.py\ ListModel.py\ - MapView.py\ - MediaView.py\ MergeData.py\ MergePeople.py\ NameDisplay.py\ Navigation.py\ Options.py\ - PageView.py\ PaperMenu.py\ - PedView.py\ PeopleModel.py\ - PersonView.py\ - PlaceView.py\ PluginMgr.py\ Plugins.py\ QuestionDialog.py\ @@ -95,7 +87,6 @@ gdir_PYTHON = \ ReportOptions.py\ Report.py\ ReportUtils.py\ - RepositoryView.py\ ScratchPad.py\ SelectChild.py\ SelectEvent.py\ @@ -104,7 +95,6 @@ gdir_PYTHON = \ Sort.py\ soundex.py\ Sources.py\ - SourceView.py\ Spell.py\ SpreadSheetDoc.py\ StartupDialog.py\ diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 456179d13..c1800b4da 100644 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -36,19 +36,9 @@ log = logging.getLogger(".") # #------------------------------------------------------------------------- import ViewManager -import PersonView -import FamilyList -import RepositoryView import GrampsDisplay import RelLib import GrampsDb -import PedView -import MapView -import FamilyView -import PlaceView -import EventView -import SourceView -import MediaView import ArgHandler import Config import GrampsCfg @@ -56,6 +46,7 @@ import const import Errors import PluginMgr import TipOfDay +import DataViews from Mime import mime_type_is_defined from QuestionDialog import ErrorDialog @@ -154,16 +145,8 @@ class Gramps: state = GrampsDb.DbState() vm = ViewManager.ViewManager(state) - vm.register_view(PersonView.PersonView) - vm.register_view(FamilyView.FamilyView) - vm.register_view(FamilyList.FamilyListView) - vm.register_view(PedView.PedView) - vm.register_view(EventView.EventView) - vm.register_view(SourceView.SourceView) - vm.register_view(PlaceView.PlaceView) - vm.register_view(MediaView.MediaView) - vm.register_view(MapView.MapView) - vm.register_view(RepositoryView.RepositoryView) + for view in DataViews.get_views(): + vm.register_view(view) ArgHandler.ArgHandler(state,vm,args)