[gedit] Do not ask confirmation when closing an empty new file
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Do not ask confirmation when closing an empty new file
- Date: Mon, 3 Mar 2014 13:11:43 +0000 (UTC)
commit 54b54059098bf2df126e796178fff48d25cf40da
Author: ghugesagar <ghugesss gmail com>
Date: Wed Feb 26 12:29:32 2014 +0530
Do not ask confirmation when closing an empty new file
https://bugzilla.gnome.org/show_bug.cgi?id=724777
gedit/gedit-document.c | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 430b8ee..5460752 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -1658,6 +1658,7 @@ document_saver_saving (GeditDocumentSaver *saver,
doc->priv->externally_modified = FALSE;
doc->priv->deleted = FALSE;
+ doc->priv->create = FALSE;
_gedit_document_set_readonly (doc, FALSE);
@@ -1942,24 +1943,12 @@ _gedit_document_needs_saving (GeditDocument *doc)
return TRUE;
}
- if (doc->priv->externally_modified ||
- doc->priv->deleted)
- {
- return TRUE;
- }
-
if (gedit_document_is_local (doc))
{
check_file_on_disk (doc);
-
- if (doc->priv->externally_modified ||
- doc->priv->deleted)
- {
- return TRUE;
- }
}
- return FALSE;
+ return (doc->priv->externally_modified || doc->priv->deleted) && !doc->priv->create;
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]