[gedit/wip/loader-saver: 2/2] GEDIT_DOCUMENT_ERROR_CANT_CREATE_BACKUP is unused
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/loader-saver: 2/2] GEDIT_DOCUMENT_ERROR_CANT_CREATE_BACKUP is unused
- Date: Mon, 6 Jan 2014 14:43:40 +0000 (UTC)
commit 66d52e94ce20e88ee1127f094f87df6b0a589238
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Jan 6 15:42:04 2014 +0100
GEDIT_DOCUMENT_ERROR_CANT_CREATE_BACKUP is unused
So to simplify the code we can remove its support.
G_IO_ERROR_CANT_CREATE_BACKUP is used instead.
gedit/gedit-document.h | 2 +-
gedit/gedit-io-error-info-bar.c | 6 ++----
gedit/gedit-tab.c | 6 ++----
3 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index e0c962a..1f09492 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -191,7 +191,7 @@ struct _GeditDocumentClass
enum
{
GEDIT_DOCUMENT_ERROR_EXTERNALLY_MODIFIED,
- GEDIT_DOCUMENT_ERROR_CANT_CREATE_BACKUP,
+ GEDIT_DOCUMENT_ERROR_CANT_CREATE_BACKUP, /* unused */
GEDIT_DOCUMENT_ERROR_TOO_BIG,
GEDIT_DOCUMENT_ERROR_ENCODING_AUTO_DETECTION_FAILED,
GEDIT_DOCUMENT_ERROR_CONVERSION_FALLBACK,
diff --git a/gedit/gedit-io-error-info-bar.c b/gedit/gedit-io-error-info-bar.c
index 1763294..4c3a5d9 100644
--- a/gedit/gedit-io-error-info-bar.c
+++ b/gedit/gedit-io-error-info-bar.c
@@ -904,10 +904,8 @@ gedit_no_backup_saving_error_info_bar_new (GFile *location,
g_return_val_if_fail (G_IS_FILE (location), NULL);
g_return_val_if_fail (error != NULL, NULL);
- g_return_val_if_fail (((error->domain == GEDIT_DOCUMENT_ERROR &&
- error->code == GEDIT_DOCUMENT_ERROR_CANT_CREATE_BACKUP) ||
- (error->domain == G_IO_ERROR &&
- error->code == G_IO_ERROR_CANT_CREATE_BACKUP)), NULL);
+ g_return_val_if_fail (error->domain == G_IO_ERROR &&
+ error->code == G_IO_ERROR_CANT_CREATE_BACKUP, NULL);
full_formatted_uri = g_file_get_parse_name (location);
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 84c4c0b..d5c70a4 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -1448,10 +1448,8 @@ document_saved (GeditDocument *document,
G_CALLBACK (externally_modified_error_info_bar_response),
tab);
}
- else if ((error->domain == GEDIT_DOCUMENT_ERROR &&
- error->code == GEDIT_DOCUMENT_ERROR_CANT_CREATE_BACKUP) ||
- (error->domain == G_IO_ERROR &&
- error->code == G_IO_ERROR_CANT_CREATE_BACKUP))
+ else if (error->domain == G_IO_ERROR &&
+ error->code == G_IO_ERROR_CANT_CREATE_BACKUP)
{
/* This error is recoverable */
emsg = gedit_no_backup_saving_error_info_bar_new (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]