* src/Editors/_EditMedia.py: fix menu title (bug#755)

svn: r7784
This commit is contained in:
Don Allingham 2006-12-12 04:57:36 +00:00
parent 8666d4a62a
commit 227cd3b555
2 changed files with 11 additions and 5 deletions

View File

@ -1,4 +1,5 @@
2006-12-11 Don Allingham <don@gramps-project.org>
* src/Editors/_EditMedia.py: fix menu title (bug#755)
* src/GrampsDb/_WriteXML.py: handle XML escapes
* src/DisplayModels/_BaseModel.py: handle ignored values in filtering

View File

@ -67,10 +67,14 @@ class EditMedia(EditPrimary):
def get_menu_title(self):
if self.obj.get_handle():
event_name = self.obj.get_description()
if not event_name:
event_name = str(self.obj.get_type())
dialog_title = _('Media: %s') % event_name
name = self.obj.get_description()
if not name:
name = self.obj.get_path()
if not name:
name = self.obj.get_mime_type()
if not name:
name = _('Note')
dialog_title = _('Media: %s') % name
else:
dialog_title = _('New Media')
return dialog_title
@ -80,7 +84,8 @@ class EditMedia(EditPrimary):
self.glade = gtk.glade.XML(const.gladeFile,
"change_global","gramps")
self.set_window(self.glade.get_widget('change_global'), None, self.get_menu_title())
self.set_window(self.glade.get_widget('change_global'),
None, self.get_menu_title())
width = Config.get(Config.MEDIA_WIDTH)
height = Config.get(Config.MEDIA_HEIGHT)
self.window.resize(width, height)