[Spambayes-checkins] spambayes/Outlook2000 addin.py, 1.86,
1.86.2.1 manager.py, 1.69.2.2, 1.69.2.3
Adam Walker
xenogeist at users.sourceforge.net
Tue Aug 5 16:57:37 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1:/tmp/cvs-serv14818/Outlook2000
Modified Files:
Tag: outlook-dialog-branch
addin.py manager.py
Log Message:
Put the about and troubleshooting html files on the toolbar menu.
Index: addin.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/addin.py,v
retrieving revision 1.86
retrieving revision 1.86.2.1
diff -C2 -d -r1.86 -r1.86.2.1
*** addin.py 4 Aug 2003 00:56:07 -0000 1.86
--- addin.py 5 Aug 2003 22:57:35 -0000 1.86.2.1
***************
*** 412,415 ****
--- 412,421 ----
self.manager.SaveBayesPostIncrementalTrain()
+ def ShowAbout(mgr):
+ mgr.ShowHtml("about.html")
+
+ def ShowTroubleshooting(mgr):
+ mgr.ShowHtml("docs/troubleshooting.html")
+
# Event function fired from the "Show Clues" UI items.
def ShowClues(mgr, explorer):
***************
*** 778,781 ****
--- 784,801 ----
Visible=True,
Tag = "SpamBayesCommand.CheckVersion")
+ self._AddControl(popup,
+ constants.msoControlButton,
+ ButtonEvent, (ShowAbout, self.manager,),
+ Caption="About SpamBayes",
+ Enabled=True,
+ Visible=True,
+ Tag = "SpamBayesCommand.ShowAbout")
+ self._AddControl(popup,
+ constants.msoControlButton,
+ ButtonEvent, (ShowTroubleshooting, self.manager,),
+ Caption="Troubleshooting Guide",
+ Enabled=True,
+ Visible=True,
+ Tag = "SpamBayesCommand.ShowTroubleshooting")
# If we are running from Python sources, enable a few extra items
if not hasattr(sys, "frozen"):
Index: manager.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/manager.py,v
retrieving revision 1.69.2.2
retrieving revision 1.69.2.3
diff -C2 -d -r1.69.2.2 -r1.69.2.3
*** manager.py 4 Aug 2003 07:21:14 -0000 1.69.2.2
--- manager.py 5 Aug 2003 22:57:35 -0000 1.69.2.3
***************
*** 724,727 ****
--- 724,748 ----
# And re-save now, just incase Outlook dies on the way down.
self.SaveConfig()
+
+ def ShowHtml(self,fileName):
+ """Displays the main SpamBayes documentation in your Web browser"""
+ import sys, os
+ if hasattr(sys, "frozen"):
+ # Same directory as to the executable.
+ fname = os.path.join(os.path.dirname(sys.argv[0]),
+ fileName)
+ else:
+ # (ie, main Outlook2000) dir
+ fname = os.path.join(os.path.dirname(__file__),
+ fileName)
+ fname = os.path.abspath(fname)
+ from dialogs import SetWaitCursor
+ if os.path.isfile(fname):
+ SetWaitCursor(1)
+ os.startfile(fname)
+ SetWaitCursor(0)
+ else:
+ print "Cant find ",fileName," - fix messagebox"
+ #self.MessageBox("Can't find "+fileName)
_mgr = None
More information about the Spambayes-checkins
mailing list