[anjuta/git-shell: 226/234] libanjuta: Make AnjutaCommand signals overridable



commit 2178f7163cdab1ca3beb76b42345cf2816aad3fc
Author: James Liggett <jrliggett cox net>
Date:   Thu Apr 1 21:30:51 2010 -0700

    libanjuta: Make AnjutaCommand signals overridable

 libanjuta/anjuta-command.c |   37 +++++++++++++++++++++++++++----------
 libanjuta/anjuta-command.h |    2 ++
 2 files changed, 29 insertions(+), 10 deletions(-)
---
diff --git a/libanjuta/anjuta-command.c b/libanjuta/anjuta-command.c
index 7bd8bfe..42b13ce 100644
--- a/libanjuta/anjuta-command.c
+++ b/libanjuta/anjuta-command.c
@@ -91,11 +91,6 @@ anjuta_command_finalize (GObject *object)
 	G_OBJECT_CLASS (anjuta_command_parent_class)->finalize (object);
 }
 
-static void
-anjuta_command_started (AnjutaCommand *command)
-{
-}
-
 static gboolean
 start_automatic_monitor (AnjutaCommand *self)
 {
@@ -108,6 +103,26 @@ stop_automatic_monitor (AnjutaCommand *self)
 }
 
 static void
+data_arrived (AnjutaCommand *command)
+{
+}
+
+static void
+command_started (AnjutaCommand *command)
+{
+}
+
+static void
+command_finished (AnjutaCommand *command, guint return_code)
+{
+}
+
+static void
+progress (AnjutaCommand *command, gfloat progress)
+{
+}
+
+static void
 anjuta_command_class_init (AnjutaCommandClass *klass)
 {
 	GObjectClass* object_class = G_OBJECT_CLASS (klass);
@@ -124,8 +139,10 @@ anjuta_command_class_init (AnjutaCommandClass *klass)
 	klass->get_error_message = anjuta_command_get_error_message;
 	klass->start_automatic_monitor = start_automatic_monitor;
 	klass->stop_automatic_monitor = stop_automatic_monitor;
-	klass->command_started = anjuta_command_started;
-	klass->progress = NULL;
+	klass->data_arrived = data_arrived;
+	klass->command_started = command_started;
+	klass->command_finished = command_finished;
+	klass->progress = progress;
 
 	/**
 	 * AnjutaCommand::data-arrived:
@@ -137,8 +154,8 @@ anjuta_command_class_init (AnjutaCommandClass *klass)
 	anjuta_command_signals[DATA_ARRIVED] =
 		g_signal_new ("data-arrived",
 		              G_OBJECT_CLASS_TYPE (klass),
-		              G_SIGNAL_RUN_FIRST,
-		              0,
+		              G_SIGNAL_RUN_LAST,
+		              G_STRUCT_OFFSET (AnjutaCommandClass, data_arrived),
 		              NULL, NULL,
 		              g_cclosure_marshal_VOID__VOID,
 		              G_TYPE_NONE, 
@@ -173,7 +190,7 @@ anjuta_command_class_init (AnjutaCommandClass *klass)
 		g_signal_new ("command-finished",
 		              G_OBJECT_CLASS_TYPE (klass),
 		              G_SIGNAL_RUN_FIRST,
-		              0,
+		              G_STRUCT_OFFSET (AnjutaCommandClass, command_finished),
 		              NULL, NULL,
 		              g_cclosure_marshal_VOID__UINT ,
 		              G_TYPE_NONE, 1,
diff --git a/libanjuta/anjuta-command.h b/libanjuta/anjuta-command.h
index 03e911a..31668cf 100644
--- a/libanjuta/anjuta-command.h
+++ b/libanjuta/anjuta-command.h
@@ -57,7 +57,9 @@ struct _AnjutaCommandClass
 	void (*stop_automatic_monitor) (AnjutaCommand *self);
 	
 	/* Signals */
+	void (*data_arrived) (AnjutaCommand *command);
 	void (*command_started) (AnjutaCommand *command);
+	void (*command_finished) (AnjutaCommand *command, guint return_code);
 	void (*progress) (AnjutaCommand *command, gfloat progress);
 
 };



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