summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-03-04 12:12:48 +0100
committerraveit65 <[email protected]>2017-03-06 16:10:06 +0100
commit32ae49f81c05e676a86544e66b09f65f83b9db37 (patch)
treee7276b2611c75b1e8363d43894749f4b1ed9bd49 /shell
parent285289c2e4d7d625c96d3e683dfdb01b098df373 (diff)
downloadatril-32ae49f81c05e676a86544e66b09f65f83b9db37.tar.bz2
atril-32ae49f81c05e676a86544e66b09f65f83b9db37.tar.xz
avoid deprecated gtk_misc_set_alignment
Diffstat (limited to 'shell')
-rw-r--r--shell/eggfindbar.c5
-rw-r--r--shell/ev-annotation-properties-dialog.c30
-rw-r--r--shell/ev-message-area.c11
-rw-r--r--shell/ev-password-view.c11
-rw-r--r--shell/ev-progress-message-area.c4
-rw-r--r--shell/ev-properties-license.c4
6 files changed, 57 insertions, 8 deletions
diff --git a/shell/eggfindbar.c b/shell/eggfindbar.c
index ea34cd2a..c6b7af84 100644
--- a/shell/eggfindbar.c
+++ b/shell/eggfindbar.c
@@ -346,8 +346,11 @@ egg_find_bar_init (EggFindBar *find_bar)
priv->status_label = gtk_label_new (NULL);
gtk_label_set_ellipsize (GTK_LABEL (priv->status_label),
PANGO_ELLIPSIZE_END);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (priv->status_label), 0.0);
+#else
gtk_misc_set_alignment (GTK_MISC (priv->status_label), 0.0, 0.5);
-
+#endif
g_signal_connect (priv->find_entry, "changed",
G_CALLBACK (entry_changed_callback),
diff --git a/shell/ev-annotation-properties-dialog.c b/shell/ev-annotation-properties-dialog.c
index 3d65b70f..372b213a 100644
--- a/shell/ev-annotation-properties-dialog.c
+++ b/shell/ev-annotation-properties-dialog.c
@@ -92,7 +92,11 @@ ev_annotation_properties_dialog_constructed (GObject *object)
switch (dialog->annot_type) {
case EV_ANNOTATION_TYPE_TEXT:
label = gtk_label_new (_("Icon:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 5, 1, 1);
gtk_widget_show (label);
@@ -152,7 +156,11 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (grid);
label = gtk_label_new (_("Author:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
gtk_widget_show (label);
@@ -163,7 +171,11 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (annot_dialog->author);
label = gtk_label_new (_("Color:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
gtk_widget_show (label);
@@ -173,7 +185,11 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (annot_dialog->color);
label = gtk_label_new (_("Style:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
gtk_widget_show (label);
@@ -204,7 +220,11 @@ ev_annotation_properties_dialog_init (EvAnnotationPropertiesDialog *annot_dialog
gtk_widget_show (hbox);
label = gtk_label_new (_("Initial window state:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0., 0.5);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1);
gtk_widget_show (label);
diff --git a/shell/ev-message-area.c b/shell/ev-message-area.c
index 8226537b..64a11ee2 100644
--- a/shell/ev-message-area.c
+++ b/shell/ev-message-area.c
@@ -105,7 +105,11 @@ ev_message_area_init (EvMessageArea *area)
gtk_label_set_use_markup (GTK_LABEL (area->priv->label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (area->priv->label), TRUE);
gtk_label_set_selectable (GTK_LABEL (area->priv->label), TRUE);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (area->priv->label), 0.0);
+#else
gtk_misc_set_alignment (GTK_MISC (area->priv->label), 0.0, 0.5);
+#endif
gtk_widget_set_can_focus (area->priv->label, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), area->priv->label, TRUE, TRUE, 0);
gtk_widget_show (area->priv->label);
@@ -114,12 +118,17 @@ ev_message_area_init (EvMessageArea *area)
gtk_label_set_use_markup (GTK_LABEL (area->priv->secondary_label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (area->priv->secondary_label), TRUE);
gtk_label_set_selectable (GTK_LABEL (area->priv->secondary_label), TRUE);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (area->priv->secondary_label), 0.0);
+#else
gtk_misc_set_alignment (GTK_MISC (area->priv->secondary_label), 0.0, 0.5);
+#endif
gtk_widget_set_can_focus (area->priv->secondary_label, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), area->priv->secondary_label, TRUE, TRUE, 0);
area->priv->image = gtk_image_new_from_stock (NULL, GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (area->priv->image), 0.5, 0.0);
+ gtk_widget_set_halign (area->priv->image, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (area->priv->image, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), area->priv->image, FALSE, FALSE, 0);
gtk_widget_show (area->priv->image);
diff --git a/shell/ev-password-view.c b/shell/ev-password-view.c
index 12ccffb2..1bfa873e 100644
--- a/shell/ev-password-view.c
+++ b/shell/ev-password-view.c
@@ -278,7 +278,8 @@ ev_password_view_ask_password (EvPasswordView *password_view)
icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION,
GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0);
+ gtk_widget_set_halign (icon, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (icon, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
gtk_widget_show (icon);
@@ -287,7 +288,11 @@ ev_password_view_ask_password (EvPasswordView *password_view)
gtk_widget_show (main_vbox);
label = gtk_label_new (NULL);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
file_name = g_file_get_basename (password_view->priv->uri_file);
text = g_markup_printf_escaped (_("The document ā€œ%sā€ is locked and requires a password before it can be opened."),
@@ -324,7 +329,11 @@ ev_password_view_ask_password (EvPasswordView *password_view)
gtk_widget_show (grid);
label = gtk_label_new_with_mnemonic (_("_Password:"));
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0.0);
+#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
password_view->priv->password_entry = gtk_entry_new ();
gtk_entry_set_visibility (GTK_ENTRY (password_view->priv->password_entry), FALSE);
diff --git a/shell/ev-progress-message-area.c b/shell/ev-progress-message-area.c
index c50b6041..4c972e7c 100644
--- a/shell/ev-progress-message-area.c
+++ b/shell/ev-progress-message-area.c
@@ -91,7 +91,11 @@ ev_progress_message_area_init (EvProgressMessageArea *area)
gtk_label_set_use_markup (GTK_LABEL (area->priv->label), TRUE);
gtk_label_set_ellipsize (GTK_LABEL (area->priv->label),
PANGO_ELLIPSIZE_END);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (area->priv->label), 0.0);
+#else
gtk_misc_set_alignment (GTK_MISC (area->priv->label), 0.0, 0.5);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), area->priv->label, TRUE, TRUE, 0);
gtk_widget_show (area->priv->label);
diff --git a/shell/ev-properties-license.c b/shell/ev-properties-license.c
index 154991a4..de7aaa77 100644
--- a/shell/ev-properties-license.c
+++ b/shell/ev-properties-license.c
@@ -107,7 +107,11 @@ ev_properties_license_add_section (EvPropertiesLicense *properties,
gchar *markup;
title = gtk_label_new (NULL);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (title), 0.0);
+#else
gtk_misc_set_alignment (GTK_MISC (title), 0.0, 0.5);
+#endif
gtk_label_set_use_markup (GTK_LABEL (title), TRUE);
markup = g_strdup_printf ("<b>%s</b>", title_text);
gtk_label_set_markup (GTK_LABEL (title), markup);