diff --git a/src/gen/plug/_manager.py b/src/gen/plug/_manager.py index 471156e76..3ebc83c81 100644 --- a/src/gen/plug/_manager.py +++ b/src/gen/plug/_manager.py @@ -127,6 +127,14 @@ class BasePluginManager(object): for plugin in self.__pgr.filter_load_on_reg(): mod = self.load_plugin(plugin) + def is_loaded(self, pdata_id): + """ + return True if plugin is already loaded + """ + if pdata_id in self.__loaded_plugins: + return True + return False + def load_plugin(self, pdata): """ Load a PluginData object. This means import of the python module. diff --git a/src/gen/plug/_pluginreg.py b/src/gen/plug/_pluginreg.py index ba3335187..cd8d4d918 100644 --- a/src/gen/plug/_pluginreg.py +++ b/src/gen/plug/_pluginreg.py @@ -40,6 +40,7 @@ import traceback # #------------------------------------------------------------------------- from const import VERSION as GRAMPSVERSION +from const import IMAGE_DIR from TransUtils import get_addon_translator from gen.ggettext import gettext as _ @@ -168,6 +169,19 @@ class PluginData(object): bool value, if True, the plugin is loaded on GRAMPS startup. Some plugins. Only set this value if for testing you want the plugin to be loaded immediately on startup. default=False + .. attribute: icons + New stock icons to register. A list of tuples (stock_id, icon_label), + eg: + [('gramps_myplugin', _('My Plugin')), + ('gramps_myplugin_open', _('Open Plugin')] + The icon directory must contain the directories scalable, 48x48, 22x22 + and 16x16 with the icons, eg: + scalable/gramps_myplugin.svg + 48x48/gramps_myplugin.png + 22x22/gramps_myplugin.png + .. attribute: icondir + The directory to use for the icons. If icondir is not set or None, it + reverts to the plugindirectory itself. Attributes for RELCALC plugins: .. attribute:: relcalcclass @@ -263,6 +277,9 @@ class PluginData(object): """ def __init__(self): + #read/write attribute + self.directory = None + #base attributes self._id = None self._name = None self._version = None @@ -276,6 +293,8 @@ class PluginData(object): self._authors_email = [] self._supported = True self._load_on_reg = False + self._icons = [] + self._icondir = None #derived var self.mod_name = None #RELCALC attr @@ -412,14 +431,28 @@ class PluginData(object): def _get_supported(self): return self._supported - def _get_load_on_reg(self): - return self._load_on_reg - def _set_load_on_reg(self, load_on_reg): if not isinstance(load_on_reg, bool): raise ValueError, 'Plugin must have load_on_reg=True or False' self._load_on_reg = load_on_reg - + + def _get_load_on_reg(self): + return self._load_on_reg + + def _get_icons(self): + return self._icons + + def _set_icons(self, icons): + if not isinstance(icons, list): + raise ValueError, 'Plugin must have icons as a list' + self._icons = icons + + def _get_icondir(self): + return self._icondir + + def _set_icondir(self, icondir): + self._icondir = icondir + id = property(_get_id, _set_id) name = property(_get_name, _set_name) description = property(_get_description, _set_description) @@ -434,6 +467,8 @@ class PluginData(object): authors_email = property(_get_authors_email, _set_authors_email) supported = property(_get_supported, _set_supported) load_on_reg = property(_get_load_on_reg, _set_load_on_reg) + icons = property(_get_icons, _set_icons) + icondir = property(_get_icondir, _set_icondir) def statustext(self): return STATUSTEXT[self.status] @@ -740,6 +775,7 @@ class PluginData(object): viewclass = property(_get_viewclass, _set_viewclass) order = property(_get_order, _set_order) + def newplugin(): """ @@ -821,6 +857,7 @@ def make_environment(**kwargs): 'GRAMPSVERSION': GRAMPSVERSION, 'START': START, 'END': END, + 'IMAGE_DIR': IMAGE_DIR } env.update(kwargs) return env @@ -902,6 +939,7 @@ class PluginRegister(object): ind = lenpd-1 for plugin in self.__plugindata[lenpd:]: ind += 1 + plugin.directory = dir if not plugin.status == STABLE and self.stable_only: rmlist.append(ind) continue diff --git a/src/gui/grampsgui.py b/src/gui/grampsgui.py index bbb9a25ee..a57a981b6 100644 --- a/src/gui/grampsgui.py +++ b/src/gui/grampsgui.py @@ -61,8 +61,8 @@ import gobject from QuestionDialog import ErrorDialog import config import Utils -import constfunc -from gui.pluginmanager import GuiPluginManager +from constfunc import win +from gui.pluginmanager import GuiPluginManager, base_reg_stock_icons from gen.plug import (START, END) #------------------------------------------------------------------------- @@ -71,6 +71,7 @@ from gen.plug import (START, END) # #------------------------------------------------------------------------- + def register_stock_icons (): """ Add the gramps names for its icons (eg gramps-person) to the GTK icon @@ -78,7 +79,7 @@ def register_stock_icons (): """ #iconpath to the base image. The front of the list has highest priority - if constfunc.win(): + if win(): iconpaths = [ (os.path.join(const.IMAGE_DIR, '48x48'), '.png'), (const.IMAGE_DIR, '.png'), @@ -156,51 +157,7 @@ def register_stock_icons (): ('gramps-url', _('URL'), gtk.gdk.CONTROL_MASK, 0, ''), ] - # Register our stock items - gtk.stock_add (items+items_legacy) - - # Add our custom icon factory to the list of defaults - factory = gtk.IconFactory () - factory.add_default () - - for data in items+items_legacy: - pixbuf = 0 - for (dirname, ext) in iconpaths: - icon_file = os.path.expanduser(os.path.join(dirname, data[0]+ext)) - if os.path.isfile(icon_file): - try: - pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file) - break - except: - pass - - if not pixbuf : - icon_file = os.path.join(const.IMAGE_DIR, 'gramps.png') - pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file) - - ## FIXME from gtk 2.17.3/2.15.2 change this to - ## FIXME pixbuf = pixbuf.add_alpha(True, 255, 255, 255) - pixbuf = pixbuf.add_alpha(True, chr(0xff), chr(0xff), chr(0xff)) - icon_set = gtk.IconSet (pixbuf) - #add different sized icons, always png type! - for size in extraiconsize : - pixbuf = 0 - icon_file = os.path.expanduser( - os.path.join(size[0], data[0]+'.png')) - if os.path.isfile(icon_file): - try: - pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file) - except: - pass - - if pixbuf : - source = gtk.IconSource() - source.set_size_wildcarded(False) - source.set_size(size[1]) - source.set_pixbuf(pixbuf) - icon_set.add_source(source) - - factory.add (data[0], icon_set) + base_reg_stock_icons(iconpaths, extraiconsize, items+items_legacy) def _display_welcome_message(): """ diff --git a/src/gui/pluginmanager.py b/src/gui/pluginmanager.py index f15cf2261..2cb8ee9e1 100644 --- a/src/gui/pluginmanager.py +++ b/src/gui/pluginmanager.py @@ -34,7 +34,8 @@ importers, exporters, quick reports, and document generators. # Standard Python modules # #------------------------------------------------------------------------- - +import os +import gtk #------------------------------------------------------------------------- # @@ -43,14 +44,75 @@ importers, exporters, quick reports, and document generators. #------------------------------------------------------------------------- import gen.utils from gen.plug import BasePluginManager, PluginRegister +from constfunc import win import config +import const #------------------------------------------------------------------------- # -# Constants +# Functions # #------------------------------------------------------------------------- +def base_reg_stock_icons(iconpaths, extraiconsize, items): + """ + Reusable base to register stock icons in Gramps + ..attribute iconpaths: list of main directory of the base icon, and + extension, eg: + [(os.path.join(const.IMAGE_DIR, 'scalable'), '.svg')] + ..attribute extraiconsize: list of dir with extra prepared icon sizes and + the gtk size to use them for, eg: + [(os.path.join(const.IMAGE_DIR, '22x22'), gtk.ICON_SIZE_LARGE_TOOLBAR)] + ..attribute items: list of icons to register, eg: + [('gramps-db', _('Family Trees'), gtk.gdk.CONTROL_MASK, 0, '')] + """ + + # Register our stock items + gtk.stock_add (items) + + # Add our custom icon factory to the list of defaults + factory = gtk.IconFactory () + factory.add_default () + + for data in items: + pixbuf = 0 + for (dirname, ext) in iconpaths: + icon_file = os.path.expanduser(os.path.join(dirname, data[0]+ext)) + if os.path.isfile(icon_file): + try: + pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file) + break + except: + pass + + if not pixbuf : + icon_file = os.path.join(const.IMAGE_DIR, 'gramps.png') + pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file) + + ## FIXME from gtk 2.17.3/2.15.2 change this to + ## FIXME pixbuf = pixbuf.add_alpha(True, 255, 255, 255) + pixbuf = pixbuf.add_alpha(True, chr(0xff), chr(0xff), chr(0xff)) + icon_set = gtk.IconSet (pixbuf) + #add different sized icons, always png type! + for size in extraiconsize : + pixbuf = 0 + icon_file = os.path.expanduser( + os.path.join(size[0], data[0]+'.png')) + if os.path.isfile(icon_file): + try: + pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file) + except: + pass + + if pixbuf : + source = gtk.IconSource() + source.set_size_wildcarded(False) + source.set_size(size[1]) + source.set_pixbuf(pixbuf) + icon_set.add_source(source) + + factory.add (data[0], icon_set) + #------------------------------------------------------------------------- # # GuiPluginManager @@ -83,14 +145,70 @@ class GuiPluginManager(gen.utils.Callback): self.basemgr = BasePluginManager.get_instance() self.__hidden_plugins = set(config.get('plugin.hiddenplugins')) self.__hidden_changed() - + + def load_plugin(self, pdata): + if not self.is_loaded(pdata.id): + #load stock icons before import, only gui needs this + if pdata.icons: + if pdata.icondir and os.path.isdir(pdata.icondir): + dir = pdata.icondir + else: + #use the plugin directory + dir = pdata.directory + self.load_icons(pdata.icons, dir) + return self.basemgr.load_plugin(pdata) + def reload_plugins(self): self.basemgr.reload_plugins() self.emit('plugins-reloaded') def __getattr__(self, name): return getattr(self.basemgr, name) - + + def load_icons(self, icons, dir): + """ + Load icons in the iconfactory of gramps, so they can be used in the + plugin. + + ..attribute icons: + New stock icons to register. A list of tuples (stock_id, icon_label), + eg: + [('gramps_myplugin', _('My Plugin')), + ('gramps_myplugin_open', _('Open Plugin'))] + The plugin directory must contain the directories scalable, 48x48, 22x22 + and 16x16 with the icons, eg in dir we have: + scalable/gramps_myplugin.svg + 48x48/gramps_myplugin.png + 22x22/gramps_myplugin.png + ..attribute dir: directory from where to load the icons + """ + if win(): + iconpaths = [ + (os.path.join(dir, '48x48'), '.png'), + (dir, '.png'), + ] + else : + iconpaths = [ + (os.path.join(dir, 'scalable'), '.svg'), + (dir, '.svg'), (dir, '.png'), + ] + + #sizes: menu=16, small_toolbar=18, large_toolbar=24, + # button=20, dnd=32, dialog=48 + #add to the back of this list to overrule images set at beginning of list + extraiconsize = [ + (os.path.join(dir, '22x22'), gtk.ICON_SIZE_LARGE_TOOLBAR), + (os.path.join(dir, '16x16'), gtk.ICON_SIZE_MENU), + (os.path.join(dir, '22x22'), gtk.ICON_SIZE_BUTTON), + ] + + items = [] + for stock_id, label in icons: + items.append((stock_id, label, gtk.gdk.CONTROL_MASK, 0, '')) + + base_reg_stock_icons(iconpaths, extraiconsize, items) + + def __hidden_changed(self, *args): #if hidden changed, stored data must be emptied as it could contain #something that now must be hidden diff --git a/src/images/16x16/gramps-geo.png b/src/images/16x16/gramps-geo.png index 1ab720324..6d98e1ab5 100644 Binary files a/src/images/16x16/gramps-geo.png and b/src/images/16x16/gramps-geo.png differ diff --git a/src/images/22x22/Makefile.am b/src/images/22x22/Makefile.am index cb749ad65..41c81e061 100644 --- a/src/images/22x22/Makefile.am +++ b/src/images/22x22/Makefile.am @@ -5,6 +5,14 @@ SUBDIRS = pkgdatadir = $(datadir)/@PACKAGE@/images/22x22 dist_pkgdata_DATA = \ + geo-fixed-zoom.png \ + geo-free-zoom.png \ + geo-place-add.png \ + geo-place-link.png \ + geo-show-event.png \ + geo-show-family.png \ + geo-show-person.png \ + geo-show-place.png \ gramps-address.png \ gramps-attribute.png \ gramps-bookmark-delete.png \ diff --git a/src/images/22x22/geo-fixed-zoom.png b/src/images/22x22/geo-fixed-zoom.png new file mode 100644 index 000000000..e4be82858 Binary files /dev/null and b/src/images/22x22/geo-fixed-zoom.png differ diff --git a/src/images/22x22/geo-free-zoom.png b/src/images/22x22/geo-free-zoom.png new file mode 100644 index 000000000..938ffa828 Binary files /dev/null and b/src/images/22x22/geo-free-zoom.png differ diff --git a/src/images/22x22/geo-place-add.png b/src/images/22x22/geo-place-add.png new file mode 100644 index 000000000..21ecb6100 Binary files /dev/null and b/src/images/22x22/geo-place-add.png differ diff --git a/src/images/22x22/geo-place-link.png b/src/images/22x22/geo-place-link.png new file mode 100644 index 000000000..d9f4d93c2 Binary files /dev/null and b/src/images/22x22/geo-place-link.png differ diff --git a/src/images/22x22/geo-show-event.png b/src/images/22x22/geo-show-event.png new file mode 100644 index 000000000..131c059be Binary files /dev/null and b/src/images/22x22/geo-show-event.png differ diff --git a/src/images/22x22/geo-show-family.png b/src/images/22x22/geo-show-family.png new file mode 100644 index 000000000..e47e0d64f Binary files /dev/null and b/src/images/22x22/geo-show-family.png differ diff --git a/src/images/22x22/geo-show-person.png b/src/images/22x22/geo-show-person.png new file mode 100644 index 000000000..a63ad86d6 Binary files /dev/null and b/src/images/22x22/geo-show-person.png differ diff --git a/src/images/22x22/geo-show-place.png b/src/images/22x22/geo-show-place.png new file mode 100644 index 000000000..844dc3e85 Binary files /dev/null and b/src/images/22x22/geo-show-place.png differ diff --git a/src/images/22x22/gramps-geo.png b/src/images/22x22/gramps-geo.png index 1a9292d49..c22ac5b73 100644 Binary files a/src/images/22x22/gramps-geo.png and b/src/images/22x22/gramps-geo.png differ diff --git a/src/images/48x48/Makefile.am b/src/images/48x48/Makefile.am index 60d075f8b..2c0da0cde 100644 --- a/src/images/48x48/Makefile.am +++ b/src/images/48x48/Makefile.am @@ -5,6 +5,14 @@ SUBDIRS = pkgdatadir = $(datadir)/@PACKAGE@/images/48x48 dist_pkgdata_DATA = \ + geo-fixed-zoom.png \ + geo-free-zoom.png \ + geo-place-add.png \ + geo-place-link.png \ + geo-show-event.png \ + geo-show-family.png \ + geo-show-person.png \ + geo-show-place.png \ gramps-address.png \ gramps-attribute.png \ gramps-bookmark-delete.png \ diff --git a/src/images/48x48/geo-fixed-zoom.png b/src/images/48x48/geo-fixed-zoom.png new file mode 100644 index 000000000..c3c2a40e1 Binary files /dev/null and b/src/images/48x48/geo-fixed-zoom.png differ diff --git a/src/images/48x48/geo-free-zoom.png b/src/images/48x48/geo-free-zoom.png new file mode 100644 index 000000000..889a44862 Binary files /dev/null and b/src/images/48x48/geo-free-zoom.png differ diff --git a/src/images/48x48/geo-place-add.png b/src/images/48x48/geo-place-add.png new file mode 100644 index 000000000..c2c0750a1 Binary files /dev/null and b/src/images/48x48/geo-place-add.png differ diff --git a/src/images/48x48/geo-place-link.png b/src/images/48x48/geo-place-link.png new file mode 100644 index 000000000..b88acfbc4 Binary files /dev/null and b/src/images/48x48/geo-place-link.png differ diff --git a/src/images/48x48/geo-show-event.png b/src/images/48x48/geo-show-event.png new file mode 100644 index 000000000..464818f7c Binary files /dev/null and b/src/images/48x48/geo-show-event.png differ diff --git a/src/images/48x48/geo-show-family.png b/src/images/48x48/geo-show-family.png new file mode 100644 index 000000000..2ff66b141 Binary files /dev/null and b/src/images/48x48/geo-show-family.png differ diff --git a/src/images/48x48/geo-show-person.png b/src/images/48x48/geo-show-person.png new file mode 100644 index 000000000..f0fc0e588 Binary files /dev/null and b/src/images/48x48/geo-show-person.png differ diff --git a/src/images/48x48/geo-show-place.png b/src/images/48x48/geo-show-place.png new file mode 100644 index 000000000..bf3cc1731 Binary files /dev/null and b/src/images/48x48/geo-show-place.png differ diff --git a/src/images/48x48/gramps-geo.png b/src/images/48x48/gramps-geo.png index 2113b4c20..56ad65e56 100644 Binary files a/src/images/48x48/gramps-geo.png and b/src/images/48x48/gramps-geo.png differ diff --git a/src/images/scalable/Makefile.am b/src/images/scalable/Makefile.am index 9b953022b..027cd31ea 100644 --- a/src/images/scalable/Makefile.am +++ b/src/images/scalable/Makefile.am @@ -5,6 +5,15 @@ SUBDIRS = pkgdatadir = $(datadir)/@PACKAGE@/images/scalable dist_pkgdata_DATA = \ +geo-place-add.svg + geo-fixed-zoom.svg \ + geo-free-zoom.svg \ + geo-place-add.svg \ + geo-place-link.svg \ + geo-show-event.svg \ + geo-show-family.svg \ + geo-show-person.svg \ + geo-show-place.svg \ gramps-address.svg \ gramps-attribute.svg \ gramps-bookmark-delete.svg \ diff --git a/src/images/scalable/geo-fixed-zoom.svg b/src/images/scalable/geo-fixed-zoom.svg new file mode 100644 index 000000000..dea78fca7 --- /dev/null +++ b/src/images/scalable/geo-fixed-zoom.svg @@ -0,0 +1,1088 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + document + search + find + + + + + + Lapo Calamandrei + + + + + + Jakub Steiner + + + 2006-04-21 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/images/scalable/geo-free-zoom.svg b/src/images/scalable/geo-free-zoom.svg new file mode 100644 index 000000000..102dc0596 --- /dev/null +++ b/src/images/scalable/geo-free-zoom.svg @@ -0,0 +1,908 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Find + + + document + search + find + + + + + + Lapo Calamandrei + + + + + + Jakub Steiner + + + 2006-04-21 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/images/scalable/geo-place-add.svg b/src/images/scalable/geo-place-add.svg new file mode 100644 index 000000000..d58069a40 --- /dev/null +++ b/src/images/scalable/geo-place-add.svg @@ -0,0 +1,1058 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Jakub Steiner + + + + + Tuomas Kuosmanen + + + + http://jimmac.musichall.cz + + + globe + international + web + www + internet + network + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/images/scalable/geo-place-link.svg b/src/images/scalable/geo-place-link.svg new file mode 100644 index 000000000..bbf116223 --- /dev/null +++ b/src/images/scalable/geo-place-link.svg @@ -0,0 +1,1158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Jakub Steiner + + + + + Tuomas Kuosmanen + + + + http://jimmac.musichall.cz + + + globe + international + web + www + internet + network + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/images/scalable/geo-show-event.svg b/src/images/scalable/geo-show-event.svg new file mode 100644 index 000000000..8a594883e --- /dev/null +++ b/src/images/scalable/geo-show-event.svg @@ -0,0 +1,2885 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + + diff --git a/src/images/scalable/geo-show-family.svg b/src/images/scalable/geo-show-family.svg new file mode 100644 index 000000000..4fb4fad59 --- /dev/null +++ b/src/images/scalable/geo-show-family.svg @@ -0,0 +1,2849 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/images/scalable/geo-show-person.svg b/src/images/scalable/geo-show-person.svg new file mode 100644 index 000000000..c4221b672 --- /dev/null +++ b/src/images/scalable/geo-show-person.svg @@ -0,0 +1,2957 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/images/scalable/geo-show-place.svg b/src/images/scalable/geo-show-place.svg new file mode 100644 index 000000000..ccc6beb67 --- /dev/null +++ b/src/images/scalable/geo-show-place.svg @@ -0,0 +1,2718 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + 001001000111 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/images/scalable/gramps-geo.svg b/src/images/scalable/gramps-geo.svg index 5fbad1cc1..639985fcc 100644 --- a/src/images/scalable/gramps-geo.svg +++ b/src/images/scalable/gramps-geo.svg @@ -1,5 +1,6 @@ + 0111 - - - - - - - + + + + inkscape:guide-bbox="true" + inkscape:window-maximized="1" + inkscape:snap-nodes="true" /> @@ -671,6 +667,7 @@ image/svg+xml + @@ -679,126 +676,78 @@ id="layer4" inkscape:label="Map" style="display:inline"> - - - - - - - + id="g5384" + transform="matrix(-0.0462529,-1.0014923,1.1231331,-0.04124348,-4.4108026,49.940205)"> + id="path2670" + d="M 4.3194641,7.8618014 C 18.555924,7.7862647 32.856027,6.5387482 47.092432,6.4995453 c -0.0843,3.0031609 -0.106112,7.6023897 0.260935,10.5873197 -1.658318,2.89611 -2.153268,6.247001 -3.287619,9.34816 0.946165,2.877206 1.767374,5.815802 2.565864,8.724178 0.354562,3.848309 0.279552,9.006356 0.639931,12.85431 C 31.767099,47.100116 16.25958,46.30966 0.7718911,45.048857 2.4332679,42.242736 3.1000322,39.002802 4.4485404,36.055824 3.460062,33.828765 2.6092477,31.53453 1.9758277,29.180707 3.6278646,25.419064 3.7691535,21.120868 5.6633076,17.457618 5.3880019,14.235289 4.8143299,11.054386 4.3194641,7.8618014 z" + style="fill:#edd400;fill-opacity:1;stroke:#7c7c7c;stroke-width:0.82360929;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1" + sodipodi:nodetypes="ccccccccccc" /> + sodipodi:nodetypes="csscscccsccscc" + id="path2682" + d="m 33.01552,45.990981 c -2.120326,-2.568582 -6.394869,-6.616357 -5.42859,-6.616357 1.464304,0 1.994993,-0.543233 0.614631,-0.543233 -0.458418,0 0.978079,-2.650198 1.445058,-3.388773 -0.0777,-1.505494 -0.178214,-1.905223 0.927706,-3.01775 0.573017,-0.57644 1.039831,-1.128717 0.525708,-2.644246 4.685703,2.610536 3.087104,-0.673964 2.486041,-2.035421 7.673716,-0.20121 -2.394051,-8.945821 5.047921,-8.134287 1.781092,1.195039 2.960663,2.172638 3.583026,2.928094 0.496089,0.602177 -0.214347,3.394172 -0.964561,4.831332 0.821849,2.482327 2.77621,6.366753 3.124266,7.96191 0.944079,0.675111 1.080035,0.520537 1.172037,1.841173 0.04485,0.643758 0.119433,5.702282 0.233574,9.483369 C 30.72285,45.96913 40.660618,46.471567 33.01552,45.990981 z" + style="fill:#4e9a06;fill-opacity:1;fill-rule:evenodd;stroke:none" /> + sodipodi:nodetypes="ccscscscccc" + id="path1901" + d="m 15.249903,32.336144 c 0.447906,-1.822675 4.19115,-0.677191 4.389195,-3.667684 -0.891201,-5.217822 -2.458974,-9.070528 1.576885,-9.121297 3.133013,-0.03941 6.018316,4.744043 6.880361,8.503375 -0.198045,2.638197 0.41447,7.1509 0.41447,8.699854 0,2.69831 4.743163,8.57672 4.871775,9.282946 C 30.95948,45.886363 17.085627,45.105209 14.997691,44.85626 14.33263,44.77696 12.009068,43.701243 11.338926,43.701243 9.0155661,42.963587 6.9326761,41.100078 6.6792651,39.864884 c 1.123006,-3.344968 2.0750514,-0.97072 2.5251825,-4.154358 -1.662117,-2.061197 2.8075734,-4.767613 6.0454554,-3.374382 z" + style="fill:#3465a4;fill-opacity:1;fill-rule:evenodd;stroke:none" /> + sodipodi:nodetypes="ccccccccccccccccccc" + id="path2680" + d="m 26.94833,12.457805 2.622904,-4.3008938 -0.231918,4.4016978 3.280495,-2.6455508 5.690714,-1.787493 -3.101539,4.4119908 3.092376,-1.635115 2.777298,1.614062 2.902233,-0.01041 c 0,0 -1.808072,3.215 -1.998893,4.225883 -1.140492,0.887628 -3.707295,2.248627 -3.707295,2.248627 l -2.862845,-2.042907 -2.822039,2.063298 -0.0077,2.347713 -5.68489,0.02039 5.699411,-4.421304 -5.069707,-0.115449 -1.523392,-4.261769 0.944834,-0.112767 z" + style="fill:#75507b;fill-opacity:1;fill-rule:evenodd;stroke:none" /> + + + + + + + + + sodipodi:nodetypes="ccccccccccc" + id="path2670-3" + d="M 5.3146309,8.6438471 C 19.551091,8.5683071 31.968364,7.2650955 46.204769,7.2258929 c -0.0843,3.0031601 -0.208856,6.8913601 0.158195,9.8762901 -1.658318,2.89611 -1.955223,6.247001 -3.089574,9.34816 0.946165,2.877207 1.767374,5.914826 2.565864,8.823202 0.354562,3.848309 0.176371,8.020122 0.53675,11.868076 C 30.871556,46.228224 17.546688,45.631823 2.0589991,44.37102 3.7203758,41.564899 3.9643879,39.057781 5.3128961,36.110803 4.3244177,33.883744 3.500266,31.450827 2.866846,29.097004 4.5188829,25.33536 4.6893975,21.03429 6.5835516,17.37104 6.3082459,14.148711 5.8094967,11.836431 5.3146309,8.6438471 z" + style="fill:none;stroke:#ffffff;stroke-width:0.82360929;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0.68773235;display:inline" /> - - - - - - + sodipodi:nodetypes="ccccc" + id="path5347" + d="M 5.4462326,35.820243 45.451287,35.325132 43.074749,27.205294 3.366762,29.383786 5.4462326,35.820243 z" + style="opacity:0.15034964;fill:#020300;fill-opacity:1;stroke:none" /> - - + sodipodi:nodetypes="ccccc" + id="path5347-8" + d="M 7.1296143,16.857451 45.847376,16.956475 45.816617,7.5771751 5.7433002,9.1337025 7.1296143,16.857451 z" + style="opacity:0.15034964;fill:#020300;fill-opacity:1;stroke:none;display:inline" /> L", + ('SaveZoom', 'geo-fixed-zoom', _("_Save Zoom"), "L", _("Save the zoom between places map, person map, " - "family map and events map"), + "family map and event map"), self._save_zoom, config.get('geoview.lock') ) ]) self._add_action_group(self.lock_action) - self._add_action('AllPlacesMaps', gtk.STOCK_HOME, _('_All Places'), + self._add_action('AllPlacesMaps', 'geo-show-place', _('_All Places'), callback=self._all_places, tip=_("Attempt to view all places in " "the family tree.")) - self._add_action('PersonMaps', 'gramps-person', _('_Person'), + self._add_action('PersonMaps', 'geo-show-person', _('_Person'), callback=self._person_places, tip=_("Attempt to view all the places " "where the selected people lived.")) - self._add_action('FamilyMaps', 'gramps-parents-add', _('_Family'), + self._add_action('FamilyMaps', 'geo-show-family', _('_Family'), callback=self._family_places, tip=_("Attempt to view places of the selected people's family.")) - self._add_action('EventMaps', 'gramps-event', _('_Event'), + self._add_action('EventMaps', 'geo-show-event', _('_Event'), callback=self._event_places, tip=_("Attempt to view places connected to all events.")) self._add_toggle_action('Filter', None, _('_Filter Sidebar'), @@ -1033,9 +1033,9 @@ class GeoView(HtmlView): for widget in widgets : if isinstance(widget, gtk.ToggleToolButton): if self.lock_action.get_action('SaveZoom').get_active(): - widget.set_stock_id('gramps-lock') + widget.set_stock_id('geo-fixed-zoom') else: - widget.set_stock_id('gramps-unlock') + widget.set_stock_id('geo-free-zoom') def _save_zoom(self, button): """