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

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon Nov 27 13:23:49 UTC 2006


Revision: 946
          http://svn.sourceforge.net/rkward/?rev=946&view=rev
Author:   tfry
Date:     2006-11-27 05:23:49 -0800 (Mon, 27 Nov 2006)

Log Message:
-----------
Add options ("printcmd") to settings

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/settings/rksettingsmoduler.cpp
    trunk/rkward/rkward/settings/rksettingsmoduler.h
    trunk/rkward/rkward/windows/rkcatchedx11windowpart.rc
    trunk/rkward/rkward/windows/rkwindowcatcher.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2006-11-27 12:39:56 UTC (rev 945)
+++ trunk/rkward/ChangeLog	2006-11-27 13:23:49 UTC (rev 946)
@@ -1,3 +1,4 @@
+- add options ("printcmd") to settings
 - fix help menu for detached windows
 - R X11 device windows are now managed by rkward, with the following initial features:
 - R X11 device windows: attach to / detach from workplace (they start detached)
@@ -2,2 +3,3 @@
 - R X11 device windows: toggle between normal resize mode and (settable) fixed size with scrollbars
+
 - fixed: selecting Window->Close in a detached window would only close the internal view, not the window

Modified: trunk/rkward/rkward/settings/rksettingsmoduler.cpp
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2006-11-27 12:39:56 UTC (rev 945)
+++ trunk/rkward/rkward/settings/rksettingsmoduler.cpp	2006-11-27 13:23:49 UTC (rev 946)
@@ -45,6 +45,7 @@
 int RKSettingsModuleR::options_expressions;
 int RKSettingsModuleR::options_digits;
 bool RKSettingsModuleR::options_checkbounds;
+QString RKSettingsModuleR::options_printcmd;
 
 RKSettingsModuleR::RKSettingsModuleR (RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
 	RK_TRACE (SETTINGS);
@@ -129,6 +130,11 @@
 	connect (checkbounds_input, SIGNAL (activated (int)), this, SLOT (boxChanged (int)));
 	grid->addWidget (checkbounds_input, row, 1);
 
+	grid->addWidget (new QLabel (i18n ("Command used to send file to printer"), this), ++row, 0);
+	printcmd_input = new QLineEdit (options_printcmd, this);
+	connect (printcmd_input, SIGNAL (textChanged (const QString &)), this, SLOT (textChanged (const QString &)));
+	grid->addWidget (printcmd_input, row, 1);
+
 	main_vbox->addStretch ();
 }
 
@@ -173,6 +179,7 @@
 	options_expressions = expressions_input->value ();
 	options_digits = digits_input->value ();
 	options_checkbounds = (checkbounds_input->currentItem () == 0);
+	options_printcmd = printcmd_input->text ();
 
 // apply run time options in R
 	QStringList commands = makeRRunTimeOptionCommands ();
@@ -198,6 +205,7 @@
 	list.append ("options (digits=" + QString::number (options_digits) + ")\n");
 	if (options_checkbounds) tf = "TRUE"; else tf = "FALSE";
 	list.append ("options (checkbounds=" + tf + ")\n");
+	list.append ("options (printcmd=\"" + options_printcmd + "\")\n");
 
 	return list;
 }
@@ -222,6 +230,7 @@
 	config->writeEntry ("expressions", options_expressions);
 	config->writeEntry ("digits", options_digits);
 	config->writeEntry ("check.bounds", options_checkbounds);
+	config->writeEntry ("printcmd", options_printcmd);
 }
 
 void RKSettingsModuleR::loadSettings (KConfig *config) {
@@ -238,6 +247,7 @@
 	options_expressions = config->readNumEntry ("expressions", 5000);
 	options_digits = config->readNumEntry ("digits", 7);
 	options_checkbounds = config->readNumEntry ("check.bounds", false);
+	options_printcmd = config->readEntry ("printcmd", "kprinter");
 }
 
 //#################################################

Modified: trunk/rkward/rkward/settings/rksettingsmoduler.h
===================================================================
--- trunk/rkward/rkward/settings/rksettingsmoduler.h	2006-11-27 12:39:56 UTC (rev 945)
+++ trunk/rkward/rkward/settings/rksettingsmoduler.h	2006-11-27 13:23:49 UTC (rev 946)
@@ -65,6 +65,7 @@
 	KIntSpinBox *expressions_input;
 	KIntSpinBox *digits_input;
 	QComboBox *checkbounds_input;
+	QLineEdit *printcmd_input;
 
 	static QString options_outdec;
 	static int options_width;
@@ -75,6 +76,7 @@
 	static int options_expressions;
 	static int options_digits;
 	static bool options_checkbounds;
+	static QString options_printcmd;
 };
 
 /**

Modified: trunk/rkward/rkward/windows/rkcatchedx11windowpart.rc
===================================================================
--- trunk/rkward/rkward/windows/rkcatchedx11windowpart.rc	2006-11-27 12:39:56 UTC (rev 945)
+++ trunk/rkward/rkward/windows/rkcatchedx11windowpart.rc	2006-11-27 13:23:49 UTC (rev 946)
@@ -1,7 +1,7 @@
 <!DOCTYPE kpartgui>
 <kpartgui name="rkward" version="0.4.2">
 	<MenuBar>
-		<Menu name="plot"><text>&Plot Device</text>
+		<Menu name="plot"><text>&Device</text>
 			<Action name="device_activate"/>
 			<Action name="device_duplicate"/>
 			<Separator/>

Modified: trunk/rkward/rkward/windows/rkwindowcatcher.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkwindowcatcher.cpp	2006-11-27 12:39:56 UTC (rev 945)
+++ trunk/rkward/rkward/windows/rkwindowcatcher.cpp	2006-11-27 13:23:49 UTC (rev 946)
@@ -228,8 +228,6 @@
 	RK_TRACE (MISC);
 
 	RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\ndev.print ()", RCommand::App, i18n ("Print contents of graphics device number %1").arg (QString::number (device_number)));
-
-	#warning TODO: options ("printcmd") should be made configurable, and set to kprinter by default
 }
 
 void RKCatchedX11Window::copyDeviceToRObject () {


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