diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index bdddd4d58..1dc0eeea5 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2005-04-28 Alex Roitman + * src/EditPlace.py (on_add_url_clicked,on_update_url_clicked): + Use empty name when not available. + * src/UrlEdit.py (__init__): Work with empty names. + 2005-04-29 Eero Tamminen * src/dates/Date_fi.py: initial Finnish date parser, doesn't yet work correctly diff --git a/gramps2/src/EditPlace.py b/gramps2/src/EditPlace.py index 97624a79c..b4c2ce35a 100644 --- a/gramps2/src/EditPlace.py +++ b/gramps2/src/EditPlace.py @@ -418,10 +418,9 @@ class EditPlace: if node: row = store.get_path(node) url = self.ulist[row[0]] - if url: - name = _("Internet Address Editor for %s") % self.place.get_title() - else: - name = _("Internet Address Editor") + name = "" + if self.place: + name = self.place.get_title() UrlEdit.UrlEditor(self,name,url,self.url_edit_callback) def on_update_loc_clicked(self,obj): @@ -445,10 +444,9 @@ class EditPlace: def on_add_url_clicked(self,obj): import UrlEdit + name = "" if self.place: - name = _("Internet Address Editor for %s") % self.place.get_title() - else: - name = _("Internet Address Editor") + name = self.place.get_title() UrlEdit.UrlEditor(self,name,None,self.url_edit_callback) def url_edit_callback(self,url): diff --git a/gramps2/src/UrlEdit.py b/gramps2/src/UrlEdit.py index 78c3ace1c..492b6affa 100644 --- a/gramps2/src/UrlEdit.py +++ b/gramps2/src/UrlEdit.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# python modules +# +#------------------------------------------------------------------------- +from gettext import gettext as _ + #------------------------------------------------------------------------- # # GTK/Gnome modules @@ -36,7 +43,6 @@ import gnome import const import Utils import RelLib -from gettext import gettext as _ #------------------------------------------------------------------------- # @@ -64,7 +70,7 @@ class UrlEditor: self.priv = self.top.get_widget("priv") title_label = self.top.get_widget("title") - if name == ", ": + if not name or name == ", ": etitle =_('Internet Address Editor') else: etitle =_('Internet Address Editor for %s') % name,