Package: release.debian.org Severity: normal User: [email protected] Usertags: unblock
Hi, please unblock gnome-boxes for a new upstream bugfix release. gnome-boxes (3.14.2-1) unstable; urgency=medium [ Jackson Doak ] * New upstream bugfix release. The Debian diff consists in the above changelog. Attaching the upstream diff between 3.14.1.1 and 3.14.2. unblock gnome-boxes/3.14.2-1 Thanks, -- .''`. Josselin Mouette : :' : `. `' `-
diff --git a/NEWS b/NEWS index a4e87ee..3a0649c 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,46 @@ -3.14.1.1 - Oct 15, 2014 +3.14.2 - Nov 11, 2014 ===================== +Changes since 3.14.1.2: + +- Remove redundant revealer from snapshots view. +- Fix a potential crash on snapshot deletion. +- Print a more descriptive warning on failing to rename a snapshot. +- Report ovirt support in configure summary. + +3.14.1.2 - Oct 27, 2014 +======================= + Changes since 3.14.1.1: +- Fix crash on launching a VNC box. +- Fix exit of wizard when going back from customization screen. +- Don't start the VM after reverting to a snapshot unless it was running in + foreground before the reversion operation. +- Always show "Reverting to SNAPSHOT_NAME" message when reverting as we can + never be sure about the speed of the operation. +- Fix the the issue of pause button still being available to user when a + selected box(es) is already being paused and Boxes leading into interesting + scenerios if user clicks on the button. +- Fix the issue of change of box name from toolbar title not getting saved. +- Fix cancellation of media setup and therefore wizard jumping to setup page + even after user has cancelled creation of corresponding VM. +- Continue wizard to next step on user hitting 'Enter' in URL entry. +- Correctly handle HTTP(S) redirection. +- Remove a now redundant work around. +- Added/updated/fixed translations: + - Arabic + +All contributors to this release: + +Mosaab Alzoubi <[email protected]> +Zeeshan Ali (Khattak) <[email protected]> + +3.14.1.1 - Oct 15, 2014 +======================= + +Changes since 3.14.1: + - Fix express installation for Microsoft Windows. - Fix handling of downloads of unknown size. diff --git a/configure.ac b/configure.ac index caf7984..cf79f9e 100644 --- a/configure.ac +++ b/configure.ac @@ -217,4 +217,5 @@ AC_MSG_NOTICE([ build from vala sources: $enable_vala USB redirection support: $enable_usbredir Smartcard support: $enable_smartcard + oVirt support: $have_govirt ]) diff --git a/data/ui/snapshot-list-row.ui b/data/ui/snapshot-list-row.ui index f20ee62..a94fb97 100644 --- a/data/ui/snapshot-list-row.ui +++ b/data/ui/snapshot-list-row.ui @@ -22,83 +22,45 @@ <template class="BoxesSnapshotListRow" parent="GtkListBoxRow"> <property name="visible">True</property> <property name="can_focus">True</property> + <child> - <object class="GtkRevealer" id="delete_revealer"> + <object class="GtkStack" id="mode_stack"> <property name="visible">true</property> <property name="can_focus">false</property> - <property name="reveal_child">true</property> - + <property name="transition_type">slide-up-down</property> <child> - <object class="GtkStack" id="mode_stack"> - <property name="visible">true</property> - <property name="can_focus">false</property> - <property name="transition_type">slide-up-down</property> + <object class="GtkBox" id="show_name_box"> + <property name="visible">True</property> + <property name="can_focus">False</property> <child> - <object class="GtkBox" id="show_name_box"> + <object class="GtkLabel" id="name_label"> <property name="visible">True</property> <property name="can_focus">False</property> - <child> - <object class="GtkLabel" id="name_label"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="vexpand">True</property> - <property name="halign">start</property> - <property name="valign">center</property> - <property name="margin_start">45</property> - <property name="ellipsize">end</property> - <property name="xalign">0</property> - </object> - </child> - - <child> - <object class="GtkMenuButton" id="more_button"> - <property name="visible">true</property> - <property name="menu_model">actions_menu</property> - <property name="valign">center</property> - <property name="margin_top">4</property> - <property name="margin_bottom">4</property> - <property name="margin_end">4</property> - <style> - <class name="image-button" /> - </style> - <child> - <object class="GtkImage"> - <property name="visible">true</property> - <property name="icon-name">emblem-system-symbolic</property> - </object> - </child> - </object> - </child> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="halign">start</property> + <property name="valign">center</property> + <property name="margin_start">45</property> + <property name="ellipsize">end</property> + <property name="xalign">0</property> </object> </child> <child> - <object class="GtkBox" id="edit_name_box"> + <object class="GtkMenuButton" id="more_button"> <property name="visible">true</property> - <property name="orientation">horizontal</property> - <property name="can_focus">false</property> - <child> - <object class="GtkEntry" id="name_entry"> - <property name="visible">true</property> - <property name="can_focus">true</property> - <property name="margin_start">45</property> - <property name="hexpand">true</property> - <signal name="activate" handler="on_save_name_button_clicked" /> - </object> - </child> - + <property name="menu_model">actions_menu</property> + <property name="valign">center</property> + <property name="margin_top">4</property> + <property name="margin_bottom">4</property> + <property name="margin_end">4</property> + <style> + <class name="image-button" /> + </style> <child> - <object class="GtkButton" id="save_name_button"> - <property name="can_focus">true</property> + <object class="GtkImage"> <property name="visible">true</property> - <property name="margin_start">10</property> - <property name="valign">center</property> - <property name="label" translatable="yes">Done</property> - <signal name="clicked" handler="on_save_name_button_clicked" /> - <style> - <class name="text-button" /> - </style> + <property name="icon-name">emblem-system-symbolic</property> </object> </child> </object> @@ -106,7 +68,36 @@ </object> </child> + <child> + <object class="GtkBox" id="edit_name_box"> + <property name="visible">true</property> + <property name="orientation">horizontal</property> + <property name="can_focus">false</property> + <child> + <object class="GtkEntry" id="name_entry"> + <property name="visible">true</property> + <property name="can_focus">true</property> + <property name="margin_start">45</property> + <property name="hexpand">true</property> + <signal name="activate" handler="on_save_name_button_clicked" /> + </object> + </child> + <child> + <object class="GtkButton" id="save_name_button"> + <property name="can_focus">true</property> + <property name="visible">true</property> + <property name="margin_start">10</property> + <property name="valign">center</property> + <property name="label" translatable="yes">Done</property> + <signal name="clicked" handler="on_save_name_button_clicked" /> + <style> + <class name="text-button" /> + </style> + </object> + </child> + </object> + </child> </object> </child> </template> diff --git a/data/ui/wizard-source.ui b/data/ui/wizard-source.ui index 297eada..920ab83 100644 --- a/data/ui/wizard-source.ui +++ b/data/ui/wizard-source.ui @@ -227,6 +227,7 @@ <property name="margin-top">10</property> <property name="margin-start">20</property> <property name="margin-end">20</property> + <signal name="activate" handler="on_url_entry_activated"/> </object> </child> diff --git a/po/LINGUAS b/po/LINGUAS index d8cf07b..bb4a993 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1,4 +1,5 @@ # Keep this list sorted alphabetically +ar as be bg diff --git a/po/ar.po b/po/ar.po new file mode 100644 index 0000000..b77dfb3 diff --git a/src/downloader.vala b/src/downloader.vala index f64b1b7..ca3e04d 100644 --- a/src/downloader.vala +++ b/src/downloader.vala @@ -137,6 +137,9 @@ private async void download_from_http (Download download, Cancellable? cancellab int64 current_num_bytes = 0; // FIXME: Reduce lambda nesting by splitting out downloading to Download class msg.got_chunk.connect ((msg, chunk) => { + if (session.would_redirect (msg)) + return; + current_num_bytes += chunk.length; try { // Write synchronously as we have no control over order of async diff --git a/src/installer-media.vala b/src/installer-media.vala index 30b0ca2..a5e0d34 100644 --- a/src/installer-media.vala +++ b/src/installer-media.vala @@ -82,8 +82,10 @@ } public virtual void set_direct_boot_params (DomainOs os) {} - public virtual async void prepare (ActivityProgress progress = new ActivityProgress (), - Cancellable? cancellable = null) {} + public virtual async bool prepare (ActivityProgress progress = new ActivityProgress (), + Cancellable? cancellable = null) { + return true; + } public virtual async void prepare_for_installation (string vm_name, Cancellable? cancellable) throws GLib.Error {} public virtual void prepare_to_continue_installation (string vm_name) {} public virtual void clean_up () { diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala index 07a6d2c..657875a 100644 --- a/src/libvirt-machine-properties.vala +++ b/src/libvirt-machine-properties.vala @@ -11,26 +11,22 @@ public LibvirtMachineProperties (LibvirtMachine machine) { this.machine = machine; machine.notify["name"].connect (() => { - try_change_name (machine.name); + save_machine_name_change (); }); } - private bool try_change_name (string name) { - if (machine.name == name) - return false; - + private bool save_machine_name_change () { try { var config = machine.domain.get_config (GVir.DomainXMLFlags.INACTIVE); // Te use libvirt "title" for free form user name - config.title = name; + config.title = machine.name; // This will take effect only after next reboot, but we use pending/inactive config for name and title machine.domain.set_config (config); - machine.name = name; return true; } catch (GLib.Error error) { - warning ("Failed to change title of box '%s' to '%s': %s", - machine.domain.get_name (), name, error.message); + warning ("Failed to save change of title of box from '%s' to '%s': %s", + machine.domain.get_name (), machine.name, error.message); return false; } } @@ -121,7 +117,12 @@ private string collect_logs () { var property = add_string_property (ref list, _("Name"), machine.name); property.editable = true; property.changed.connect ((property, name) => { - return try_change_name (name); + machine.name = name; + + // Its unlikely that machine name change fails and even if it + // does, name is still changed in the UI at least (it just + // doesn't get saved). + return true; }); var name_property = property; diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala index b86a7da..22532b6 100644 --- a/src/libvirt-machine.vala +++ b/src/libvirt-machine.vala @@ -29,6 +29,8 @@ set { source.set_boolean ("source", "save-on-quit", value); } } + public override bool can_save { get { return !saving && state != MachineState.SAVED; } } + public override void disconnect_display () { stay_on_display = false; @@ -76,11 +78,11 @@ public override async void connect_display (Machine.ConnectFlags flags) throws G private MachineStat[] stats; private bool force_stopped; + private bool saving; // Machine is being saved currently.. construct { stats = new MachineStat[STATS_SIZE]; stats_cancellable = new Cancellable (); - can_save = true; } public void update_domain_config () { @@ -430,7 +432,9 @@ public override void delete (bool by_user = true) { } public async override void save_real () throws GLib.Error { + saving = true; yield domain.save_async (0, null); + saving = false; } public async void suspend () throws GLib.Error { diff --git a/src/machine.vala b/src/machine.vala index 76bcedc..e419ca0 100644 --- a/src/machine.vala +++ b/src/machine.vala @@ -11,7 +11,7 @@ public string? status { get; set; } public bool suspend_at_exit; - public bool can_save { get; protected set; default = false; } + public virtual bool can_save { get { return false; } } public bool can_delete { get; protected set; default = true; } public bool under_construction { get; protected set; default = false; } diff --git a/src/properties-toolbar.vala b/src/properties-toolbar.vala index 6e6a3bc..af75efe 100644 --- a/src/properties-toolbar.vala +++ b/src/properties-toolbar.vala @@ -25,7 +25,8 @@ public void setup_ui (AppWindow window) { [GtkCallback] private void on_back_clicked () { - if ((window.current_item as Machine).state != Machine.MachineState.RUNNING) + if ((window.current_item as Machine).state != Machine.MachineState.RUNNING && + window.previous_ui_state == UIState.DISPLAY) window.set_state (UIState.COLLECTION); else window.set_state (window.previous_ui_state); diff --git a/src/selectionbar.vala b/src/selectionbar.vala index 0187ab9..583b84d 100644 --- a/src/selectionbar.vala +++ b/src/selectionbar.vala @@ -121,7 +121,7 @@ private void update_pause_btn () { continue; var machine = item as Machine; - if (machine.can_save && machine.state != Machine.MachineState.SAVED) { + if (machine.can_save) { sensitive = true; break; diff --git a/src/snapshot-list-row.vala b/src/snapshot-list-row.vala index fa98d8a..e6fb5bf 100644 --- a/src/snapshot-list-row.vala +++ b/src/snapshot-list-row.vala @@ -6,8 +6,6 @@ public string activity_message { get; set; default = ""; } [GtkChild] - private Gtk.Revealer delete_revealer; - [GtkChild] private Gtk.Label name_label; [GtkChild] private Gtk.Stack mode_stack; @@ -63,14 +61,6 @@ public SnapshotListRow (GVir.DomainSnapshot snapshot, var action_group = new GLib.SimpleActionGroup (); action_group.add_action_entries (action_entries, this); this.insert_action_group ("snap", action_group); - - delete_revealer.notify["child-revealed"].connect (() => { - if (!delete_revealer.child_revealed) { - parent_container = (Gtk.Container) this.get_parent (); - if (parent_container != null) - parent_container.remove (this); - } - }); } // Need to override this in order to connect the indicators without any gaps. @@ -120,14 +110,16 @@ public override bool draw (Cairo.Context ct) { [GtkCallback] private void on_save_name_button_clicked () { + var name = name_entry.text; + try { var config = snapshot.get_config (0); - config.set_description (name_entry.text); + config.set_description (name); snapshot.set_config (config); - name_label.label = name_entry.get_text (); + name_label.label = name; mode_stack.visible_child = show_name_box; } catch (GLib.Error e) { - warning (e.message); + warning ("Failed to change name of snapshot to %s: %s", name, e.message); } } @@ -142,11 +134,11 @@ private void revert_to_activated (GLib.SimpleAction action, GLib.Variant? v) { snapshot_state = snapshot_config.get_state (); } catch (GLib.Error e) {} - var show_activity = (machine.state == Machine.MachineState.RUNNING); - if (show_activity) - activity_message = _("Reverting to %s…").printf (snapshot_name); + activity_message = _("Reverting to %s…").printf (snapshot_name); - if (snapshot_state == GVirConfig.DomainSnapshotDomainState.SHUTOFF) { + if (machine.window.previous_ui_state == UIState.DISPLAY && + snapshot_state == GVirConfig.DomainSnapshotDomainState.SHUTOFF) { + // Previous UI state being DISPLAY implies that machine is running ulong restart_id = 0; restart_id = machine.domain.stopped.connect (() => { machine.start.begin (Machine.ConnectFlags.NONE, null); @@ -162,8 +154,7 @@ private void revert_to_activated (GLib.SimpleAction action, GLib.Variant? v) { warning (e.message); machine.window.notificationbar.display_error (_("Failed to apply snapshot")); } - if (show_activity) - activity_message = null; + activity_message = null; }); } @@ -179,12 +170,13 @@ private void delete_activated (GLib.SimpleAction action, GLib.Variant? v) { e.message); } var message = _("Snapshot \"%s\" deleted.").printf (snapshot_identifier); - delete_revealer.reveal_child = false; + parent_container = (Gtk.Container) this.get_parent (); + var row = this; + parent_container.remove (this); Notification.OKFunc undo = () => { parent_container.add (this); - this.visible = true; - delete_revealer.reveal_child = true; + row = null; }; Notification.CancelFunc really_remove = () => { @@ -196,6 +188,7 @@ private void delete_activated (GLib.SimpleAction action, GLib.Variant? v) { warning ("Error while deleting snapshot %s: %s", snapshot.get_name (), e.message); } }); + row = null; }; machine.window.notificationbar.display_for_action (message, _("_Undo"), @@ -209,15 +202,6 @@ private void rename_activated (GLib.SimpleAction action, GLib.Variant? v) { name_entry.grab_focus (); } - public void unreveal () { - delete_revealer.reveal_child = false; - } - - public void reveal () { - delete_revealer.reveal_child = true; - } - - private void update_index () { var parent = this.get_parent (); diff --git a/src/snapshots-property.vala b/src/snapshots-property.vala index 714f749..584d503 100644 --- a/src/snapshots-property.vala +++ b/src/snapshots-property.vala @@ -106,9 +106,7 @@ private async void create_snapshot () { var new_snapshot = yield machine.properties.create_snapshot (); var new_row = new SnapshotListRow (new_snapshot, machine); new_row.notify["activity-message"].connect (row_activity_changed); - new_row.unreveal (); snapshot_list.add (new_row); - new_row.reveal (); } catch (GLib.Error e) { var msg = _("Failed to create snapshot of %s").printf (machine.name); machine.window.notificationbar.display_error (msg); diff --git a/src/topbar.vala b/src/topbar.vala index 15808da..52cbc10 100644 --- a/src/topbar.vala +++ b/src/topbar.vala @@ -101,8 +101,7 @@ public void setup_ui (AppWindow window) { this.window = window; window.notify["selection-mode"].connect (() => { - // FIXME: Usage of 'this' is a work around for https://bugzilla.gnome.org/show_bug.cgi?id=734877 - page = this.window.selection_mode ? + page = window.selection_mode ? TopbarPage.SELECTION : page = TopbarPage.COLLECTION; }); diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala index 2f06e03..7e635b7 100644 --- a/src/unattended-installer.vala +++ b/src/unattended-installer.vala @@ -326,9 +326,9 @@ public string get_user_unattended (string? suffix = null) { return get_user_pkgcache (filename); } - public override async void prepare (ActivityProgress progress = new ActivityProgress (), - Cancellable? cancellable = null) { - yield setup_drivers (progress, cancellable); + public override async bool prepare (ActivityProgress progress = new ActivityProgress (), + Cancellable? cancellable = null) { + return yield setup_drivers (progress, cancellable); } private DomainDisk? get_unattended_disk_config (PathFormat path_format = PathFormat.UNIX) { @@ -450,7 +450,7 @@ private async void extract_boot_files (ISOExtractor extractor, Cancellable? canc private delegate void AddUnattendedFileFunc (UnattendedFile file); - private async void setup_drivers (ActivityProgress progress, Cancellable? cancellable = null) { + private async bool setup_drivers (ActivityProgress progress, Cancellable? cancellable = null) { progress.info = _("Downloading device drivers…"); var scripts = get_pre_installer_scripts (); @@ -458,7 +458,8 @@ private async void setup_drivers (ActivityProgress progress, Cancellable? cancel if (drivers.length () != 0 && scripts.length () != 0) { var drivers_progress = progress.add_child_activity (0.5); - yield setup_drivers_from_list (drivers, drivers_progress, add_unattended_file, cancellable); + if (!yield setup_drivers_from_list (drivers, drivers_progress, add_unattended_file, cancellable)) + return false; } else progress.progress = 0.5; @@ -467,12 +468,14 @@ private async void setup_drivers (ActivityProgress progress, Cancellable? cancel if (drivers.length () != 0 && scripts.length () != 0) { var drivers_progress = progress.add_child_activity (0.5); - yield setup_drivers_from_list (drivers, drivers_progress, add_secondary_unattended_file, cancellable); + return yield setup_drivers_from_list (drivers, drivers_progress, add_secondary_unattended_file, cancellable); } else progress.progress = 1.0; + + return true; } - private async void setup_drivers_from_list (GLib.List<DeviceDriver> drivers, + private async bool setup_drivers_from_list (GLib.List<DeviceDriver> drivers, ActivityProgress progress, AddUnattendedFileFunc add_func, Cancellable? cancellable = null) { @@ -483,12 +486,18 @@ private async void setup_drivers_from_list (GLib.List<DeviceDriver> drivers, try { yield setup_driver (driver, driver_progress, add_func, cancellable); additional_devices.add_all (driver.get_devices ()); + } catch (IOError.CANCELLED e) { + debug ("Media preparation cancelled during driver setup."); + + return false; } catch (GLib.Error e) { debug ("Failed to make use of drivers at '%s': %s", driver.get_location (), e.message); } finally { driver_progress.progress = 1.0; // Ensure progress reaches 100% } } + + return true; } private async void setup_driver (DeviceDriver driver, @@ -516,7 +525,7 @@ private async void setup_driver (DeviceDriver driver, cached_paths += system_cached_path; var file_progress = progress.add_child_activity (file_progress_scale); - file = yield downloader.download (file, cached_paths, file_progress); + file = yield downloader.download (file, cached_paths, file_progress, cancellable); file_progress.progress = 1.0; // Ensure progress reaches 100% driver_files.append (new UnattendedRawFile (this, file.get_path (), filename)); diff --git a/src/vnc-display.vala b/src/vnc-display.vala index 4bb505b..67213ff 100644 --- a/src/vnc-display.vala +++ b/src/vnc-display.vala @@ -45,9 +45,9 @@ debug ("auth unsupported"); }); - display.vnc_auth_credential.connect ((vnc, creds) => { + display.vnc_auth_credential.connect ((creds) => { foreach (var cred in creds) { - var credential = cred as DisplayCredential; + var credential = (DisplayCredential) cred; switch (credential) { case DisplayCredential.USERNAME: diff --git a/src/wizard-source.vala b/src/wizard-source.vala index c30b041..cf8a8f5 100644 --- a/src/wizard-source.vala +++ b/src/wizard-source.vala @@ -200,6 +200,11 @@ private void on_enter_url_button_clicked () { } [GtkCallback] + private void on_url_entry_activated () { + activated (); + } + + [GtkCallback] private void on_url_back_button_clicked () { selected = null; page = SourcePage.MAIN; diff --git a/src/wizard.vala b/src/wizard.vala index 00d5581..a452771 100644 --- a/src/wizard.vala +++ b/src/wizard.vala @@ -53,7 +53,7 @@ protected Machine? machine { get; set; } private LibvirtMachine? libvirt_machine { get { return (machine as LibvirtMachine); } } - private Cancellable? prepare_cancellable; + private Cancellable prepare_cancellable = new Cancellable (); private Cancellable? review_cancellable; private bool skip_review_for_live; @@ -209,8 +209,7 @@ private void wizard_source_update_next () { } public void cleanup () { - if (prepare_cancellable != null) - prepare_cancellable.cancel (); + prepare_cancellable.cancel (); destroy_machine (); vm_creator = null; @@ -344,7 +343,8 @@ private async void prepare_media (InstallerMedia install_media, ActivityProgress else prepare_media_progress = progress; prepare_media_progress.bind_property ("info", prep_status_label, "label"); - yield install_media.prepare (prepare_media_progress, prepare_cancellable); + if (!yield install_media.prepare (prepare_media_progress, prepare_cancellable)) + return; vm_creator = install_media.get_vm_creator (); prep_progress.fraction = 1.0; @@ -361,7 +361,8 @@ private bool prepare (ActivityProgress progress) { return false; } - prepare_cancellable = new Cancellable (); + prepare_cancellable.reset (); + if (wizard_source.download_required) { continue_button.sensitive = false; download_media.begin (wizard_source.uri, progress); @@ -588,8 +589,6 @@ private async void download_media (string uri, ActivityProgress progress) { warning ("Failed downloading media '%s'! %s", uri, e.message); window.notificationbar.display_error (_("Download failed.")); page = WizardPage.SOURCE; - } finally { - prepare_cancellable = null; } } @@ -612,8 +611,7 @@ public void setup_ui (AppWindow window) { }); back_button = window.topbar.wizard_toolbar.back_btn; back_button.clicked.connect (() => { - if (prepare_cancellable != null) - prepare_cancellable.cancel (); + prepare_cancellable.cancel (); page = page - 1; });

