Fixed the "Discard" button when opening a new file

This commit is contained in:
Pierre Pronchery 2012-02-23 00:46:38 +00:00
parent c24bd0b284
commit 8ee8a71c7d

View File

@ -1,6 +1,6 @@
/* $Id$ */
static char const _copyright[] =
"Copyright (c) 2011 Pierre Pronchery <khorben@defora.org>";
"Copyright (c) 2006-2012 Pierre Pronchery <khorben@defora.org>";
/* This file is part of DeforaOS Desktop Editor */
static char const _license[] =
"This program is free software: you can redistribute it and/or modify\n"
@ -699,7 +699,7 @@ void editor_open(Editor * editor, char const * filename)
NULL);
if(res == GTK_RESPONSE_ACCEPT && editor_save(editor) != TRUE)
return;
else if(res != GTK_RESPONSE_CLOSE)
else if(res != GTK_RESPONSE_REJECT)
return;
}
tbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(editor->view));