The R Project SVN R

Rev

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

Rev 51948 Rev 52072
Line 151... Line 151...
151
    strcpy(gui->style, "normal");
151
    strcpy(gui->style, "normal");
152
    gui->tt_font = 1;
152
    gui->tt_font = 1;
153
    gui->pointsize = 10;
153
    gui->pointsize = 10;
154
    strcpy(gui->language, "");
154
    strcpy(gui->language, "");
155
    gui->buffered = 1;
155
    gui->buffered = 1;
-
 
156
    gui->warning[0] = 0;
156
 
157
 
157
#ifdef USE_MDI
158
#ifdef USE_MDI
158
    gui->toolbar = ((RguiMDI & RW_TOOLBAR) != 0);
159
    gui->toolbar = ((RguiMDI & RW_TOOLBAR) != 0);
159
    gui->statusbar = ((RguiMDI & RW_STATUSBAR) != 0);
160
    gui->statusbar = ((RguiMDI & RW_STATUSBAR) != 0);
160
    gui->MDI = ((RguiMDI & RW_MDI) != 0);
161
    gui->MDI = ((RguiMDI & RW_MDI) != 0);
Line 222... Line 223...
222
	/* Font colours */
223
	/* Font colours */
223
	for (int i=0; i<numGuiColors; i++)
224
	for (int i=0; i<numGuiColors; i++)
224
	    gui->guiColors[i] = guiColors[i];
225
	    gui->guiColors[i] = guiColors[i];
225
 
226
 
226
	/* MDIsize is not currently a choice in the dialog, only in the Rconsole file, so is not set here */
227
	/* MDIsize is not currently a choice in the dialog, only in the Rconsole file, so is not set here */
-
 
228
	gui->warning[0] = 0;
227
    } else
229
    } else
228
	getDefaults(gui);
230
	getDefaults(gui);
229
}
231
}
230
 
232
 
231
static int has_changed(Gui a, Gui b)
233
static int has_changed(Gui a, Gui b)
Line 500... Line 502...
500
    optf = askfilenamewithdir(G_("Select 'Rconsole' file"), "Rconsole", buf);
502
    optf = askfilenamewithdir(G_("Select 'Rconsole' file"), "Rconsole", buf);
501
    if(!optf) return;
503
    if(!optf) return;
502
 
504
 
503
    getChoices(&newGUI);
505
    getChoices(&newGUI);
504
    if (loadRconsole(&newGUI, optf)) {
506
    if (loadRconsole(&newGUI, optf)) {
-
 
507
        if (strlen(newGUI.warning)) askok(newGUI.warning);
505
	cleanup();
508
	cleanup();
506
	showDialog(&newGUI);
509
	showDialog(&newGUI);
507
    }
510
    }
508
}
511
}
509
 
512
 
Line 677... Line 680...
677
	    if (!strcmp(opt[0], "language")) {
680
	    if (!strcmp(opt[0], "language")) {
678
		strcpy(gui->language, opt[1]);
681
		strcpy(gui->language, opt[1]);
679
		done = 1;
682
		done = 1;
680
	    }
683
	    }
681
	}
684
	}
682
	if (!done) {
685
	if (!done) 
683
	    char  buf[128];
686
	    snprintf(gui->warning, sizeof(gui->warning), 
684
 
-
 
685
	    snprintf(buf, 128, G_("Error at line %d of file %s"),
687
	             G_("Ignored '%s' at line %d of file %s"), 
686
		     optline(), optfile());
688
	                opt[0], optline(), optfile());
687
	    askok(buf);
-
 
688
	    cfgerr = 1;
-
 
689
	}
-
 
690
    }
689
    }
691
    return !cfgerr;
690
    return !cfgerr;
692
}
691
}
693
 
692
 
694
static void apply(button b) /* button callback */
693
static void apply(button b) /* button callback */