Skip to content

Commit

Permalink
enable the abbility to save the document if it was changed externally
Browse files Browse the repository at this point in the history
This change is needed after 2b34ed2
  • Loading branch information
sc0w committed Jul 1, 2017
1 parent 2b34ed2 commit 4c2ed0e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pluma/pluma-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 4c2ed0e

Please sign in to comment.