From 7c6cba4faecf176bea6a1bb6a239f442fcf4bc0b Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 13 Aug 2010 06:42:14 +0000 Subject: [PATCH] New check for updated addons svn: r15721 --- src/config.py | 2 ++ src/gen/plug/utils.py | 5 +++-- src/gui/viewmanager.py | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/config.py b/src/config.py index 4837281fa..5bea001f7 100644 --- a/src/config.py +++ b/src/config.py @@ -127,6 +127,8 @@ register('behavior.addmedia-relative-path', False) register('behavior.autoload', False) register('behavior.avg-generation-gap', 20) register('behavior.betawarn', False) +register('behavior.check-for-updates', 0) +register('behavior.last-check-for-updates', "1970/01/01") register('behavior.database-path', os.path.join( const.HOME_DIR, 'grampsdb')) register('behavior.date-about-range', 50) register('behavior.date-after-range', 50) diff --git a/src/gen/plug/utils.py b/src/gen/plug/utils.py index d5555c350..87eeaa6dd 100644 --- a/src/gen/plug/utils.py +++ b/src/gen/plug/utils.py @@ -249,6 +249,7 @@ def load_addon_file(path, callback=None, register_plugin=None): # There can be multiple addons per gpr file: for results in globals()["register_results"]: gramps_target_version = results.get("gramps_target_version", None) + id = results.get("id", None) if gramps_target_version: vtup = version_str_to_tup(gramps_target_version, 2) # Is it for the right version of gramps? @@ -256,11 +257,11 @@ def load_addon_file(path, callback=None, register_plugin=None): # If this version is not installed, or > installed, install it good_gpr.add(gpr_file) if callback: - callback(" " + (_("'%s' is for this version of Gramps.") % gpr_file) + "\n") + callback(" " + (_("'%s' is for this version of Gramps.") % id) + "\n") else: # If the plugin is for another version; inform and do nothing if callback: - callback(" " + (_("'%s' is NOT for this version of Gramps.") % gpr_file) + "\n") + callback(" " + (_("'%s' is NOT for this version of Gramps.") % id) + "\n") callback(" " + (_("It is for version %d.%d" % vtup) + "\n")) continue else: diff --git a/src/gui/viewmanager.py b/src/gui/viewmanager.py index 65ec1a025..71a3020cd 100644 --- a/src/gui/viewmanager.py +++ b/src/gui/viewmanager.py @@ -309,9 +309,9 @@ class ViewManager(CLIManager): if (version_str_to_tup(plugin_dict["v"], 3) > version_str_to_tup(plugin.version, 3)): print(" Downloading '%s'..." % plugin_dict["z"]) - load_addon_file("%s/download/%s" % - (SOURCEFORGE, plugin_dict["z"]), - callback=print) + #load_addon_file("%s/download/%s" % + # (SOURCEFORGE, plugin_dict["z"]), + # callback=print) else: print(" '%s' is ok" % plugin_dict["n"]) else: