[gnome-control-center] region: Fix deprecated API usage
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] region: Fix deprecated API usage
- Date: Fri, 5 Dec 2014 15:15:38 +0000 (UTC)
commit 6686a791581a3a5636e826d7167e26eede27b406
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Nov 26 16:30:55 2014 +0100
region: Fix deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
panels/region/cc-format-chooser.c | 1 -
panels/region/cc-input-chooser.c | 11 +++++------
panels/region/cc-region-panel.c | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/panels/region/cc-format-chooser.c b/panels/region/cc-format-chooser.c
index ea42dee..9d1dba5 100644
--- a/panels/region/cc-format-chooser.c
+++ b/panels/region/cc-format-chooser.c
@@ -270,7 +270,6 @@ more_widget_new (void)
gtk_style_context_add_class (gtk_widget_get_style_context (arrow), "dim-label");
gtk_widget_set_margin_top (box, 10);
gtk_widget_set_margin_bottom (box, 10);
- gtk_misc_set_alignment (GTK_MISC (arrow), 0.5, 0.5);
gtk_box_pack_start (GTK_BOX (box), arrow, TRUE, TRUE, 0);
return GTK_LIST_BOX_ROW (row);
diff --git a/panels/region/cc-input-chooser.c b/panels/region/cc-input-chooser.c
index ab608fe..1b735e2 100644
--- a/panels/region/cc-input-chooser.c
+++ b/panels/region/cc-input-chooser.c
@@ -119,14 +119,14 @@ padded_label_new (const gchar *text,
GtkWidget *widget;
GtkWidget *label;
GtkWidget *arrow;
- gdouble alignment;
+ GtkAlign alignment;
if (position == ROW_LABEL_POSITION_START)
- alignment = 0.0;
+ alignment = GTK_ALIGN_START;
else if (position == ROW_LABEL_POSITION_CENTER)
- alignment = 0.5;
+ alignment = GTK_ALIGN_CENTER;
else
- alignment = 1.0;
+ alignment = GTK_ALIGN_END;
widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -137,7 +137,7 @@ padded_label_new (const gchar *text,
}
label = gtk_label_new (text);
- gtk_misc_set_alignment (GTK_MISC (label), alignment, 0.5);
+ gtk_widget_set_halign (label, alignment);
set_row_widget_margins (label);
gtk_box_pack_start (GTK_BOX (widget), label, TRUE, TRUE, 0);
if (dim_label)
@@ -167,7 +167,6 @@ more_row_new (void)
arrow = gtk_image_new_from_icon_name ("view-more-symbolic", GTK_ICON_SIZE_MENU);
gtk_style_context_add_class (gtk_widget_get_style_context (arrow), "dim-label");
set_row_widget_margins (arrow);
- gtk_misc_set_alignment (GTK_MISC (arrow), 0.5, 0.5);
gtk_box_pack_start (GTK_BOX (box), arrow, TRUE, TRUE, 0);
return GTK_LIST_BOX_ROW (row);
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index b045c34..e756dd5 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -824,7 +824,7 @@ add_input_row (CcRegionPanel *self,
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (row), box);
label = gtk_label_new (name);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_margin_start (label, 20);
gtk_widget_set_margin_end (label, 20);
gtk_widget_set_margin_top (label, 6);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]