[rkward-cvs] rkward/rkward khelpdlg.cpp,1.12,1.13
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Wed Apr 12 14:09:00 UTC 2006
Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27177/rkward
Modified Files:
khelpdlg.cpp
Log Message:
Notify user if finding context help fails
Index: khelpdlg.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/khelpdlg.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** khelpdlg.cpp 30 Sep 2005 10:41:30 -0000 1.12
--- khelpdlg.cpp 12 Apr 2006 14:08:58 -0000 1.13
***************
*** 20,23 ****
--- 20,24 ----
#include <klocale.h>
#include <kurl.h>
+ #include <kmessagebox.h>
#include <qcheckbox.h>
***************
*** 122,126 ****
// step 2: retrieve help
! RKGlobals::rInterface ()->issueCommand ("help(\"" + result + "\", htmlhelp=TRUE)[1]", RCommand::App | RCommand::Sync | RCommand::GetStringVector, QString::null, this, GET_HELP_URL, 0);
}
--- 123,127 ----
// step 2: retrieve help
! RKGlobals::rInterface ()->issueCommand ("help(\"" + result + "\", htmlhelp=TRUE)[1]", RCommand::App | RCommand::GetStringVector, QString::null, this, GET_HELP_URL, 0);
}
***************
*** 207,213 ****
RK_ASSERT (command->stringVectorLength ());
url.setPath(command->getStringVector ()[0]);
! if (QFile::exists( url.path() )) {
RKGlobals::rkApp()->openHTML(url);
return;
}
} else if (command->getFlags () == GET_INSTALLED_PACKAGES) {
--- 208,216 ----
RK_ASSERT (command->stringVectorLength ());
url.setPath(command->getStringVector ()[0]);
! if (QFile::exists (url.path ())) {
RKGlobals::rkApp()->openHTML(url);
return;
+ } else {
+ KMessageBox::sorry (this, i18n ("No help found on '%1'. Maybe the corresponding package is not installed/loaded, or maybe you mistyped the command. Try using Help->Search R Help for more options.").arg (command->command ().section ("\"", 1, 1)), i18n ("No help found"));
}
} else if (command->getFlags () == GET_INSTALLED_PACKAGES) {
More information about the rkward-tracker
mailing list