aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Bradford <rob@o-hand.com>2008-04-03 17:25:27 +0000
committerrob <rob@aea7fca7-3721-49c4-ace3-ac8c44b998bb>2008-04-03 17:25:27 +0000
commit2654d7aee67fdef0a42a934fbc214ad6facf3fc3 (patch)
tree32135508670fb61217b185519e0e7ca8d64c16f8
parentd21bbfd9362dade66372d728f94a14d26c407de2 (diff)
downloadanjuta-poky-2654d7aee67fdef0a42a934fbc214ad6facf3fc3.tar.gz
anjuta-poky-2654d7aee67fdef0a42a934fbc214ad6facf3fc3.tar.bz2
anjuta-poky-2654d7aee67fdef0a42a934fbc214ad6facf3fc3.zip
2008-04-03 Rob Bradford <rob@openedhand.com>
* src/beaver-target-qemu.c: (beaver_target_qemu_set_state), (launcher_data_cb): Don't blindly transition into the READY state. Check that we are still ready. Remove dead code.
-rw-r--r--ChangeLog8
-rw-r--r--src/beaver-target-qemu.c34
2 files changed, 17 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index f040562..6ba7965 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2008-04-03 Rob Bradford <rob@openedhand.com>
+ * src/beaver-target-qemu.c: (beaver_target_qemu_set_state),
+ (launcher_data_cb):
+ Don't blindly transition into the READY state. Check that we are still
+ ready.
+ Remove dead code.
+
+2008-04-03 Rob Bradford <rob@openedhand.com>
+
* src/beaver-target.c: (beaver_target_class_init),
(beaver_target_run_remote), (_beaver_target_run_remote),
(launcher_child_exited_cb):
diff --git a/src/beaver-target-qemu.c b/src/beaver-target-qemu.c
index e45a799..b98e780 100644
--- a/src/beaver-target-qemu.c
+++ b/src/beaver-target-qemu.c
@@ -281,8 +281,15 @@ beaver_target_qemu_set_state (BeaverTarget *target, BeaverTargetState state)
BeaverTargetQEMU *btq = BEAVER_TARGET_QEMU (target);
BeaverTargetQEMUPrivate *priv = TARGET_QEMU_PRIVATE (btq);
- priv->state = state;
- g_signal_emit_by_name (btq, "state-changed");
+ /* We've been asked to go into READY state, but are we really ready... */
+ if (state == TARGET_STATE_READY &&
+ !anjuta_launcher_is_busy (priv->launcher))
+ {
+ /* do nothing */
+ } else {
+ priv->state = state;
+ g_signal_emit_by_name (btq, "state-changed");
+ }
}
static void
@@ -306,29 +313,6 @@ launcher_data_cb (AnjutaLauncher *launcher,
g_warning ("No message view to append to.");
}
}
-/*
-static void
-action_shutdown_qemu_activate_cb (GtkAction *actio, gpointer userdata)
-{
- AnjutaPluginSdk *sp = (AnjutaPluginSdk *)userdata;
- gchar *args[] = { "ssh", SSH_OPTIONS,
- "root@"QEMU_IP_ADDRESS, "reboot", NULL};
-
- if (!sp->remote_launcher)
- {
- sp->remote_launcher = anjuta_launcher_new ();
- g_signal_connect (sp->remote_launcher, "child-exited",
- (GCallback)remote_launcher_child_exited_cb, sp);
- }
-
- if (anjuta_launcher_execute_v (sp->remote_launcher, args, NULL, NULL))
- {
- gtk_action_set_sensitive (sp->qemu_shutdown_action, FALSE);
- } else {
- g_warning ("Error whilst launching reboot (for shutdown) command");
- }
-}
-*/
static void
launcher_child_exited_cb (AnjutaLauncher *launcher, gint child_pid,