New event editing abilities

svn: r259
This commit is contained in:
Don Allingham 2001-07-26 20:56:32 +00:00
parent 3f46117ac4
commit 7a91eff426
2 changed files with 836 additions and 370 deletions

View File

@ -1463,30 +1463,38 @@
<fill>True</fill>
</child>
<widget>
<class>GtkFrame</class>
<name>eventName</name>
<border_width>5</border_width>
<label>No Events</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>5</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkTable</class>
<name>table7</name>
<rows>4</rows>
<columns>3</columns>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>0</row_spacing>
<column_spacing>0</column_spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label103</name>
<label>Event Type</label>
<label>Date :</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<ypad>3</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@ -1505,14 +1513,14 @@
<widget>
<class>GtkLabel</class>
<name>label104</name>
<label>Date</label>
<name>label106</name>
<label>Place :</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<ypad>3</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@ -1532,13 +1540,117 @@
<widget>
<class>GtkLabel</class>
<name>label105</name>
<label>Description</label>
<label>Description :</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<ypad>3</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>eventDate</name>
<label></label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>eventPlace</name>
<label></label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>eventDescription</name>
<label></label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label164</name>
<label>Details :</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>3</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
@ -1557,38 +1669,17 @@
<widget>
<class>GtkLabel</class>
<name>label106</name>
<label>Place</label>
<name>event_details</name>
<label></label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GnomeEntry</class>
<name>eDescBox</name>
<history_id>event_description</history_id>
<max_saved>15</max_saved>
<child>
<left_attach>1</left_attach>
<right_attach>3</right_attach>
<right_attach>2</right_attach>
<top_attach>3</top_attach>
<bottom_attach>4</bottom_attach>
<xpad>3</xpad>
@ -1600,170 +1691,6 @@
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GnomeEntry:entry</child_name>
<name>eventDescription</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>GtkEntry</class>
<name>eventDate</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>personalEvents</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>eventName</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>GtkButton</class>
<name>event_source</name>
<tooltip>Edit source information for the highlighted event</tooltip>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_showsource_clicked</handler>
<object>eventList</object>
<last_modification_time>Thu, 11 Jan 2001 04:08:33 GMT</last_modification_time>
</signal>
<label>Source</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>5</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>event_note</name>
<tooltip>Edit note information for the highlighted event</tooltip>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_event_note_clicked</handler>
<object>eventList</object>
<last_modification_time>Tue, 29 May 2001 15:07:23 GMT</last_modification_time>
</signal>
<label>Note</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>5</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>eventPlace_combo</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<left_attach>1</left_attach>
<right_attach>3</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>eventPlace</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
</widget>
@ -1839,7 +1766,7 @@
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>event_details</name>
<name>eventDetails</name>
<label>Details</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
@ -1894,7 +1821,7 @@
<object>eventList</object>
<last_modification_time>Fri, 01 Dec 2000 02:58:32 GMT</last_modification_time>
</signal>
<label>Update</label>
<label>Edit</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
@ -3331,4 +3258,528 @@
</widget>
</widget>
<widget>
<class>GtkDialog</class>
<name>event_edit</name>
<title>Gramps - Event Editor</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>True</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<widget>
<class>GtkVBox</class>
<child_name>Dialog:vbox</child_name>
<name>dialog-vbox1</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkHBox</class>
<child_name>Dialog:action_area</child_name>
<name>dialog-action_area1</name>
<border_width>10</border_width>
<homogeneous>True</homogeneous>
<spacing>5</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
<pack>GTK_PACK_END</pack>
</child>
<widget>
<class>GtkHButtonBox</class>
<name>hbuttonbox18</name>
<layout_style>GTK_BUTTONBOX_END</layout_style>
<spacing>30</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkButton</class>
<name>button111</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_event_edit_ok_clicked</handler>
<object>event_edit</object>
<last_modification_time>Thu, 26 Jul 2001 20:29:11 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>button112</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_event_edit_apply_clicked</handler>
<object>event_edit</object>
<last_modification_time>Thu, 26 Jul 2001 20:29:24 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>button113</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>destroy_passed_object</handler>
<object>event_edit</object>
<last_modification_time>Thu, 26 Jul 2001 19:16:49 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
</widget>
<widget>
<class>GtkVBox</class>
<name>vbox29</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>eventTitle</name>
<label>Event Editor</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>10</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator1</name>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkTable</class>
<name>table21</name>
<rows>6</rows>
<columns>2</columns>
<homogeneous>False</homogeneous>
<row_spacing>0</row_spacing>
<column_spacing>0</column_spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label154</name>
<label>Event Type</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label155</name>
<label>Date</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label156</name>
<label>Description</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>3</top_attach>
<bottom_attach>4</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label157</name>
<label>Place</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GnomeEntry</class>
<name>eDescBox</name>
<history_id>event_description</history_id>
<max_saved>15</max_saved>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>3</top_attach>
<bottom_attach>4</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GnomeEntry:entry</child_name>
<name>eventDescription</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>GtkCombo</class>
<name>eventPlace_combo</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>eventPlace</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<name>label158</name>
<label>Source</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0.5</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>4</top_attach>
<bottom_attach>5</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>personalEvents</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>eventName</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>GtkEntry</class>
<name>eventDate</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow21</name>
<width>400</width>
<height>150</height>
<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>5</top_attach>
<bottom_attach>6</bottom_attach>
<xpad>3</xpad>
<ypad>3</ypad>
<xexpand>False</xexpand>
<yexpand>True</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
<widget>
<class>GtkText</class>
<name>eventNote</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text></text>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<name>label159</name>
<label>Note</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>1</xalign>
<yalign>0</yalign>
<xpad>5</xpad>
<ypad>8</ypad>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>5</top_attach>
<bottom_attach>6</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox21</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>4</top_attach>
<bottom_attach>5</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
<widget>
<class>GtkEntry</class>
<name>event_source</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
<child>
<padding>3</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>button114</name>
<border_width>3</border_width>
<tooltip>Edit source information for the highlighted event</tooltip>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_showsource_clicked</handler>
<object>eventList</object>
<last_modification_time>Thu, 11 Jan 2001 04:08:33 GMT</last_modification_time>
</signal>
<label>Edit Source</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>3</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
</GTK-Interface>

