From a7d5470caa1315703c6e56661812e2c298d56cd1 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 7 May 2010 18:33:44 +0000 Subject: [PATCH] Small cleanup of link type names svn: r15349 --- src/glade/editlink.glade | 4 ++-- src/gui/editors/editlink.py | 23 ++++++++++------------- src/plugins/quickview/LinkReferences.py | 2 +- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/glade/editlink.glade b/src/glade/editlink.glade index 2d6148cc0..4689635e7 100644 --- a/src/glade/editlink.glade +++ b/src/glade/editlink.glade @@ -42,7 +42,7 @@ True 0 - Web Address: + Internet Address: True center entry1 @@ -58,7 +58,7 @@ True 0 - Type: + Link Type: True diff --git a/src/gui/editors/editlink.py b/src/gui/editors/editlink.py index 7e707c7b0..385076453 100644 --- a/src/gui/editors/editlink.py +++ b/src/gui/editors/editlink.py @@ -77,15 +77,15 @@ class EditLink(ManagedWindow.ManagedWindow): _('Link Editor')) self.table = self.top.get_object('table27') self.uri_list = gtk.combo_box_new_text() - for text in [_("Web Address"), # 0 this order range above - _("Gramps Event"), # 1 - _("Gramps Family"), # 2 - _("Gramps Media"), # 3 - _("Gramps Note"), # 4 - _("Gramps Person"), # 5 - _("Gramps Place"), # 6 - _("Gramps Repository"), # 7 - _("Gramps Source"), # 8 + for text in [_("Internet Address"), # 0 this order range above + _("Event"), # 1 + _("Family"), # 2 + _("Media"), # 3 + _("Note"), # 4 + _("Person"), # 5 + _("Place"), # 6 + _("Repository"), # 7 + _("Source"), # 8 ]: self.uri_list.append_text(text) self.table.attach(self.uri_list, 1, 2, 0, 1) @@ -137,6 +137,7 @@ class EditLink(ManagedWindow.ManagedWindow): return self.simple_access.display(obj_class, prop, value) def _on_edit_one(self, widget): + # Not used due to modal dialog in StyledTextEditor from gui.editors import EditObject uri = self.url_link.get_text() if uri.startswith("gramps://"): @@ -187,10 +188,6 @@ class EditLink(ManagedWindow.ManagedWindow): if self.uri_list.get_active() == WEB: return self.url_link.get_text() else: - #object_class = OBJECT_MAP[self.uri_list.get_active()] - #prop = "handle" - #value = "" - #return "gramps://%s/%s/%s" % (object_class, prop, value) return self.url_link.get_text() def _connect_signals(self): diff --git a/src/plugins/quickview/LinkReferences.py b/src/plugins/quickview/LinkReferences.py index 94bf65760..9fce2f52b 100644 --- a/src/plugins/quickview/LinkReferences.py +++ b/src/plugins/quickview/LinkReferences.py @@ -50,7 +50,7 @@ def run(database, document, obj): if int(styledtext_tag.name) == StyledTextTagType.LINK: if styledtext_tag.value.startswith("gramps://"): object_class, prop, value = styledtext_tag.value[9:].split("/", 2) - tagtype = _("Gramps") + tagtype = _(object_class) ref_obj = sdb.get_link(object_class, prop, value) if ref_obj: tagvalue = ref_obj