aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ephy-favicon-action.c8
-rwxr-xr-xsrc/toolbar.c23
2 files changed, 21 insertions, 10 deletions
diff --git a/src/ephy-favicon-action.c b/src/ephy-favicon-action.c
index aa88571c5..8a35d8012 100644
--- a/src/ephy-favicon-action.c
+++ b/src/ephy-favicon-action.c
@@ -84,14 +84,18 @@ static void
each_url_get_data_binder (EphyDragEachSelectedItemDataGet iteratee,
gpointer iterator_context, gpointer data)
{
- const char *location;
+ char *location;
EphyTab *tab;
+ EphyEmbed *embed;
EphyWindow *window = EPHY_WINDOW(iterator_context);
tab = ephy_window_get_active_tab (window);
- location = ephy_tab_get_location (tab);
+ embed = ephy_tab_get_embed (tab);
+ ephy_embed_get_location (embed, TRUE, &location);
iteratee (location, -1, -1, -1, -1, data);
+
+ g_free (location);
}
static void
diff --git a/src/toolbar.c b/src/toolbar.c
index 78c0d39f5..e47ed7d8c 100755
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -81,6 +81,7 @@ struct ToolbarPrivate
EggMenuMerge *ui_merge;
EggActionGroup *action_group;
gboolean visibility;
+ gboolean can_set_location;
GtkWidget *spinner;
GtkWidget *favicon;
GtkWidget *go;
@@ -471,17 +472,19 @@ get_location_entry (Toolbar *t)
}
static void
-location_user_changed_cb (GtkWidget *entry, EphyWindow *window)
+location_user_changed_cb (GtkWidget *entry, Toolbar *t)
{
EphyTab *tab;
char *address;
- tab = ephy_window_get_active_tab (window);
+ tab = ephy_window_get_active_tab (t->priv->window);
g_return_if_fail (IS_EPHY_TAB (tab));
+ t->priv->can_set_location = FALSE;
address = ephy_location_entry_get_location (EPHY_LOCATION_ENTRY (entry));
ephy_tab_set_location (tab, address, TAB_ADDRESS_EXPIRE_CURRENT);
g_free (address);
+ t->priv->can_set_location = TRUE;
}
static void
@@ -517,7 +520,7 @@ toolbar_set_window (Toolbar *t, EphyWindow *window)
g_signal_connect_object (get_location_entry (t), "user_changed",
G_CALLBACK (location_user_changed_cb),
- window, 0);
+ t, 0);
}
static void
@@ -528,6 +531,7 @@ toolbar_init (Toolbar *t)
t->priv->window = NULL;
t->priv->ui_merge = NULL;
t->priv->visibility = TRUE;
+ t->priv->can_set_location = TRUE;
}
static void
@@ -631,12 +635,15 @@ toolbar_set_location (Toolbar *t,
{
GtkWidget *location;
- location = get_location_entry (t);
- g_return_if_fail (location != NULL);
+ if (t->priv->can_set_location)
+ {
+ location = get_location_entry (t);
+ g_return_if_fail (location != NULL);
- ephy_location_entry_set_location
- (EPHY_LOCATION_ENTRY (location),
- alocation ? alocation : "");
+ ephy_location_entry_set_location
+ (EPHY_LOCATION_ENTRY (location),
+ alocation ? alocation : "");
+ }
}
void