Skip to content
Permalink
Browse files

[FEATURE] clearly mark deprecated plugins in plugin manager

  • Loading branch information
alexbruy committed Sep 11, 2013
1 parent 9ce316d commit 8a27c7656011187b28d4594cd109b9379f8a65ff
@@ -369,6 +369,7 @@
<file>themes/default/pie-chart.png</file>
<file>themes/default/plugin.png</file>
<file>themes/default/pluginExperimental.png</file>
<file>themes/default/pluginDeprecated.png</file>
<file>themes/default/propertyicons/action.svg</file>
<file>themes/default/propertyicons/attributes.png</file>
<file>themes/default/propertyicons/colormap.png</file>
Binary file not shown.
@@ -208,6 +208,7 @@ def exportPluginsToManager(self):
"error" : plugin["error"],
"error_details" : plugin["error_details"],
"experimental" : plugin["experimental"] and "true" or "false",
"deprecated" : plugin["deprecated"] and "true" or "false",
"version_available" : plugin["version_available"],
"zip_repository" : plugin["zip_repository"],
"download_url" : plugin["download_url"],
@@ -71,6 +71,7 @@
"error" unicode, # NULL | broken | incompatible | dependent
"error_details" unicode, # error description
"experimental" boolean, # true if experimental, false if stable
"deprecated" boolean, # true if deprected, false if actual
"version_available" unicode, # available version
"zip_repository" unicode, # the remote repository id
"download_url" unicode, # url for downloading the plugin
@@ -403,6 +404,9 @@ def xmlDownloaded(self):
experimental = False
if pluginNodes.item(i).firstChildElement("experimental").text().strip().upper() in ["TRUE","YES"]:
experimental = True
deprecated = False
if pluginNodes.item(i).firstChildElement("deprecated").text().strip().upper() in ["TRUE","YES"]:
deprecated = True
icon = pluginNodes.item(i).firstChildElement("icon").text().strip()
if icon and not icon.startswith("http"):
icon = "http://%s/%s" % ( QUrl(self.mRepositories[reposName]["url"]).host() , icon )
@@ -427,6 +431,7 @@ def xmlDownloaded(self):
"rating_votes" : pluginNodes.item(i).firstChildElement("rating_votes").text().strip(),
"icon" : icon,
"experimental" : experimental,
"deprecated" : deprecated,
"filename" : fileName,
"installed" : False,
"available" : True,
@@ -645,6 +650,7 @@ def pluginMetadata(fct):
"library" : path,
"pythonic" : True,
"experimental" : pluginMetadata("experimental").strip().upper() in ["TRUE","YES"],
"deprecated" : pluginMetadata("deprecated").strip().upper() in ["TRUE","YES"],
"version_available" : "",
"zip_repository" : "",
"download_url" : path, # warning: local path as url!
@@ -729,7 +735,7 @@ def rebuild(self):
self.mPlugins[key][attrib] = plugin[attrib]
# other remote metadata is preffered:
for attrib in ["name", "description", "about", "category", "tags", "changelog", "author_name", "author_email", "homepage",
"tracker", "code_repository", "experimental", "version_available", "zip_repository",
"tracker", "code_repository", "experimental", "deprecated", "version_available", "zip_repository",
"download_url", "filename", "downloads", "average_vote", "rating_votes"]:
if ( not attrib in translatableAttributes ) or ( attrib == "name" ): # include name!
if plugin[attrib]:
@@ -659,6 +659,14 @@ void QgsPluginManager::showPluginDetails( QStandardItem * item )
" </td></tr>"
"</table>" ).arg( tr( "This plugin is experimental" ) );
};
if ( metadata->value( "deprecated" ) == "true" )
{
html += QString( "<table bgcolor=\"#EEBBCC\" cellspacing=\"2\" cellpadding=\"2\" width=\"100%\">"
" <tr><td width=\"100%\" style=\"color:#660000\">"
" <img src=\":/images/themes/default/pluginDeprecated.png\" width=\"32\"><b>%1</b>"
" </td></tr>"
"</table>" ).arg( tr( "This plugin is deprecated" ) );
};
// if ( metadata->value( "status" ) == t.b.d. )
// {
// html += QString( "<table bgcolor=\"#CCCCFF\" cellspacing=\"2\" cellpadding=\"6\" width=\"100%\">"

0 comments on commit 8a27c76

Please sign in to comment.
You can’t perform that action at this time.