[epiphany] ephy-shell: Make it possible to prepend a tab in a window
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-shell: Make it possible to prepend a tab in a window
- Date: Thu, 7 Feb 2013 22:03:31 +0000 (UTC)
commit f3eef3662c3a0fad0df94f35023b73869519675d
Author: Claudio Saavedra <csaavedra igalia com>
Date: Sat Jan 26 12:30:12 2013 +0200
ephy-shell: Make it possible to prepend a tab in a window
We need this in order to open a tab in the first position of a window
when undoing a tab closure.
https://bugzilla.gnome.org/show_bug.cgi?id=128184
src/ephy-shell.c | 3 +++
src/ephy-shell.h | 15 ++++++++-------
2 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 81fd0d4..5d7f47c 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -797,6 +797,9 @@ ephy_shell_new_tab_full (EphyShell *shell,
g_warning ("Requested to append new tab after parent, but 'previous_embed' was NULL");
}
+ if (flags & EPHY_NEW_TAB_FIRST)
+ position = 0;
+
if (flags & EPHY_NEW_TAB_FROM_EXTERNAL) {
/* If the active embed is blank, use that to open the url and jump to it */
embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index 70ebad2..d6f246a 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -92,17 +92,18 @@ typedef enum {
EPHY_NEW_TAB_PRESENT_WINDOW = 1 << 6,
/* Tabs */
- EPHY_NEW_TAB_APPEND_LAST = 1 << 7,
- EPHY_NEW_TAB_APPEND_AFTER = 1 << 8,
- EPHY_NEW_TAB_JUMP = 1 << 9,
+ EPHY_NEW_TAB_FIRST = 1 << 7,
+ EPHY_NEW_TAB_APPEND_LAST = 1 << 8,
+ EPHY_NEW_TAB_APPEND_AFTER = 1 << 9,
+ EPHY_NEW_TAB_JUMP = 1 << 10,
/* Where */
- EPHY_NEW_TAB_IN_NEW_WINDOW = 1 << 10,
- EPHY_NEW_TAB_IN_EXISTING_WINDOW = 1 << 11,
+ EPHY_NEW_TAB_IN_NEW_WINDOW = 1 << 11,
+ EPHY_NEW_TAB_IN_EXISTING_WINDOW = 1 << 12,
/* The way to load */
- EPHY_NEW_TAB_FROM_EXTERNAL = 1 << 12,
- EPHY_NEW_TAB_DONT_COPY_HISTORY = 1 << 13,
+ EPHY_NEW_TAB_FROM_EXTERNAL = 1 << 13,
+ EPHY_NEW_TAB_DONT_COPY_HISTORY = 1 << 14,
} EphyNewTabFlags;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]