The R Project SVN R

Rev

Rev 28138 | Rev 28888 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28138 Rev 28163
Line 62... Line 62...
62
static menubar RMenuBar;
62
static menubar RMenuBar;
63
static menuitem msource, mdisplay, mload, msave, mloadhistory,
63
static menuitem msource, mdisplay, mload, msave, mloadhistory,
64
    msavehistory, mpaste, mcopy, mcopypaste, mlazy, mconfig,
64
    msavehistory, mpaste, mcopy, mcopypaste, mlazy, mconfig,
65
    mls, mrm, msearch, mhelp, mmanintro, mmanref, mmandata,
65
    mls, mrm, msearch, mhelp, mmanintro, mmanref, mmandata,
66
    mmanext, mmanlang, mapropos, mhelpstart, mhelpsearch, mFAQ,
66
    mmanext, mmanlang, mapropos, mhelpstart, mhelpsearch, mFAQ,
67
    mrwFAQ, mpkgl, mpkgi, mpkgil, mpkgb, mpkgu, mpkgbu, mde;
67
    mrwFAQ, mpkgl, mpkgi, mpkgil, mpkgb, mpkgu, mpkgbu, mde, mCRAN;
68
static int lmanintro, lmanref, lmandata, lmanlang, lmanext;
68
static int lmanintro, lmanref, lmandata, lmanlang, lmanext;
69
static menu m, mman;
69
static menu m, mman;
70
static char cmd[1024];
70
static char cmd[1024];
71
 
71
 
72
/* menu callbacks */
72
/* menu callbacks */
Line 492... Line 492...
492
	    "    The R Development Core Team");
492
	    "    The R Development Core Team");
493
    askok(s);
493
    askok(s);
494
/*    show(RConsole); */
494
/*    show(RConsole); */
495
}
495
}
496
 
496
 
-
 
497
static void menuRhome(control m)
-
 
498
{
-
 
499
    ShellExecute(NULL, "open", "http://www.r-project.org", NULL, NULL, SW_SHOW);
-
 
500
}
-
 
501
 
-
 
502
static void menuCRAN(control m)
-
 
503
{
-
 
504
    if (!ConsoleAcceptCmd) return;
-
 
505
    consolecmd(RConsole, "shell.exec(getOption('CRAN'))");
-
 
506
}
-
 
507
 
-
 
508
 
497
/* some menu commands can be issued only if R is waiting for input */
509
/* some menu commands can be issued only if R is waiting for input */
498
static void menuact(control m)
510
static void menuact(control m)
499
{
511
{
500
    if (consolegetlazy(RConsole)) check(mlazy); else uncheck(mlazy);
512
    if (consolegetlazy(RConsole)) check(mlazy); else uncheck(mlazy);
501
 
513
 
Line 517... Line 529...
517
	enable(mpkgb);
529
	enable(mpkgb);
518
	enable(mpkgil);
530
	enable(mpkgil);
519
	enable(mpkgu);
531
	enable(mpkgu);
520
	enable(mpkgbu);
532
	enable(mpkgbu);
521
	enable(mde);
533
	enable(mde);
-
 
534
	enable(mCRAN);
522
    } else {
535
    } else {
523
	disable(msource);
536
	disable(msource);
524
	disable(mload);
537
	disable(mload);
525
	disable(msave);
538
	disable(msave);
526
	disable(mls);
539
	disable(mls);
Line 534... Line 547...
534
	disable(mpkgb);
547
	disable(mpkgb);
535
	disable(mpkgil);
548
	disable(mpkgil);
536
	disable(mpkgu);
549
	disable(mpkgu);
537
	disable(mpkgbu);
550
	disable(mpkgbu);
538
	disable(mde);
551
	disable(mde);
-
 
552
	disable(mCRAN);
539
    }
553
    }
540
 
554
 
541
    if (consolecancopy(RConsole)) {
555
    if (consolecancopy(RConsole)) {
542
	enable(mcopy);
556
	enable(mcopy);
543
	enable(mcopypaste);
557
	enable(mcopypaste);
Line 1010... Line 1024...
1010
    if (!check_doc_file("doc\\html\\rwin.html")) disable(mhelpstart);
1024
    if (!check_doc_file("doc\\html\\rwin.html")) disable(mhelpstart);
1011
    MCHECK(mhelpsearch = newmenuitem("Search help...", 0, menuhelpsearch));
1025
    MCHECK(mhelpsearch = newmenuitem("Search help...", 0, menuhelpsearch));
1012
    MCHECK(newmenuitem("-", 0, NULL));
1026
    MCHECK(newmenuitem("-", 0, NULL));
1013
    MCHECK(mapropos = newmenuitem("Apropos...", 0, menuapropos));
1027
    MCHECK(mapropos = newmenuitem("Apropos...", 0, menuapropos));
1014
    MCHECK(newmenuitem("-", 0, NULL));
1028
    MCHECK(newmenuitem("-", 0, NULL));
-
 
1029
    MCHECK(newmenuitem("R Project home page", 0, menuRhome));
-
 
1030
    MCHECK(mCRAN = newmenuitem("CRAN", 0, menuCRAN));
-
 
1031
    MCHECK(newmenuitem("-", 0, NULL));
1015
    MCHECK(newmenuitem("About", 0, menuabout));
1032
    MCHECK(newmenuitem("About", 0, menuabout));
1016
    consolesetbrk(RConsole, menukill, ESC, 0);
1033
    consolesetbrk(RConsole, menukill, ESC, 0);
1017
    gl_hist_init(R_HistorySize, 0);
1034
    gl_hist_init(R_HistorySize, 0);
1018
    if (R_RestoreHistory) gl_loadhistory(R_HistoryFile);
1035
    if (R_RestoreHistory) gl_loadhistory(R_HistoryFile);
1019
    show(RConsole);
1036
    show(RConsole);