aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--doc/reference/tmpl/ephy-embed.sgml4
-rw-r--r--doc/reference/tmpl/ephy-shell.sgml5
-rw-r--r--src/ephy-automation.c2
-rw-r--r--src/ephy-shell.c41
-rw-r--r--src/ephy-shell.h4
6 files changed, 50 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index a5140bbe5..9022adb0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2005-02-02 Christian Persch <chpe@cvs.gnome.org>
+ * src/ephy-automation.c:
+ (impl_ephy_automation_loadUrlWithStartupId):
+ * src/ephy-shell.c: (ephy_shell_new_window_cb),
+ (ephy_shell_new_tab_full), (ephy_shell_new_tab):
+ * src/ephy-shell.h:
+
+ Add chrome param to ephy_shell_new_tab_full, and use it
+ in ephy_shell_new_window_cb(). Fixes bug #165566.
+
+2005-02-02 Christian Persch <chpe@cvs.gnome.org>
+
* embed/ephy-embed-persist.c: (ephy_embed_persist_set_fc_parent),
(ephy_embed_persist_finalize):
diff --git a/doc/reference/tmpl/ephy-embed.sgml b/doc/reference/tmpl/ephy-embed.sgml
index fe5145716..d2ebbc930 100644
--- a/doc/reference/tmpl/ephy-embed.sgml
+++ b/doc/reference/tmpl/ephy-embed.sgml
@@ -213,6 +213,10 @@ be done by casting).
@:
@:
@:
+@:
+@:
+@:
+@:
@:
<!-- ##### SIGNAL EphyEmbed::ge-security-change ##### -->
diff --git a/doc/reference/tmpl/ephy-shell.sgml b/doc/reference/tmpl/ephy-shell.sgml
index e0df50d62..779dcefff 100644
--- a/doc/reference/tmpl/ephy-shell.sgml
+++ b/doc/reference/tmpl/ephy-shell.sgml
@@ -58,6 +58,7 @@ ephy-shell
@EPHY_NEW_TAB_NEW_PAGE:
@EPHY_NEW_TAB_OPEN_PAGE:
@EPHY_NEW_TAB_FULLSCREEN_MODE:
+@EPHY_NEW_TAB_DONT_SHOW_WINDOW:
@EPHY_NEW_TAB_APPEND_LAST:
@EPHY_NEW_TAB_APPEND_AFTER:
@EPHY_NEW_TAB_JUMP:
@@ -87,11 +88,13 @@ ephy-shell
@shell:
@flags:
-@startup_id:
+@user_time:
@args:
@string_arg:
@error:
@Returns:
+<!-- # Unused Parameters # -->
+@startup_id:
<!-- ##### FUNCTION ephy_shell_new_tab ##### -->
diff --git a/src/ephy-automation.c b/src/ephy-automation.c
index fac7600d1..99fb8071a 100644
--- a/src/ephy-automation.c
+++ b/src/ephy-automation.c
@@ -106,7 +106,7 @@ impl_ephy_automation_loadUrlWithStartupId (PortableServer_Servant _servant,
}
ephy_shell_new_tab_full (ephy_shell, window, NULL, url, flags,
- user_time);
+ EPHY_EMBED_CHROME_ALL, user_time);
}
static void
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index dc9647df5..62e6f5692 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -158,26 +158,33 @@ ephy_shell_new_window_cb (EphyEmbedSingle *single,
EphyEmbedChrome chromemask,
EphyShell *shell)
{
+ GtkWidget *parent = NULL;
EphyTab *new_tab;
- EphyWindow *window;
+ EphyNewTabFlags flags = EPHY_NEW_TAB_DONT_SHOW_WINDOW |
+ EPHY_NEW_TAB_APPEND_LAST |
+ EPHY_NEW_TAB_IN_NEW_WINDOW |
+ EPHY_NEW_TAB_JUMP;
LOG ("ephy_shell_new_window_cb tab chrome %d", chromemask);
- /* FIXME in lockdown-fullscreen mode, always add a new tab instead */
-
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_JAVASCRIPT_CHROME))
{
- window = ephy_window_new ();
+ chromemask = EPHY_EMBED_CHROME_ALL;
}
- else
+
+ if (parent_embed != NULL)
{
- window = ephy_window_new_with_chrome (chromemask);
+ /* this will either be a EphyWindow, or the embed itself
+ * (in case it's about to be destroyed, which means it's already
+ * removed from its tab)
+ */
+ parent = gtk_widget_get_toplevel (GTK_WIDGET (parent_embed));
}
- new_tab = ephy_tab_new ();
- gtk_widget_show (GTK_WIDGET (new_tab));
-
- ephy_window_add_tab (window, new_tab, -1, FALSE);
+ new_tab = ephy_shell_new_tab_full
+ (shell,
+ EPHY_IS_WINDOW (parent) ? EPHY_WINDOW (parent) : NULL,
+ NULL, NULL, flags, chromemask, 0);
return ephy_tab_get_embed (new_tab);
}
@@ -649,6 +656,7 @@ load_homepage (EphyEmbed *embed)
* @parent_window: the target #EphyWindow or %NULL
* @previous_tab: the referrer tab or %NULL
* @url: an url to load or %NULL
+ * @chrome: a #EphyEmbedChrome mask to use if creating a new window
* @user_time: a timestamp, or 0
*
* Create a new tab and the parent window when necessary.
@@ -662,6 +670,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
EphyTab *previous_tab,
const char *url,
EphyNewTabFlags flags,
+ EphyEmbedChrome chrome,
guint32 user_time)
{
EphyWindow *window;
@@ -690,7 +699,7 @@ ephy_shell_new_tab_full (EphyShell *shell,
}
else
{
- window = ephy_window_new ();
+ window = ephy_window_new_with_chrome (chrome);
}
toolbar = EPHY_TOOLBAR (ephy_window_get_toolbar (window));
@@ -715,8 +724,6 @@ ephy_shell_new_tab_full (EphyShell *shell,
ephy_gui_window_update_user_time (GTK_WIDGET (window), user_time);
- gtk_widget_show (GTK_WIDGET (window));
-
if (flags & EPHY_NEW_TAB_HOME_PAGE ||
flags & EPHY_NEW_TAB_NEW_PAGE)
{
@@ -730,6 +737,11 @@ ephy_shell_new_tab_full (EphyShell *shell,
ephy_embed_load_url (embed, url);
}
+ if ((flags & EPHY_NEW_TAB_DONT_SHOW_WINDOW) == 0)
+ {
+ gtk_widget_show (GTK_WIDGET (window));
+ }
+
if (flags & EPHY_NEW_TAB_FULLSCREEN_MODE)
{
gtk_window_fullscreen (GTK_WINDOW (window));
@@ -758,7 +770,8 @@ ephy_shell_new_tab (EphyShell *shell,
EphyNewTabFlags flags)
{
return ephy_shell_new_tab_full (shell, parent_window,
- previous_tab, url, flags, 0);
+ previous_tab, url, flags,
+ EPHY_EMBED_CHROME_ALL, 0);
}
/**
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index 84b86d340..32e5f9383 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -74,13 +74,14 @@ typedef enum
/* Page mode */
EPHY_NEW_TAB_FULLSCREEN_MODE = 1 << 4,
+ EPHY_NEW_TAB_DONT_SHOW_WINDOW = 1 << 5,
/* Tabs */
EPHY_NEW_TAB_APPEND_LAST = 1 << 7,
EPHY_NEW_TAB_APPEND_AFTER = 1 << 8,
EPHY_NEW_TAB_JUMP = 1 << 9,
EPHY_NEW_TAB_IN_NEW_WINDOW = 1 << 10,
- EPHY_NEW_TAB_IN_EXISTING_WINDOW = 1 << 11
+ EPHY_NEW_TAB_IN_EXISTING_WINDOW = 1 << 11,
} EphyNewTabFlags;
struct _EphyShell
@@ -128,6 +129,7 @@ EphyTab *ephy_shell_new_tab_full (EphyShell *shell,
EphyTab *previous_tab,
const char *url,
EphyNewTabFlags flags,
+ EphyEmbedChrome chrome,
guint32 user_time);
GObject *ephy_shell_get_session (EphyShell *shell);