[pve-devel] [PATCH installer 1/4] stop using Gtk3::Misc->set_alignment

Maximiliano Sandoval m.sandoval at proxmox.com
Thu Jun 15 14:15:00 CEST 2023


This was deprecated in GTK 3.14, instead we use
GtkLabel:{xalign,yalign}. Note that by default they are both set to 0.5.

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 proxinstall | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/proxinstall b/proxinstall
index d385bc5..00b2d14 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1612,7 +1612,7 @@ sub create_text_input {
 
     my $label = Gtk3::Label->new($text);
     $label->set_size_request(150, -1);
-    $label->set_alignment(1, 0.5);
+    $label->set_xalign(1.0);
     $hbox->pack_start($label, 0, 0, 10);
     my $e1 = Gtk3::Entry->new();
     $e1->set_width_chars(35);
@@ -1628,7 +1628,7 @@ sub create_cidr_inputs {
 
     my $label = Gtk3::Label->new('IP Address (CIDR)');
     $label->set_size_request(150, -1);
-    $label->set_alignment(1, 0.5);
+    $label->set_xalign(1.0);
     $hbox->pack_start($label, 0, 0, 10);
 
     my $ip_el = Gtk3::Entry->new();
@@ -1638,7 +1638,6 @@ sub create_cidr_inputs {
 
     $label = Gtk3::Label->new('/');
     $label->set_size_request(10, -1);
-    $label->set_alignment(0.5, 0.5);
     $hbox->pack_start($label, 0, 0, 2);
 
     my $cidr_el = Gtk3::Entry->new();
@@ -1745,7 +1744,7 @@ sub create_ipconf_view {
     my $devicebox = Gtk3::HBox->new(0, 0);
     my $label = Gtk3::Label->new("Management Interface:");
     $label->set_size_request(150, -1);
-    $label->set_alignment(1, 0.5);
+    $label->set_xalign(1.0);
     $devicebox->pack_start($label, 0, 0, 10);
     $devicebox->pack_start($device_cb, 0, 0, 0);
 
@@ -2009,7 +2008,7 @@ sub create_password_view {
     my $hbox1 = Gtk3::HBox->new(0, 0);
     my $label = Gtk3::Label->new("Password");
     $label->set_size_request(150, -1);
-    $label->set_alignment(1, 0.5);
+    $label->set_xalign(1.0);
     $hbox1->pack_start($label, 0, 0, 10);
     my $pwe1 = Gtk3::Entry->new();
     $pwe1->set_visibility(0);
@@ -2020,7 +2019,7 @@ sub create_password_view {
     my $hbox2 = Gtk3::HBox->new(0, 0);
     $label = Gtk3::Label->new("Confirm");
     $label->set_size_request(150, -1);
-    $label->set_alignment(1, 0.5);
+    $label->set_xalign(1.0);
     $hbox2->pack_start($label, 0, 0, 10);
     my $pwe2 = Gtk3::Entry->new();
     $pwe2->set_visibility(0);
@@ -2031,7 +2030,7 @@ sub create_password_view {
     my $hbox3 = Gtk3::HBox->new(0, 0);
     $label = Gtk3::Label->new("Email");
     $label->set_size_request(150, -1);
-    $label->set_alignment(1, 0.5);
+    $label->set_xalign(1.0);
     $hbox3->pack_start($label, 0, 0, 10);
     my $eme = Gtk3::Entry->new();
     $eme->set_size_request(200, -1);
@@ -2113,14 +2112,14 @@ sub create_country_view {
     my $hbox2 = Gtk3::HBox->new(0, 0);
     my $label = Gtk3::Label->new("Time zone");
     $label->set_size_request(150, -1);
-    $label->set_alignment(1, 0.5);
+    $label->set_xalign(1.0);
     $hbox2->pack_start($label, 0, 0, 10);
     update_zonelist ($hbox2);
 
     my $hbox3 = Gtk3::HBox->new(0, 0);
     $label = Gtk3::Label->new("Keyboard Layout");
     $label->set_size_request(150, -1);
-    $label->set_alignment(1, 0.5);
+    $label->set_xalign(1.0);
     $hbox3->pack_start($label, 0, 0, 10);
 
     my $kmapcb = Gtk3::ComboBoxText->new();
@@ -2231,7 +2230,7 @@ sub create_country_view {
     my $hbox =  Gtk3::HBox->new(0, 0);
 
     $label = Gtk3::Label->new("Country");
-    $label->set_alignment(1, 0.5);
+    $label->set_xalign(1.0);
     $label->set_size_request(150, -1);
     $hbox->pack_start($label, 0, 0, 10);
     $hbox->pack_start($w, 0, 0, 0);
@@ -2295,7 +2294,7 @@ my $create_label_widget_grid = sub {
 	my $widget = @$labeled_widgets[$i+1];
 	my $label = Gtk3::Label->new(@$labeled_widgets[$i]);
 	$label->set_visible(1);
-	$label->set_alignment (1, 0.5);
+	$label->set_xalign(1.0);
 	$grid->attach($label, 0, $row, 1, 1);
 	$widget->set_visible(1);
 	$grid->attach($widget, 1, $row, 1, 1);
@@ -2523,7 +2522,7 @@ sub create_hdoption_view {
 
     # Filesystem type
     my $label0 = Gtk3::Label->new("Filesystem");
-    $label0->set_alignment (1, 0.5);
+    $label0->set_xalign(1.0);
     $grid->attach($label0, 0, $row, 1, 1);
 
     my $fstypecb = Gtk3::ComboBoxText->new();
-- 
2.39.2






More information about the pve-devel mailing list