[rkward-cvs] SF.net SVN: rkward: [1093] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Mon Jan 8 14:40:54 UTC 2007
Revision: 1093
http://svn.sourceforge.net/rkward/?rev=1093&view=rev
Author: tfry
Date: 2007-01-08 06:40:54 -0800 (Mon, 08 Jan 2007)
Log Message:
-----------
Correct installation and path detection
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/Makefile.am
trunk/rkward/rkward/misc/rkcommonfunctions.cpp
trunk/rkward/rkward/misc/rkcommonfunctions.h
trunk/rkward/rkward/pages/Makefile.am
trunk/rkward/rkward/plugins/makemakefileam.php
trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
trunk/rkward/rkward/windows/rkhtmlwindow.cpp
trunk/rkward/subdirs
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2007-01-08 14:00:53 UTC (rev 1092)
+++ trunk/rkward/ChangeLog 2007-01-08 14:40:54 UTC (rev 1093)
@@ -1,3 +1,5 @@
+- TODO: test auto-detection of pluginmap path!
+
- plug-in for skewness and kurtosis added
- plug-ins for distribution analysis added
- plug-ins for new plots (stripchart & density plot)
@@ -2,5 +4,2 @@
- enhancements to existing plot plug-ins
-- Experimental (might still be removed):
- - Always show all top level menus
-
- removed the "output" menu; entries were moved to "Edit" and "View"
Modified: trunk/rkward/rkward/Makefile.am
===================================================================
--- trunk/rkward/rkward/Makefile.am 2007-01-08 14:00:53 UTC (rev 1092)
+++ trunk/rkward/rkward/Makefile.am 2007-01-08 14:40:54 UTC (rev 1093)
@@ -38,7 +38,7 @@
$(LIBSOCKET) -L$(R_HOMEDIR)/lib -lR $(R_LAPACK_FLAG) $(R_BLAS_FLAG) -lkatepartinterfaces
SUBDIRS = plugins dataeditor settings plugin agents rbackend dialogs scriptbackends \
- misc core icons windows syntax
+ misc core icons windows syntax pages
install-data-local:
$(mkinstalldirs) $(kde_appsdir)/Applications/
Modified: trunk/rkward/rkward/misc/rkcommonfunctions.cpp
===================================================================
--- trunk/rkward/rkward/misc/rkcommonfunctions.cpp 2007-01-08 14:00:53 UTC (rev 1092)
+++ trunk/rkward/rkward/misc/rkcommonfunctions.cpp 2007-01-08 14:40:54 UTC (rev 1093)
@@ -21,6 +21,8 @@
#include <qregexp.h>
#include <kxmlguiclient.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
namespace RKCommonFunctions {
void removeNamedElementsRecursive (const QStringList &names, QDomNode &parent) {
@@ -132,4 +134,8 @@
if (*end < 0) *end = context_line.length ();
}
+ QString getRKWardDataDir () {
+ return (KGlobal::dirs ()->findResourceDir ("data", "rkward/all.pluginmap") + "rkward/");
+ }
+
} // namespace
Modified: trunk/rkward/rkward/misc/rkcommonfunctions.h
===================================================================
--- trunk/rkward/rkward/misc/rkcommonfunctions.h 2007-01-08 14:00:53 UTC (rev 1092)
+++ trunk/rkward/rkward/misc/rkcommonfunctions.h 2007-01-08 14:40:54 UTC (rev 1093)
@@ -2,7 +2,7 @@
rkcommonfunctions - description
-------------------
begin : Mon Oct 17 2005
- copyright : (C) 2005, 2006 by Thomas Friedrichsmeier
+ copyright : (C) 2005, 2006, 2007 by Thomas Friedrichsmeier
email : tfry at users.sourceforge.net
***************************************************************************/
@@ -35,6 +35,9 @@
/** move container (action, menu, etc.) with tagname "tagname" and attribute 'name="..."' to be a child node of the tag with tagname=tagname and attribute name=to_name. Can be used to make a top-level menu a sub-menu of another menu instead */
void moveContainer (KXMLGUIClient *client, const QString &tagname, const QString &name, const QString &to_name, bool recursive);
+/** Get the base directory where RKWard data files are stored */
+ QString getRKWardDataDir ();
+
/** given the context line, find what looks like an R symbol */
QString getCurrentSymbol (const QString &context_line, int cursor_pos, bool strict=true);
/** like get current symbol, but merely returns the start and end position of the current symbol */
Modified: trunk/rkward/rkward/pages/Makefile.am
===================================================================
--- trunk/rkward/rkward/pages/Makefile.am 2007-01-08 14:00:53 UTC (rev 1092)
+++ trunk/rkward/rkward/pages/Makefile.am 2007-01-08 14:40:54 UTC (rev 1093)
@@ -1,4 +1,4 @@
-pagesdir = $(kde_datadir)/rkward/
+pagesdir = $(kde_datadir)/rkward/pages
dist_pages_DATA = \
rkward_welcome.rkh
Modified: trunk/rkward/rkward/plugins/makemakefileam.php
===================================================================
--- trunk/rkward/rkward/plugins/makemakefileam.php 2007-01-08 14:00:53 UTC (rev 1092)
+++ trunk/rkward/rkward/plugins/makemakefileam.php 2007-01-08 14:40:54 UTC (rev 1093)
@@ -8,12 +8,16 @@
# ../plugins/makemakefileam.php pages > Makefile.am
if ($argc < 2) {
+ $base_dir = "";
readsubs ("", "plugins");
} else {
+ $base_dir = $argv[1];
readsubs ("", $argv[1]);
}
function readsubs ($dir, $prefix) {
+ global $base_dir;
+
if ($dir == "") {
$thisdir = opendir (".");
$ndir = "";
@@ -24,7 +28,7 @@
$subdirs = array ();
$files = array ();
- echo (strtr ($prefix, "/", "X") . "dir = $(kde_datadir)/rkward/" . $dir . "\n");
+ echo (strtr ($prefix, "/", "X") . "dir = $(kde_datadir)/rkward/" . $base_dir . $dir . "\n");
while (false !== ($file = readdir($thisdir))) {
if (!is_dir ($ndir . $file)) {
Modified: trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp 2007-01-08 14:00:53 UTC (rev 1092)
+++ trunk/rkward/rkward/settings/rksettingsmoduleplugins.cpp 2007-01-08 14:40:54 UTC (rev 1093)
@@ -18,8 +18,6 @@
#include <klocale.h>
#include <kconfig.h>
-#include <kglobal.h>
-#include <kstandarddirs.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
@@ -31,6 +29,7 @@
#include "../rkward.h"
#include "../rkglobals.h"
#include "../misc/multistringselector.h"
+#include "../misc/rkcommonfunctions.h"
// static members
QStringList RKSettingsModulePlugins::plugin_maps;
@@ -80,7 +79,7 @@
}
void RKSettingsModulePlugins::browseRequest (QStringList* strings) {
- (*strings) = KFileDialog::getOpenFileNames (KGlobal::dirs()->findResourceDir("plugins", "standard_plugins.pluginmap"), "*.pluginmap", this, i18n ("Select .pluginmap-file"));
+ (*strings) = KFileDialog::getOpenFileNames (RKCommonFunctions::getRKWardDataDir (), "*.pluginmap", this, i18n ("Select .pluginmap-file"));
}
QString RKSettingsModulePlugins::caption () {
@@ -115,14 +114,7 @@
config->setGroup ("Plugin Settings");
plugin_maps = config->readListEntry ("Plugin Maps");
if (!plugin_maps.count ()) {
- QString dummy = KGlobal::dirs()->findResourceDir ("data", "rkward/all.pluginmap");
- if (dummy.isEmpty ()) {
- // try our luck with a relative path
- dummy = "plugins";
- } else {
- dummy.append ("rkward");
- }
- plugin_maps.append (dummy + "/all.pluginmap");
+ plugin_maps.append (RKCommonFunctions::getRKWardDataDir () + "/all.pluginmap");
}
// TODO: this code is only needed for transition from rkward 0.3.4 to rkward 0.3.5. Remove some version later!
// BEGIN
@@ -134,14 +126,7 @@
}
if (fix) {
plugin_maps.clear ();
- QString dummy = KGlobal::dirs()->findResourceDir ("data", "rkward/all.pluginmap");
- if (dummy.isEmpty ()) {
- // try our luck with a relative path
- dummy = "plugins";
- } else {
- dummy.append ("rkward");
- }
- plugin_maps.append (dummy + "/all.pluginmap");
+ plugin_maps.append (RKCommonFunctions::getRKWardDataDir () + "/all.pluginmap");
}
// END
Modified: trunk/rkward/rkward/windows/rkhtmlwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkhtmlwindow.cpp 2007-01-08 14:00:53 UTC (rev 1092)
+++ trunk/rkward/rkward/windows/rkhtmlwindow.cpp 2007-01-08 14:40:54 UTC (rev 1093)
@@ -24,7 +24,6 @@
#include <kmessagebox.h>
#include <krun.h>
#include <kparts/partmanager.h>
-#include <kstandarddirs.h>
#include <qfileinfo.h>
#include <qwidget.h>
@@ -422,8 +421,7 @@
if (help_file_name.isNull ()) break;
help_file_name = QFileInfo (chandle->getFilename ()).dir (true).filePath (help_file_name);
} else {
- help_base_dir = KGlobal::dirs()->findResourceDir ("pages", "rkward/pages/rkward_welcome.rkh");
- help_base_dir.append ("rkward/pages");
+ help_base_dir = RKCommonFunctions::getRKWardDataDir () + "pages/";
help_file_name = help_base_dir + url.path () + ".rkh";
}
Modified: trunk/rkward/subdirs
===================================================================
--- trunk/rkward/subdirs 2007-01-08 14:00:53 UTC (rev 1092)
+++ trunk/rkward/subdirs 2007-01-08 14:40:54 UTC (rev 1093)
@@ -1,4 +1,3 @@
doc
po
rkward
-rkward-0.4.2
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