diff options
author | kraxel <kraxel> | 2009-03-17 15:06:21 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2009-03-17 15:06:21 +0000 |
commit | 65f31bb8dd9af0817600035c189ea673a9edbdc1 (patch) | |
tree | bce6c120363522277b311bbd4be611c009318169 | |
parent | 2769d1abbd1b6da81b820d21a84bdfdf47cfc063 (diff) | |
download | qemu-gtk-65f31bb8dd9af0817600035c189ea673a9edbdc1.tar.gz |
add vm/destroy menu item
-rw-r--r-- | qemu-gtk.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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; @@ -692,6 +700,10 @@ static const GtkActionEntry entries[] = { .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", .callback = G_CALLBACK(menu_cb_run_gdb), @@ -759,6 +771,7 @@ static char ui_xml[] = " <menuitem action='MonitorSysPowerdown'/>" " <separator/>" " <menuitem action='MonitorSysReset'/>" +" <menuitem action='MonitorQuit'/>" " <separator/>" " <menuitem action='RunGdb'/>" " </menu>" |