anjuta r3876 - in branches/anjuta-2-4: . plugins/document-manager plugins/sourceview



Author: jhs
Date: Sun Apr 20 12:11:43 2008
New Revision: 3876
URL: http://svn.gnome.org/viewvc/anjuta?rev=3876&view=rev

Log:
2008-04-20  Johannes Schmid  <jhs gnome org>

	* plugins/document-manager/plugin.c
	(update_document_ui_undo_items), (update_document_ui_save_items),
	(on_document_update_ui):
	* plugins/sourceview/sourceview.c (idocument_redo):
	Bug #528705 â There is no Redo (from trunk)

Modified:
   branches/anjuta-2-4/ChangeLog
   branches/anjuta-2-4/plugins/document-manager/plugin.c
   branches/anjuta-2-4/plugins/sourceview/sourceview.c

Modified: branches/anjuta-2-4/plugins/document-manager/plugin.c
==============================================================================
--- branches/anjuta-2-4/plugins/document-manager/plugin.c	(original)
+++ branches/anjuta-2-4/plugins/document-manager/plugin.c	Sun Apr 20 12:11:43 2008
@@ -648,13 +648,13 @@
 }
 
 static void
-update_document_ui_save_items (AnjutaPlugin *plugin, IAnjutaDocument *doc)
+update_document_ui_undo_items (AnjutaPlugin *plugin, IAnjutaDocument* doc)
 {
 	AnjutaUI *ui;
 	GtkAction *action;
-	
-	ui = anjuta_shell_get_ui (plugin->shell, NULL);
 
+	ui = anjuta_shell_get_ui (plugin->shell, NULL);
+	
 	action = anjuta_ui_get_action (ui, "ActionGroupEditorEdit",
 								   "ActionEditUndo");
 	g_object_set (G_OBJECT (action), "sensitive",
@@ -664,6 +664,15 @@
 								   "ActionEditRedo");
 	g_object_set (G_OBJECT (action), "sensitive",
 				  ianjuta_document_can_redo (doc, NULL), NULL);
+}
+
+static void
+update_document_ui_save_items (AnjutaPlugin *plugin, IAnjutaDocument *doc)
+{
+	AnjutaUI *ui;
+	GtkAction *action;
+	
+	ui = anjuta_shell_get_ui (plugin->shell, NULL);
 	
 	action = anjuta_ui_get_action (ui, "ActionGroupEditorFile",
 								   "ActionFileSave");
@@ -964,8 +973,12 @@
 	IAnjutaDocument *curdoc;
 		
 	curdoc = anjuta_docman_get_current_document (ANJUTA_DOCMAN (plugin->docman));
+	update_document_ui_undo_items (plugin, curdoc);
+
 	if (IANJUTA_IS_EDITOR (curdoc) && curdoc == doc)
+	{
 		update_status (plugin, IANJUTA_EDITOR (curdoc));
+	}
 }
 
 /* Remove all instances of c from the string s. */

Modified: branches/anjuta-2-4/plugins/sourceview/sourceview.c
==============================================================================
--- branches/anjuta-2-4/plugins/sourceview/sourceview.c	(original)
+++ branches/anjuta-2-4/plugins/sourceview/sourceview.c	Sun Apr 20 12:11:43 2008
@@ -1179,6 +1179,7 @@
 	if (idocument_can_redo(edit, NULL))	
 		gtk_source_buffer_redo(GTK_SOURCE_BUFFER(sv->priv->document));
 	anjuta_view_scroll_to_cursor(sv->priv->view);
+	g_signal_emit_by_name(G_OBJECT(sv), "update_ui", sv);
 }
 
 /* Grab focus */



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