|
|
e76f14 |
From b8e5dd108de16061210a965d84a83909b97fd472 Mon Sep 17 00:00:00 2001
|
|
|
e76f14 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
e76f14 |
Date: Fri, 3 Jun 2016 11:10:20 +0100
|
|
|
e76f14 |
Subject: [PATCH] p2v: Place conversion server name and port side by side.
|
|
|
e76f14 |
|
|
|
e76f14 |
Just a small rearrangement of the UI.
|
|
|
e76f14 |
|
|
|
e76f14 |
(cherry picked from commit 9f3b6aa6e207b22792973577d7c6b21e6166b77e)
|
|
|
e76f14 |
---
|
|
|
e76f14 |
p2v/gui.c | 37 ++++++++++++++++++-------------------
|
|
|
e76f14 |
p2v/virt-p2v.pod | 4 +---
|
|
|
e76f14 |
2 files changed, 19 insertions(+), 22 deletions(-)
|
|
|
e76f14 |
|
|
|
e76f14 |
diff --git a/p2v/gui.c b/p2v/gui.c
|
|
|
e76f14 |
index b8d61b5..832d72a 100644
|
|
|
e76f14 |
--- a/p2v/gui.c
|
|
|
e76f14 |
+++ b/p2v/gui.c
|
|
|
e76f14 |
@@ -105,7 +105,8 @@ create_connection_dialog (struct config *config)
|
|
|
e76f14 |
{
|
|
|
e76f14 |
GtkWidget *intro, *table;
|
|
|
e76f14 |
GtkWidget *server_label;
|
|
|
e76f14 |
- GtkWidget *port_label;
|
|
|
e76f14 |
+ GtkWidget *server_hbox;
|
|
|
e76f14 |
+ GtkWidget *port_colon_label;
|
|
|
e76f14 |
GtkWidget *username_label;
|
|
|
e76f14 |
GtkWidget *password_label;
|
|
|
e76f14 |
GtkWidget *identity_label;
|
|
|
e76f14 |
@@ -125,44 +126,42 @@ create_connection_dialog (struct config *config)
|
|
|
e76f14 |
gtk_label_set_line_wrap (GTK_LABEL (intro), TRUE);
|
|
|
e76f14 |
gtk_misc_set_padding (GTK_MISC (intro), 10, 10);
|
|
|
e76f14 |
|
|
|
e76f14 |
- table = gtk_table_new (7, 2, FALSE);
|
|
|
e76f14 |
+ table = gtk_table_new (6, 2, FALSE);
|
|
|
e76f14 |
server_label = gtk_label_new (_("Conversion server:"));
|
|
|
e76f14 |
gtk_misc_set_alignment (GTK_MISC (server_label), 1., 0.5);
|
|
|
e76f14 |
gtk_table_attach (GTK_TABLE (table), server_label,
|
|
|
e76f14 |
0, 1, 0, 1, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ server_hbox = gtk_hbox_new (FALSE, 4);
|
|
|
e76f14 |
server_entry = gtk_entry_new ();
|
|
|
e76f14 |
if (config->server != NULL)
|
|
|
e76f14 |
gtk_entry_set_text (GTK_ENTRY (server_entry), config->server);
|
|
|
e76f14 |
- gtk_table_attach (GTK_TABLE (table), server_entry,
|
|
|
e76f14 |
- 1, 2, 0, 1, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
-
|
|
|
e76f14 |
- port_label = gtk_label_new (_("SSH port:"));
|
|
|
e76f14 |
- gtk_misc_set_alignment (GTK_MISC (port_label), 1., 0.5);
|
|
|
e76f14 |
- gtk_table_attach (GTK_TABLE (table), port_label,
|
|
|
e76f14 |
- 0, 1, 1, 2, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ port_colon_label = gtk_label_new (":");
|
|
|
e76f14 |
port_entry = gtk_entry_new ();
|
|
|
e76f14 |
gtk_entry_set_width_chars (GTK_ENTRY (port_entry), 6);
|
|
|
e76f14 |
snprintf (port_str, sizeof port_str, "%d", config->port);
|
|
|
e76f14 |
gtk_entry_set_text (GTK_ENTRY (port_entry), port_str);
|
|
|
e76f14 |
- gtk_table_attach (GTK_TABLE (table), port_entry,
|
|
|
e76f14 |
- 1, 2, 1, 2, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ gtk_box_pack_start (GTK_BOX (server_hbox), server_entry, TRUE, TRUE, 0);
|
|
|
e76f14 |
+ gtk_box_pack_start (GTK_BOX (server_hbox), port_colon_label, FALSE, FALSE, 0);
|
|
|
e76f14 |
+ gtk_box_pack_start (GTK_BOX (server_hbox), port_entry, FALSE, FALSE, 0);
|
|
|
e76f14 |
+ gtk_table_attach (GTK_TABLE (table), server_hbox,
|
|
|
e76f14 |
+ 1, 2, 0, 1, GTK_EXPAND|GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
|
|
|
e76f14 |
username_label = gtk_label_new (_("User name:"));
|
|
|
e76f14 |
gtk_misc_set_alignment (GTK_MISC (username_label), 1., 0.5);
|
|
|
e76f14 |
gtk_table_attach (GTK_TABLE (table), username_label,
|
|
|
e76f14 |
- 0, 1, 2, 3, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ 0, 1, 1, 2, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
username_entry = gtk_entry_new ();
|
|
|
e76f14 |
if (config->username != NULL)
|
|
|
e76f14 |
gtk_entry_set_text (GTK_ENTRY (username_entry), config->username);
|
|
|
e76f14 |
else
|
|
|
e76f14 |
gtk_entry_set_text (GTK_ENTRY (username_entry), "root");
|
|
|
e76f14 |
gtk_table_attach (GTK_TABLE (table), username_entry,
|
|
|
e76f14 |
- 1, 2, 2, 3, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
|
|
|
e76f14 |
password_label = gtk_label_new (_("Password:"));
|
|
|
e76f14 |
gtk_misc_set_alignment (GTK_MISC (password_label), 1., 0.5);
|
|
|
e76f14 |
gtk_table_attach (GTK_TABLE (table), password_label,
|
|
|
e76f14 |
- 0, 1, 3, 4, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ 0, 1, 2, 3, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
password_entry = gtk_entry_new ();
|
|
|
e76f14 |
gtk_entry_set_visibility (GTK_ENTRY (password_entry), FALSE);
|
|
|
e76f14 |
#ifdef GTK_INPUT_PURPOSE_PASSWORD
|
|
|
e76f14 |
@@ -172,31 +171,31 @@ create_connection_dialog (struct config *config)
|
|
|
e76f14 |
if (config->password != NULL)
|
|
|
e76f14 |
gtk_entry_set_text (GTK_ENTRY (password_entry), config->password);
|
|
|
e76f14 |
gtk_table_attach (GTK_TABLE (table), password_entry,
|
|
|
e76f14 |
- 1, 2, 3, 4, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ 1, 2, 2, 3, GTK_EXPAND|GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
|
|
|
e76f14 |
identity_label = gtk_label_new (_("SSH Identity URL:"));
|
|
|
e76f14 |
gtk_misc_set_alignment (GTK_MISC (identity_label), 1., 0.5);
|
|
|
e76f14 |
gtk_table_attach (GTK_TABLE (table), identity_label,
|
|
|
e76f14 |
- 0, 1, 4, 5, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ 0, 1, 3, 4, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
identity_entry = gtk_entry_new ();
|
|
|
e76f14 |
if (config->identity_url != NULL)
|
|
|
e76f14 |
gtk_entry_set_text (GTK_ENTRY (identity_entry), config->identity_url);
|
|
|
e76f14 |
gtk_table_attach (GTK_TABLE (table), identity_entry,
|
|
|
e76f14 |
- 1, 2, 4, 5, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ 1, 2, 3, 4, GTK_EXPAND|GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
|
|
|
e76f14 |
identity_tip_label = gtk_label_new (NULL);
|
|
|
e76f14 |
gtk_label_set_markup (GTK_LABEL (identity_tip_label),
|
|
|
e76f14 |
_("If using password authentication, leave the SSH Identity URL blank"));
|
|
|
e76f14 |
gtk_label_set_line_wrap (GTK_LABEL (identity_tip_label), TRUE);
|
|
|
e76f14 |
gtk_table_attach (GTK_TABLE (table), identity_tip_label,
|
|
|
e76f14 |
- 1, 2, 5, 6, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ 1, 2, 4, 5, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
|
|
|
e76f14 |
sudo_button =
|
|
|
e76f14 |
gtk_check_button_new_with_label (_("Use sudo when running virt-v2v"));
|
|
|
e76f14 |
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sudo_button),
|
|
|
e76f14 |
config->sudo);
|
|
|
e76f14 |
gtk_table_attach (GTK_TABLE (table), sudo_button,
|
|
|
e76f14 |
- 1, 2, 6, 7, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
+ 1, 2, 5, 6, GTK_FILL, GTK_FILL, 4, 4);
|
|
|
e76f14 |
|
|
|
e76f14 |
test_hbox = gtk_hbox_new (FALSE, 0);
|
|
|
e76f14 |
test = gtk_button_new_with_label (_("Test connection"));
|
|
|
e76f14 |
diff --git a/p2v/virt-p2v.pod b/p2v/virt-p2v.pod
|
|
|
e76f14 |
index 3e4ef99..5ceafa7 100644
|
|
|
e76f14 |
--- a/p2v/virt-p2v.pod
|
|
|
e76f14 |
+++ b/p2v/virt-p2v.pod
|
|
|
e76f14 |
@@ -81,9 +81,7 @@ When virt-p2v starts up in GUI mode, the first dialog looks like this:
|
|
|
e76f14 |
┌────────────────────────────────────────────────────────┐
|
|
|
e76f14 |
│ virt-p2v │
|
|
|
e76f14 |
│ │
|
|
|
e76f14 |
- │ Conversion server: [_________________________________] │
|
|
|
e76f14 |
- │ │
|
|
|
e76f14 |
- │ SSH port: [22_______________________________] │
|
|
|
e76f14 |
+ │ Conversion server: [_______________________] : [22___] │
|
|
|
e76f14 |
│ │
|
|
|
e76f14 |
│ User name: [root_____________________________] │
|
|
|
e76f14 |
│ │
|
|
|
e76f14 |
--
|
|
|
e76f14 |
1.8.3.1
|
|
|
e76f14 |
|