9841: Support tag on EventRef Editor

This commit is contained in:
système 2017-01-01 10:09:21 +01:00 committed by Nick Hall
parent f6e854d98d
commit b774ed8f32
2 changed files with 49 additions and 2 deletions

View File

@ -40,7 +40,7 @@ from ..glade import Glade
from .displaytabs import (CitationEmbedList, NoteTab, GalleryTab, from .displaytabs import (CitationEmbedList, NoteTab, GalleryTab,
EventBackRefList, AttrEmbedList) EventBackRefList, AttrEmbedList)
from ..widgets import (PrivacyButton, MonitoredEntry, from ..widgets import (PrivacyButton, MonitoredEntry,
MonitoredDate, MonitoredDataType) MonitoredDate, MonitoredDataType, MonitoredTagList)
from .editreference import RefTab, EditReference from .editreference import RefTab, EditReference
from .objectentries import PlaceEntry from .objectentries import PlaceEntry
@ -139,6 +139,15 @@ class EditEventRef(EditReference):
self.source.get_gramps_id, self.source.get_gramps_id,
self.db.readonly) self.db.readonly)
self.tags = MonitoredTagList(
self.top.get_object("tag_label"),
self.top.get_object("tag_button"),
self.source.set_tag_list,
self.source.get_tag_list,
self.db,
self.uistate, self.track,
self.db.readonly)
self.place_field = PlaceEntry( self.place_field = PlaceEntry(
self.dbstate, self.dbstate,
self.uistate, self.uistate,

View File

@ -457,6 +457,44 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Tags:</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="tag_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
<object class="GtkButton" id="tag_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="margin_right">1</property>
<property name="image_position">right</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">5</property>
</packing>
</child>
<child> <child>
<object class="UndoableEntry" id="eer_description"> <object class="UndoableEntry" id="eer_description">
<property name="visible">True</property> <property name="visible">True</property>
@ -511,7 +549,7 @@
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">5</property> <property name="top_attach">6</property>
<property name="width">3</property> <property name="width">3</property>
</packing> </packing>
</child> </child>