diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-08-15 23:45:18 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-08-15 23:45:18 +0200 |
commit | 3ab79ed743f5574c3f9120c2892d377128e2d7bc (patch) | |
tree | 056095b2de19a76dd6c1566f18db9821530e6245 /domain.c | |
parent | 98f99f5f4b7760010922041d92bf1d17cefd151d (diff) | |
download | vconsole-3ab79ed743f5574c3f9120c2892d377128e2d7bc.tar.gz |
start guest menu/toolbar item
Diffstat (limited to 'domain.c')
-rw-r--r-- | domain.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -121,15 +121,13 @@ static void domain_user_input(VteTerminal *vte, gchar *buf, guint len, gpointer opaque) { struct vconsole_domain *dom = opaque; - virDomainPtr d; if (dom->stream) { virStreamSend(dom->stream, buf, len); return; } if (dom->info.state == VIR_DOMAIN_SHUTOFF) { - d = virDomainLookupByUUIDString(dom->conn->ptr, dom->uuid); - virDomainCreate(d); + domain_start(dom); } } @@ -163,6 +161,12 @@ static void domain_connect(struct vconsole_domain *dom, virDomainPtr d) /* ------------------------------------------------------------------ */ +void domain_start(struct vconsole_domain *dom) +{ + virDomainPtr d = virDomainLookupByUUIDString(dom->conn->ptr, dom->uuid); + virDomainCreate(d); +} + void domain_update(struct vconsole_connect *conn, virDomainPtr d, virDomainEventType event) { @@ -300,7 +304,7 @@ static void domain_close_tab(struct vconsole_domain *dom) dom->status = NULL; } -static struct vconsole_domain *domain_find_current_tab(struct vconsole_window *win) +struct vconsole_domain *domain_find_current_tab(struct vconsole_window *win) { GtkTreeModel *model = GTK_TREE_MODEL(win->store); GtkTreeIter host, guest; |