[rkward-cvs] SF.net SVN: rkward:[4244] trunk/rkward/rkward/plugin/rkstandardcomponent. cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue May 8 18:13:23 UTC 2012


Revision: 4244
          http://rkward.svn.sourceforge.net/rkward/?rev=4244&view=rev
Author:   tfry
Date:     2012-05-08 18:13:22 +0000 (Tue, 08 May 2012)
Log Message:
-----------
Do not try to build dialog, if only wizard is defined.

Modified Paths:
--------------
    trunk/rkward/rkward/plugin/rkstandardcomponent.cpp

Modified: trunk/rkward/rkward/plugin/rkstandardcomponent.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkstandardcomponent.cpp	2012-05-03 08:02:41 UTC (rev 4243)
+++ trunk/rkward/rkward/plugin/rkstandardcomponent.cpp	2012-05-08 18:13:22 UTC (rev 4244)
@@ -2,7 +2,7 @@
                           rkstandardcomponent  -  description
                              -------------------
     begin                : Sun Feb 19 2006
-    copyright            : (C) 2006, 2007, 2009, 2010, 2011 by Thomas Friedrichsmeier
+    copyright            : (C) 2006, 2007, 2009, 2010, 2011, 2012 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -226,15 +226,18 @@
 
 	dialog_element = xml->getChildElement (doc_element, "dialog", DL_INFO);
 	wizard_element = xml->getChildElement (doc_element, "wizard", DL_INFO);
-	if (!wizard_element.isNull ()) {
-		build_wizard = xml->getBoolAttribute (wizard_element, "recommended", false, DL_INFO);
-	}
 
 	if (force_mode == 0) {
-		if (RKSettingsModulePlugins::getInterfacePreference () == RKSettingsModulePlugins::PreferDialog) {
-			if (!dialog_element.isNull ()) build_wizard = false;
-		} else if (RKSettingsModulePlugins::getInterfacePreference () == RKSettingsModulePlugins::PreferWizard) {
-			if (!wizard_element.isNull ()) build_wizard = true;
+		if (wizard_element.isNull ()) build_wizard = false;
+		else if (dialog_element.isNull ()) build_wizard = true;
+		else {	// both are given
+			if (RKSettingsModulePlugins::getInterfacePreference () == RKSettingsModulePlugins::PreferDialog) {
+				build_wizard = false;
+			} else if (RKSettingsModulePlugins::getInterfacePreference () == RKSettingsModulePlugins::PreferWizard) {
+				build_wizard = true;
+			} else {
+				build_wizard = xml->getBoolAttribute (wizard_element, "recommended", false, DL_INFO);
+			}
 		}
 	} else if (force_mode == 1) {
 		build_wizard = false;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list