[pve-devel] [PATCH ha-manager 3/6] sim: set migrate dialog transient to parent
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Jan 12 15:51:56 CET 2017
This allows window managers to e.g. keep the dialog on top of the
main window, or center the dialog over the main window.
Fixes also a warning that the dialog had no transient parent
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
Did some whitespace cleanup in the touched areas
src/PVE/HA/Sim/RTHardware.pm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/PVE/HA/Sim/RTHardware.pm b/src/PVE/HA/Sim/RTHardware.pm
index 12b0f2b..7d1210d 100644
--- a/src/PVE/HA/Sim/RTHardware.pm
+++ b/src/PVE/HA/Sim/RTHardware.pm
@@ -381,8 +381,9 @@ sub show_migrate_dialog {
$dialog->set_title("Migrate $sid");
$dialog->set_modal(1);
+ $dialog->set_transient_for($self->{main_window});
- my $grid = Gtk3::Grid->new();
+ my $grid = Gtk3::Grid->new();
$grid->set_row_spacing(2);
$grid->set_column_spacing(5);
$grid->set('margin', 5);
@@ -542,7 +543,9 @@ sub create_main_window {
$window->signal_connect( destroy => sub { Gtk3::main_quit(); });
- my $grid = Gtk3::Grid->new();
+ $self->{main_window} = $window;
+
+ my $grid = Gtk3::Grid->new();
my $frame = $self->create_log_view();
$grid->attach($frame, 0, 0, 1, 1);
--
2.1.4
More information about the pve-devel
mailing list