[gnome-boxes] winxp,express: Require user to input product key
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] winxp,express: Require user to input product key
- Date: Mon, 13 Aug 2012 09:16:05 +0000 (UTC)
commit c27e6dea2f31d7506e150e192e42379c7a096e2f
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Aug 7 16:40:40 2012 +0300
winxp,express: Require user to input product key
Also remove the 'Add Product Key' button and show the entry by default
to make the mandatory nature more obvious.
https://bugzilla.gnome.org/show_bug.cgi?id=680825
src/winxp-installer.vala | 22 ++++++++--------------
1 files changed, 8 insertions(+), 14 deletions(-)
---
diff --git a/src/winxp-installer.vala b/src/winxp-installer.vala
index 1aa1ab4..20cb490 100644
--- a/src/winxp-installer.vala
+++ b/src/winxp-installer.vala
@@ -11,6 +11,12 @@ private class Boxes.WinXPInstaller: WindowsInstaller {
private ulong key_inserted_id; // ID of key_entry.insert_text signal handler
+ public override bool user_data_for_vm_creation_available {
+ get {
+ return base.user_data_for_vm_creation_available && key_entry.text_length == 29;
+ }
+ }
+
static construct {
try {
key_regex = new Regex ("BOXES_PRODUCT_KEY");
@@ -49,23 +55,11 @@ private class Boxes.WinXPInstaller: WindowsInstaller {
label.halign = Gtk.Align.START;
hbox.pack_start (label, true, true, 0);
- var notebook = new Gtk.Notebook ();
- notebook.show_tabs = false;
- notebook.show_border = false;
- var button = new Gtk.Button.with_mnemonic (_("_Add Product Key"));
- notebook.append_page (button);
- key_entry = new Gtk.Entry ();
+ key_entry = create_input_entry ("");
key_entry.width_chars = 29;
key_entry.max_length = 29;
key_entry.get_style_context ().add_class ("boxes-product-key-entry");
- notebook.append_page (key_entry);
-
- button.clicked.connect (() => {
- notebook.next_page ();
- key_entry.is_focus = true;
- });
-
- hbox.pack_start (notebook, true, true, 0);
+ hbox.pack_start (key_entry, true, true, 0);
setup_table.attach_defaults (hbox, 0, setup_table.n_columns, setup_table.n_rows - 1, setup_table.n_rows);
express_toggle.bind_property ("active", hbox, "sensitive", 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]