aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ephy-shell.c13
-rw-r--r--src/ephy-window.c5
-rwxr-xr-xsrc/toolbar.c16
-rw-r--r--src/toolbar.h2
4 files changed, 32 insertions, 4 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index eae78784b..9dfccb49f 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -31,6 +31,7 @@
#include "ephy-thread-helpers.h"
#include "ephy-bookmarks-import.h"
#include "ephy-debug.h"
+#include "toolbar.h"
#include <string.h>
#include <libgnomeui/gnome-client.h>
@@ -448,10 +449,10 @@ ephy_shell_get_active_window (EphyShell *gs)
**/
EphyTab *
ephy_shell_new_tab (EphyShell *shell,
- EphyWindow *parent_window,
- EphyTab *previous_tab,
- const char *url,
- EphyNewTabFlags flags)
+ EphyWindow *parent_window,
+ EphyTab *previous_tab,
+ const char *url,
+ EphyNewTabFlags flags)
{
EphyWindow *window;
EphyTab *tab;
@@ -493,11 +494,15 @@ ephy_shell_new_tab (EphyShell *shell,
if (flags & EPHY_NEW_TAB_HOMEPAGE)
{
+ Toolbar *toolbar;
char *homepage;
homepage = build_homepage_url (shell, previous_embed);
g_assert (homepage != NULL);
+ toolbar = ephy_window_get_toolbar (window);
+ toolbar_edit_location (toolbar);
+
ephy_embed_load_url (embed, homepage);
g_free (homepage);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index a1d29a28b..11ebc7d15 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -421,6 +421,11 @@ add_widget (EggMenuMerge *merge, GtkWidget *widget, EphyWindow *window)
}
else
{
+ GtkWidget *event_box;
+
+ event_box = gtk_event_box_new ();
+ gtk_container_add (GTK_CONTAINER (event_box), widget);
+ widget = event_box;
window->priv->toolbars = g_list_append
(window->priv->toolbars, widget);
}
diff --git a/src/toolbar.c b/src/toolbar.c
index 7eb0ee1ad..690edc1b7 100755
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -405,6 +405,22 @@ toolbar_new (EphyWindow *window)
}
void
+toolbar_edit_location (Toolbar *t)
+{
+ EggAction *action;
+ GtkWidget *location;
+
+ action = egg_action_group_get_action
+ (t->priv->action_group, "Location");
+ location = ephy_location_action_get_widget
+ (EPHY_LOCATION_ACTION (action));
+ g_return_if_fail (location != NULL);
+
+ ephy_location_entry_edit
+ (EPHY_LOCATION_ENTRY(location));
+}
+
+void
toolbar_activate_location (Toolbar *t)
{
EggAction *action;
diff --git a/src/toolbar.h b/src/toolbar.h
index ac98f94c4..0aa096e41 100644
--- a/src/toolbar.h
+++ b/src/toolbar.h
@@ -61,6 +61,8 @@ char *toolbar_get_location (Toolbar *t);
void toolbar_set_location (Toolbar *t,
const char *location);
+void toolbar_edit_location (Toolbar *t);
+
void toolbar_activate_location (Toolbar *t);
void toolbar_clear_location_history (Toolbar *t);