summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-03-06 15:42:35 +0100
committerraveit65 <[email protected]>2017-03-07 13:29:23 +0100
commit3f14ab3b26ea683f02089d14795ac0b5b8d9d076 (patch)
tree189ad23070e74770287ba2405061caa8a9e34e71 /shell
parent8b716eba237b2153fba29a6a25611675a816b6b9 (diff)
downloadatril-3f14ab3b26ea683f02089d14795ac0b5b8d9d076.tar.bz2
atril-3f14ab3b26ea683f02089d14795ac0b5b8d9d076.tar.xz
eggfindbar: don't use deprecated GtkAlignment
Diffstat (limited to 'shell')
-rw-r--r--shell/eggfindbar.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/shell/eggfindbar.c b/shell/eggfindbar.c
index c6b7af84..ce0cf8ad 100644
--- a/shell/eggfindbar.c
+++ b/shell/eggfindbar.c
@@ -287,7 +287,6 @@ egg_find_bar_init (EggFindBar *find_bar)
{
EggFindBarPrivate *priv;
GtkWidget *label;
- GtkWidget *alignment;
GtkWidget *box;
GtkToolItem *item;
GtkWidget *arrow;
@@ -304,15 +303,24 @@ egg_find_bar_init (EggFindBar *find_bar)
item = gtk_tool_item_new ();
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
- alignment = gtk_alignment_new (0.0, 0.5, 1.0, 0.0);
- gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 2, 2);
-
label = gtk_label_new_with_mnemonic (_("Find:"));
+ gtk_widget_set_halign (label, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (label, TRUE);
+ gtk_widget_set_margin_start (label, 2);
+ gtk_widget_set_margin_top (label, 4);
+ gtk_widget_set_margin_bottom (label, 4);
+ gtk_widget_show (label);
priv->find_entry = gtk_entry_new ();
gtk_entry_set_width_chars (GTK_ENTRY (priv->find_entry), 32);
gtk_entry_set_max_length (GTK_ENTRY (priv->find_entry), 512);
+ gtk_widget_set_halign (priv->find_entry, GTK_ALIGN_START);
+ gtk_widget_set_hexpand (priv->find_entry, TRUE);
+ gtk_widget_set_margin_end (priv->find_entry, 2);
+ gtk_widget_set_margin_top (priv->find_entry, 4);
+ gtk_widget_set_margin_bottom (priv->find_entry, 4);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), priv->find_entry);
+ gtk_widget_show (priv->find_entry);
/* Prev */
arrow = gtk_image_new_from_icon_name ("pan-start-symbolic", GTK_ICON_SIZE_BUTTON);
@@ -370,8 +378,7 @@ egg_find_bar_init (EggFindBar *find_bar)
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (box), priv->find_entry, TRUE, TRUE, 0);
- gtk_container_add (GTK_CONTAINER (alignment), box);
- gtk_container_add (GTK_CONTAINER (item), alignment);
+ gtk_container_add (GTK_CONTAINER (item), box);
gtk_toolbar_insert (GTK_TOOLBAR (find_bar), item, -1);
gtk_toolbar_insert (GTK_TOOLBAR (find_bar), priv->previous_button, -1);
gtk_toolbar_insert (GTK_TOOLBAR (find_bar), priv->next_button, -1);