diff --git a/gramps2/src/EditPerson.py b/gramps2/src/EditPerson.py
index cd9e914d6..d075351a3 100644
--- a/gramps2/src/EditPerson.py
+++ b/gramps2/src/EditPerson.py
@@ -1201,10 +1201,11 @@ class EditPerson:
else:
n = GrampsCfg.nameof(m[idval])
msg1 = _("GRAMPS ID value was not changed.")
- msg2 = _("%(grampsid)s is already used by %(person)s") % {
+ msg2 = _("You have attempted to change the GRAMPS ID to a value "
+ "of %(grampsid)s. This value is already used by %(person)s.") % {
'grampsid' : idval,
'person' : n }
- WarningDialog("%s\n%s" % (msg1,msg2))
+ WarningDialog(msg1,msg2)
if suffix != name.getSuffix():
name.setSuffix(suffix)
diff --git a/gramps2/src/FamilyView.py b/gramps2/src/FamilyView.py
index 091377799..4e6eb110e 100644
--- a/gramps2/src/FamilyView.py
+++ b/gramps2/src/FamilyView.py
@@ -586,8 +586,8 @@ class FamilyView:
list.insert(row,obj)
if (birth_dates_in_order(list) == 0):
- msg = _("Invalid move. Children must be ordered by birth date.")
- WarningDialog(msg)
+ WarningDialog(_("Attempt to Reorder Children Failed"),
+ _("Children must be ordered by their birth dates."))
return
self.family.setChildList(list)
self.load_family()
diff --git a/gramps2/src/QuestionDialog.py b/gramps2/src/QuestionDialog.py
index 501b75126..b4f30f299 100644
--- a/gramps2/src/QuestionDialog.py
+++ b/gramps2/src/QuestionDialog.py
@@ -68,7 +68,7 @@ class QuestionDialog:
self.top.destroy()
class OptionDialog:
- def __init__(self,msg1,msg2,label1,task1,label2,task2):
+ def __init__(self,msg1,msg2,btnmsg1,task1,btnmsg2,task2):
self.xml = gtk.glade.XML(const.errdialogsFile,"optiondialog")
self.top = self.xml.get_widget('optiondialog')
self.top.set_title('')
@@ -81,9 +81,12 @@ class OptionDialog:
label2.set_text(msg2)
label2.set_use_markup(gtk.TRUE)
+ self.xml.get_widget('option1').set_label(btnmsg1)
+ self.xml.get_widget('option2').set_label(btnmsg2)
response = self.top.run()
if response == gtk.RESPONSE_NO:
- task1()
+ if task1:
+ task1()
else:
task2()
self.top.destroy()
@@ -103,24 +106,16 @@ class ErrorDialog:
self.top.destroy()
class WarningDialog:
- def __init__(self,msg):
- title = '%s - GRAMPS' % _('Warning')
+ def __init__(self,msg1,msg2=""):
- self.top = gtk.Dialog()
- self.top.set_title(title)
- label = gtk.Label(msg)
- label.show()
- hbox = gtk.HBox()
- image = gtk.Image()
- image.set_from_stock(gtk.STOCK_DIALOG_WARNING,gtk.ICON_SIZE_DIALOG)
- hbox.set_spacing(10)
- hbox.pack_start(image)
- hbox.add(label)
- self.top.vbox.pack_start(hbox)
- self.top.set_default_size(300,150)
- self.top.add_button(gtk.STOCK_OK,0)
- self.top.set_response_sensitive(0,gtk.TRUE)
- self.top.show_all()
+ self.xml = gtk.glade.XML(const.errdialogsFile,"warndialog")
+ self.top = self.xml.get_widget('warndialog')
+
+ label1 = self.xml.get_widget('label1')
+ label2 = self.xml.get_widget('label2')
+ label1.set_text('%s' % msg1)
+ label1.set_use_markup(gtk.TRUE)
+ label2.set_text(msg2)
self.top.run()
self.top.destroy()
diff --git a/gramps2/src/RelImage.py b/gramps2/src/RelImage.py
index 9412bdc82..86061e4f4 100644
--- a/gramps2/src/RelImage.py
+++ b/gramps2/src/RelImage.py
@@ -104,7 +104,9 @@ def scale_image(path,size):
try:
image1 = gtk.gdk.pixbuf_new_from_file(path)
except:
- WarningDialog(_("Could not load image file %s") % path)
+ WarningDialog(_("Cannot display %s") % path,
+ _('GRAMPS is not able to display the image file. '
+ 'This may be cause by a corrupt file.'))
return gtk.gdk.pixbuf_new_from_file(const.icon)
width = image1.get_width()
@@ -114,7 +116,9 @@ def scale_image(path,size):
try:
return image1.scale_simple(int(scale*width), int(scale*height), gtk.gdk.INTERP_BILINEAR)
except:
- WarningDialog(_("Could not load image file %s") % path)
+ WarningDialog(_("Cannot display %s") % path,
+ _('GRAMPS is not able to display the image file. '
+ 'This may be cause by a corrupt file.'))
return gtk.gdk.pixbuf_new_from_file(const.icon)
#-------------------------------------------------------------------------
diff --git a/gramps2/src/errdialogs.glade b/gramps2/src/errdialogs.glade
index 2388cd042..1080820af 100644
--- a/gramps2/src/errdialogs.glade
+++ b/gramps2/src/errdialogs.glade
@@ -568,4 +568,134 @@
+
+ True
+
+ GTK_WINDOW_TOPLEVEL
+ GTK_WIN_POS_NONE
+ False
+ 450
+ True
+ False
+ True
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ GTK_BUTTONBOX_END
+
+
+
+ True
+ True
+ True
+ gtk-close
+ True
+ GTK_RELIEF_NORMAL
+ -7
+
+
+
+
+ 0
+ False
+ True
+ GTK_PACK_END
+
+
+
+
+
+ 12
+ True
+ 2
+ 3
+ False
+ 0
+ 0
+
+
+
+ True
+ label2
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ True
+ False
+ 0
+ 0.5
+ 6
+ 24
+
+
+ 2
+ 3
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ gtk-dialog-warning
+ 6
+ 0.5
+ 0
+ 0
+ 0
+
+
+ 0
+ 1
+ 0
+ 2
+ fill
+ fill
+
+
+
+
+
+ True
+ label1
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 6
+ 0
+
+
+ 2
+ 3
+ 0
+ 1
+ expand|shrink|fill
+
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+
diff --git a/gramps2/src/gramps.py b/gramps2/src/gramps.py
index 29b7b4fb4..f7bded3be 100755
--- a/gramps2/src/gramps.py
+++ b/gramps2/src/gramps.py
@@ -57,5 +57,5 @@ try:
except:
import DisplayTrace
DisplayTrace.DisplayTrace()
-
+
gtk.mainloop()
diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py
index 9aece17b1..1a4cf76da 100755
--- a/gramps2/src/gramps_main.py
+++ b/gramps2/src/gramps_main.py
@@ -57,7 +57,7 @@ import PlaceView
import FamilyView
import SourceView
-from QuestionDialog import QuestionDialog, ErrorDialog, WarningDialog, SaveDialog
+from QuestionDialog import QuestionDialog, ErrorDialog, WarningDialog, SaveDialog, OptionDialog
import DisplayTrace
import Filter
@@ -115,9 +115,11 @@ class Gramps:
gtk.rc_parse(const.gtkrcFile)
if os.getuid() == 0:
- msg = _("You are running GRAMPS as the 'root' user.\n"
- "This account is not meant for normal application use.")
- WarningDialog(msg)
+ WarningDialog(_("GRAMPS is being run as the 'root' user."),
+ _("This account is not meant for normal appication use. "
+ "Running user applications in the administrative account "
+ "is rarely a wise idea, and can open up potential "
+ "security risks."))
# This will never contain data - It will be replaced by either
# a GrampsXML or GrampsZODB
@@ -533,7 +535,11 @@ class Gramps:
def on_contents_activate(self,obj):
"""Display the GRAMPS manual"""
- WarningDialog('HELP currently not available')
+ WarningDialog(_('HELP is currently not available'),
+ _('Documentation for GRAMPS is currently being '
+ 'developed, but is not yet available for this '
+ 'version.'))
+
# url = gnome.help_display_with_doc_id(self.program,
# "",
# "gramps-manual.sgml",
@@ -544,7 +550,10 @@ class Gramps:
def on_writing_extensions_activate(self,obj):
"""Display the Extending GRAMPS manual"""
- WarningDialog('HELP currently not available')
+ WarningDialog(_('HELP is currently not available'),
+ _('Documentation for GRAMPS is currently being '
+ 'developed, but is not yet available for this '
+ 'version.'))
# import gnome.help
# url = gnome.help.file_find_file("extending-gramps","extending-gramps.sgml")
# if url:
@@ -996,7 +1005,9 @@ class Gramps:
else:
msg = _("Cannot revert to a previous database, since "
"one does not exist")
- WarningDialog(msg)
+ WarningDialog(_('Could Not Revert to the Previous Database.'),
+ _('GRAMPS could not find a previous version of '
+ 'the database'))
def revert_query(self):
const.personalEvents = const.init_personal_event_list()
@@ -1402,7 +1413,7 @@ class Gramps:
self.status_text(_("%s has been bookmarked") % name)
gtk.timeout_add(5000,self.modify_statusbar)
else:
- WarningDialog(_("Could not set bookmark."),
+ WarningDialog(_("Could Not Set a Bookmark."),
_("A bookmark could not be set because no one was selected."))
def on_edit_bookmarks_activate(self,obj):
@@ -1492,7 +1503,6 @@ def set_panel(obj):
#-------------------------------------------------------------------------
if __name__ == '__main__':
import gnome
- import sys
Gramps(None)
gtk.mainloop()