From 65f31bb8dd9af0817600035c189ea673a9edbdc1 Mon Sep 17 00:00:00 2001 From: kraxel Date: Tue, 17 Mar 2009 15:06:21 +0000 Subject: add vm/destroy menu item --- qemu-gtk.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/qemu-gtk.c b/qemu-gtk.c index 51c3bad..073d572 100644 --- a/qemu-gtk.c +++ b/qemu-gtk.c @@ -137,8 +137,10 @@ static void tabs_add(struct qemu_window *win, GtkWidget *child, label = gtk_label_new(text); gtk_notebook_insert_page(GTK_NOTEBOOK(win->tab), child, label, pos); gtk_widget_show(child); - if (0 == pos) + if (0 == pos) { gtk_notebook_set_current_page(GTK_NOTEBOOK(win->tab), 0); + gtk_widget_grab_focus(child); + } tabs_configure(win); } @@ -348,6 +350,12 @@ static void menu_cb_monitor_sys_powerdown(GtkAction *action, gpointer userdata) monitor_append(win, "system_powerdown"); } +static void menu_cb_monitor_quit(GtkAction *action, gpointer userdata) +{ + struct qemu_window *win = userdata; + monitor_append(win, "quit"); +} + static void menu_cb_run_gdb(GtkAction *action, gpointer userdata) { struct qemu_window *win = userdata; @@ -691,6 +699,10 @@ static const GtkActionEntry entries[] = { .name = "MonitorSysPowerdown", .label = "_Shutdown", .callback = G_CALLBACK(menu_cb_monitor_sys_powerdown), + },{ + .name = "MonitorQuit", + .label = "_Destroy", + .callback = G_CALLBACK(menu_cb_monitor_quit), },{ .name = "RunGdb", .label = "_Debug with gdb", @@ -759,6 +771,7 @@ static char ui_xml[] = " " " " " " +" " " " " " " " -- cgit