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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sun Mar 25 15:04:10 UTC 2007


Revision: 1721
          http://svn.sourceforge.net/rkward/?rev=1721&view=rev
Author:   tfry
Date:     2007-03-25 08:04:10 -0700 (Sun, 25 Mar 2007)

Log Message:
-----------
When flushing the output, also delete all graphs

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/TODO
    trunk/rkward/rkward/main.cpp
    trunk/rkward/rkward/windows/rkhtmlwindow.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2007-03-25 14:31:31 UTC (rev 1720)
+++ trunk/rkward/ChangeLog	2007-03-25 15:04:10 UTC (rev 1721)
@@ -1,3 +1,4 @@
+- when flushing the output, also delete all graphs
 - add support for a "technical details" section in plugin help files
 - add option to enable / disable single options of a radio or dropdown control in plugins		TODO: document
 - t-test plugin now also allows to calculate a paired test

Modified: trunk/rkward/TODO
===================================================================
--- trunk/rkward/TODO	2007-03-25 14:31:31 UTC (rev 1720)
+++ trunk/rkward/TODO	2007-03-25 15:04:10 UTC (rev 1721)
@@ -266,19 +266,12 @@
 
 ################## cryptic notes ######################
 
-- printutils.c->481 Rvprintf: can we get at the standard out-connection and give it a fake vprintf (or better write?!) and fake fflush?
-	- see also: connections.c line 3246ff InitConnections
-	- seems ok now. But maybe we could still use this to catch immediate warning messages (which go to R_Consolefile)?
-
-tryCatch (message ("a"), error=function (x) {print ("e"); x$message}, warning=function (y) {print ("w"); conditionMessage(y)}, message=function (z) {print ("m"); conditionCall (z)})
-withCallingHandlers ({message ("a"); stop ("b");}, error=function (x) {print ("e"); x$message}, warning=function (y) {print ("w"); conditionMessage(y)}, message=function (z) {print ("c"); conditionCall (z)})
-
-Not quite correct yet:
-	.Internal (.addCondHands (c ("error"), list (function (x) {print ("e"); print (conditionMessage (x))}), parent.frame (), NULL, TRUE))
-
-.Internal (.addCondHands (c ("warning"), list (function (x) {print ("w"); print (conditionCall (x))}), globalenv (), NULL, TRUE))
-
-condition handlers seem to be reset after an error!
-condition handlers do not seem to carry over two separate calls of R_tryEval ().
-
-http://slashdot.org/article.pl?sid=05/06/24/149231&tid=121&tid=188&tid=95&tid=1
+translation of plugins and help files (no, this is not good, yet. Not modular, order gets messed up, context information is lacking. We need a dedicated simple parser that will understand the files it deals with, and extracts the strings with relevant context info).
+in Makefil.am:
+# experimental: extract all messages. Probably it would make sense to split this up, however, perhaps per .pluginmap, or per directory!
+messages:
+	extractrc `find . -name \*.rkh` --tag=title --tag=summary --tag=usage --tag=section --tag=related --tag=technical > messages.cpp
+	extractattr `find . -name \*.rkh` --attr=section,title --attr=section,shorttitle >> messages.cpp
+	extractattr `find . -name \*.pluginmap` --attr=component,label --attr=menu,label --attr=entry,label >> messages.cpp
+	extractrc `find . -name \*.xml` --tag=text >> messages.cpp
+	extractattr `find . -name \*.xml` --attr=dialog,label --attr=wizard,label --attr=tab,label --attr=page,label --attr=frame,label --attr=varselector,label --attr=varslot,label --attr=radio,label --attr=dropdown,label --attr=option,label --attr=checkbox,label --attr=spinbox,label --attr=browser,label --attr=saveobject,label --attr=formula,label >> messages.cpp

Modified: trunk/rkward/rkward/main.cpp
===================================================================
--- trunk/rkward/rkward/main.cpp	2007-03-25 14:31:31 UTC (rev 1720)
+++ trunk/rkward/rkward/main.cpp	2007-03-25 15:04:10 UTC (rev 1721)
@@ -79,7 +79,7 @@
 };
 
 int main(int argc, char *argv[]) {
-	KAboutData aboutData( "rkward", I18N_NOOP ("RKWard"), version, description, KAboutData::License_GPL, "(c) 2002, 2004, 2005, 2006", 0, "http://rkward.sf.net", "rkward-devel at lists.sourceforge.net");
+	KAboutData aboutData( "rkward", I18N_NOOP ("RKWard"), version, description, KAboutData::License_GPL, "(c) 2002, 2004, 2005, 2006, 2007", 0, "http://rkward.sf.net", "rkward-devel at lists.sourceforge.net");
 	aboutData.addAuthor ("Thomas Friedrichsmeier", I18N_NOOP ("Project leader / main developer"), 0);
 	aboutData.addAuthor ("Pierre Ecochard",  I18N_NOOP ("C++ coder since 0.2.9"), 0);
 	aboutData.addAuthor ("Stefan Roediger", I18N_NOOP ("Many plugins, suggestions, marketing, translations"), 0);

Modified: trunk/rkward/rkward/windows/rkhtmlwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2007-03-25 14:31:31 UTC (rev 1720)
+++ trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2007-03-25 15:04:10 UTC (rev 1721)
@@ -350,7 +350,16 @@
 	int res = KMessageBox::questionYesNo (this, i18n ("Do you really want to flush the output? It will not be possible to restore it."), i18n ("Flush output?"));
 	if (res==KMessageBox::Yes) {
 		QFile out_file (RKSettingsModuleGeneral::filesPath () + "/rk_out.html");
+		QDir out_dir = QFileInfo (out_file).dir (true);
 		out_file.remove ();
+
+		// remove all the graphs
+		out_dir.setNameFilter ("graph*.png");
+		QStringList graph_files = out_dir.entryList ();
+		for (QStringList::const_iterator it = graph_files.constBegin (); it != graph_files.constEnd (); ++it) {
+			QFile file (out_dir.absFilePath (*it, false));
+			file.remove ();
+		}
 		refreshOutput (false, false, 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