From a919238f30e02cc996eb842d0ab4a0922964d77e Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Sat, 6 May 2023 02:45:49 +0200 Subject: Fix some deprecations --- src/main-window.vala | 5 ++--- src/menubar.vala | 2 +- src/prompt-box.vala | 4 ++-- src/settings.vala | 2 ++ 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main-window.vala b/src/main-window.vala index fd1e19c..32df287 100644 --- a/src/main-window.vala +++ b/src/main-window.vala @@ -52,7 +52,6 @@ public class MainWindow : Gtk.Window bg_color.parse (AGSettings.get_string (AGSettings.KEY_BACKGROUND_COLOR)); override_background_color (Gtk.StateFlags.NORMAL, bg_color); get_accessible ().set_name (_("Login Screen")); - has_resize_grip = false; ArcticaGreeter.add_style_class (this); background = new Background (); @@ -201,8 +200,8 @@ public class MainWindow : Gtk.Window if (hbox != null) { - hbox.margin_left = get_grid_offset (get_allocated_width ()) + grid_size; - hbox.margin_right = get_grid_offset (get_allocated_width ()); + hbox.margin_start = get_grid_offset (get_allocated_width ()) + grid_size; + hbox.margin_end = get_grid_offset (get_allocated_width ()); hbox.margin_top = get_grid_offset (get_allocated_height ()); hbox.margin_bottom = get_grid_offset (get_allocated_height ()); } diff --git a/src/menubar.vala b/src/menubar.vala index 4438b04..a53b461 100644 --- a/src/menubar.vala +++ b/src/menubar.vala @@ -277,7 +277,7 @@ public class MenuBar : Gtk.MenuBar hostname_item.set_sensitive (false); - hostname_item.set_right_justified (true); + hostname_item.set_halign (Gtk.Align.END); } /* Prevent dragging the window by the menubar */ diff --git a/src/prompt-box.vala b/src/prompt-box.vala index f429bc6..5716ab1 100644 --- a/src/prompt-box.vala +++ b/src/prompt-box.vala @@ -238,7 +238,7 @@ public class PromptBox : FadableBox name_label.vexpand = true; name_label.yalign = 0.5f; name_label.xalign = 0.0f; - name_label.margin_left = 2; + name_label.margin_start = 2; name_label.set_size_request (-1, grid_size); name_label.show (); name_grid.attach (name_label, COL_NAME_LABEL, ROW_NAME, 1, 1); @@ -340,7 +340,7 @@ public class PromptBox : FadableBox small_name_label.override_color (Gtk.StateFlags.NORMAL, { 1.0f, 1.0f, 1.0f, 1.0f }); small_name_label.yalign = 0.5f; small_name_label.xalign = 0.0f; - small_name_label.margin_left = 2; + small_name_label.margin_start = 2; small_name_label.set_size_request (-1, grid_size); small_name_label.show (); small_name_grid.attach (small_name_label, 1, 0, 1, 1); diff --git a/src/settings.vala b/src/settings.vala index 33d40c1..30f25ed 100644 --- a/src/settings.vala +++ b/src/settings.vala @@ -3,6 +3,7 @@ * Copyright (C) 2011,2012 Canonical Ltd * Copyright (C) 2015,2017 Mike Gabriel * Copyright (C) 2022 Mihai Moldovan + * Copyright (C) 2023 Robert Tari * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -19,6 +20,7 @@ * Authors: Robert Ancell * Michael Terry * Mike Gabriel + * Robert Tari */ [SingleInstance] -- cgit v1.2.3