From 4c2ed0e7d7221b6ff7d570012f31bb76796cc38a Mon Sep 17 00:00:00 2001 From: ZenWalker Date: Sat, 1 Jul 2017 02:31:33 +0200 Subject: 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 --- pluma/pluma-window.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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"); -- cgit v1.2.1