2006-08-13 Don Allingham <don@gramps-project.org>

* src/Editors/_EditEventRef.py: add attribute list, remove cause
	* src/Editors/_EditEvent.py: add attribute list, remove cause
	* src/glade/gramps.glade: event fixes



svn: r7172
This commit is contained in:
Don Allingham 2006-08-14 03:32:20 +00:00
parent e3020e855e
commit edfef7d661
4 changed files with 117 additions and 199 deletions

View File

@ -1,3 +1,8 @@
2006-08-13 Don Allingham <don@gramps-project.org>
* src/Editors/_EditEventRef.py: add attribute list, remove cause
* src/Editors/_EditEvent.py: add attribute list, remove cause
* src/glade/gramps.glade: event fixes
2006-08-13 Alex Roitman <shura@gramps-project.org>
* NEWS: Update.

View File

@ -45,7 +45,7 @@ import GrampsDisplay
from _EditPrimary import EditPrimary
from QuestionDialog import ErrorDialog
from DisplayTabs import SourceEmbedList, NoteTab, GalleryTab, EventBackRefList
from DisplayTabs import SourceEmbedList, NoteTab, GalleryTab, EventBackRefList, AttrEmbedList
from GrampsWidgets import *
#-------------------------------------------------------------------------
@ -111,11 +111,6 @@ class EditEvent(EditPrimary):
self.add_del_btn,
self.share_btn)
self.cause_monitor = MonitoredEntry(
self.top.get_widget("eventCause"),
self.obj.set_cause,
self.obj.get_cause, self.db.readonly)
self.descr_field = MonitoredEntry(
self.top.get_widget("event_description"),
self.obj.set_description,
@ -173,6 +168,14 @@ class EditEvent(EditPrimary):
notebook,
EventBackRefList(self.dbstate, self.uistate, self.track,
self.dbstate.db.find_backlink_handles(self.obj.handle)))
try:
self.attr_ref_list = self._add_tab(
notebook,
AttrEmbedList(self.dbstate, self.uistate, self.track,
self.source_ref.get_attribute_list()))
except AttributeError:
print "Attribute list not available yet"
notebook.show_all()
self.top.get_widget('vbox').pack_start(notebook,True)

View File

@ -42,7 +42,7 @@ import gtk
import const
import RelLib
from DisplayTabs import SourceEmbedList,NoteTab,GalleryTab,EventBackRefList
from DisplayTabs import SourceEmbedList,NoteTab,GalleryTab,EventBackRefList,AttrEmbedList
from GrampsWidgets import *
from _EditReference import EditReference
@ -87,12 +87,6 @@ class EditEventRef(EditReference):
def _setup_fields(self):
self.cause_monitor = MonitoredEntry(
self.top.get_widget("eer_cause"),
self.source.set_cause,
self.source.get_cause,
self.db.readonly)
self.ref_privacy = PrivacyButton(
self.top.get_widget('eer_ref_priv'),
self.source_ref)
@ -161,6 +155,14 @@ class EditEventRef(EditReference):
notebook,
SourceEmbedList(self.dbstate,self.uistate, self.track,
self.source.source_list))
try:
self.attr_list = self._add_tab(
notebook_ref,
AttrEmbedList(self.dbstate, self.uistate, self.track,
self.source.get_attribute_list()))
except AttributeError:
print "Attribute list not available yet"
self.note_tab = self._add_tab(
notebook,
@ -183,6 +185,14 @@ class EditEventRef(EditReference):
self.db.find_backlink_handles(self.source.handle),
self.enable_warnbox))
try:
self.attr_ref_list = self._add_tab(
notebook,
AttrEmbedList(self.dbstate, self.uistate, self.track,
self.source_ref.get_attribute_list()))
except AttributeError:
print "Attribute list not available yet"
def build_menu_names(self,eventref):
if self.source:
event_name = str(self.source.get_type())

View File

@ -6792,35 +6792,6 @@
</packing>
</child>
<child>
<widget class="GtkLabel" id="causelabel">
<property name="visible">True</property>
<property name="label" translatable="yes">_Cause:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">eventCause</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label155">
<property name="visible">True</property>
@ -6939,34 +6910,6 @@
</packing>
</child>
<child>
<widget class="GtkLabel" id="label656">
<property name="visible">True</property>
<property name="label" translatable="yes">ID:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="eventDate">
<property name="visible">True</property>
@ -6988,48 +6931,6 @@
</packing>
</child>
<child>
<widget class="GtkEntry" id="gid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">●</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="eventCause">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="event_description">
<property name="visible">True</property>
@ -7189,6 +7090,55 @@
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label656">
<property name="visible">True</property>
<property name="label" translatable="yes">ID:</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="gid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">●</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">4</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
@ -10649,7 +10599,7 @@
<widget class="GtkTable" id="table62">
<property name="border_width">12</property>
<property name="visible">True</property>
<property name="n_rows">7</property>
<property name="n_rows">6</property>
<property name="n_columns">3</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
@ -10734,8 +10684,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
@ -10770,35 +10720,6 @@
</packing>
</child>
<child>
<widget class="GtkLabel" id="label505">
<property name="visible">True</property>
<property name="label" translatable="yes">_Cause:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">eer_cause</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="eer_date">
<property name="visible">True</property>
@ -10871,8 +10792,8 @@
<packing>
<property name="left_attach">0</property>
<property name="right_attach">3</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">expand|shrink|fill</property>
<property name="y_options">expand|shrink|fill</property>
</packing>
@ -10896,7 +10817,7 @@
</child>
<child>
<widget class="GtkEntry" id="eer_cause">
<widget class="GtkEntry" id="eer_description">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
@ -10916,58 +10837,6 @@
</packing>
</child>
<child>
<widget class="GtkEntry" id="eer_description">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="eer_ev_priv">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<child>
<widget class="GtkImage" id="image2676">
<property name="visible">True</property>
<property name="icon_size">1</property>
<property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">3</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label657">
<property name="visible">True</property>
@ -11137,6 +11006,37 @@
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkToggleButton" id="eer_ev_priv">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<child>
<widget class="GtkImage" id="image2676">
<property name="visible">True</property>
<property name="icon_size">1</property>
<property name="icon_name">stock_lock-open</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>