View File

@ -90,6 +90,7 @@ class EditPerson:
self.event_place_field = self.get_widget("eventPlace")
self.event_date_field = self.get_widget("eventDate")
self.event_descr_field = self.get_widget("eventDescription")
self.event_details_field = self.get_widget("event_details")
self.photo_list = self.get_widget("photolist")
self.attr_list = self.get_widget("attr_list")
self.attr_type = self.get_widget("attr_type")
@ -112,7 +113,7 @@ class EditPerson:
self.alt_given_field = self.get_widget("alt_given")
self.alt_last_field = self.get_widget("alt_last")
self.alt_suffix_field = self.get_widget("alt_suffix")
self.surname = self.get_widget("surname")
self.surname_field = self.get_widget("surname")
self.suffix = self.get_widget("suffix")
self.given = self.get_widget("givenName")
self.nick = self.get_widget("nickname")
@ -123,8 +124,6 @@ class EditPerson:
self.dplace = self.get_widget("deathPlace")
self.is_male = self.get_widget("genderMale")
self.is_female = self.get_widget("genderFemale")
self.event_note = self.get_widget("event_note")
self.event_source = self.get_widget("event_source")
self.addr_note = self.get_widget("addr_note")
self.addr_source = self.get_widget("addr_source")
self.attr_note = self.get_widget("attr_note")
@ -169,7 +168,6 @@ class EditPerson:
"on_photolist_button_press_event" : on_photolist_button_press_event,
"on_addphoto_clicked" : on_add_photo_clicked,
"on_deletephoto_clicked" : on_delete_photo_clicked,
"on_event_note_clicked" : on_event_note_clicked,
"on_showsource_clicked" : on_showsource_clicked,
"on_applyPerson_clicked" : on_apply_person_clicked
})
@ -178,11 +176,6 @@ class EditPerson:
self.surname_list.sort()
self.get_widget("lastNameList").set_popdown_strings(self.surname_list)
event_names = self.get_widget("personalEvents")
event_names.set_popdown_strings(const.personalEvents)
event_names.entry.set_text("")
attr_names = self.get_widget("attribute")
attr_names.set_popdown_strings(const.personalAttributes)
attr_names.entry.set_text("")
@ -199,7 +192,7 @@ class EditPerson:
if len(const.places) > 0:
self.get_widget("dp_combo").set_popdown_strings(const.places)
self.get_widget("bp_combo").set_popdown_strings(const.places)
self.get_widget("eventPlace_combo").set_popdown_strings(const.places)
# self.get_widget("eventPlace_combo").set_popdown_strings(const.places)
if Config.display_attr:
self.get_widget("user_label").set_text(Config.attr_name)
@ -217,7 +210,8 @@ class EditPerson:
# initial values
self.get_widget("activepersonTitle").set_text(Config.nameof(person))
self.suffix.set_text(name.getSuffix())
self.surname.set_text(name.getSurname())
self.surname_field.set_text(name.getSurname())
self.given.set_text(name.getFirstName())
if person.getGender() == Person.male:
@ -449,11 +443,6 @@ class EditPerson:
current_row = current_row - 1
self.event_list.select_row(current_row,0)
self.event_list.moveto(current_row,0)
self.event_note.set_sensitive(1)
self.event_source.set_sensitive(1)
else:
self.event_note.set_sensitive(0)
self.event_source.set_sensitive(0)
self.event_list.set_data(INDEX,current_row)
self.event_list.thaw()
@ -497,6 +486,7 @@ class EditPerson:
def load_photo(self,photo):
self.get_widget("personPix").load_file(photo)
#-------------------------------------------------------------------------
#
# on_name_list_select_row - sets the row object attached to the passed
@ -811,30 +801,7 @@ def on_add_address_clicked(obj):
def on_event_add_clicked(obj):
edit_person_obj = obj.get_data(EDITPERSON)
date = edit_person_obj.event_date_field.get_text()
place= edit_person_obj.event_place_field.get_text()
name = edit_person_obj.event_name_field.get_text()
desc = edit_person_obj.event_descr_field.get_text()
event = Event()
event.set(name,date,place,desc)
if name not in const.personalEvents:
const.personalEvents.append(name)
menu = edit_person_obj.get_widget("personalEvents")
menu.set_popdown_strings(const.personalEvents)
if place not in const.places:
const.places.append(place)
const.places.sort()
edit_person_obj.get_widget("dp_combo").set_popdown_strings(const.places)
edit_person_obj.get_widget("bp_combo").set_popdown_strings(const.places)
edit_person_obj.get_widget("eventPlace_combo").set_popdown_strings(const.places)
edit_person_obj.person.addEvent(event)
edit_person_obj.redraw_event_list()
utils.modified()
editor = EventEditor(edit_person_obj,None)
#-------------------------------------------------------------------------
#
@ -877,19 +844,7 @@ def on_event_update_clicked(obj):
edit_person_obj = obj.get_data(EDITPERSON)
event = obj.get_row_data(row)
date = edit_person_obj.event_date_field.get_text()
place = edit_person_obj.event_place_field.get_text()
name = edit_person_obj.event_name_field.get_text()
desc = edit_person_obj.event_descr_field.get_text()
if name not in const.personalEvents:
const.personalEvents.append(name)
menu = edit_person_obj.get_widget("personalEvents")
menu.set_popdown_strings(const.personalEvents)
update_event(event,name,date,place,desc)
edit_person_obj.redraw_event_list()
editor = EventEditor(edit_person_obj,event)
#-------------------------------------------------------------------------
#
@ -905,9 +860,20 @@ def on_event_select_row(obj,row,b,c):
edit_person_obj = obj.get_data(EDITPERSON)
edit_person_obj.event_date_field.set_text(event.getDate())
edit_person_obj.event_place_field.set_text(event.getPlace())
edit_person_obj.event_name_field.set_text(const.display_pevent(event.getName()))
edit_person_obj.event_name_field.set_label(const.display_pevent(event.getName()))
edit_person_obj.event_descr_field.set_text(event.getDescription())
if event.getNote() != "":
details = _("Note")
else:
details = ""
if event.getSourceRef().getBase() != None:
if details == "":
details = _("Source")
else:
details = "%s, %s" % (_("Note"),_("Source"))
edit_person_obj.event_details_field.set_text(details)
#-------------------------------------------------------------------------
#
#
@ -978,7 +944,7 @@ def on_primary_photo_clicked(obj):
# actually changed.
#
#-------------------------------------------------------------------------
def update_event(event,name,date,place,desc):
def update_event(event,name,date,place,desc,note):
if event.getPlace() != place:
event.setPlace(place)
utils.modified()
@ -991,6 +957,10 @@ def update_event(event,name,date,place,desc):
event.setDescription(desc)
utils.modified()
if event.getNote() != note:
event.setNote(note)
utils.modified()
if event.getDate() != date:
event.setDate(date)
utils.modified()
@ -1189,31 +1159,6 @@ def on_save_note_clicked(obj):
utils.destroy_passed_object(obj)
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_event_note_clicked(obj):
row = obj.get_data(INDEX)
data = obj.get_row_data(row)
edit_person_obj = obj.get_data(EDITPERSON)
if row >= 0:
editnote = libglade.GladeXML(const.editnoteFile,"editnote")
textobj = editnote.get_widget("notetext")
en_obj = editnote.get_widget("editnote")
en_obj.set_data("n",data)
en_obj.set_data("w",textobj)
textobj.set_point(0)
textobj.insert_defaults(data.getNote())
textobj.set_word_wrap(1)
editnote.signal_autoconnect({
"on_save_note_clicked" : on_save_note_clicked,
"destroy_passed_object" : utils.destroy_passed_object
})
#-------------------------------------------------------------------------
#
#
@ -1468,3 +1413,73 @@ def on_browse_clicked(obj):
if path != "":
gnome.url.show(path)
#-------------------------------------------------------------------------
#
# EventEditor class
#
#-------------------------------------------------------------------------
class EventEditor:
def __init__(self,parent,event):
self.parent = parent
self.event = event
self.top = libglade.GladeXML(const.editPersonFile, "event_edit")
self.window = self.top.get_widget("event_edit")
self.name_field = self.top.get_widget("eventName")
self.place_field = self.top.get_widget("eventPlace")
self.date_field = self.top.get_widget("eventDate")
self.descr_field = self.top.get_widget("eventDescription")
self.note_field = self.top.get_widget("eventNote")
self.event_menu = self.top.get_widget("personalEvents")
name = parent.person.getPrimaryName().getName()
self.top.get_widget("eventTitle").set_text(_("Event Editor for %s") % name)
self.event_menu.set_popdown_strings(const.personalEvents)
if event != None:
self.name_field.set_text(event.getName())
self.place_field.set_text(event.getPlace())
self.date_field.set_text(event.getDate())
self.descr_field.set_text(event.getDescription())
self.note_field.set_point(0)
self.note_field.insert_defaults(event.getNote())
self.note_field.set_word_wrap(1)
self.window.set_data("o",self)
self.top.signal_autoconnect({
"destroy_passed_object" : utils.destroy_passed_object,
"on_event_edit_ok_clicked" : on_event_edit_ok_clicked,
"on_event_edit_apply_clicked" : on_event_edit_apply_clicked
})
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_event_edit_apply_clicked(obj):
ee = obj.get_data("o")
event = ee.event
ename = ee.name_field.get_text()
edate = ee.date_field.get_text()
eplace = ee.place_field.get_text()
enote = ee.note_field.get_chars(0,-1)
edesc = ee.descr_field.get_text()
if event == None:
event = Event()
ee.parent.person.addEvent(event)
update_event(event,ename,edate,eplace,edesc,enote)
ee.parent.redraw_event_list()
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def on_event_edit_ok_clicked(obj):
on_event_edit_apply_clicked(obj)
utils.destroy_passed_object(obj)