aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--ChangeLog15
-rw-r--r--src/ephy-notebook.c45
-rw-r--r--src/ephy-notebook.h5
-rw-r--r--src/ephy-shell.c7
-rw-r--r--src/ephy-shell.h1
-rw-r--r--src/ephy-tab.c2
-rw-r--r--src/ephy-window.c4
7 files changed, 26 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index dd19bdfe1..e6c05878a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
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.
+
+2004-06-19 Marco Pesenti Gritti <marco@gnome.org>
+
* data/art/epiphany-tab-loading.gif:
Update from new winstripe theme of Firefox
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));
diff --git a/src/ephy-notebook.h b/src/ephy-notebook.h
index 452fb10db..5094dd842 100644
--- a/src/ephy-notebook.h
+++ b/src/ephy-notebook.h
@@ -43,8 +43,7 @@ typedef struct EphyNotebookPrivate EphyNotebookPrivate;
enum
{
- EPHY_NOTEBOOK_INSERT_LAST = -1,
- EPHY_NOTEBOOK_INSERT_GROUPED = -2
+ EPHY_NOTEBOOK_ADD_LAST = -1
};
struct EphyNotebook
@@ -75,7 +74,7 @@ GType ephy_notebook_get_type (void);
GtkWidget *ephy_notebook_new (void);
-void ephy_notebook_insert_tab (EphyNotebook *nb,
+void ephy_notebook_add_tab (EphyNotebook *nb,
EphyTab *tab,
int position,
gboolean jump_to);
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index d61f6075a..ff2a36917 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -546,7 +546,6 @@ ephy_shell_new_tab (EphyShell *shell,
EphyTab *tab;
EphyEmbed *embed;
gboolean in_new_window = TRUE;
- gboolean grouped;
gboolean jump_to;
EphyEmbed *previous_embed = NULL;
GtkWidget *nb;
@@ -574,10 +573,6 @@ ephy_shell_new_tab (EphyShell *shell,
previous_embed = ephy_tab_get_embed (previous_tab);
}
- grouped = ((flags & EPHY_NEW_TAB_OPEN_PAGE ||
- flags & EPHY_NEW_TAB_APPEND_GROUPED)) &&
- !(flags & EPHY_NEW_TAB_APPEND_LAST);
-
if ((flags & EPHY_NEW_TAB_APPEND_AFTER) && previous_embed != NULL)
{
nb = ephy_window_get_notebook (window);
@@ -586,7 +581,7 @@ ephy_shell_new_tab (EphyShell *shell,
}
else
{
- position = grouped ? EPHY_NOTEBOOK_INSERT_GROUPED : EPHY_NOTEBOOK_INSERT_LAST;
+ position = EPHY_NOTEBOOK_ADD_LAST;
}
tab = ephy_tab_new ();
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index d3d9233c3..a2dbc338f 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -77,7 +77,6 @@ typedef enum
EPHY_NEW_TAB_FULLSCREEN_MODE = 1 << 4,
/* Tabs */
- EPHY_NEW_TAB_APPEND_GROUPED = 1 << 6,
EPHY_NEW_TAB_APPEND_LAST = 1 << 7,
EPHY_NEW_TAB_APPEND_AFTER = 1 << 8,
EPHY_NEW_TAB_JUMP = 1 << 9,
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 41e6fd2b6..33fd8ea01 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -951,7 +951,7 @@ ephy_tab_new_window_cb (EphyEmbed *embed, EphyEmbed **new_embed,
new_tab = ephy_tab_new ();
gtk_widget_show (GTK_WIDGET (new_tab));
- ephy_window_add_tab (window, new_tab, EPHY_NOTEBOOK_INSERT_GROUPED, FALSE);
+ ephy_window_add_tab (window, new_tab, EPHY_NOTEBOOK_ADD_LAST, FALSE);
*new_embed = ephy_tab_get_embed (new_tab);
}
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 49c177f7a..5010ffc46 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2256,8 +2256,8 @@ ephy_window_add_tab (EphyWindow *window,
widget = GTK_WIDGET(ephy_tab_get_embed (tab));
- ephy_notebook_insert_tab (EPHY_NOTEBOOK (window->priv->notebook),
- tab, position, jump_to);
+ ephy_notebook_add_tab (EPHY_NOTEBOOK (window->priv->notebook),
+ tab, position, jump_to);
}
/**