aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-notebook.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-06-20 01:21:19 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-06-20 01:21:19 +0800
commit1f1f4b78c63f4e5421c223d93c3b23d52dc72c30 (patch)
tree27107202bf73b5fcdc14bf5aabcae39338a95571 /src/ephy-notebook.c
parentdef0bcab86eb6dc80ee74fc95b3424ad2cbe14cc (diff)
downloadgsoc2013-epiphany-1f1f4b78c63f4e5421c223d93c3b23d52dc72c30.tar
gsoc2013-epiphany-1f1f4b78c63f4e5421c223d93c3b23d52dc72c30.tar.gz
gsoc2013-epiphany-1f1f4b78c63f4e5421c223d93c3b23d52dc72c30.tar.bz2
gsoc2013-epiphany-1f1f4b78c63f4e5421c223d93c3b23d52dc72c30.tar.lz
gsoc2013-epiphany-1f1f4b78c63f4e5421c223d93c3b23d52dc72c30.tar.xz
gsoc2013-epiphany-1f1f4b78c63f4e5421c223d93c3b23d52dc72c30.tar.zst
gsoc2013-epiphany-1f1f4b78c63f4e5421c223d93c3b23d52dc72c30.zip
Append tabs at the end instead of grouping them near the current one.
2004-06-19 Marco Pesenti Gritti <marco@gnome.org> * src/ephy-notebook.c: (ephy_notebook_move_tab), (move_tab), (ephy_notebook_switch_page_cb), (ephy_notebook_init), (ephy_notebook_finalize), (ephy_notebook_add_tab), (ephy_notebook_remove_tab): * src/ephy-notebook.h: * src/ephy-shell.c: (ephy_shell_new_tab): * src/ephy-shell.h: * src/ephy-tab.c: (ephy_tab_new_window_cb): * src/ephy-window.c: (ephy_window_add_tab): Append tabs at the end instead of grouping them near the current one.
Diffstat (limited to 'src/ephy-notebook.c')
-rw-r--r--src/ephy-notebook.c45
1 files changed, 5 insertions, 40 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index eca8adc84..a693de78a 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -61,7 +61,6 @@
struct EphyNotebookPrivate
{
GList *focused_pages;
- GList *opened_tabs;
GtkTooltips *title_tips;
guint tabs_vis_notifier_id;
gulong motion_notify_handler_id;
@@ -378,7 +377,7 @@ ephy_notebook_move_tab (EphyNotebook *src,
/* make sure the tab isn't destroyed while we move it */
g_object_ref (tab);
ephy_notebook_remove_tab (src, tab);
- ephy_notebook_insert_tab (dest, tab, dest_position, TRUE);
+ ephy_notebook_add_tab (dest, tab, dest_position, TRUE);
g_object_unref (tab);
}
}
@@ -438,10 +437,6 @@ move_tab (EphyNotebook *notebook,
ephy_notebook_move_tab (EPHY_NOTEBOOK (notebook), NULL,
EPHY_TAB (cur_tab),
dest_position);
-
- /* Reset the list of newly opened tabs when moving tabs. */
- g_list_free (notebook->priv->opened_tabs);
- notebook->priv->opened_tabs = NULL;
}
}
@@ -615,10 +610,6 @@ ephy_notebook_switch_page_cb (GtkNotebook *notebook,
nb->priv->focused_pages = g_list_append (nb->priv->focused_pages,
child);
-
- /* Reset the list of newly opened tabs when switching tabs. */
- g_list_free (nb->priv->opened_tabs);
- nb->priv->opened_tabs = NULL;
}
#define INSANE_NUMBER_OF_URLS 20
@@ -753,7 +744,6 @@ ephy_notebook_init (EphyNotebook *notebook)
notebook->priv->drag_in_progress = FALSE;
notebook->priv->motion_notify_handler_id = 0;
notebook->priv->focused_pages = NULL;
- notebook->priv->opened_tabs = NULL;
notebook->priv->show_tabs = TRUE;
g_signal_connect (notebook, "button-press-event",
@@ -791,7 +781,6 @@ ephy_notebook_finalize (GObject *object)
{
g_list_free (notebook->priv->focused_pages);
}
- g_list_free (notebook->priv->opened_tabs);
g_object_unref (notebook->priv->title_tips);
LOG ("EphyNotebook finalised %p", object)
@@ -980,10 +969,10 @@ ephy_notebook_set_show_tabs (EphyNotebook *nb, gboolean show_tabs)
}
void
-ephy_notebook_insert_tab (EphyNotebook *nb,
- EphyTab *tab,
- int position,
- gboolean jump_to)
+ephy_notebook_add_tab (EphyNotebook *nb,
+ EphyTab *tab,
+ int position,
+ gboolean jump_to)
{
GtkWidget *label;
@@ -993,29 +982,6 @@ ephy_notebook_insert_tab (EphyNotebook *nb,
update_tabs_visibility (nb, TRUE);
- if (position == EPHY_NOTEBOOK_INSERT_GROUPED)
- {
- /* Keep a list of newly opened tabs, if the list is empty open the new
- * tab after the current one. If it's not, add it after the newly
- * opened tabs.
- */
- if (nb->priv->opened_tabs != NULL)
- {
- GList *last = g_list_last (nb->priv->opened_tabs);
- GtkWidget *last_tab = last->data;
- position = gtk_notebook_page_num
- (GTK_NOTEBOOK (nb), last_tab) + 1;
- }
- else
- {
- position = gtk_notebook_get_current_page
- (GTK_NOTEBOOK (nb)) + 1;
- }
- nb->priv->opened_tabs =
- g_list_append (nb->priv->opened_tabs, tab);
- }
-
-
gtk_notebook_insert_page (GTK_NOTEBOOK (nb), GTK_WIDGET (tab),
label, position);
@@ -1101,7 +1067,6 @@ ephy_notebook_remove_tab (EphyNotebook *nb,
/* Remove the page from the focused pages list */
nb->priv->focused_pages = g_list_remove (nb->priv->focused_pages,
tab);
- nb->priv->opened_tabs = g_list_remove (nb->priv->opened_tabs, tab);
position = gtk_notebook_page_num (GTK_NOTEBOOK (nb), GTK_WIDGET (tab));
curr = gtk_notebook_get_current_page (GTK_NOTEBOOK (nb));