The R Project SVN R

Rev

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

Rev 33001 Rev 33756
Line 260... Line 260...
260
    textbox t = getdata(c);
260
    textbox t = getdata(c);
261
    EditorData p = getdata(t);
261
    EditorData p = getdata(t);
262
    int save;
262
    int save;
263
    char buf[EDITORMAXTITLE + 100];
263
    char buf[EDITORMAXTITLE + 100];
264
    if (ggetmodified(t)) {
264
    if (ggetmodified(t)) {
265
	snprintf(buf, EDITORMAXTITLE + 100, 
265
	snprintf(buf, EDITORMAXTITLE + 100,
266
		 "\"%s\" has been modified.  Do you want to save the changes?",
266
		 "\"%s\" has been modified.  Do you want to save the changes?",
267
		 (p->title ? p->title : "Untitled"));
267
		 (p->title ? p->title : "Untitled"));
268
	save = askyesnocancel(buf);
268
	save = askyesnocancel(buf);
269
	switch (save) {
269
	switch (save) {
270
	case YES:
270
	case YES:
271
	    editorsave(c);
271
	    editorsave(c);
272
	    break;
272
	    break;
273
	case NO:
273
	case NO:
274
	    break;
274
	    break;
275
	case CANCEL:
275
	case CANCEL:
276
	    return 1; /* used in rui.c (closeconsole) to abort closing 
276
	    return 1; /* used in rui.c (closeconsole) to abort closing
277
			 the whole of Rgui */
277
			 the whole of Rgui */
278
	}
278
	}
279
    }
279
    }
280
    return 0;
280
    return 0;
281
}
281
}
Line 736... Line 736...
736
 
736
 
737
void editorsetfont(font f)
737
void editorsetfont(font f)
738
{
738
{
739
    int i, ismod;
739
    int i, ismod;
740
    textbox t;
740
    textbox t;
741
    setfont(f);
-
 
742
    for (i = 0; i<neditors; ++i) {
741
    for (i = 0; i < neditors; i++) {
743
	t = getdata(REditors[i]);
742
	t = getdata(REditors[i]);
-
 
743
 	ismod = ggetmodified(t);
744
 	ismod = ggetmodified(t); /* Don't change the modification flag when changing font  */
744
	/* Don't change the modification flag when changing font  */
745
	settextfont(t, f);
745
	settextfont(t, f);
746
	gsetmodified(t, ismod);
746
	gsetmodified(t, ismod);
747
	show(t);
747
	show(t);
748
    }
748
    }
749
}
749
}