summaryrefslogtreecommitdiff
path: root/pluma
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-07-01 02:31:33 +0200
committerZenWalker <[email protected]>2017-07-01 02:31:33 +0200
commit4c2ed0e7d7221b6ff7d570012f31bb76796cc38a (patch)
treee86bbd8dc8a22f4472cb591fcfea8b821b99fb3b /pluma
parent2b34ed27ac4abde8d70735c008bd214a79b45491 (diff)
downloadpluma-4c2ed0e7d7221b6ff7d570012f31bb76796cc38a.tar.bz2
pluma-4c2ed0e7d7221b6ff7d570012f31bb76796cc38a.tar.xz
enable the abbility to save the document if it was changed externally
This change is needed after https://github.com/mate-desktop/pluma/commit/2b34ed27ac4abde8d70735c008bd214a79b45491
Diffstat (limited to 'pluma')
-rw-r--r--pluma/pluma-window.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pluma/pluma-window.c b/pluma/pluma-window.c
index 82b72ade..8c5d95ba 100644
--- a/pluma/pluma-window.c
+++ b/pluma/pluma-window.c
@@ -690,13 +690,19 @@ set_sensitivity_according_to_tab (PlumaWindow *window,
action = gtk_action_group_get_action (window->priv->action_group,
"FileSave");
+
+ if (state == PLUMA_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION) {
+ gtk_text_buffer_set_modified (GTK_TEXT_BUFFER (doc), TRUE);
+ }
+
gtk_action_set_sensitive (action,
(state_normal ||
(state == PLUMA_TAB_STATE_EXTERNALLY_MODIFIED_NOTIFICATION) ||
(state == PLUMA_TAB_STATE_SHOWING_PRINT_PREVIEW)) &&
!pluma_document_get_readonly (doc) &&
!(lockdown & PLUMA_LOCKDOWN_SAVE_TO_DISK) &&
- (cansave));
+ (cansave) &&
+ (editable));
action = gtk_action_group_get_action (window->priv->action_group,
"FileSaveAs");