diff --git a/src/glade/editmediaref.glade b/src/glade/editmediaref.glade index 2c86daa68..ea5b36964 100644 --- a/src/glade/editmediaref.glade +++ b/src/glade/editmediaref.glade @@ -1,4 +1,4 @@ - + @@ -7,7 +7,6 @@ 600 450 dialog - False True @@ -33,7 +32,9 @@ True 0 - Corner 2: X + _Corner 2: X + True + corner2_x 1 @@ -49,6 +50,8 @@ True 0 Y coordinate|Y + True + corner2_y 3 @@ -80,7 +83,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 +102,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 @@ -149,7 +152,9 @@ Select a region with clicking and holding the mouse button on the top left corne True 0 - Corner 1: X + _Corner 1: X + True + corner1_x 1 @@ -167,7 +172,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 +191,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 @@ -204,6 +209,8 @@ You can use the mouse on the picture to select a region, or use these spinbutton True 0 Y coordinate|Y + True + corner1_y 3 @@ -234,10 +241,20 @@ You can use the mouse on the picture to select a region, or use these spinbutton True True none + + + Private + + True gtk-dialog-authentication + + + Privacy + + 1 @@ -308,8 +325,8 @@ You can use the mouse on the picture to select a region, or use these spinbutton True 12 - 5 - 3 + 7 + 4 12 6 @@ -319,12 +336,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 +386,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 +432,8 @@ You can use the mouse on the picture to select a region, or use these spinbutton 3 - 4 - 5 + 6 + 7 GTK_FILL @@ -447,7 +465,7 @@ You can use the mouse on the picture to select a region, or use these spinbutton - 4 + 5 GTK_FILL GTK_FILL @@ -456,15 +474,14 @@ You can use the mouse on the picture to select a region, or use these spinbutton True 0 - _Type: - True + Type: type 1 2 - 3 - 4 + 5 + 6 GTK_FILL @@ -478,89 +495,34 @@ You can use the mouse on the picture to select a region, or use these spinbutton 2 3 - 3 - 4 + 5 + 6 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_entry - 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 +532,193 @@ You can use the mouse on the picture to select a region, or use these spinbutton + + + True + True + True + True + Invoke date editor + none + + + + + + Date + + + + + True + gramps-date + + + Date + + + + + + + 3 + 4 + 2 + 3 + GTK_FILL + + + + + + True + True + True + none + + + Private + + + + + True + gtk-dialog-authentication + + + Privacy + + + 1 + + + + + 3 + 4 + + + + + True + True + + + + 2 + 3 + + + + + True + True + True + True + Select a file + none + + + + + + Path + + + + + True + gtk-open + + + Folder + + + 1 + + + + + 3 + 4 + 3 + 4 + + + + + True + True + + + + 2 + 3 + 3 + 4 + + + + + True + 0 + _Tags: + True + tag_button + + + 1 + 2 + 4 + 5 + GTK_FILL + + + + + + True + + + 2 + 3 + 4 + 5 + + + + + True + True + True + + + + + + Tags + + + + + 3 + 4 + 4 + 5 + + + + + + + + + + + + + + diff --git a/src/gui/editors/editmediaref.py b/src/gui/editors/editmediaref.py index 2694ba50c..0854f0da3 100644 --- a/src/gui/editors/editmediaref.py +++ b/src/gui/editors/editmediaref.py @@ -52,7 +52,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, MonitoredTagList) from editreference import RefTab, EditReference from addmedia import AddMediaObject @@ -149,6 +150,7 @@ class EditMediaRef(EditReference): self.subpixmap.set_from_pixbuf(pb) def _setup_fields(self): + ebox_shared = self.top.get_object('eventbox') ebox_shared.connect('button-press-event', self.button_press_event) @@ -252,6 +254,22 @@ 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) + + 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) def set_corner1_x(self, value): """