diff --git a/src/glade/editmediaref.glade b/src/glade/editmediaref.glade index 2c86daa68..69570b7c3 100644 --- a/src/glade/editmediaref.glade +++ b/src/glade/editmediaref.glade @@ -1,4 +1,4 @@ - + @@ -7,7 +7,6 @@ 600 450 dialog - False True @@ -80,7 +79,7 @@ True If media is an image, select the specific part of the image you want to reference. You can use the mouse on the picture to select a region, or use these spinbuttons to set the top left, and bottom right corner of the referenced region. Point (0,0) is the top left corner of the picture, and (100,100) the bottom right corner. - + adjustment4 1 True @@ -99,7 +98,7 @@ You can use the mouse on the picture to select a region, or use these spinbutton True If media is an image, select the specific part of the image you want to reference. You can use the mouse on the picture to select a region, or use these spinbuttons to set the top left, and bottom right corner of the referenced region. Point (0,0) is the top left corner of the picture, and (100,100) the bottom right corner. - + adjustment3 1 True @@ -167,7 +166,7 @@ Select a region with clicking and holding the mouse button on the top left corne If media is an image, select the specific part of the image you want to reference. You can use the mouse on the picture to select a region, or use these spinbuttons to set the top left, and bottom right corner of the referenced region. Point (0,0) is the top left corner of the picture, and (100,100) the bottom right corner. - + adjustment2 1 True @@ -186,7 +185,7 @@ You can use the mouse on the picture to select a region, or use these spinbutton True If media is an image, select the specific part of the image you want to reference. You can use the mouse on the picture to select a region, or use these spinbuttons to set the top left, and bottom right corner of the referenced region. Point (0,0) is the top left corner of the picture, and (100,100) the bottom right corner. - + adjustment1 1 True @@ -308,8 +307,8 @@ You can use the mouse on the picture to select a region, or use these spinbutton True 12 - 5 - 3 + 6 + 4 12 6 @@ -319,12 +318,13 @@ You can use the mouse on the picture to select a region, or use these spinbutton _Path: True center + path 1 2 - 2 - 3 + 3 + 4 GTK_FILL @@ -368,7 +368,7 @@ You can use the mouse on the picture to select a region, or use these spinbutton True True Descriptive title for this media object. - + 2 @@ -414,8 +414,8 @@ You can use the mouse on the picture to select a region, or use these spinbutton 3 - 4 - 5 + 5 + 6 GTK_FILL @@ -447,7 +447,7 @@ You can use the mouse on the picture to select a region, or use these spinbutton - 4 + 5 GTK_FILL GTK_FILL @@ -463,8 +463,8 @@ You can use the mouse on the picture to select a region, or use these spinbutton 1 2 - 3 - 4 + 4 + 5 GTK_FILL @@ -478,89 +478,34 @@ You can use the mouse on the picture to select a region, or use these spinbutton 2 3 - 3 - 4 + 4 + 5 GTK_FILL - + True - 12 - - - True - True - A unique ID to identify the Media object. - - - - 0 - - - - - True - True - True - none - - - True - gtk-dialog-authentication - 1 - - - - - False - False - 1 - - + 0 + _Date: + True + date_edit - 2 - 3 + 1 + 2 + 2 + 3 GTK_FILL - GTK_FILL + - + True - 12 - - - True - True - - - - 0 - - - - - True - True - True - none - - - True - gtk-open - 1 - - - - - False - False - 1 - - + True + 2 @@ -570,6 +515,101 @@ You can use the mouse on the picture to select a region, or use these spinbutton + + + True + True + True + none + + + True + gramps-date + + + + + 3 + 4 + 2 + 3 + GTK_FILL + + + + + + True + True + True + none + + + True + gtk-dialog-authentication + 1 + + + + + 3 + 4 + + + + + True + True + + + + 2 + 3 + + + + + True + True + True + none + + + True + gtk-open + 1 + + + + + 3 + 4 + 3 + 4 + + + + + True + True + + + + 2 + 3 + 3 + 4 + + + + + + + + + + + diff --git a/src/gui/editors/editmediaref.py b/src/gui/editors/editmediaref.py index 4a8891630..f9d5a1913 100644 --- a/src/gui/editors/editmediaref.py +++ b/src/gui/editors/editmediaref.py @@ -51,7 +51,8 @@ from gen.db import DbTxn from glade import Glade from displaytabs import (SourceEmbedList, AttrEmbedList, MediaBackRefList, NoteTab) -from gui.widgets import MonitoredSpinButton, MonitoredEntry, PrivacyButton +from gui.widgets import (MonitoredSpinButton, MonitoredEntry, PrivacyButton, + MonitoredDate) from editreference import RefTab, EditReference from addmedia import AddMediaObject @@ -146,7 +147,8 @@ class EditMediaRef(EditReference): self.pixmap.set_from_pixbuf(pb) self.subpixmap.set_from_pixbuf(pb) - def _setup_fields(self): + def _setup_fields(self): + ebox_shared = self.top.get_object('eventbox') ebox_shared.connect('button-press-event', self.button_press_event) @@ -249,6 +251,13 @@ class EditMediaRef(EditReference): self.source.set_path, self.source.get_path, self.db.readonly) + + self.date_field = MonitoredDate( + self.top.get_object("date_entry"), + self.top.get_object("date_edit"), + self.source.get_date_object(), + self.uistate, self.track, + self.db.readonly) def set_corner1_x(self, value): """