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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sat Apr 9 09:07:20 UTC 2011


Revision: 3511
          http://rkward.svn.sourceforge.net/rkward/?rev=3511&view=rev
Author:   tfry
Date:     2011-04-09 09:07:20 +0000 (Sat, 09 Apr 2011)

Log Message:
-----------
Fix various bits of brokenness in the progress control dialog.

Modified Paths:
--------------
    trunk/rkward/rkward/misc/rkprogresscontrol.cpp
    trunk/rkward/rkward/misc/rkprogresscontrol.h
    trunk/rkward/rkward/settings/rksettingsmoduler.cpp

Modified: trunk/rkward/rkward/misc/rkprogresscontrol.cpp
===================================================================
--- trunk/rkward/rkward/misc/rkprogresscontrol.cpp	2011-04-09 09:04:51 UTC (rev 3510)
+++ trunk/rkward/rkward/misc/rkprogresscontrol.cpp	2011-04-09 09:07:20 UTC (rev 3511)
@@ -2,7 +2,7 @@
                           rkprogresscontol  -  description
                              -------------------
     begin                : Sun Sep 10 2006
-    copyright            : (C) 2006, 2007, 2008, 2009, 2010 by Thomas Friedrichsmeier
+    copyright            : (C) 2006, 2007, 2008, 2009, 2010, 2011 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -217,25 +217,24 @@
 	error_indicator->hide ();
 
 	KVBox* output_box = new KVBox ();
-	if (mode_flags & (RKProgressControl::IncludeErrorOutput | RKProgressControl::IncludeRegularOutput)) {
-		QString ocaption;
-		if (mode_flags & RKProgressControl::IncludeRegularOutput) {
-			output_button_text = i18n ("Output");
-			ocaption = i18n ("Output:");
-		} else {
-			output_button_text = i18n ("Errors / Warnings");
-			ocaption = i18n ("Errors / Warnings:");
-		}
-		new QLabel (ocaption, output_box);
-
-		output_text = new QTextEdit (output_box);
-		output_text->setReadOnly (true);
-		output_text->setPlainText (QString ());
-		output_text->setUndoRedoEnabled (false);
-		output_text->setLineWrapMode (QTextEdit::NoWrap);
-		output_text->setMinimumWidth (QFontMetrics (output_text->font ()).averageCharWidth () * RKSettingsModuleR::getDefaultWidth ());
-		output_box->setStretchFactor (output_text, 10);
+	QString ocaption;
+	if (mode_flags & RKProgressControl::IncludeRegularOutput) {
+		output_button_text = i18n ("Output");
+		ocaption = i18n ("Output:");
+	} else {
+		output_button_text = i18n ("Errors / Warnings");
+		ocaption = i18n ("Errors / Warnings:");
 	}
+	new QLabel (ocaption, output_box);
+
+	output_text = new QTextEdit (output_box);
+	output_text->setReadOnly (true);
+	output_text->setPlainText (QString ());
+	output_text->setUndoRedoEnabled (false);
+	output_text->setLineWrapMode (QTextEdit::NoWrap);
+	output_text->setMinimumWidth (QFontMetrics (output_text->font ()).averageCharWidth () * RKSettingsModuleR::getDefaultWidth ());
+	output_box->setStretchFactor (output_text, 10);
+
 	setDetailsWidget (output_box);
 	// it's important to use a queued connection, here. Otherwise, if the details widget gets shown due to error output, scrollDown() would only scroll to the position directly *above* the new output.
 	connect (this, SIGNAL(aboutToShowDetails()), this, SLOT(scrollDown()), Qt::QueuedConnection);

Modified: trunk/rkward/rkward/misc/rkprogresscontrol.h
===================================================================
--- trunk/rkward/rkward/misc/rkprogresscontrol.h	2011-04-09 09:04:51 UTC (rev 3510)
+++ trunk/rkward/rkward/misc/rkprogresscontrol.h	2011-04-09 09:07:20 UTC (rev 3511)
@@ -2,7 +2,7 @@
                           rkprogresscontol  -  description
                              -------------------
     begin                : Sun Sep 10 2006
-    copyright            : (C) 2006, 2007, 2009 by Thomas Friedrichsmeier
+    copyright            : (C) 2006, 2007, 2009, 2011 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -61,11 +61,10 @@
 		OutputSwitchable=128,		/**< the textfield with the output can be shown/hidden by the user */
 		ShowAtOnce=256,				/**< dialog is shown at once, instead of only when there is an error/output */
 		PreventClose=512,				/**< do not accept close events */
-		StandardCancel=AllowCancel | ShowAtOnce | OutputSwitchable | PreventClose,
 		StandardError=IncludeErrorOutput | RaiseOnError | OutputShownByDefault,
 		DetailedError=StandardError | IncludeRegularOutput,
 		StandardProgress=DetailedError | OutputSwitchable | RaiseOnRegularOutput,
-		CancellableProgress=(StandardProgress | StandardCancel) - (OutputShownByDefault | RaiseOnRegularOutput)
+		CancellableProgress=(StandardProgress | AllowCancel | AutoCancelCommands | PreventClose | ShowAtOnce) - (RaiseOnRegularOutput | OutputShownByDefault)
 	};
 
 /** show the dialog modal. This will always show the dialog right away

Modified: trunk/rkward/rkward/settings/rksettingsmoduler.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2011-04-09 09:04:51 UTC (rev 3510)
+++ trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2011-04-09 09:07:20 UTC (rev 3511)
@@ -407,7 +407,7 @@
 	
 	RCommand* command = new RCommand ("rk.select.CRAN.mirror()\n", RCommand::App | RCommand::GetStringVector, title, this, SELECT_CRAN_MIRROR_COMMAND);
 
-	RKProgressControl* control = new RKProgressControl (this, title, title, RKProgressControl::StandardCancel);
+	RKProgressControl* control = new RKProgressControl (this, title, title, RKProgressControl::CancellableProgress);
 	control->addRCommand (command, true);
 	RKGlobals::rInterface ()->issueCommand (command);
 	control->doModal (true);


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