Small cleanup of link type names
svn: r15349
This commit is contained in:
parent
99c4671e3e
commit
a7d5470caa
@ -42,7 +42,7 @@
|
||||
<object class="GtkLabel" id="label220">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Web Address:</property>
|
||||
<property name="label" translatable="yes">Internet Address:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">entry1</property>
|
||||
@ -58,7 +58,7 @@
|
||||
<object class="GtkLabel" id="label591">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Type:</property>
|
||||
<property name="label" translatable="yes">Link Type:</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user