[epiphany] Ensure pinned tab position after window dnd
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Ensure pinned tab position after window dnd
- Date: Tue, 5 Nov 2019 22:00:24 +0000 (UTC)
commit 773ec7deba6a935a401d1befbc82a2a0487b2b84
Author: Jan-Michael Brummer <jan brummer tabos org>
Date: Tue Nov 5 16:53:13 2019 +0100
Ensure pinned tab position after window dnd
Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/969
src/ephy-notebook.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 7d4dccaf0..fc4c97bca 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -505,10 +505,9 @@ get_last_pinned_tab_pos (EphyNotebook *notebook)
}
static void
-page_reordered_cb (GtkNotebook *notebook,
- GtkWidget *child,
- guint page_num,
- gpointer user_data)
+ephy_notebook_ensure_pinned_tab_position (GtkNotebook *notebook,
+ GtkWidget *child,
+ guint page_num)
{
int last_pinned_tab_pos = get_last_pinned_tab_pos (EPHY_NOTEBOOK (notebook));
gboolean is_current_tab_pinned = ephy_notebook_tab_is_pinned (EPHY_NOTEBOOK (notebook), EPHY_EMBED
(child));
@@ -521,6 +520,15 @@ page_reordered_cb (GtkNotebook *notebook,
}
}
+static void
+page_reordered_cb (GtkNotebook *notebook,
+ GtkWidget *child,
+ guint page_num,
+ gpointer user_data)
+{
+ ephy_notebook_ensure_pinned_tab_position (notebook, child, page_num);
+}
+
static void
ephy_notebook_init (EphyNotebook *notebook)
{
@@ -901,6 +909,8 @@ ephy_notebook_page_added (GtkNotebook *notebook,
if (GTK_NOTEBOOK_CLASS (ephy_notebook_parent_class)->page_added != NULL)
GTK_NOTEBOOK_CLASS (ephy_notebook_parent_class)->page_added (notebook, child, page_num);
+ ephy_notebook_ensure_pinned_tab_position (notebook, child, page_num);
+
ephy_notebook_rebuild_tab_menu (EPHY_NOTEBOOK (notebook));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]