[epiphany] Revert "ephy-notebook: Set halign depending on notebook position"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Revert "ephy-notebook: Set halign depending on notebook position"
- Date: Sun, 18 Feb 2018 17:18:29 +0000 (UTC)
commit 89fce08e25023468d3d10de8ce2d669a0444e8de
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sun Feb 18 11:17:56 2018 -0600
Revert "ephy-notebook: Set halign depending on notebook position"
This reverts commit 6e23db528f5e80effbf667de70085eee74a116c6.
https://bugzilla.gnome.org/show_bug.cgi?id=793356
src/ephy-notebook.c | 35 ++---------------------------------
1 files changed, 2 insertions(+), 33 deletions(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 6e0463a..bddbaef 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -404,41 +404,11 @@ ephy_settings_get_tabs_bar_position (void)
}
static void
-box_set_halign (GtkWidget *box, GtkPositionType type)
-{
- switch (type) {
- case GTK_POS_LEFT:
- case GTK_POS_RIGHT:
- gtk_widget_set_halign (box, GTK_ALIGN_START);
- break;
- case GTK_POS_TOP:
- case GTK_POS_BOTTOM:
- gtk_widget_set_halign (box, GTK_ALIGN_CENTER);
- break;
- default:
- break;
- }
-}
-
-static void
position_changed_cb (GSettings *settings,
char *key,
EphyNotebook *nb)
{
- GtkPositionType type = ephy_settings_get_tabs_bar_position ();
- gint pages = gtk_notebook_get_n_pages (GTK_NOTEBOOK (nb));
- gint i;
-
- /* Update halign of all notebook label widgets (sub-box) */
- for (i = 0; i < pages; i++) {
- GtkWidget *child = gtk_notebook_get_nth_page (GTK_NOTEBOOK (nb), i);
- GtkWidget *label_widget = gtk_notebook_get_tab_label (GTK_NOTEBOOK (nb), child);
- GtkWidget *box = gtk_container_get_children (GTK_CONTAINER (label_widget))->data;
-
- box_set_halign (box, type);
- }
-
- gtk_notebook_set_tab_pos (GTK_NOTEBOOK (nb), type);
+ gtk_notebook_set_tab_pos (GTK_NOTEBOOK (nb), ephy_settings_get_tabs_bar_position ());
}
static void
@@ -731,7 +701,6 @@ build_tab_label (EphyNotebook *nb, EphyEmbed *embed)
GtkWidget *hbox, *label, *close_button, *image, *spinner, *icon, *speaker_icon;
GtkWidget *box;
EphyWebView *view;
- GtkPositionType type = ephy_settings_get_tabs_bar_position ();
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_widget_show (box);
@@ -740,7 +709,7 @@ build_tab_label (EphyNotebook *nb, EphyEmbed *embed)
* equal amount of space around the label */
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_widget_show (hbox);
- box_set_halign (box, type);
+ gtk_widget_set_halign (hbox, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
/* setup load feedback */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]