[Rqda-commits] r44 - in pkg: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Dec 14 02:47:55 CET 2008
Author: wincent
Date: 2008-12-14 02:47:55 +0100 (Sun, 14 Dec 2008)
New Revision: 44
Modified:
pkg/ChangeLog
pkg/R/Setting.R
pkg/R/deletion.R
pkg/R/utils.R
pkg/man/RQDA-internal.rd
pkg/man/RQDA-package.Rd
pkg/man/write.FileList.rd
Log:
Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog 2008-12-13 06:27:27 UTC (rev 43)
+++ pkg/ChangeLog 2008-12-14 01:47:55 UTC (rev 44)
@@ -1,3 +1,11 @@
+2008-12-14
+ * Add help of SearchFiles and GetFileId.
+ * Change the default of ask argument of undelete to TRUE.
+
+2008-12-13
+ * New function of gselect.list, gtk version of select.list.
+ * Add help of SummaryCoding, improve help of write.FileList.
+
2008-12-12
* Fix bugs of SortByTime(), now should work for R < 2.8.0. Fix bug of GetCodingTable and SummaryCoding.
* New function of RunOnSelected. Use it to replace select.list.
Modified: pkg/R/Setting.R
===================================================================
--- pkg/R/Setting.R 2008-12-13 06:27:27 UTC (rev 43)
+++ pkg/R/Setting.R 2008-12-14 01:47:55 UTC (rev 44)
@@ -1,5 +1,5 @@
## "back.col" "BOM" "encoding" "fore.col" "owner"
-addSettingGUI <- function(container){
+addSettingGUI <- function(container,width=12){
Setting <- list(type = "ggroup",
horizontal = FALSE,
children = list(
@@ -11,27 +11,27 @@
children = list(
list(name = "owner",
label = "Name of Coder",
- type = "gedit",
+ type = "gedit",width=width,
text = .rqda$owner
),
list(name = "encoding",
label = "File Encoding",
- type = "gedit",
+ type = "gedit",width=width,
text = .rqda$encoding
),
list(name = "BOM",
label = "BOM",
- type = "gcombobox",
+ type = "gcombobox",width=width,
items = c(FALSE, TRUE)
),
list(name = "fore.col",
label = "Color for Coding",
- type = "gedit",
+ type = "gedit",width=width,
text = .rqda$fore.col
),
list(name = "back.col",
label = "Color for Case",
- type = "gedit",
+ type = "gedit",width=width,
text = .rqda$back.col
)
)
@@ -44,7 +44,7 @@
SettingFL <- gformlayout(Setting, cont = container, expand=TRUE)
-ButtonContainer <- ggroup(cont = container)
+ButtonContainer <- ggroup(cont = container) ##, width=100) ## not necessary to set width here
addSpring(ButtonContainer)
resetButton <- gbutton("Default", cont = ButtonContainer)
okButton <- gbutton("OK", cont = ButtonContainer)
Modified: pkg/R/deletion.R
===================================================================
--- pkg/R/deletion.R 2008-12-13 06:27:27 UTC (rev 43)
+++ pkg/R/deletion.R 2008-12-14 01:47:55 UTC (rev 44)
@@ -124,7 +124,7 @@
print("Nothing to clear.")
} else {
if (ask){
- del <- select(del[,1],multiple=TRUE)$selected ##select.list(del[,1],multiple=TRUE)
+ del <- gselect.list(del[,1],multiple=TRUE) ##select.list(del[,1],multiple=TRUE)
} else {
del <- del[,1]
}
@@ -152,7 +152,7 @@
-undelete <- function(type=c("file","code","case","codecategory","filecategory"),ask=FALSE){
+undelete <- function(type=c("file","code","case","codecategory","filecategory"),ask=TRUE){
## set the status back to 1
## beginning of helper functions
@@ -228,11 +228,12 @@
print("Nothing to clear.")
} else {
if (ask){
- del <- select(del[,1],multiple=TRUE)$selected ##select.list(del[,1],multiple=TRUE)
+ del <- gselect.list(del[,1],multiple=TRUE) ##select.list(del[,1],multiple=TRUE)
} else {
del <- del[,1]
}
- switch(type,
+ if (del!=""){
+ switch(type,
## use switch to run Fun
file=fileFun(del=del),
code=codeFun(del=del),
@@ -240,6 +241,7 @@
codecategory=CcatFun(del=del),
filecategory=FcatFun(del=del)
)
+ }
}
}
}
Modified: pkg/R/utils.R
===================================================================
--- pkg/R/utils.R 2008-12-13 06:27:27 UTC (rev 43)
+++ pkg/R/utils.R 2008-12-14 01:47:55 UTC (rev 44)
@@ -180,3 +180,24 @@
}
+gselect.list <- function(x,multiple=TRUE,title=NULL,...){
+ ## gtk version of select.list()
+ ## Thanks go to John Verzani for his help.
+ title <- ifelse(multiple,"Select one or more","Select one")
+
+ helper <- function(){
+ ans<-new.env()
+ x1<-ggroup(horizontal=FALSE) # no parent container here
+ x2<-gtable(x,multiple=multiple,con=x1,expand=TRUE)
+ ret <- gbasicdialog(title=title,widget=x1,handler=function(h,...){
+ value <- svalue(x2)
+ assign("selected",value,env=h$action$env)
+ dispose(x1)
+ },action=list(env=ans))
+ ans
+ }## end helper function
+ items <- helper()$selected
+ if (is.null(items)) items <- ""
+ items
+}
+
Modified: pkg/man/RQDA-internal.rd
===================================================================
--- pkg/man/RQDA-internal.rd 2008-12-13 06:27:27 UTC (rev 43)
+++ pkg/man/RQDA-internal.rd 2008-12-14 01:47:55 UTC (rev 44)
@@ -89,7 +89,6 @@
\alias{UncodedFileNamesUpdate}
\alias{ProjectMemoWidget}
\alias{FileNameWidgetUpdate}
-\alias{GetFileId}
\alias{OrderByTime}
%% add related alias functions here.
Modified: pkg/man/RQDA-package.Rd
===================================================================
--- pkg/man/RQDA-package.Rd 2008-12-13 06:27:27 UTC (rev 43)
+++ pkg/man/RQDA-package.Rd 2008-12-14 01:47:55 UTC (rev 44)
@@ -22,29 +22,7 @@
%% description of the package
%% main functions.
The workhorse function for end-user is the RQDA(), you can use RQDA() to
-start the GUI after library(QRDA).
-}
-
-\note{
-The basic usage:
-1. Open or create new project.
-2. Import files.
-3. Select a file and open it by click button open.
-4. Add codes.
-5. Select a codes, select text segment in the open file, and press
-button mark. Select the same text segment and click button Unmark, you
-can undo the action.
-6. Do more coding as step 5.
-7. Select a code and click button retrieval to see what text
-segments have been attached to that code.
-
-About memo buttons in the code tab:
-1. C-memo is used to attach memo to a selected code. You can select a code then click C-memo button
-to view/add memo.
-2. C2Memo is used to attach a memo to a coded segments. In the open file, you can see the coded segments
-(highlighted), select one segment, and click C2Memo, you can view/add memo to that coded-segment.
-}
-
+start the GUI after library(QRDA). Please Refer to the documentation section of the project homepage for the usage of RQDA.}
\author{
Huang Ronggui
Modified: pkg/man/write.FileList.rd
===================================================================
--- pkg/man/write.FileList.rd 2008-12-13 06:27:27 UTC (rev 43)
+++ pkg/man/write.FileList.rd 2008-12-14 01:47:55 UTC (rev 44)
@@ -16,7 +16,14 @@
\item{con}{ Don't change this argument.}
\item{\dots}{ \code{\dots} is not used.}
}
-
+\details{
+The file content will converted to UTF-8 character before write to
+*.rqda. The original content can be in any suitable encoding, so you
+can inspect the content correctly; In other words,the better
+practices is to used the corresponding encoding (you can get a hint by
+\code{localeToCharset} function) to save the imported
+files.
+}
\value{
This function is used for the side-effects. No value is return.
}
More information about the Rqda-commits
mailing list