aboutsummaryrefslogtreecommitdiffstats
path: root/vconsole.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-09-06 14:17:34 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-09-06 14:17:34 +0200
commit0b005f4cff8ae28655243043529fa091a481c9fa (patch)
tree767d4f67afe4f17801965af8181c8ae37eb06617 /vconsole.c
parent8776506e3cabba93083438fef1587de915af8113 (diff)
downloadvconsole-0b005f4cff8ae28655243043529fa091a481c9fa.tar.gz
add menu item to save guest to disk
Diffstat (limited to 'vconsole.c')
-rw-r--r--vconsole.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/vconsole.c b/vconsole.c
index a4f6cad..2c23572 100644
--- a/vconsole.c
+++ b/vconsole.c
@@ -271,6 +271,15 @@ static void menu_cb_vm_pause(GtkAction *action, void *data)
domain_pause(dom);
}
+static void menu_cb_vm_save(GtkAction *action, void *data)
+{
+ struct vconsole_window *win = data;
+ struct vconsole_domain *dom = find_guest(win);
+
+ if (dom)
+ domain_save(dom);
+}
+
static void menu_cb_vm_reboot(GtkAction *action, void *data)
{
struct vconsole_window *win = data;
@@ -415,28 +424,33 @@ static const GtkActionEntry entries[] = {
.name = "GuestRun",
.stock_id = GTK_STOCK_MEDIA_PLAY,
.label = "Run",
- .tooltip = "Run Guest",
+ .tooltip = "Run guest",
.callback = G_CALLBACK(menu_cb_vm_run),
},{
.name = "GuestPause",
.stock_id = GTK_STOCK_MEDIA_PAUSE,
.label = "Pause",
- .tooltip = "Pause Guest",
+ .tooltip = "Pause guest",
.callback = G_CALLBACK(menu_cb_vm_pause),
},{
+ .name = "GuestSave",
+ .label = "Save to disk",
+ .tooltip = "Save guest to disk",
+ .callback = G_CALLBACK(menu_cb_vm_save),
+ },{
.name = "GuestReboot",
.label = "Reboot",
- .tooltip = "Reboot Guest",
+ .tooltip = "Reboot guest",
.callback = G_CALLBACK(menu_cb_vm_reboot),
},{
.name = "GuestShutdown",
.label = "Shutdown",
- .tooltip = "Shutdown Guest",
+ .tooltip = "Shutdown guest",
.callback = G_CALLBACK(menu_cb_vm_shutdown),
},{
.name = "GuestKill",
.label = "Destroy",
- .tooltip = "Destroy Guest",
+ .tooltip = "Destroy guest",
.callback = G_CALLBACK(menu_cb_vm_kill),
},{
@@ -496,6 +510,7 @@ static char ui_xml[] =
" <separator/>\n"
" <menuitem action='GuestRun'/>\n"
" <menuitem action='GuestPause'/>\n"
+" <menuitem action='GuestSave'/>\n"
" <menuitem action='GuestReboot'/>\n"
" <menuitem action='GuestShutdown'/>\n"
" <separator/>\n"