[rkward-cvs] SF.net SVN: rkward:[3551] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Thu May 12 14:05:39 UTC 2011
Revision: 3551
http://rkward.svn.sourceforge.net/rkward/?rev=3551&view=rev
Author: tfry
Date: 2011-05-12 14:05:38 +0000 (Thu, 12 May 2011)
Log Message:
-----------
Add carbon copy dialog to the 'Run' menu.
Modified Paths:
--------------
trunk/rkward/ChangeLog
trunk/rkward/rkward/rkward.cpp
trunk/rkward/rkward/rkward.h
trunk/rkward/rkward/rkwardui.rc
trunk/rkward/rkward/settings/rksettingsmoduleoutput.h
Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog 2011-05-12 10:39:57 UTC (rev 3550)
+++ trunk/rkward/ChangeLog 2011-05-12 14:05:38 UTC (rev 3551)
@@ -1,4 +1,5 @@
-- R commands and their output can be "carbon copied" to the output window # TODO: Add a dialog for this in the 'Run' Menu
+- Fix compilation on FreeBSD
+- R commands and their output can be "carbon copied" to the output window
- On Windows, RKWard will detect, and offer to disable "native" file system dialogs
- Object browsers that show only the global environment now hide the ".GlobalEnv" item
- Fixed: Function argument hints would not be shown in some corner cases
Modified: trunk/rkward/rkward/rkward.cpp
===================================================================
--- trunk/rkward/rkward/rkward.cpp 2011-05-12 10:39:57 UTC (rev 3550)
+++ trunk/rkward/rkward/rkward.cpp 2011-05-12 14:05:38 UTC (rev 3551)
@@ -298,6 +298,20 @@
RKGlobals::rInterface ()->cancelAll ();
}
+void RKWardMainWindow::configureCarbonCopy () {
+ RK_TRACE (APP);
+
+ KDialog *dialog = new KDialog ();
+ dialog->setCaption (i18n ("Carbon Copy Settings"));
+ RKCarbonCopySettings *settings = new RKCarbonCopySettings (dialog);
+ dialog->setMainWidget (settings);
+ dialog->setButtons (KDialog::Ok | KDialog::Apply | KDialog::Cancel);
+ dialog->setAttribute (Qt::WA_DeleteOnClose);
+ connect (dialog, SIGNAL (okClicked()), settings, SLOT (applyChanges ()));
+ connect (dialog, SIGNAL (applyClicked()), settings, SLOT (applyChanges ()));
+ dialog->show ();
+}
+
void RKWardMainWindow::initToolViewsAndR () {
RK_TRACE (APP);
@@ -385,6 +399,9 @@
interrupt_all_commands->setIcon (RKStandardIcons::getIcon (RKStandardIcons::ActionInterrupt));
interrupt_all_commands->setEnabled (false); // enabled from within setRStatus()
+ action = actionCollection ()->addAction ("carbon_copy", this, SLOT (configureCarbonCopy ()));
+ action->setText (i18n ("CC commands to output..."));
+
// These two currently do the same thing
action = actionCollection ()->addAction ("load_unload_libs", this, SLOT (slotFileLoadLibs()));
action->setText (i18n ("Load / Unload Packages"));
Modified: trunk/rkward/rkward/rkward.h
===================================================================
--- trunk/rkward/rkward/rkward.h 2011-05-12 10:39:57 UTC (rev 3550)
+++ trunk/rkward/rkward/rkward.h 2011-05-12 14:05:38 UTC (rev 3551)
@@ -103,6 +103,7 @@
* @param text the text that is displayed in the statusbar
*/
void slotCancelAllCommands ();
+ void configureCarbonCopy ();
void slotSetStatusBarText (const QString &text);
/** Basically a shortcut to slotSetStatusBarText (QString::null). Needed as a slot without parameters. */
void slotSetStatusReady () { slotSetStatusBarText (QString::null); };
Modified: trunk/rkward/rkward/rkwardui.rc
===================================================================
--- trunk/rkward/rkward/rkwardui.rc 2011-05-12 10:39:57 UTC (rev 3550)
+++ trunk/rkward/rkward/rkwardui.rc 2011-05-12 14:05:38 UTC (rev 3551)
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui>
-<kpartgui name="rkward_main" version="561">
+<kpartgui name="rkward_main" version="562">
<MenuBar>
<!-- The Main Window ui.rc is the only one, where merging happens, reliably. That is, why we need to define
a lot of merge points, here, which can then be used be mdi windows and their children.
@@ -55,6 +55,8 @@
<DefineGroup name="run_actions_merge" append="run_actions_merge"/>
<DefineGroup name="postrun_actions_merge" append="postrun_actions_merge"/>
<Action name="cancel_all_commands"/>
+ <Separator />
+ <Action name="carbon_copy"/>
</Menu>
<Merge name="rkwardcomponents" />
Modified: trunk/rkward/rkward/settings/rksettingsmoduleoutput.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduleoutput.h 2011-05-12 10:39:57 UTC (rev 3550)
+++ trunk/rkward/rkward/settings/rksettingsmoduleoutput.h 2011-05-12 14:05:38 UTC (rev 3551)
@@ -43,6 +43,7 @@
static bool shouldCarbonCopyCommand (const RCommand *command);
static bool includeOutputInCarbonCopy () { return (cc_globally_enabled && cc_command_output); };
+public slots:
void applyChanges ();
signals:
void changed ();
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