[rkward-cvs] SF.net SVN: rkward: [1124] branches/release_branch_0.4.5/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Jan 11 18:27:44 UTC 2007


Revision: 1124
          http://svn.sourceforge.net/rkward/?rev=1124&view=rev
Author:   tfry
Date:     2007-01-11 10:27:43 -0800 (Thu, 11 Jan 2007)

Log Message:
-----------
Merge 1119, 1120, 1121, 1122, 1123 from trunk

Modified Paths:
--------------
    branches/release_branch_0.4.5/rkward/ChangeLog
    branches/release_branch_0.4.5/rkward/rkward/agents/rkloadagent.cpp
    branches/release_branch_0.4.5/rkward/rkward/main.cpp
    branches/release_branch_0.4.5/rkward/rkward/plugins/00means/00ttests/00independent_samples/code.php
    branches/release_branch_0.4.5/rkward/rkward/plugins/plots/histogram.php
    branches/release_branch_0.4.5/rkward/rkward/rkward.cpp
    branches/release_branch_0.4.5/rkward/rkward/windows/rkhtmlwindow.cpp
    branches/release_branch_0.4.5/rkward/rkward/windows/rkhtmlwindow.h
    branches/release_branch_0.4.5/rkward/rkward/windows/rkoutputwindow.rc
    branches/release_branch_0.4.5/rkward/rkward/windows/rkworkplace.cpp
    branches/release_branch_0.4.5/rkward/rkward/windows/rkworkplace.h

Modified: branches/release_branch_0.4.5/rkward/ChangeLog
===================================================================
--- branches/release_branch_0.4.5/rkward/ChangeLog	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/ChangeLog	2007-01-11 18:27:43 UTC (rev 1124)
@@ -1,12 +1,16 @@
+--- Version 0.4.5 - DATE
 - TODO: message merge!
 - TODO: test auto-detection of pluginmap path!
 
+- fixed: non-local workspaces would not be loaded
+- fixed: specifying a workspace to load on the command line would only work for full urls
 - new Console RMB actions: "copy selection cleaned" and "run selection"
 - added a basic help system, and some introductory help pages
 - plug-in for skewness and kurtosis added
 - plug-ins for distribution analysis added
 - plug-ins for new plots (stripchart & density plot)
 - enhancements to existing plot plug-ins
+- added refresh output and flush output as toolbar actions
 - removed the "output" menu; entries were moved to "Edit" and "View"
 - always show all top level menus
 - code generated for most plugins cleaned and simplified

Modified: branches/release_branch_0.4.5/rkward/rkward/agents/rkloadagent.cpp
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/agents/rkloadagent.cpp	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/agents/rkloadagent.cpp	2007-01-11 18:27:43 UTC (rev 1124)
@@ -2,7 +2,7 @@
                           rkloadagent  -  description
                              -------------------
     begin                : Sun Sep 5 2004
-    copyright            : (C) 2004 by Thomas Friedrichsmeier
+    copyright            : (C) 2004, 2007 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -37,11 +37,18 @@
 	RK_TRACE (APP);
 	RKWardMainWindow::getMain ()->slotSetStatusBarText (i18n ("Loading Workspace ..."));
 
+	QString filename;
+	if (!url.isLocalFile ()) {
 #if !KDE_IS_VERSION (3, 2, 0)
-	KIO::NetAccess::download (url, tmpfile);
+		KIO::NetAccess::download (url, tmpfile);
 #else
-	KIO::NetAccess::download (url, tmpfile, RKWardMainWindow::getMain ());
+		KIO::NetAccess::download (url, tmpfile, RKWardMainWindow::getMain ());
 #endif
+		filename = tmpfile;
+	} else {
+		filename = url.path ();
+	}
+	
 
 	RCommand *command;
 	
@@ -51,7 +58,7 @@
 		RKGlobals::rInterface ()->issueCommand (command);
 	}
 
-	command = new RCommand ("load (\"" + url.path () + "\")", RCommand::App | RCommand::ObjectListUpdate, QString::null, this, WORKSPACE_LOAD_COMMAND);
+	command = new RCommand ("load (\"" + filename + "\")", RCommand::App | RCommand::ObjectListUpdate, QString::null, this, WORKSPACE_LOAD_COMMAND);
 	RKGlobals::rInterface ()->issueCommand (command);
 
 	RObjectList::getObjectList ()->setWorkspaceURL (url);
