From 2fa235ff33d16040fdf97869bfab3d37aabae2a2 Mon Sep 17 00:00:00 2001
From: Shlomi Fish <shlomif@shlomifish.org>
Date: Wed, 16 Mar 2016 12:28:03 +0200
Subject: [PATCH] Fix MfxMessageDialog.

---
 pysollib/tile/menubar.py      | 5 ++++-
 pysollib/tk/menubar.py        | 3 +++
 pysollib/ui/tktile/menubar.py | 4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/pysollib/tile/menubar.py b/pysollib/tile/menubar.py
index 837b1be9..10a72531 100644
--- a/pysollib/tile/menubar.py
+++ b/pysollib/tile/menubar.py
@@ -89,6 +89,9 @@ class PysolMenubarTk(PysolMenubarTkCommon):
     def _calcSelectTileDialogWithPreview(self):
         return SelectTileDialogWithPreview
 
+    def _calc_MfxMessageDialog(self):
+        return MfxMessageDialog
+
     #
     # create the menubar
     #
@@ -112,7 +115,7 @@ class PysolMenubarTk(PysolMenubarTkCommon):
     def mOptTheme(self, *event):
         theme = self.tkopt.theme.get()
         self.app.opt.tile_theme = theme
-        d = MfxMessageDialog(self.top, title=_("Change theme"),
+        d = self._calc_MfxMessageDialog()(self.top, title=_("Change theme"),
                       text=_("""\
 This settings will take effect
 the next time you restart """)+TITLE,
diff --git a/pysollib/tk/menubar.py b/pysollib/tk/menubar.py
index 9922d3fd..9036ebf2 100644
--- a/pysollib/tk/menubar.py
+++ b/pysollib/tk/menubar.py
@@ -80,6 +80,9 @@ class PysolMenubarTk(PysolMenubarTkCommon):
     def _calcSelectTileDialogWithPreview(self):
         return SelectTileDialogWithPreview
 
+    def _calc_MfxMessageDialog(self):
+        return MfxMessageDialog
+
     #
     # create the menubar
     #
diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py
index e5d6feeb..64fd0817 100644
--- a/pysollib/ui/tktile/menubar.py
+++ b/pysollib/ui/tktile/menubar.py
@@ -952,7 +952,7 @@ class PysolMenubarTkCommon:
         if not self.menustate.save_as:
             return
         if not game.Solver_Class:
-            d = MfxMessageDialog(self.top, title=_('Export game error'),
+            d = self._calc_MfxMessageDialog()(self.top, title=_('Export game error'),
                                      text=_('''
 Unsupported game for export.
 '''),
@@ -1353,7 +1353,7 @@ Unsupported game for export.
             except Exception, err:
                 if DEBUG:
                     traceback.print_exc()
-                d = MfxMessageDialog(self.top, title=_('Save game error'),
+                d = self._calc_MfxMessageDialog()(self.top, title=_('Save game error'),
                                      text=_('''
 Error while saving game.