diff --git a/ChangeLog b/ChangeLog index 5ad1640d0..4ea6148bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 2006-12-11 Don Allingham + * 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 diff --git a/src/Editors/_EditMedia.py b/src/Editors/_EditMedia.py index d761a4340..78632ff07 100644 --- a/src/Editors/_EditMedia.py +++ b/src/Editors/_EditMedia.py @@ -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)