[gedit/wip/improve-printing] Window: do not allow saving when the print preview is shown
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/improve-printing] Window: do not allow saving when the print preview is shown
- Date: Sat, 21 Feb 2015 16:54:08 +0000 (UTC)
commit 128d35b9fd8b57406019618d8ca34be7c6abf739
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Feb 21 17:48:28 2015 +0100
Window: do not allow saving when the print preview is shown
Supporting document saving when the print preview is shown is not really
useful and makes the code in GeditTab more complicated and error-prone.
A later commit will simplify the code in GeditTab.
What will still be supported is to quit gedit and save unsaved
documents, even if for some of them the print preview is shown. In that
case, the print preview will simply be closed before saving.
Also, the Save As was not well supported with the print preview, the
file name was not updated in the print preview.
gedit/gedit-window.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 25e0ff7..b840b8e 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -599,8 +599,7 @@ update_actions_sensitivity (GeditWindow *window)
action = g_action_map_lookup_action (G_ACTION_MAP (window), "save");
g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
((state == GEDIT_TAB_STATE_NORMAL) ||
- (state == GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION) ||
- (state == GEDIT_TAB_STATE_SHOWING_PRINT_PREVIEW)) &&
+ (state == GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION)) &&
(doc != NULL) && !gedit_document_get_readonly (doc) &&
!(lockdown & GEDIT_LOCKDOWN_SAVE_TO_DISK));
@@ -608,8 +607,7 @@ update_actions_sensitivity (GeditWindow *window)
g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
((state == GEDIT_TAB_STATE_NORMAL) ||
(state == GEDIT_TAB_STATE_SAVING_ERROR) ||
- (state == GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION) ||
- (state == GEDIT_TAB_STATE_SHOWING_PRINT_PREVIEW)) &&
+ (state == GEDIT_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION)) &&
(doc != NULL) &&
!(lockdown & GEDIT_LOCKDOWN_SAVE_TO_DISK));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]