aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Bradford <rob@o-hand.com>2008-09-11 09:46:41 +0000
committerrob <rob@aea7fca7-3721-49c4-ace3-ac8c44b998bb>2008-09-11 09:46:41 +0000
commitb2adfa62fcc4717a6abb77286ca86a20574dcc41 (patch)
tree9cb4ecb55c4af43e67d5ded8c271d653495eb4a6
parent82afb16110d75ebeaf902902916832bd762db83b (diff)
downloadanjuta-poky-b2adfa62fcc4717a6abb77286ca86a20574dcc41.tar.gz
anjuta-poky-b2adfa62fcc4717a6abb77286ca86a20574dcc41.tar.bz2
anjuta-poky-b2adfa62fcc4717a6abb77286ca86a20574dcc41.zip
2008-09-11 Rob Bradford <rob@linux.intel.com>
* anjuta-plugin-sdk/src/beaver-target-qemu.c: * anjuta-plugin-sdk/src/beaver-target.c: * anjuta-plugin-sdk/src/beaver-util.h: * anjuta-plugin-sdk/src/plugin.c: Make the plugin build with Anjuta 2.23.x
-rw-r--r--ChangeLog8
-rw-r--r--src/beaver-target-qemu.c17
-rw-r--r--src/beaver-target.c32
-rw-r--r--src/beaver-util.h8
-rw-r--r--src/plugin.c7
5 files changed, 65 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index b2857a4..2a57fd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-09-11 Rob Bradford <rob@linux.intel.com>
+
+ * anjuta-plugin-sdk/src/beaver-target-qemu.c:
+ * anjuta-plugin-sdk/src/beaver-target.c:
+ * anjuta-plugin-sdk/src/beaver-util.h:
+ * anjuta-plugin-sdk/src/plugin.c:
+ Make the plugin build with Anjuta 2.23.x
+
2008-05-19 Ross Burton <ross@openedhand.com>
* configure.ac:
diff --git a/src/beaver-target-qemu.c b/src/beaver-target-qemu.c
index b98e780..a5fb371 100644
--- a/src/beaver-target-qemu.c
+++ b/src/beaver-target-qemu.c
@@ -239,11 +239,24 @@ beaver_target_qemu_start (BeaverTargetQEMU *btq, GError **out_err)
if (priv->kernel && priv->rootfs)
{
gchar *args[] = {QEMU_SCRIPT, priv->kernel, priv->rootfs, NULL};
-
- if (!anjuta_launcher_execute_v (priv->launcher, args, launcher_data_cb, btq))
+#ifdef ANJUTA_2_23_OR_HIGHER
+ if (!anjuta_launcher_execute_v (priv->launcher,
+ args,
+ NULL,
+ launcher_data_cb,
+ btq))
{
g_warning ("Error launching QEMU");
return FALSE;
+#else
+ if (!anjuta_launcher_execute_v (priv->launcher,
+ args,
+ launcher_data_cb,
+ btq))
+ {
+ g_warning ("Error launching QEMU");
+ return FALSE;
+#endif
} else {
beaver_target_qemu_set_state (BEAVER_TARGET (btq),
TARGET_STATE_READY);
diff --git a/src/beaver-target.c b/src/beaver-target.c
index 9a3f52e..84c4cc9 100644
--- a/src/beaver-target.c
+++ b/src/beaver-target.c
@@ -321,10 +321,24 @@ _beaver_target_run_remote_v (BeaverTarget *target, gchar **in_args,
}
}
- if (anjuta_launcher_execute_v (priv->launcher, args, launcher_data_cb, target))
+#ifdef ANJUTA_2_23_OR_HIGHER
+ if (anjuta_launcher_execute_v (priv->launcher,
+ args,
+ NULL,
+ launcher_data_cb,
+ target))
{
beaver_target_set_state (target, TARGET_STATE_REMOTE_RUNNING);
return TRUE;
+#else
+ if (anjuta_launcher_execute_v (priv->launcher,
+ args,
+ launcher_data_cb,
+ target))
+ {
+ beaver_target_set_state (target, TARGET_STATE_REMOTE_RUNNING);
+ return TRUE;
+#endif
} else {
gchar *debug_str = NULL;
@@ -411,10 +425,24 @@ _beaver_target_remote_debug (BeaverTarget *target, gchar *cmd, gchar *cmd_args,
}
}
- if (anjuta_launcher_execute_v (priv->debug_launcher, args, debug_launcher_data_cb, target))
+#ifdef ANJUTA_2_23_OR_HIGHER
+ if (anjuta_launcher_execute_v (priv->debug_launcher,
+ args,
+ NULL,
+ debug_launcher_data_cb,
+ target))
+ {
+ beaver_target_set_state (target, TARGET_STATE_BUSY);
+ return TRUE;
+#else
+ if (anjuta_launcher_execute_v (priv->debug_launcher,
+ args,
+ debug_launcher_data_cb,
+ target))
{
beaver_target_set_state (target, TARGET_STATE_BUSY);
return TRUE;
+#endif
} else {
gchar *debug_str = NULL;
diff --git a/src/beaver-util.h b/src/beaver-util.h
index c6f5ef0..ede3274 100644
--- a/src/beaver-util.h
+++ b/src/beaver-util.h
@@ -21,7 +21,7 @@
#include <config.h>
#include <glib-object.h>
-#include <libanjuta/anjuta-plugin.h>
+#include <libanjuta/libanjuta.h>
#include <libanjuta/interfaces/ianjuta-message-manager.h>
void beaver_util_message_view_buffer_flushed_cb (IAnjutaMessageView *view,
@@ -29,4 +29,10 @@ void beaver_util_message_view_buffer_flushed_cb (IAnjutaMessageView *view,
gchar **beaver_util_strv_concat (gchar **strv_1, gchar **strv_2);
gchar **beaver_util_strv_joinv (gchar **strv_1, ...);
+#ifdef ANJUTA_CHECK_VERSION
+#if ANJUTA_CHECK_VERSION(2,23,0)
+#define ANJUTA_2_23_OR_HIGHER
+#endif
+#endif
+
#endif /* _BEAVER_UTIL */
diff --git a/src/plugin.c b/src/plugin.c
index 312d1ed..fda61e0 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -735,8 +735,11 @@ do_local_gdb (AnjutaPluginSdk *sp)
cmd = g_strdup_printf (LOCAL_GDB_COMMAND, sp->triplet,
script_name, sp->gdb_local_path);
cur_dir = g_get_current_dir ();
- ianjuta_terminal_execute_command (terminal, cur_dir, cmd, &error);
-
+#ifdef ANJUTA_2_23_OR_HIGHER
+ ianjuta_terminal_execute_command (terminal, cur_dir, cmd, NULL, &error);
+#else
+ ianjuta_terminal_execute_command (terminal, cur_dir, cmd, NULL, &error);
+#endif
if (error != NULL)
{
g_warning ("Error whilst launching local gdb command: %s", error->message);