@@ -65,7 +72,7 @@
 	RK_TRACE (APP);
 	
 	if (command->getFlags () == WORKSPACE_LOAD_COMMAND) {
-		KIO::NetAccess::removeTempFile (tmpfile);
+		if (!tmpfile.isEmpty ()) KIO::NetAccess::removeTempFile (tmpfile);
 		if (command->failed ()) {
 			KMessageBox::error (0, i18n ("There has been an error opening file '%1':\n%2").arg (RObjectList::getObjectList ()->getWorkspaceURL ().path ()).arg (command->error ()), i18n ("Error loading workspace"));
 			RObjectList::getObjectList ()->setWorkspaceURL (QString::null);

Modified: branches/release_branch_0.4.5/rkward/rkward/main.cpp
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/main.cpp	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/main.cpp	2007-01-11 18:27:43 UTC (rev 1124)
@@ -112,7 +112,7 @@
 		
 		KURL *open_url = 0;
 		if (args->count ()) {
-			open_url = new KURL (args->arg (0));
+			open_url = new KURL (args->makeURL (args->arg (0)));
 		}
 		args->clear();
 		

Modified: branches/release_branch_0.4.5/rkward/rkward/plugins/00means/00ttests/00independent_samples/code.php
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/plugins/00means/00ttests/00independent_samples/code.php	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/plugins/00means/00ttests/00independent_samples/code.php	2007-01-11 18:27:43 UTC (rev 1124)
@@ -23,7 +23,7 @@
 		paste (rk.get.short.name (rk.temp.x), "is greater than", rk.get.short.name (rk.temp.y))
 	      else
 		paste (rk.get.short.name (rk.temp.x), "and", rk.get.short.name (rk.temp.y), "differ"),
-	"Equal variances:", "<? if (!getRK_val ("varequal")) echo "not"; ?> assumed"))
+	"Equal variances", "<? if (!getRK_val ("varequal")) echo "not"; ?> assumed"))
 
 rk.results (list (
 	'Variable Name'=rk.get.description (rk.temp.x),

Modified: branches/release_branch_0.4.5/rkward/rkward/plugins/plots/histogram.php
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/plugins/plots/histogram.php	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/plugins/plots/histogram.php	2007-01-11 18:27:43 UTC (rev 1124)
@@ -14,7 +14,7 @@
 	$giveRkern =  getRK_val ("giveRkern");
 	$x = getRK_val ("x");
 	if ($breaks == "int") {
-		$breaksopt = "breaks =seq (as.integer (min (" . $x . "))-0.5, as.integer (max (" . $x ."))+ 0.5)";
+		$breaksopt = "breaks =seq (floor (min (" . $x . "))-0.5, ceiling (max (" . $x ."))+0.5)";
 		$breaks = "Integers";
 	} else if (!empty ($breaks)) {
 		$breaksopt = "breaks=\"" . $breaks . "\"";

Modified: branches/release_branch_0.4.5/rkward/rkward/rkward.cpp
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/rkward.cpp	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/rkward.cpp	2007-01-11 18:27:43 UTC (rev 1124)
@@ -2,7 +2,7 @@
                           rkward.cpp  -  description
                              -------------------
     begin                : Tue Oct 29 20:06:08 CET 2002
-    copyright            : (C) 2002, 2005, 2006 by Thomas Friedrichsmeier 
+    copyright            : (C) 2002, 2005, 2006, 2007 by Thomas Friedrichsmeier 
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -569,7 +569,7 @@
 void RKWardMainWindow::showRKWardHelp () {
 	RK_TRACE (APP);
 
-	RKWorkplace::mainWorkplace ()->openHelpWindow ("rkward://page/rkward_welcome");
+	RKWorkplace::mainWorkplace ()->openHelpWindow ("rkward://page/rkward_welcome", true);
 	topLevelWidget ()->raise ();
 }
 

Modified: branches/release_branch_0.4.5/rkward/rkward/windows/rkhtmlwindow.cpp
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/windows/rkhtmlwindow.cpp	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/windows/rkhtmlwindow.cpp	2007-01-11 18:27:43 UTC (rev 1124)
@@ -144,6 +144,15 @@
 	return true;
 }
 
+KURL RKHTMLWindow::url () {
+	if (khtmlpart) {
+		return khtmlpart->url ();
+	} else {
+		RK_ASSERT (false);
+		return KURL ();
+	}
+}
+
 void RKHTMLWindow::changeURL (const KURL &url) {
 	updateCaption (url);
 
@@ -203,8 +212,8 @@
 	setIcon (SmallIcon ("text_block"));
 	setCaption (i18n ("Output"));
 
-	outputFlush = new KAction (i18n ("&Flush Output"), 0, 0, this, SLOT (flushOutput ()), actionCollection (), "output_flush");
-	outputRefresh = new KAction (i18n ("&Refresh Output"), 0, 0, this, SLOT (refreshOutput ()), actionCollection (), "output_refresh");
+	outputFlush = new KAction (i18n ("&Flush Output"), "editclear", 0, this, SLOT (flushOutput ()), actionCollection (), "output_flush");
+	outputRefresh = new KAction (i18n ("&Refresh Output"), "reload", 0, this, SLOT (refreshOutput ()), actionCollection (), "output_refresh");
 	print = KStdAction::print (this, SLOT (slotPrint ()), actionCollection (), "print_output");
 	print->setText (i18n ("Print Output"));
 	addCommonActions (actionCollection ());

Modified: branches/release_branch_0.4.5/rkward/rkward/windows/rkhtmlwindow.h
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/windows/rkhtmlwindow.h	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/windows/rkhtmlwindow.h	2007-01-11 18:27:43 UTC (rev 1124)
@@ -59,6 +59,8 @@
 	QString getDescription ();
 	bool isModified ();
 	KParts::Part *getPart ();
+/** Return current url */
+	KURL url ();
 public slots:
 /** this is used for browsing only. Use openURL instead, when calling from outside. */
 	void slotOpenURLRequest (const KURL &url, const KParts::URLArgs &);

Modified: branches/release_branch_0.4.5/rkward/rkward/windows/rkoutputwindow.rc
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/windows/rkoutputwindow.rc	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/windows/rkoutputwindow.rc	2007-01-11 18:27:43 UTC (rev 1124)
@@ -14,4 +14,8 @@
 			<Action name="output_refresh"/>
 		</Menu>
 	</MenuBar>
+	<ToolBar fullWidth="true" name="mainToolBar">
+		<Action name="output_flush"/>
+		<Action name="output_refresh"/>
+	</ToolBar>
 </kpartgui>

Modified: branches/release_branch_0.4.5/rkward/rkward/windows/rkworkplace.cpp
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/windows/rkworkplace.cpp	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/windows/rkworkplace.cpp	2007-01-11 18:27:43 UTC (rev 1124)
@@ -2,7 +2,7 @@
                           rkworkplace  -  description
                              -------------------
     begin                : Thu Sep 21 2006
-    copyright            : (C) 2006 by Thomas Friedrichsmeier
+    copyright            : (C) 2006, 2007 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -130,11 +130,20 @@
 	return true;
 }
 
-void RKWorkplace::openHelpWindow (const KURL &url) {
+void RKWorkplace::openHelpWindow (const KURL &url, bool only_once) {
 	RK_TRACE (APP);
 
 	RKHelpWindow *hw = new RKHelpWindow (view ());
 	if (!url.isEmpty ()) {
+		if (only_once) {
+			RKWorkplaceObjectList help_windows = getObjectList (RKMDIWindow::HelpWindow, RKMDIWindow::AnyState);
+			for (RKWorkplaceObjectList::const_iterator it = help_windows.constBegin (); it != help_windows.constEnd (); ++it) {
+				if (static_cast<RKHelpWindow *> (*it)->url ().equals (url, true)) {
+					(*it)->activate ();
+					return;
+				}
+			}
+		}
 		hw->openURL (url);
 	}
 
@@ -357,7 +366,7 @@
 	} else if (type == "output") {
 		openOutputWindow (specification);
 	} else if (type == "help") {
-		openHelpWindow (specification);
+		openHelpWindow (specification, true);
 	} else {
 		RK_ASSERT (false);
 	}

Modified: branches/release_branch_0.4.5/rkward/rkward/windows/rkworkplace.h
===================================================================
--- branches/release_branch_0.4.5/rkward/rkward/windows/rkworkplace.h	2007-01-11 18:15:11 UTC (rev 1123)
+++ branches/release_branch_0.4.5/rkward/rkward/windows/rkworkplace.h	2007-01-11 18:27:43 UTC (rev 1124)
@@ -2,7 +2,7 @@
                           rkworkplace  -  description
                              -------------------
     begin                : Thu Sep 21 2006
-    copyright            : (C) 2006 by Thomas Friedrichsmeier
+    copyright            : (C) 2006, 2007 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -67,8 +67,9 @@
 @returns false if a local url could not be opened, true for all remote urls, and on success */
 	bool openScriptEditor (const KURL &url=KURL (), bool use_r_highlighting=true, bool read_only=false, const QString &force_caption = QString::null);
 /** Opens a new help window, starting at the given url
- at param url URL to open */
-	void openHelpWindow (const KURL &url=KURL ());
+ at param url URL to open
+ at param only_once if true, checks whether any help window already shows this URL. If so, raise it, but do not open a new window. Else show the new window */
+	void openHelpWindow (const KURL &url=KURL (), bool only_once=false);
 /** Opens a new output window. Currently only a single output window will ever be created. Subsequent calls to the function will not create additional windows right now (but will raise / refresh the output window
 @param url currently ignored! */
 	void openOutputWindow (const KURL &url=KURL ());


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