[gnome-boxes] preferences: Show Troubleshoot logs for "Failed to start" notification
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] preferences: Show Troubleshoot logs for "Failed to start" notification
- Date: Tue, 14 Dec 2021 14:15:01 +0000 (UTC)
commit bb4e2e01da7723caf3c6354e0c730fea108cb5a5
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Dec 14 14:30:03 2021 +0100
preferences: Show Troubleshoot logs for "Failed to start" notification
data/ui/preferences/resources-page.ui | 2 +-
src/machine.vala | 10 ++++++----
src/preferences/preferences-window.vala | 4 ++++
src/preferences/resources-page.vala | 2 +-
4 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/data/ui/preferences/resources-page.ui b/data/ui/preferences/resources-page.ui
index 3a1aae74..ed64c9e8 100644
--- a/data/ui/preferences/resources-page.ui
+++ b/data/ui/preferences/resources-page.ui
@@ -154,7 +154,7 @@
<object class="GtkButton">
<property name="visible">True</property>
<property name="valign">center</property>
- <signal name="clicked" handler="on_troubleshooting_logs_button_clicked"/>
+ <signal name="clicked" handler="show_logs"/>
<child>
<object class="GtkImage">
diff --git a/src/machine.vala b/src/machine.vala
index b093d465..556406aa 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -608,11 +608,13 @@ private async void try_connect_display (ConnectFlags flags = ConnectFlags.NONE)
if (this is LibvirtMachine) {
Notification.OKFunc troubleshoot = () => {
window.current_item = this;
- //window.show_properties ();
- var libvirt_machine = this as LibvirtMachine;
- //FIXME: var logs = libvirt_machine.properties.collect_logs ();
- //window.props_window.show_troubleshoot_log (logs);
+ var preferences = new PreferencesWindow () {
+ machine = this as LibvirtMachine,
+ transient_for = window
+ };
+ preferences.present ();
+ preferences.show_troubleshoot_logs ();
};
window.notificationbar.display_for_action (msg, _("Troubleshooting Log"), (owned)
troubleshoot, null);
diff --git a/src/preferences/preferences-window.vala b/src/preferences/preferences-window.vala
index e3bbd58c..a66579e1 100644
--- a/src/preferences/preferences-window.vala
+++ b/src/preferences/preferences-window.vala
@@ -17,4 +17,8 @@
private unowned Boxes.DevicesPage devices_page;
[GtkChild]
private unowned Boxes.SnapshotsPage snapshots_page;
+
+ public void show_troubleshoot_logs () {
+ resources_page.show_logs ();
+ }
}
diff --git a/src/preferences/resources-page.vala b/src/preferences/resources-page.vala
index 9e9a92a3..a3360c8e 100644
--- a/src/preferences/resources-page.vala
+++ b/src/preferences/resources-page.vala
@@ -161,7 +161,7 @@ private async void on_run_in_bg_toggled () {
}
[GtkCallback]
- private void on_troubleshooting_logs_button_clicked () {
+ public void show_logs () {
if (logs == null)
logs = collect_logs (machine);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]