[prev in list] [next in list] [prev in thread] [next in thread]
List: spambayes-checkins
Subject: [Spambayes-checkins] spambayes/windows pop3proxy_tray.py,1.23,1.24
From: anadelonbrin () users ! sourceforge ! net (Tony Meyer)
Date: 2005-03-29 7:59:32
Message-ID: E1DG9lB-000683-8n () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/spambayes/spambayes/windows
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23547/windows
Modified Files:
pop3proxy_tray.py
Log Message:
Add Help menuitem, which at the moment just opens up the troubleshooting guide.
Index: pop3proxy_tray.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/windows/pop3proxy_tray.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** pop3proxy_tray.py 23 Dec 2004 18:14:33 -0000 1.23
--- pop3proxy_tray.py 29 Mar 2005 05:59:25 -0000 1.24
***************
*** 137,140 ****
--- 137,145 ----
1029 : ("Check for latest version", self.CheckVersion),
1030 : ("-", None),
+ # This could become a submenu, like the Outlook plug-in has, at
+ # some point, if necessary. For the moment, the only help is a
+ # simple troubleshooting guide, so we'll just open that.
+ 1031 : ("Help", self.GetHelp),
+ 1032 : ("-", None),
1099 : ("Exit SpamBayes", self.OnExit),
}
***************
*** 505,508 ****
--- 510,542 ----
self.ShowMessage("SpamBayes is not running.")
+ def GetHelp(self):
+ # We don't need to be running for this.
+ self.ShowHTML("troubleshooting.html")
+
+ def ShowHTML(self, url):
+ """Displays the main SpamBayes documentation in your Web browser"""
+ # Stolen from Outlook's Manager.py
+ import sys, os, urllib
+ if urllib.splittype(url)[0] is None: # just a file spec
+ if hasattr(sys, "frozen"):
+ # New binary is in ../docs/sb_server relative to executable.
+ fname = os.path.join(os.path.dirname(sys.argv[0]),
+ "..", "docs", "sb_server", url)
+ if not os.path.isfile(fname):
+ # Still support same directory as to the executable.
+ fname = os.path.join(os.path.dirname(sys.argv[0]), url)
+ else:
+ # ../windows/docs dir
+ fname = os.path.join(os.path.dirname(__file__), "docs", url)
+ fname = os.path.abspath(fname)
+ if not os.path.isfile(fname):
+ self.ShowMessage("Can't find "+url)
+ return
+ url = fname
+ # else assume it is valid!
+ SetWaitCursor(1)
+ os.startfile(url)
+ SetWaitCursor(0)
+
def CheckVersion(self):
# Stolen, with few modifications, from addin.py
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic