summaryrefslogtreecommitdiff
path: root/shell/ev-password-view.c
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/ev-password-view.c
parent285289c2e4d7d625c96d3e683dfdb01b098df373 (diff)
downloadatril-32ae49f81c05e676a86544e66b09f65f83b9db37.tar.bz2
atril-32ae49f81c05e676a86544e66b09f65f83b9db37.tar.xz
avoid deprecated gtk_misc_set_alignment
Diffstat (limited to 'shell/ev-password-view.c')
-rw-r--r--shell/ev-password-view.c11
1 files changed, 10 insertions, 1 deletions
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);