[anjuta] document-manager: bgo#604065 - save button is disable even if the file is modified



commit b6b8d157ae39d007058ecdc7aed0d0c00fac7b16
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Dec 8 17:06:28 2009 +0100

    document-manager: bgo#604065 - save button is disable even if the file is modified

 plugins/document-manager/plugin.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/plugins/document-manager/plugin.c b/plugins/document-manager/plugin.c
index b515e9f..3782d67 100644
--- a/plugins/document-manager/plugin.c
+++ b/plugins/document-manager/plugin.c
@@ -683,14 +683,17 @@ update_document_ui_save_items (AnjutaPlugin *plugin, IAnjutaDocument *doc)
 	GtkAction *action;
 	
 	ui = anjuta_shell_get_ui (plugin->shell, NULL);
-	
-	action = anjuta_ui_get_action (ui, "ActionGroupEditorFile",
-								   "ActionFileSave");
-	g_object_set (G_OBJECT (action), "sensitive",
-				  ianjuta_file_savable_is_dirty(IANJUTA_FILE_SAVABLE(doc), NULL),
-				  NULL);
-}
 
+	if (anjuta_docman_get_current_document (ANJUTA_DOCMAN(ANJUTA_PLUGIN_DOCMAN(plugin)->docman)) ==
+		doc)
+	{
+		action = anjuta_ui_get_action (ui, "ActionGroupEditorFile",
+		                               "ActionFileSave");
+		g_object_set (G_OBJECT (action), "sensitive",
+		              ianjuta_file_savable_is_dirty(IANJUTA_FILE_SAVABLE(doc), NULL),
+		              NULL);
+	}
+}
 static void
 update_document_ui_interface_items (AnjutaPlugin *plugin, IAnjutaDocument *doc)
 {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]