[Spambayes-checkins] spambayes/Outlook2000 addin.py,1.147,1.148

Kenny Pitt kpitt at users.sourceforge.net
Thu Dec 23 19:14:50 CET 2004


Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1047/Outlook2000

Modified Files:
	addin.py 
Log Message:
New version numbering scheme.  All apps now use the same version number, and
the current version information is read from the __init__.py file in the
"spambayes" module.

Float version numbers are no longer used for update checks.  Instead, our
standard string version number format is parsed into a tuple in the format of
the sys.version_info field.  Versions can then be compared based on that
tuple.

Index: addin.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/addin.py,v
retrieving revision 1.147
retrieving revision 1.148
diff -C2 -d -r1.147 -r1.148
*** addin.py	23 Dec 2004 04:34:13 -0000	1.147
--- addin.py	23 Dec 2004 18:14:16 -0000	1.148
***************
*** 45,48 ****
--- 45,49 ----
  
  toolbar_name = "SpamBayes"
+ ADDIN_DISPLAY_NAME = "SpamBayes Outlook Addin"
  
  # If we are not running in a console, redirect all print statements to the
***************
*** 592,606 ****
  
  def CheckLatestVersion(manager):
!     from spambayes.Version import get_version_string, get_version_number, fetch_latest_dict
!     if hasattr(sys, "frozen"):
!         version_number_key = "BinaryVersion"
!         version_string_key = "Full Description Binary"
!     else:
!         version_number_key = "Version"
!         version_string_key = "Full Description"
  
      app_name = "Outlook"
!     cur_ver_string = get_version_string(app_name, version_string_key)
!     cur_ver_num = get_version_number(app_name, version_number_key)
  
      try:
--- 593,602 ----
  
  def CheckLatestVersion(manager):
!     from spambayes.Version import get_current_version, get_version, \
!             get_download_page, fetch_latest_dict
  
      app_name = "Outlook"
!     ver_current = get_current_version()
!     cur_ver_string = ver_current.get_long_version(ADDIN_DISPLAY_NAME)
  
      try:
***************
*** 608,615 ****
          latest = fetch_latest_dict()
          SetWaitCursor(0)
!         latest_ver_string = get_version_string(app_name, version_string_key,
!                                                version_dict=latest)
!         latest_ver_num = get_version_number(app_name, version_number_key,
!                                             version_dict=latest)
      except:
          print "Error checking the latest version"
--- 604,609 ----
          latest = fetch_latest_dict()
          SetWaitCursor(0)
!         ver_latest = get_version(app_name, version_dict=latest)
!         latest_ver_string = ver_latest.get_long_version(ADDIN_DISPLAY_NAME)
      except:
          print "Error checking the latest version"
***************
*** 622,628 ****
          return
  
!     print "Current version is %s, latest is %s." % (cur_ver_num, latest_ver_num)
!     if latest_ver_num > cur_ver_num:
!         url = get_version_string(app_name, "Download Page", version_dict=latest)
          msg = _("You are running %s\r\n\r\nThe latest available version is %s" \
                  "\r\n\r\nThe download page for the latest version is\r\n%s" \
--- 616,622 ----
          return
  
!     print "Current version is %s, latest is %s." % (str(ver_current), str(ver_latest))
!     if ver_latest > ver_current:
!         url = get_download_page(app_name, version_dict=latest)
          msg = _("You are running %s\r\n\r\nThe latest available version is %s" \
                  "\r\n\r\nThe download page for the latest version is\r\n%s" \
***************
*** 1282,1291 ****
              # Only now will the import of "spambayes.Version" work, as the
              # manager is what munges sys.path for us.
!             from spambayes.Version import get_version_string
!             version_key = "Full Description"
!             if hasattr(sys, "frozen"): version_key += " Binary"
!             print "%s starting (with engine %s)" % \
!                     (get_version_string("Outlook", version_key),
!                      get_version_string())
              major, minor, spack, platform, ver_str = win32api.GetVersionEx()
              print "on Windows %d.%d.%d (%s)" % \
--- 1276,1284 ----
              # Only now will the import of "spambayes.Version" work, as the
              # manager is what munges sys.path for us.
!             from spambayes.Version import get_current_version
!             v = get_current_version()
!             vstring = v.get_long_version(ADDIN_DISPLAY_NAME)
!             if not hasattr(sys, "frozen"): vstring += " from source"
!             print vstring
              major, minor, spack, platform, ver_str = win32api.GetVersionEx()
              print "on Windows %d.%d.%d (%s)" % \



More information about the Spambayes-checkins mailing list