[rkward-cvs] SF.net SVN: rkward-code:[4526] trunk/rkward

tfry at users.sf.net tfry at users.sf.net
Tue Feb 5 14:05:54 UTC 2013


Revision: 4526
          http://sourceforge.net/p/rkward/code/4526
Author:   tfry
Date:     2013-02-05 14:05:52 +0000 (Tue, 05 Feb 2013)
Log Message:
-----------
Don't try to parse dependencies of a non-existant component.

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/doc/rkwardplugins/index.docbook
    trunk/rkward/rkward/windows/rkhtmlwindow.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2013-02-04 21:38:32 UTC (rev 4525)
+++ trunk/rkward/ChangeLog	2013-02-05 14:05:52 UTC (rev 4526)
@@ -7,9 +7,6 @@
 - Easier (de-)activation of RKWard plugin maps using checkboxes (Settings->Configure RKWard->Plugins)
 - Broken or quirky .pluginmap files are reported to the user, completely broken maps are disabled, automatically
 - Implement basic dependency handling for plugins / pluginmaps
-	- NOTES: Contrary to existing documentation, <dependencies> is a top level element, not a child element of <about>
-	- TODO:
-		- Write mail on implementation details
 - Added support for the upcoming R 3.0.0			TODO: Check for any more regressions, before release
 - Added <switch> logic element to switch between several target properties (or fixed values) based on the value of a condition property
 - Sort plugin gains option to sort data.frames by more than one column at a time, and options for type conversion	TODO: adjust test(s)

Modified: trunk/rkward/doc/rkwardplugins/index.docbook
===================================================================
--- trunk/rkward/doc/rkwardplugins/index.docbook	2013-02-04 21:38:32 UTC (rev 4525)
+++ trunk/rkward/doc/rkwardplugins/index.docbook	2013-02-05 14:05:52 UTC (rev 4526)
@@ -1755,7 +1755,7 @@
 
 <chapter id="chapter_about_information">
 <title>Author, license and version information</title>
-<para>So you have written a set of plugins, and you are getting ready to <link linkend="external_plugins">share your work</link>. To make sure users will know what your work is all about, under what terms they can use and distribute it, and whom they should contact about issues or ideas, you should add some information <emphasis>about</emphasis> your plugins. This can be done using the <command><about></command> element. It can be used in either the &pluginmap; or in individual plugin .xml files (in both cases as a direct child of the document tag). When specified in the &pluginmap; it will apply to all plugins. If <command><about></command> is specified in both places, the <command><about></command> information in the plugin .xml file will override that in the &pluginmap; file.</para>
+<para>So you have written a set of plugins, and you are getting ready to <link linkend="external_plugins">share your work</link>. To make sure users will know what your work is all about, under what terms they can use and distribute it, and whom they should contact about issues or ideas, you should add some information <emphasis>about</emphasis> your plugins. This can be done using the <command><about></command> element. It can be used in either the &pluginmap; or in individual plugin .xml files (in both cases as a direct child of the document tag). When specified in the &pluginmap; it will apply to all plugins. If <command><about></command> is specified in both places, the <command><about></command> information in the plugin .xml file will override that in the &pluginmap; file. You can also add an <command><about></command> element to .rkh-pages, which are not connected to a plugin, if there is a need for that.</para>
 <para>Here's an example &pluginmap; file with only a few explanations, below. In cases of doubt, more information may be available from the reference.</para>
 <programlisting>
 <document 

Modified: trunk/rkward/rkward/windows/rkhtmlwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2013-02-04 21:38:32 UTC (rev 4525)
+++ trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2013-02-05 14:05:52 UTC (rev 4526)
@@ -620,19 +620,25 @@
 		khtmlpart->write (renderHelpFragment (element));
 	}
 
-	// "dependencies" section
-	QList<RKComponentDependency> deps = chandle->getDependencies ();
-	if (!deps.isEmpty ()) {
-		khtmlpart->write (startSection ("dependencies", i18n ("Dependencies"), QString (), &anchors, &anchornames));
-		khtmlpart->write (RKComponentDependency::depsToHtml (deps));
+	if (for_component) {
+		// "dependencies" section
+		QList<RKComponentDependency> deps = chandle->getDependencies ();
+		if (!deps.isEmpty ()) {
+			khtmlpart->write (startSection ("dependencies", i18n ("Dependencies"), QString (), &anchors, &anchornames));
+			khtmlpart->write (RKComponentDependency::depsToHtml (deps));
+		}
 	}
 
 	// "about" section
-	element = help_xml.getChildElement (help_doc_element, "about", DL_INFO);
-	if (element.isNull ()) {
-		XMLHelper pluginmap_helper;
-		element = pluginmap_helper.openXMLFile (chandle->getPluginmapFilename (), DL_ERROR);
-		element = pluginmap_helper.getChildElement (element, "about", DL_INFO);
+	if (for_component) {
+		element = component_xml.getChildElement (component_doc_element, "about", DL_INFO);
+		if (element.isNull ()) {
+			XMLHelper pluginmap_helper;
+			element = pluginmap_helper.openXMLFile (chandle->getPluginmapFilename (), DL_ERROR);
+			element = pluginmap_helper.getChildElement (element, "about", DL_INFO);
+		}
+	} else {
+		element = help_xml.getChildElement (help_doc_element, "about", DL_INFO);
 	}
 	if (!element.isNull ()) {
 		RKComponentAboutData about (element);





More information about the rkward-tracker mailing list