[gnome-boxes/gnome-3-28] Revert "libvirt-machine: Inhibit while clonning machine"
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-28] Revert "libvirt-machine: Inhibit while clonning machine"
- Date: Tue, 10 Apr 2018 09:36:56 +0000 (UTC)
commit fb1e654e8a9f2fecb786b3e4cfd3931753bf4cd1
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Apr 10 11:30:42 2018 +0200
Revert "libvirt-machine: Inhibit while clonning machine"
This reverts commit 9fd9ce4f852556cd2ff6fac2ebec9c697bebf60e.
Revert "machine: Inhibit during machine construction"
This reverts commit d51b4dd69207df77f94175a6d4cd9c0b04b64481.
Revert "wizard: Inhibit during media downloads"
This reverts commit 8d70c16625380ff12f0167747b0371eae809196c.
Revert "app: Add inhibit methods"
This reverts commit f5719042720d431ea0f543f90de3f3d7879713c4.
See https://mail.gnome.org/archives/gnome-i18n/2018-April/msg00012.html
src/app.vala | 25 -------------------------
src/libvirt-machine.vala | 5 -----
src/machine.vala | 9 ---------
src/wizard.vala | 5 -----
4 files changed, 44 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 77d7d7c6..89aba7a8 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -44,8 +44,6 @@ public virtual async void add_source (CollectionSource source) throws GLib.Error
public CollectionSource default_source { get { return sources.get (DEFAULT_SOURCE_NAME); } }
public AsyncLauncher async_launcher;
- private uint inhibit_cookie = 0;
-
public App () {
application_id = "org.gnome.Boxes";
flags |= ApplicationFlags.HANDLES_COMMAND_LINE | ApplicationFlags.HANDLES_OPEN;
@@ -619,29 +617,6 @@ public new bool remove_window (AppWindow window) {
return initial_windows_count != windows.length ();
}
-
- public new void inhibit (Gtk.Window? window = main_window, Gtk.ApplicationInhibitFlags? flags = null,
string? reason = null) {
- if (reason == null) {
- reason = _("Boxes is doing something");
- }
-
- if (flags == null) {
- flags = Gtk.ApplicationInhibitFlags.IDLE | Gtk.ApplicationInhibitFlags.SUSPEND;
- }
-
- uint new_cookie = base.inhibit (window, flags, reason);
- if (inhibit_cookie != 0) {
- base.uninhibit (inhibit_cookie);
- }
-
- inhibit_cookie = new_cookie;
- }
-
- public new void uninhibit () {
- if (inhibit_cookie != 0) {
- base.uninhibit (inhibit_cookie);
- }
- }
}
[GtkTemplate (ui = "/org/gnome/Boxes/ui/kbd-shortcuts-window.ui")]
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 097780f8..a09a8f50 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -686,9 +686,6 @@ public override async void clone () {
debug ("Cloning '%s'..", domain_config.name);
can_delete = false;
- var inhibit_reason = _("Cloning '%s'..").printf (domain_config.name);
- App.app.inhibit (null, null, inhibit_reason);
-
try {
// Any better way of cloning the config?
var xml = domain_config.to_xml ();
@@ -705,8 +702,6 @@ public override async void clone () {
if (!clone_machine.under_construction) {
can_delete = true;
clone_machine.disconnect (under_construct_id);
-
- App.app.uninhibit ();
}
});
} catch (GLib.Error error) {
diff --git a/src/machine.vala b/src/machine.vala
index 46d12b1f..1c507fde 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -271,15 +271,6 @@ public Machine (Boxes.CollectionSource source, string name, string? uuid = null)
SCREENSHOT_WIDTH, SCREENSHOT_HEIGHT,
CENTERED_EMBLEM_SIZE, EMBLEM_SIZE,
FRAME_BORDER_COLOR, FRAME_BACKGROUND_COLOR);
-
- notify["under-construction"].connect (() => {
- if (under_construction) {
- var inhibit_reason = _("Machine is under construction");
- App.app.inhibit (null, null, inhibit_reason);
- } else {
- App.app.uninhibit ();
- }
- });
}
protected void load_screenshot () {
diff --git a/src/wizard.vala b/src/wizard.vala
index 223a1476..ed452246 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -642,9 +642,6 @@ private async void download_media (string uri, string? filename, ActivityProgres
prep_status_label.label = _("Downloading media…");
try {
- var inhibit_reason = _("Downloading media");
- App.app.inhibit (wizard_window, null, inhibit_reason);
-
var cache_path = yield Downloader.fetch_media (uri, filename, download_progress,
prepare_cancellable);
prepare_downloaded_media (cache_path, progress);
} catch (GLib.IOError.CANCELLED e) {
@@ -655,8 +652,6 @@ private async void download_media (string uri, string? filename, ActivityProgres
window.notificationbar.display_error (_("Download failed."));
page = WizardPage.SOURCE;
}
-
- App.app.uninhibit ();
}
private void prepare_downloaded_media (string cache_path, ActivityProgress progress) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]