[Sciviews-commits] r422 - pkg/svDialogs/inst/gui
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 31 11:57:56 CET 2012
Author: phgrosjean
Date: 2012-01-31 11:57:56 +0100 (Tue, 31 Jan 2012)
New Revision: 422
Modified:
pkg/svDialogs/inst/gui/RMenu.txt
Log:
Change in default menu in svDialogs
Modified: pkg/svDialogs/inst/gui/RMenu.txt
===================================================================
--- pkg/svDialogs/inst/gui/RMenu.txt 2012-01-30 11:55:20 UTC (rev 421)
+++ pkg/svDialogs/inst/gui/RMenu.txt 2012-01-31 10:57:56 UTC (rev 422)
@@ -1,4 +1,4 @@
-# R default menu
+@@@ R default menu
menupos= 0 0
@@ -10,37 +10,38 @@
submenu=File
item=_Source R code...
- cmd=sh -c 'xvkbd -window `xdotool getactivewindow` -text "source(\""`zenity --file-selection --title="Source an R file" --file-filter="R files (*.R) | *.R *.r"`"\")\r"'
+ cmd=sh -c 'Rfile=`zenity --file-selection --title="Select file to source" --file-filter="R files (*.R) | *.R *.r" --file-filter="S files (*.q, *.ssc, *.S) | *.q *.ssc *.S" --file-filter="All files (*.*) | *.*"` && xvkbd -text "source(\""$Rfile"\")\r"'
item=_New script
- cmd=NULL
+ cmd=gedit # Should be nice to set syntax highlighting to R directly, but how?
item=_Open script...
- cmd=NULL
+ cmd=sh -c 'Rfile=`zenity --file-selection --title="Open script" --file-filter="R files (*.R) | *.R *.r" --file-filter="S files (*.q, *.ssc, *.S) | *.q *.ssc *.S" --file-filter="All files (*.*) | *.*"` && gedit "$Rfile"'
- item=_Display file(s)...
- cmd=NULL
-
+ item=_Display file...
+ cmd=sh -c 'File=`zenity --file-selection --title="Select a file"` && zenity --text-info --title="R Pager - $File" --filename="$File" --width=500 --height=500 --ok-label=" Close " --cancel-label=" "'
+ @@@ We should use R pager instead: file.show("$File", header="$File", title= "")
+
separator
item=_Load Workspace...
- cmd=NULL # R images (*.Rdata)
+ cmd=sh -c 'Rfile=`zenity --file-selection --title="Select image to load" --file-filter="R images (*.RData) | *.RData *.Rdata" --file-filter="R image - old extension (*.rda) | *.rda" --file-filter="All files (*.*) | *.*" filename=".RData"` && xvkbd -text "load(\""$Rfile"\")\r"'
item=_Save Workspace...
- cmd=NULL
+ cmd=sh -c 'File=`zenity --file-selection --title="Save image in" --save --confirm-overwrite --file-filter="R images (*.RData) | *.RData *.Rdata" --file-filter="All files (*.*) | *.*" --filename=".RData"` && xvkbd -text "save.image(\"$File\")\r"'
separator
item=_Load History...
- cmd=NULL # (*.*)
+ cmd=sh -c 'Rfile=`zenity --file-selection --title="Select history to load" --file-filter="All files (*.*) | *.*" --filename=".Rhistory"` && xvkbd -text "loadhistory(\""$Rfile"\")\r"'
item=_Save History...
- cmd=NULL
+ cmd=sh -c 'File=`zenity --file-selection --title="Save history in" --save --confirm-overwrite --file-filter="All files (*.*) | *.*" --filename=".Rhistory"` && xvkbd -text "savehistory(\"$File\")\r"'
separator
item=_Change dir...
- cmd=NULL
+ cmd=sh -c 'File=`zenity --file-selection --title="Change working dir to" --directory` && xvkbd -text ".odir <- setwd(\"$File\")\r"'
separator
@@ -48,61 +49,49 @@
cmd=NULL
item=_Save to File...
- cmd=NULL # lastsave.txt - Text file (*.txt)
+ cmd=NULL @@@ lastsave.txt - Text file (*.txt)
separator
item=_Exit
- cmd=NULL
+ cmd=sh -c 'zenity --question --title="Exit SciViews R" --text="Are you sure?" --ok-label=OK --cancel-label=Cancel && (zenity --question --title="Exit SciViews R" --text="Save workspace image?" && xvkbd -text "q(\"yes\")\r" || xvkbd -text "q(\"no\")\r")'
submenu=_Edit
item=Copy
- cmd=NULL
+ cmd=xvkbd -text "\CC" @@@ Default shortcut in gnome-terminal is Ctrl-Shift-C
+ @@@ Note: this will not work if shortcut is changed!
item=Paste
- cmd=NULL
+ cmd=xvkbd -text "\CV" @@@ Default shortcut in gnome-terminal is Ctrl-Shift-V
+ @@@ Note: this will not work if shortcut is changed!
item=Paste commands only
cmd=NULL
item=Copy and Paste
- cmd=NULL
+ cmd=xvkbd -text "\CC\CV" @@@ Same note as for copy / paste
item=Clear console
- cmd=NULL
+ cmd=xvkbd -text "system(\"clear\") # Or menu Terminal -> Reset and clear\r"
+ @@@ Clear the console, but does not reset its content per se.
+ @@@ Use gnome-terminal menu entry Terminal -> Reset and Clear
separator
item=Data editor...
- cmd=NULL
+ cmd=sh -c 'Data=`zenity --entry --title="R data editor" --text="Name of a data frame or matrix"` && xvkbd -text "fix($Data)\r"'
- separator
-
- item=GUI preferences...
- cmd=NULL
-
submenu=_Misc
item=Stop current computation
- cmd=NULL
+ cmd=xvkbd -text "\Cc"
item=Stop all computations
cmd=NULL
separator
- item=Buffered output
- cmd=NULL
-
- item=Word completion
- cmd=NULL
-
- item=Filename completion
- cmd=NULL
-
- separator
-
item=List objects
cmd=xvkbd -text "ls()\r"
@@ -126,15 +115,15 @@
cmd=xvkbd -text "setRepositories()\r"
item=Install package(s)...
- cmd=NULL #object not found! xvkbd -text "utils:::menuInstallPkgs()\r"
+ cmd=xvkbd -text "local({pkg <- select.list(rownames(available.packages()), graphics = TRUE, multiple = TRUE, title = \"Install package(s)\")\r if (nchar(pkg[1])) install.packages(pkg)})\r"
item=Update packages...
cmd=xvkbd -text "update.packages(ask = 'graphics', checkBuild = TRUE)\r"
separator
- item=Install package(s) from local files...
- cmd=NULL #utils:::menuInstallLocal()[select one or more .tar.gz file(s) or .tgz]xvkbd -text "install.packages(<file>, repos = NULL)"
+ item=Install package from local file...
+ cmd=sh -c 'Rpackages=`zenity --file-selection --title="Select one R package" --file-filter="R package source (*.tar.gz) | *.tar.gz" file-filter="All files (*.*) | *.*"` && xvkbd -text "install.packages(\""$Rpackages"\", repos = NULL)\r"'
submenu=_Windows
@@ -150,222 +139,222 @@
submenu=_Help
item=Console
- cmd=NULL
+ cmd=xvkbd -text "\[F1]"
separator
item=FAQ on R
- cmd=NULL
+ cmd=R -e 'utils:::RShowDoc("R-FAQ")'
submenu=_Manuals (in PDF)
item=An introduction to R
- cmd=NULL
+ cmd=R -e 'utils:::RShowDoc("R-intro")'
item=R Reference Manual
- cmd=NULL
+ cmd=R -e 'system2(getOption("pdfviewer"), shQuote(file.path(R.home("doc"), "manual", "refman.pdf")), wait = FALSE)'
item=R Data Import/Export
- cmd=NULL
+ cmd=R -e 'utils:::RShowDoc("R-data")'
item=R Language Definition
- cmd=NULL
+ cmd=R -e 'utils:::RShowDoc("R-lang")'
item=Writing R Extensions
- cmd=NULL
+ cmd=R -e 'utils:::RShowDoc("R-exts")'
item=R Internals
- cmd=NULL
+ cmd=R -e 'utils:::RShowDoc("R-ints")'
item=R Installation and Administration
- cmd=NULL
+ cmd=R -e 'utils:::RShowDoc("R-admin")'
item=Sweave User
- cmd=NULL
+ cmd=R -e 'system2(getOption("pdfviewer"), shQuote(system.file("doc", "Sweave.pdf", package = "utils")), wait = FALSE)'
separator
item=R functions (text)...
- cmd=NULL #help(<topic>)
+ cmd=sh -c 'Topic=`zenity --entry --title="R help" --text="Show help for"` && xvkbd -text "help(\"$Topic\")\r"'
item=Html help
cmd=xvkbd -text "help.start()\r"
item=Search help...
- cmd=NULL #help.search(<topic>)
+ cmd=sh -c 'Topic=`zenity --entry --title="Search help" --text="Expression to search for"` && xvkbd -text "help.search(\"$Topic\")\r"'
item=search.r-project.org...
- cmd=NULL #RSiteSearch(<topic>)
+ cmd=sh -c 'Topic=`zenity --entry --title="R Site Search" --text="Search for words in help list archives and documentation"` && xvkbd -text "RSiteSearch(\"$Topic\")\r"'
separator
item=Apropos...
- cmd=NULL #apropos(<topic>)
+ cmd=sh -c 'Topic=`zenity --entry --title="Apropos" --text="Expression to search for"` && xvkbd -text "apropos(\"$Topic\")\r"'
separator
item=R project home page
- cmd=NULL #display http://www.r-project.org
+ cmd=firefox -new-window 'http://www.r-project.org' @@@ Should use browser set in R!
item=CRAN home page
- cmd=NULL #display http://cran.r-project.org
+ cmd=firefox -new-window 'http://cran.r-project.org' @@@ Should use browser set in R!
separator
item=About
- cmd=sh -c 'Rversion=`R --version`; zenity --info --title="About SciViews R" --text="$Rversion\n\nSciViews R extensions, copyright (c) 2012 Ph. Grosjean." --timeout=10'
+ cmd=sh -c 'Rversion=`R --version`; zenity --info --title="About SciViews R" --text="$Rversion\n\nSciViews R extensions, version 1.0-0.\nCopyright (c) 2012 Ph. Grosjean." --timeout=10'
-#context menu:
-#item=Copy
-#cmd=NULL
-#
-#item=Paste
-#cmd=NULL
-#
-#item=Paste commands only
-#cmd=NULL
-#
-#item=Copy and paste
-#cmd=NULL
-#
-#separator
-#
-#item=Clear window
-#cmd=NULL
-#
-#separator
-#
-#item=Select all
-#cmd=NULL
-#
-#separator
-#
-#item=Buffered output
-#cmd=NULL
-#
-#item=Stay on top
-#cmd=NULL
+@@@context menu:
+@@@item=Copy
+@@@cmd=NULL
+@@@
+@@@item=Paste
+@@@cmd=NULL
+@@@
+@@@item=Paste commands only
+@@@cmd=NULL
+@@@
+@@@item=Copy and paste
+@@@cmd=NULL
+@@@
+@@@separator
+@@@
+@@@item=Clear window
+@@@cmd=NULL
+@@@
+@@@separator
+@@@
+@@@item=Select all
+@@@cmd=NULL
+@@@
+@@@separator
+@@@
+@@@item=Buffered output
+@@@cmd=NULL
+@@@
+@@@item=Stay on top
+@@@cmd=NULL
-# Graph device menu...
-#submenu=_File
-#
-# submenu=_Save as
-#
-# item=Metafile...
-# cmd=NULL
-#
-# item=Postscript...
-# cmd=NULL
-#
-# item=PDF...
-# cmd=NULL
-#
-# item=Png...
-# cmd=NULL
-#
-# item=Bmp...
-# cmd=NULL
-#
-# item=TIFF...
-# cmd=NULL
-#
-# submenu=_Jpeg
-#
-# item=50% quality...
-# cmd=NULL
-#
-# item=75% quality...
-# cmd=NULL
-#
-# item=100% quality...
-# cmd=NULL
-#
-# submenu=_Copy to the clipboard
-#
-# item=as a Bitmap
-# cmd=NULL
-#
-# item=as a Metafile
-# cmd=NULL
-#
-# separator
-#
-# item=Print...
-# cmd=NULL
-#
-# separator
-#
-# item=close Device
-# cmd=NULL
-#
-#submenu=_History
-#
-# item=Recording
-# cmd=NULL
-#
-# separator
-#
-# item=Add
-# cmd=NULL
-#
-# item=Replace
-# cmd=NULL
-#
-# separator
-#
-# item=Previous
-# cmd=NULL
-#
-# item=Next
-# cmd=NULL
-#
-# separator
-#
-# item=Save to variable...
-# cmd=NULL
-#
-# item=Get from variable...
-# cmd=NULL
-#
-# separator
-#
-# item=Clear history
-# cmd=NULL
-#
-#submenu=_Resize
-#
-# item=R mode
-# cmd=NULL
-#
-# item=Fit to window
-# cmd=NULL
-#
-# item=Fixed size
-# cmd=NULL
-#
-#context menu:
-#item=Copy as metafile
-#cmd=NULL
-#
-#item=Copy as bitmap
-#cmd=NULL
-#
-#separator
-#
-#item=Save as metafile...
-#cmd=NULL
-#
-#item=Save as postscript...
-#cmd=NULL
-#
-#separator
-#
-#item=Stay on top
-#cmd=NULL
-#
-#separator
-#
-#item=Print...
-#cmd=NULL
+@@@ Graph device menu...
+@@@submenu=_File
+@@@
+@@@ submenu=_Save as
+@@@
+@@@ item=Metafile...
+@@@ cmd=NULL
+@@@
+@@@ item=Postscript...
+@@@ cmd=NULL
+@@@
+@@@ item=PDF...
+@@@ cmd=NULL
+@@@
+@@@ item=Png...
+@@@ cmd=NULL
+@@@
+@@@ item=Bmp...
+@@@ cmd=NULL
+@@@
+@@@ item=TIFF...
+@@@ cmd=NULL
+@@@
+@@@ submenu=_Jpeg
+@@@
+@@@ item=50% quality...
+@@@ cmd=NULL
+@@@
+@@@ item=75% quality...
+@@@ cmd=NULL
+@@@
+@@@ item=100% quality...
+@@@ cmd=NULL
+@@@
+@@@ submenu=_Copy to the clipboard
+@@@
+@@@ item=as a Bitmap
+@@@ cmd=NULL
+@@@
+@@@ item=as a Metafile
+@@@ cmd=NULL
+@@@
+@@@ separator
+@@@
+@@@ item=Print...
+@@@ cmd=NULL
+@@@
+@@@ separator
+@@@
+@@@ item=close Device
+@@@ cmd=NULL
+@@@
+@@@submenu=_History
+@@@
+@@@ item=Recording
+@@@ cmd=NULL
+@@@
+@@@ separator
+@@@
+@@@ item=Add
+@@@ cmd=NULL
+@@@
+@@@ item=Replace
+@@@ cmd=NULL
+@@@
+@@@ separator
+@@@
+@@@ item=Previous
+@@@ cmd=NULL
+@@@
+@@@ item=Next
+@@@ cmd=NULL
+@@@
+@@@ separator
+@@@
+@@@ item=Save to variable...
+@@@ cmd=NULL
+@@@
+@@@ item=Get from variable...
+@@@ cmd=NULL
+@@@
+@@@ separator
+@@@
+@@@ item=Clear history
+@@@ cmd=NULL
+@@@
+@@@submenu=_Resize
+@@@
+@@@ item=R mode
+@@@ cmd=NULL
+@@@
+@@@ item=Fit to window
+@@@ cmd=NULL
+@@@
+@@@ item=Fixed size
+@@@ cmd=NULL
+@@@
+@@@context menu:
+@@@item=Copy as metafile
+@@@cmd=NULL
+@@@
+@@@item=Copy as bitmap
+@@@cmd=NULL
+@@@
+@@@separator
+@@@
+@@@item=Save as metafile...
+@@@cmd=NULL
+@@@
+@@@item=Save as postscript...
+@@@cmd=NULL
+@@@
+@@@separator
+@@@
+@@@item=Stay on top
+@@@cmd=NULL
+@@@
+@@@separator
+@@@
+@@@item=Print...
+@@@cmd=NULL
More information about the Sciviews-commits
mailing list