[anjuta] Changes to subversion plugin that update the vcs status of the files and the icons accordingly when



commit ea79a0da50bce6917e8fb27c15a85c0017899193
Author: Tamara Atanasoska <tamara atanasoska20 gmail com>
Date:   Thu Jul 14 11:31:47 2011 +0200

    Changes to subversion plugin that update the vcs status of the files and the icons accordingly when : commit and update.

 plugins/subversion/plugin.c                   |    5 +++++
 plugins/subversion/plugin.h                   |   12 ++++++++++++
 plugins/subversion/subversion-commit-dialog.c |    4 ++++
 plugins/subversion/subversion-update-dialog.c |    4 ++++
 4 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/plugins/subversion/plugin.c b/plugins/subversion/plugin.c
index 8edb6e3..a9b761e 100644
--- a/plugins/subversion/plugin.c
+++ b/plugins/subversion/plugin.c
@@ -624,6 +624,11 @@ subversion_class_init (GObjectClass *klass)
 	klass->finalize = finalize;
 }
 
+void subversion_plugin_status_changed_emit(AnjutaCommand *command, guint return_code, Subversion *plugin)
+{
+        g_signal_emit_by_name(plugin, "status-changed");
+}
+
 ANJUTA_PLUGIN_BEGIN (Subversion, subversion);
 ANJUTA_PLUGIN_ADD_INTERFACE (subversion_ivcs, IANJUTA_TYPE_VCS);
 ANJUTA_PLUGIN_END;
diff --git a/plugins/subversion/plugin.h b/plugins/subversion/plugin.h
index 0c75af7..2b57c69 100644
--- a/plugins/subversion/plugin.h
+++ b/plugins/subversion/plugin.h
@@ -27,6 +27,16 @@
 #include <libanjuta/interfaces/ianjuta-message-manager.h>
 #include <libanjuta/interfaces/ianjuta-editor.h>
 #include <svn_client.h>
+#include <gio/gio.h>
+#include <libanjuta/interfaces/ianjuta-message-view.h>
+#include <libanjuta/interfaces/ianjuta-document-manager.h>
+#include <libanjuta/interfaces/ianjuta-file.h>
+#include <libanjuta/interfaces/ianjuta-project-manager.h>
+#include <libanjuta/interfaces/ianjuta-file-manager.h>
+#include <libanjuta/anjuta-shell.h>
+#include <libanjuta/anjuta-dock.h>
+#include <libanjuta/anjuta-debug.h>
+#include <libanjuta/anjuta-command-queue.h>
 
 extern GType subversion_get_type (GTypeModule *module);
 #define ANJUTA_TYPE_PLUGIN_SUBVERSION         (subversion_get_type (NULL))
@@ -76,4 +86,6 @@ struct _SubversionClass{
 	AnjutaPluginClass parent_class;
 };
 
+void subversion_plugin_status_changed_emit(AnjutaCommand *command, guint return_code, Subversion *plugin);
+
 #endif
diff --git a/plugins/subversion/subversion-commit-dialog.c b/plugins/subversion/subversion-commit-dialog.c
index 5bfb3ec..28ef23d 100644
--- a/plugins/subversion/subversion-commit-dialog.c
+++ b/plugins/subversion/subversion-commit-dialog.c
@@ -132,6 +132,10 @@ on_subversion_commit_response(GtkDialog* dialog, gint response,
 			g_signal_connect (G_OBJECT (commit_command), "command-finished",
 							  G_CALLBACK (on_commit_command_finished),
 							  data->plugin);
+
+			g_signal_connect (G_OBJECT (commit_command), "command-finished",
+							  G_CALLBACK (subversion_plugin_status_changed_emit),
+							  data->plugin);
 			
 			g_signal_connect (G_OBJECT (commit_command), "data-arrived",
 							  G_CALLBACK (on_command_info_arrived),
diff --git a/plugins/subversion/subversion-update-dialog.c b/plugins/subversion/subversion-update-dialog.c
index 68f3aa6..7b89963 100644
--- a/plugins/subversion/subversion-update-dialog.c
+++ b/plugins/subversion/subversion-update-dialog.c
@@ -78,6 +78,10 @@ on_subversion_update_response(GtkDialog* dialog, gint response, SubversionData*
 			g_signal_connect (G_OBJECT (update_command), "command-finished",
 							  G_CALLBACK (on_update_command_finished),
 							  data->plugin);
+
+			g_signal_connect (G_OBJECT (update_command), "command-finished",
+							  G_CALLBACK (subversion_plugin_status_changed_emit),
+							  data->plugin);
 			
 			g_signal_connect (G_OBJECT (update_command), "data-arrived",
 							  G_CALLBACK (on_command_info_arrived),



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