[Sciviews-commits] r421 - komodo/SciViews-K/content pkg/svDialogs pkg/svDialogs/R pkg/svDialogs/inst pkg/svDialogs/inst/gui pkg/svWidgets/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 30 12:55:21 CET 2012
Author: phgrosjean
Date: 2012-01-30 12:55:20 +0100 (Mon, 30 Jan 2012)
New Revision: 421
Added:
pkg/svDialogs/inst/gui/
pkg/svDialogs/inst/gui/RMenu.txt
Modified:
komodo/SciViews-K/content/.DS_Store
pkg/svDialogs/DESCRIPTION
pkg/svDialogs/NEWS
pkg/svDialogs/R/menu.R
pkg/svDialogs/R/svDialogs-internal.R
pkg/svWidgets/R/Img.R
Log:
Modified menus in svDialogs to support ctxmenu
Modified: komodo/SciViews-K/content/.DS_Store
===================================================================
(Binary files differ)
Modified: pkg/svDialogs/DESCRIPTION
===================================================================
--- pkg/svDialogs/DESCRIPTION 2012-01-19 16:11:37 UTC (rev 420)
+++ pkg/svDialogs/DESCRIPTION 2012-01-30 11:55:20 UTC (rev 421)
@@ -5,8 +5,8 @@
SystemRequirements: TODO!!!
Description: Rapidly construct dialog boxes for your GUI, including an automatic
function assistant
-Version: 0.9-45
-Date: 2011-11-11
+Version: 0.9-46
+Date: 2012-01-29
Author: Philippe Grosjean
Maintainer: Philippe Grosjean <phgrosjean at sciviews.org>
License: GPL-2
Modified: pkg/svDialogs/NEWS
===================================================================
--- pkg/svDialogs/NEWS 2012-01-19 16:11:37 UTC (rev 420)
+++ pkg/svDialogs/NEWS 2012-01-30 11:55:20 UTC (rev 421)
@@ -1,5 +1,12 @@
= svDialogs News
+== Changes in svDialogs 0.9-46
+
+* The functions to handle menus in Linux are completely rewritten to use a menu
+ configuration file that a modified version of myGtkMenu (named ctxmenu) can
+ read and interpret to display the corresponding menus.
+
+
== Changes in svDialogs 0.9-45
* Similar custom menus as winMenuXXX() functions are added and allow to add
Modified: pkg/svDialogs/R/menu.R
===================================================================
--- pkg/svDialogs/R/menu.R 2012-01-19 16:11:37 UTC (rev 420)
+++ pkg/svDialogs/R/menu.R 2012-01-30 11:55:20 UTC (rev 421)
@@ -9,6 +9,16 @@
return(invisible(res))
}
+.menuFileInit <- function ()
+{
+ res <- switch(Sys.info()["sysname"],
+ Windows = NULL,
+ Darwin = NULL, # TODO: should we have a default menu?
+ .unixMenuFileInit()
+ )
+ return(invisible(res))
+}
+
menuAdd <- function (menuname)
{
res <- switch(Sys.info()["sysname"],
@@ -159,8 +169,25 @@
return(invisible(NULL))
}
+## This holds the custom menu structure in an R object
+.Rmenu <- function ()
+{
+ ## The custom R menu is cached in a Rmenu object in TempEnv
+ return(getTemp("Rmenu", default = list(), mode = "list"))
+}
## Linux/Unix version
+## To use R custom context menu, you have to install xvkbd and xdotool
+## You need also to compile and install myGtkmenu
+## On Ubuntu:
+## sudo apt-get install xvkbd xdotool
+## Warning, you need to insqtall the English (US) keymap, even if you don't use
+## it. Otherwise, xvkbd will issue strange things in your R console!
+## TODO: install and configure myGTKmenu... + add shortcut keys!
+## Use xbindkeys to bind shell commands to keyboard and mouse keys
+## chmod +x myGtkmenu
+##
+## THIS IS THE OLD VERSION (COMMENTED CODE BELLOW!)
## Explanation: to run this, you need to install xvkbd and file-browser-applet
## for Gnome. Under Ubuntu, you make:
## sudo apt-get install file-browser-apple
@@ -169,7 +196,7 @@
## Then, you need to install and configure a file browser applet in a panel
## right-click in a panel, select 'add to Panel...' and drag&drop a 'File Browser'
## Right-click on the file browser and select 'Preferences'. In the preference
-## box, eleminate the default entry (Home) and add all subdirectories from
+## box, eliminate the default entry (Home) and add all subdirectories from
## ~/Scripts/Applications/R. You can access R menus from there, and it sends
## corresponding commands to the focused window (e.g., a terminal running R)
## TODO: find a similar item for KDE and new Ubuntu unity interface!
@@ -178,76 +205,267 @@
.unixMenuFolder <- function ()
{
## Get the root folder for the R menus
- return(getOption("menuFolder", default = "~/R/R menu"))
+ return(getOption("menuFolder", default = "/tmp"))
}
-.unixMenuClear <- function () {
+.unixMenuFile <- function ()
+{
+ ## Get the name of the file that contains the R menu
+ return(file.path(.unixMenuFolder(), paste(Sys.getenv("WINDOWID"),
+ "Menu.txt", sep = "")))
+}
+
+.unixMenuFileInit <- function ()
+{
+ ## Initialize the R menu file with default items
+ fil <- .unixMenuFile()
+ ## Get the default R menu and start from there
+ def <- file.path("~", "SciViews", "menus", "RMenu.txt")
+ if (file.exists(def)) {
+ file.copy(def, fil, overwrite = TRUE)
+ } else file.copy(system.file("gui", "RMenu.txt", package = "svDialogs"),
+ fil, overwrite = TRUE)
+ return(invisible(NULL))
+}
+
+.unixMenuSave <- function (mnu, file = TRUE)
+{
+ ## Save the menu structure in both Rmenu object in TempEnv and in a file
+ ## mnu is either a list of lists with menu entries, or NULL to delete all
+ ## custom menus
+ assignTemp("Rmenu", mnu)
+ if (!isTRUE(file)) return(invisible(NULL))
+ ## The menu file is:
+ fil <- .unixMenuFile()
+ if (is.null(mnu)) {
+ ## Clear the file
+ unlink(fil)
+ } else {
+ ## Populate the file with the content of the Rmenu object
+ makeMenu <- function (lst, indent = 0, file = fil) {
+ l <- length(lst)
+ if (l < 1) return()
+ nms <- names(lst)
+ for (i in 1:l) {
+ item <- nms[i]
+ if (is.list(lst[[i]])) {
+ ## Create a new menu
+ cat("\n", rep("\t", indent), "submenu=", item, "\n",
+ sep = "", file = file, append = TRUE)
+ makeMenu(lst[[i]], indent = indent + 1)
+ } else {
+ ## Is this a separator?
+ if (grepl("^-", item)) {
+ cat("\n", rep("\t", indent), "separator\n",
+ sep = "", file = file, append = TRUE)
+ } else { # Add an item in current menu
+ ind <- rep("\t", indent)
+ ## Rework commands using xvkbd -text "cmd\r"
+ cmd <- as.character(lst[[i]])[1]
+ if (cmd == "none") {
+ cmd <- "NULL" # This is the "no cmd" for ctxmenu
+ } else {
+ cmd <- paste(cmd, "\\r", sep = "")
+ cmd <- paste("xvkbd -text", shQuote(cmd))
+ }
+ cat("\n", ind, "item=", item, "\n", ind, "cmd=", cmd,
+ "\n", sep = "", file = file, append = TRUE)
+ }
+ }
+ }
+ }
+ ## Initialize the menu with default items
+ .unixMenuFileInit()
+ ## Add custom menus to it...
+ cat("\nseparator # Here starts the custom R menus\n\n",
+ file = fil, append = TRUE)
+ makeMenu(mnu)
+ }
+ return(invisible(fil))
+}
+
+.unixMenuClear <- function ()
+{
## To be called when svDialogs package loads: make sure to zap all
## custom menu items that may have been previously defined
## (also call it when the package closes)
- odir <- getwd()
- on.exit(setwd(odir))
- res <- try(setwd(.unixMenuFolder()), silent = TRUE)
- if (inherits(res, "try-error")) {
- ## The directory does not exists yet... create it!
- dir.create(.unixMenuFolder(), recursive = TRUE)
- } else {
- ## The directory already exists... clear it now
- setwd("..")
- folder <- file.path(".", basename(.unixMenuFolder()))
- unlink(folder, recursive = TRUE)
- dir.create(folder, recursive = TRUE)
- }
+# odir <- getwd()
+# on.exit(setwd(odir))
+# res <- try(setwd(.unixMenuFolder()), silent = TRUE)
+# if (inherits(res, "try-error")) {
+# ## The directory does not exists yet... create it!
+# dir.create(.unixMenuFolder(), recursive = TRUE)
+# ## TODO: put the default R menu there...
+# } else {
+# ## The directory already exists... clear it now
+# setwd("..")
+# folder <- file.path(".", basename(.unixMenuFolder()))
+# unlink(folder, recursive = TRUE)
+# dir.create(folder, recursive = TRUE)
+# ## TODO: a different procedure that does not delete the default R menu
+# }
## Now, I can assume that the dir is created and is empty
+
+ ## Make also sure that 'Rmenu' application is installed
+ ## TODO...
+
+ ## Also clear the local object
+ .unixMenuSave(NULL)
+ unlink(.unixMenuFile())
return(invisible(NULL))
}
-.unixMenuAdd <- function (menuname) {
- ## I just need to create (recursively) the directories
- dir.create(file.path(.unixMenuFolder(), menuname),
- showWarnings = FALSE, recursive = TRUE)
- return(invisible(NULL))
+.unixMenuAdd <- function (menuname, itemname = NULL, action = "none") {
+# ## I just need to create (recursively) the directories
+# dir.create(file.path(.unixMenuFolder(), menuname),
+# showWarnings = FALSE, recursive = TRUE)
+
+ ## Add this menu to our Rmenu object
+ mnu <- .Rmenu()
+ items <- strsplit(as.character(menuname), "/", fixed = TRUE)[[1]]
+ ## allow for a maximum of 5 sublevels (should be largely enough!)
+ l <- length(items)
+ if (l == 1) {
+ if (!is.null(mnu[[items[1]]])) {
+ ## If this is not a list, we got an error
+ if (!is.list(mnu[[items[1]]]))
+ stop(menuname, " is already defined and is not a menu")
+ } else { # Create it
+ mnu[[items[1]]] <- list()
+ }
+ ## Do we create an menu item there too?
+ if (!is.null(itemname))
+ mnu[[items[1]]][[itemname]] <- action
+ } else if (l == 2) {
+ if (!is.null(mnu[[items[1]]][[items[2]]])) {
+ ## If this is not a list, we got an error
+ if (!is.list(mnu[[items[1]]][[items[2]]]))
+ stop(menuname, " is already defined and is not a menu")
+ } else { # Create it
+ mnu[[items[1]]][[items[2]]] <- list()
+ }
+ ## Do we create an menu item there too?
+ if (!is.null(itemname))
+ mnu[[items[1]]][[items[2]]][[itemname]] <- action
+ } else if (l == 3) {
+ if (!is.null(mnu[[items[1]]][[items[2]]][[items[3]]])) {
+ ## If this is not a list, we got an error
+ if (!is.list(mnu[[items[1]]][[items[2]]][[items[3]]]))
+ stop(menuname, " is already defined and is not a menu")
+ } else { # Create it
+ mnu[[items[1]]][[items[2]]][[items[3]]] <- list()
+ }
+ ## Do we create an menu item there too?
+ if (!is.null(itemname))
+ mnu[[items[1]]][[items[2]]][[items[3]]][[itemname]] <- action
+ } else if (l == 4) {
+ if (!is.null(mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]])) {
+ ## If this is not a list, we got an error
+ if (!is.list(mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]]))
+ stop(menuname, " is already defined and is not a menu")
+ } else { # Create it
+ mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]] <- list()
+ }
+ ## Do we create an menu item there too?
+ if (!is.null(itemname))
+ mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[itemname]] <- action
+ } else if (l == 5) {
+ if (!is.null(mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[items[5]]])) {
+ ## If this is not a list, we got an error
+ if (!is.list(mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[items[5]]]))
+ stop(menuname, " is already defined and is not a menu")
+ } else { # Create it
+ mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[items[5]]] <- list()
+ }
+ ## Do we create an menu item there too?
+ if (!is.null(itemname))
+ mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[items[5]]][[itemname]] <- action
+ } else if (l > 5) {
+ stop("You cannot use more than 5 menu levels")
+ }
+ ## Save these changes
+ .unixMenuSave(mnu)
+ return(invisible(NULL))
}
.unixMenuAddItem <- function (menuname, itemname, action) {
- ## Make sure that the dir is created
- .unixMenuAdd(menuname)
- ## Add an executable file in it with 'itemname' name
- ## and containing: xvkbd -text "action\r" except if action is "none"
- cmdFile <- file.path(.unixMenuFolder(), menuname, itemname)
- if (action == "none") {
- cat("\n", file = cmdFile)
- } else {
- ## Make sure to quote "
- action <- gsub('"', '\\\\"', action)
- ## Also replace \n, \r and \t (and wait 200ms between lines)
- action <- gsub('\n', '\\\\r\\\\D2', action)
- action <- gsub('\r', '\\\\r\\\\D2', action)
- action <- gsub('\t', ' ', action)
- cat("xvkbd -text \"", action, "\\r\"\n", sep = "", file = cmdFile)
- }
- ## Make this file executable
- Sys.chmod(cmdFile, mode = "755")
- return(invisible(NULL))
+ return(.unixMenuAdd(menuname, itemname, action))
+# ## Make sure that the dir is created
+# .unixMenuAdd(menuname)
+# ## Add an executable file in it with 'itemname' name
+# ## and containing: xvkbd -text "action\r" except if action is "none"
+# cmdFile <- file.path(.unixMenuFolder(), menuname, itemname)
+# if (action == "none") {
+# cat("\n", file = cmdFile)
+# } else {
+# ## Make sure to quote "
+# action <- gsub('"', '\\\\"', action)
+# ## Also replace \n, \r and \t (and wait 200ms between lines)
+# action <- gsub('\n', '\\\\r\\\\D2', action)
+# action <- gsub('\r', '\\\\r\\\\D2', action)
+# action <- gsub('\t', ' ', action)
+# cat("xvkbd -text \"", action, "\\r\"\n", sep = "", file = cmdFile)
+# }
+# ## Make this file executable
+# Sys.chmod(cmdFile, mode = "755")
+# return(invisible(NULL))
}
.unixMenuDel <- function (menuname) {
- ## Unlink does not like ~ => change working dir first
- odir <- getwd()
- on.exit(setwd(odir))
- setwd(.unixMenuFolder())
- unlink(menuname, recursive = TRUE)
- return(invisible(NULL))
+ mnu <- .Rmenu()
+ items <- strsplit(as.character(menuname), "/", fixed = TRUE)[[1]]
+ ## Allow for a maximum of 5 sublevels (should be largely enough!)
+ l <- length(items)
+ if (l == 1 && !is.null(mnu[[items[1]]])) {
+ mnu[[items[1]]] <- NULL
+ } else if (l == 2 && !is.null(mnu[[items[1]]][[items[2]]])) {
+ mnu[[items[1]]][[items[2]]] <- NULL
+ } else if (l == 3 && !is.null(mnu[[items[1]]][[items[2]]][[items[3]]])) {
+ mnu[[items[1]]][[items[2]]][[items[3]]] <- NULL
+ } else if (l == 4 && !is.null(mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]])) {
+ mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]] <- NULL
+ } else if (l == 5 && !is.null(mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[items[5]]])) {
+ mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[items[5]]] <- NULL
+ } else return(invisible(NULL))
+ ## Save these changes
+ .unixMenuSave(mnu)
+ return(invisible(NULL))
+
+# ## Unlink does not like ~ => change working dir first
+# odir <- getwd()
+# on.exit(setwd(odir))
+# setwd(.unixMenuFolder())
+# unlink(menuname, recursive = TRUE)
+# return(invisible(NULL))
}
.unixMenuDelItem <- function (menuname, itemname) {
- ## Unlink does not like ~ => change working dir first
- path <- file.path(.unixMenuFolder(), menuname)
- if (file.exists(path) && file.info(path)$isdir) {
- odir <- getwd()
- on.exit(setwd(odir))
- setwd(path)
- unlink(itemname)
- }
- return(invisible(NULL))
+ mnu <- .Rmenu()
+ items <- strsplit(as.character(menuname), "/", fixed = TRUE)[[1]]
+ ## Allow for a maximum of 5 sublevels (should be largely enough!)
+ l <- length(items)
+ if (l == 1 && !is.null(mnu[[items[1]]][[itemname]])) {
+ mnu[[items[1]]][[itemname]] <- NULL
+ } else if (l == 2 && !is.null(mnu[[items[1]]][[items[2]]][[itemname]])) {
+ mnu[[items[1]]][[items[2]]][[itemname]] <- NULL
+ } else if (l == 3 && !is.null(mnu[[items[1]]][[items[2]]][[items[3]]][[itemname]])) {
+ mnu[[items[1]]][[items[2]]][[items[3]]][[itemname]] <- NULL
+ } else if (l == 4 && !is.null(mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[itemname]])) {
+ mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[itemname]] <- NULL
+ } else if (l == 5 && !is.null(mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[items[5]]][[itemname]])) {
+ mnu[[items[1]]][[items[2]]][[items[3]]][[items[4]]][[items[5]]][[itemname]] <- NULL
+ } else return(invisible(NULL))
+ ## Save these changes
+ .unixMenuSave(mnu)
+ return(invisible(NULL))
+
+# ## Unlink does not like ~ => change working dir first
+# path <- file.path(.unixMenuFolder(), menuname)
+# if (file.exists(path) && file.info(path)$isdir) {
+# odir <- getwd()
+# on.exit(setwd(odir))
+# setwd(path)
+# unlink(itemname)
+# }
+# return(invisible(NULL))
}
Modified: pkg/svDialogs/R/svDialogs-internal.R
===================================================================
--- pkg/svDialogs/R/svDialogs-internal.R 2012-01-19 16:11:37 UTC (rev 420)
+++ pkg/svDialogs/R/svDialogs-internal.R 2012-01-30 11:55:20 UTC (rev 421)
@@ -2,6 +2,8 @@
{
## Clear menus
.menuClear()
+ ## ... and create the default one
+ .menuFileInit()
}
.onUnload <- function (libpath)
Added: pkg/svDialogs/inst/gui/RMenu.txt
===================================================================
--- pkg/svDialogs/inst/gui/RMenu.txt (rev 0)
+++ pkg/svDialogs/inst/gui/RMenu.txt 2012-01-30 11:55:20 UTC (rev 421)
@@ -0,0 +1,371 @@
+# R default menu
+
+menupos= 0 0
+
+item=SciViews R
+cmd=NULL
+
+separator
+
+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"'
+
+ item=_New script
+ cmd=NULL
+
+ item=_Open script...
+ cmd=NULL
+
+ item=_Display file(s)...
+ cmd=NULL
+
+ separator
+
+ item=_Load Workspace...
+ cmd=NULL # R images (*.Rdata)
+
+ item=_Save Workspace...
+ cmd=NULL
+
+ separator
+
+ item=_Load History...
+ cmd=NULL # (*.*)
+
+ item=_Save History...
+ cmd=NULL
+
+ separator
+
+ item=_Change dir...
+ cmd=NULL
+
+ separator
+
+ item=_Print...
+ cmd=NULL
+
+ item=_Save to File...
+ cmd=NULL # lastsave.txt - Text file (*.txt)
+
+ separator
+
+ item=_Exit
+ cmd=NULL
+
+submenu=_Edit
+
+ item=Copy
+ cmd=NULL
+
+ item=Paste
+ cmd=NULL
+
+ item=Paste commands only
+ cmd=NULL
+
+ item=Copy and Paste
+ cmd=NULL
+
+ item=Clear console
+ cmd=NULL
+
+ separator
+
+ item=Data editor...
+ cmd=NULL
+
+ separator
+
+ item=GUI preferences...
+ cmd=NULL
+
+submenu=_Misc
+
+ item=Stop current computation
+ cmd=NULL
+
+ 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"
+
+ item=Remove all objects
+ cmd=sh -c 'zenity --question --title="Remove all objects" --text="Are you sure?" && xvkbd -text "rm(list = ls(all = TRUE))\r"'
+
+ item=List search path
+ cmd=xvkbd -text "search()\r"
+
+submenu=_Packages
+
+ item=Load package...
+ cmd=xvkbd -text "local({pkg <- select.list(sort(.packages(all.available = TRUE)), graphics = TRUE)\r if (nchar(pkg)) library(pkg, character.only = TRUE)})\r"
+
+ separator
+
+ item=Set CRAN mirror...
+ cmd=xvkbd -text "chooseCRANmirror()\r"
+
+ item=Select repositories...
+ cmd=xvkbd -text "setRepositories()\r"
+
+ item=Install package(s)...
+ cmd=NULL #object not found! xvkbd -text "utils:::menuInstallPkgs()\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)"
+
+submenu=_Windows
+
+ item=New graph
+ cmd=xvkbd -text "dev.new()\r"
+
+ item=Activate next graph
+ cmd=xvkbd -text "dev.set()\r"
+
+ item=Close all graphs
+ cmd=xvkbd -text "graphics.off()\r"
+
+submenu=_Help
+
+ item=Console
+ cmd=NULL
+
+ separator
+
+ item=FAQ on R
+ cmd=NULL
+
+ submenu=_Manuals (in PDF)
+
+ item=An introduction to R
+ cmd=NULL
+
+ item=R Reference Manual
+ cmd=NULL
+
+ item=R Data Import/Export
+ cmd=NULL
+
+ item=R Language Definition
+ cmd=NULL
+
+ item=Writing R Extensions
+ cmd=NULL
+
+ item=R Internals
+ cmd=NULL
+
+ item=R Installation and Administration
+ cmd=NULL
+
+ item=Sweave User
+ cmd=NULL
+
+ separator
+
+ item=R functions (text)...
+ cmd=NULL #help(<topic>)
+
+ item=Html help
+ cmd=xvkbd -text "help.start()\r"
+
+ item=Search help...
+ cmd=NULL #help.search(<topic>)
+
+ item=search.r-project.org...
+ cmd=NULL #RSiteSearch(<topic>)
+
+ separator
+
+ item=Apropos...
+ cmd=NULL #apropos(<topic>)
+
+ separator
+
+ item=R project home page
+ cmd=NULL #display http://www.r-project.org
+
+ item=CRAN home page
+ cmd=NULL #display http://cran.r-project.org
+
+ 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'
+
+
+#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
+
Modified: pkg/svWidgets/R/Img.R
===================================================================
--- pkg/svWidgets/R/Img.R 2012-01-19 16:11:37 UTC (rev 420)
+++ pkg/svWidgets/R/Img.R 2012-01-30 11:55:20 UTC (rev 421)
@@ -58,6 +58,6 @@
## Create image resources by reading a series of image files from the 'gui'
## subdirectory of a package
dir <- system.file(subdir, package = package)
- res <- ImgRead(dir= dir, type = type, imgtype = imgtype)
+ res <- ImgRead(dir = dir, type = type, imgtype = imgtype)
return(invisible(res))
}
More information about the Sciviews-commits
mailing list