[gnome-control-center] bluetooth: Replace GtkAlignment by halign and valign properties
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] bluetooth: Replace GtkAlignment by halign and valign properties
- Date: Fri, 16 Mar 2018 16:54:11 +0000 (UTC)
commit 1643674a244a533193515e34daa7603e88c1fac1
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Mar 16 13:51:25 2018 -0300
bluetooth: Replace GtkAlignment by halign and valign properties
This removes the last deprecation warning in the Bluetooth panel.
panels/bluetooth/cc-bluetooth-panel.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/panels/bluetooth/cc-bluetooth-panel.c b/panels/bluetooth/cc-bluetooth-panel.c
index 819364016..36c58bf4d 100644
--- a/panels/bluetooth/cc-bluetooth-panel.c
+++ b/panels/bluetooth/cc-bluetooth-panel.c
@@ -260,14 +260,14 @@ add_stack_page (CcBluetoothPanel *self,
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
if (g_str_equal (name, BLUETOOTH_AIRPLANE_PAGE)) {
- GtkWidget *button, *alignment;
+ GtkWidget *button;
button = gtk_button_new_with_label (_("Turn Off Airplane Mode"));
- alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
- gtk_container_add (GTK_CONTAINER (alignment), button);
+ gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
+ gtk_widget_set_halign (button, GTK_ALIGN_CENTER);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_airplane_mode_off_clicked), self);
- gtk_box_pack_start (GTK_BOX (box), alignment, FALSE, FALSE, 24);
+ gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 24);
}
gtk_stack_add_named (GTK_STACK (self->stack), box, name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]