summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-03-11 16:36:02 +0100
committerraveit65 <[email protected]>2017-04-07 13:03:17 +0200
commitce1421628f98aa67cbdd6bb75e32aad687ddd8d9 (patch)
tree2999f48394334cdd776540e03f525f6f92cd9689 /shell
parente77ea1a26c9c7e880b8c4d64a7e0a8f9bd8c4818 (diff)
downloadatril-ce1421628f98aa67cbdd6bb75e32aad687ddd8d9.tar.bz2
atril-ce1421628f98aa67cbdd6bb75e32aad687ddd8d9.tar.xz
password-view: don't use deprecated GtkAlignment
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-password-view.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/shell/ev-password-view.c b/shell/ev-password-view.c
index 1bfa873e..6ddd04ec 100644
--- a/shell/ev-password-view.c
+++ b/shell/ev-password-view.c
@@ -104,7 +104,6 @@ ev_password_view_clicked_cb (GtkWidget *button,
static void
ev_password_view_init (EvPasswordView *password_view)
{
- GtkWidget *align;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *image;
@@ -117,11 +116,12 @@ ev_password_view_init (EvPasswordView *password_view)
password_view->priv->password_save = G_PASSWORD_SAVE_NEVER;
/* set ourselves up */
- align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 24);
+ gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
+ gtk_widget_set_hexpand (vbox, FALSE);
+ gtk_widget_set_vexpand (vbox, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 24);
- gtk_container_add (GTK_CONTAINER (password_view), align);
- gtk_container_add (GTK_CONTAINER (align), vbox);
+ gtk_container_add (GTK_CONTAINER (password_view), vbox);
password_view->priv->label =
(GtkWidget *) g_object_new (GTK_TYPE_LABEL,
@@ -150,7 +150,7 @@ ev_password_view_init (EvPasswordView *password_view)
g_signal_connect (button, "clicked", G_CALLBACK (ev_password_view_clicked_cb), password_view);
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
- gtk_widget_show_all (align);
+ gtk_widget_show_all (vbox);
}
/* Public functions */
@@ -237,7 +237,6 @@ ev_password_view_ask_password (EvPasswordView *password_view)
{
GtkDialog *dialog;
GtkWidget *content_area, *action_area;
- GtkWidget *entry_container;
GtkWidget *hbox, *main_vbox, *vbox, *icon;
GtkWidget *grid;
GtkWidget *label;
@@ -312,21 +311,21 @@ ev_password_view_ask_password (EvPasswordView *password_view)
gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (vbox);
- /* The table that holds the entries */
- entry_container = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
-
- gtk_alignment_set_padding (GTK_ALIGNMENT (entry_container),
- 0, 0, 0, 0);
-
- gtk_box_pack_start (GTK_BOX (vbox), entry_container,
- FALSE, FALSE, 0);
- gtk_widget_show (entry_container);
-
+ /* The grid that holds the entries */
grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
- gtk_container_add (GTK_CONTAINER (entry_container), grid);
+ gtk_widget_set_valign (grid, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (grid, TRUE);
+ gtk_widget_set_vexpand (grid, TRUE);
+ gtk_widget_set_margin_top (grid, 0);
+ gtk_widget_set_margin_bottom (grid, 0);
+ gtk_widget_set_margin_start (grid, 0);
+ gtk_widget_set_margin_end (grid, 0);
gtk_widget_show (grid);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ grid,
+ FALSE, FALSE, 0);
label = gtk_label_new_with_mnemonic (_("_Password:"));
#if GTK_CHECK_VERSION (3, 16, 0)