public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 4/4] stop using Gtk3::Window->set_has_resize_grip
Date: Thu, 15 Jun 2023 14:15:03 +0200	[thread overview]
Message-ID: <20230615121503.84263-5-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20230615121503.84263-1-m.sandoval@proxmox.com>

The property GtkWindow::has-resize-grip was deprecated in GTK 3.14,
instead we make the window unresizable.

Note that we set the value of resizable only after the window has been
mapped and knows how much space it needs, also note that this only works
correctly if the window is properly displayed via present.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 proxinstall | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxinstall b/proxinstall
index d2f3d26..154703a 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1489,7 +1489,7 @@ sub create_main_window {
 
     $window = Gtk3::Window->new();
     $window->set_default_size(1024, 768);
-    $window->set_has_resize_grip(0);
+    $window->signal_connect(map => sub { $window->set_resizable(0); });
     $window->fullscreen() if !is_test_mode();
     $window->set_decorated(0) if !is_test_mode();
 
@@ -1559,7 +1559,7 @@ sub create_main_window {
     $window->add($vbox);
 
     $window->show_all;
-    $window->realize();
+    $window->present();
 }
 
 sub cleanup_view {
-- 
2.39.2





  parent reply	other threads:[~2023-06-15 12:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 12:14 [pve-devel] [PATCH installer 0/4] Drop deprecated GTK 3 methods Maximiliano Sandoval
2023-06-15 12:15 ` [pve-devel] [PATCH installer 1/4] stop using Gtk3::Misc->set_alignment Maximiliano Sandoval
2023-06-15 12:15 ` [pve-devel] [PATCH installer 2/4] stop using Gtk3::HBox and Gtk3::VBox Maximiliano Sandoval
2023-06-15 12:15 ` [pve-devel] [PATCH installer 3/4] stop using Gtk3::HSeparator Maximiliano Sandoval
2023-06-15 12:15 ` Maximiliano Sandoval [this message]
2023-06-19  7:35 ` [pve-devel] applied: [PATCH installer 0/4] Drop deprecated GTK 3 methods Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230615121503.84263-5-m.sandoval@proxmox.com \
    --to=m.sandoval@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal