Update
svn: r2872
This commit is contained in:
parent
ea5a7b5cbb
commit
87621141a1
@ -425,7 +425,7 @@ class EditPerson:
|
|||||||
self.parent.wins_dict[self.original_id] = self
|
self.parent.wins_dict[self.original_id] = self
|
||||||
win_menu_label = GrampsCfg.nameof(self.person)
|
win_menu_label = GrampsCfg.nameof(self.person)
|
||||||
if not win_menu_label.strip():
|
if not win_menu_label.strip():
|
||||||
win_menu_label = _("NewPerson")
|
win_menu_label = _("New Person")
|
||||||
self.win_menu_item = gtk.MenuItem(win_menu_label)
|
self.win_menu_item = gtk.MenuItem(win_menu_label)
|
||||||
self.win_menu_item.set_submenu(gtk.Menu())
|
self.win_menu_item.set_submenu(gtk.Menu())
|
||||||
self.win_menu_item.show()
|
self.win_menu_item.show()
|
||||||
|
@ -131,10 +131,12 @@ class NameEditor:
|
|||||||
|
|
||||||
def on_delete_event(self,obj,b):
|
def on_delete_event(self,obj,b):
|
||||||
self.close_child_windows()
|
self.close_child_windows()
|
||||||
|
self.parent.child_windows.remove(self)
|
||||||
self.remove_itself_from_menu()
|
self.remove_itself_from_menu()
|
||||||
|
|
||||||
def close(self,obj):
|
def close(self,obj):
|
||||||
self.close_child_windows()
|
self.close_child_windows()
|
||||||
|
self.parent.child_windows.remove(self)
|
||||||
self.remove_itself_from_menu()
|
self.remove_itself_from_menu()
|
||||||
Utils.destroy_passed_object(self.window)
|
Utils.destroy_passed_object(self.window)
|
||||||
|
|
||||||
@ -143,13 +145,27 @@ class NameEditor:
|
|||||||
child_window.close()
|
child_window.close()
|
||||||
|
|
||||||
def add_itself_to_menu(self):
|
def add_itself_to_menu(self):
|
||||||
|
if not self.name:
|
||||||
|
label = _("New Name")
|
||||||
|
else:
|
||||||
|
label = self.name.get_name()
|
||||||
|
if not label.strip():
|
||||||
|
label = _("New Name")
|
||||||
|
label = "%s: %s" % (_('Alternate Name'),label)
|
||||||
|
self.parent_menu_item = gtk.MenuItem(label)
|
||||||
|
self.parent_menu_item.set_submenu(gtk.Menu())
|
||||||
|
self.parent_menu_item.show()
|
||||||
|
self.parent.menu.append(self.parent_menu_item)
|
||||||
|
self.menu = self.parent_menu_item.get_submenu()
|
||||||
self.menu_item = gtk.MenuItem(_('Name Editor'))
|
self.menu_item = gtk.MenuItem(_('Name Editor'))
|
||||||
self.menu_item.connect("activate",self.present)
|
self.menu_item.connect("activate",self.present)
|
||||||
self.menu_item.show()
|
self.menu_item.show()
|
||||||
self.parent.menu.append(self.menu_item)
|
self.menu.append(self.menu_item)
|
||||||
|
|
||||||
def remove_itself_from_menu(self):
|
def remove_itself_from_menu(self):
|
||||||
self.menu_item.destroy()
|
self.menu_item.destroy()
|
||||||
|
self.menu.destroy()
|
||||||
|
self.parent_menu_item.destroy()
|
||||||
|
|
||||||
def present(self,obj):
|
def present(self,obj):
|
||||||
self.window.present()
|
self.window.present()
|
||||||
|
Loading…
Reference in New Issue
Block a user