aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-20 23:43:38 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-20 23:43:38 +0800
commita838f6d5ab82bac98a25fb3ce9cb2c0cd575146c (patch)
tree705c36ad0fb609a241d35dcf8c629102b09907e5 /src
parent476c242753cd43a612cd9eea3166c77d822f7c80 (diff)
downloadgsoc2013-epiphany-a838f6d5ab82bac98a25fb3ce9cb2c0cd575146c.tar
gsoc2013-epiphany-a838f6d5ab82bac98a25fb3ce9cb2c0cd575146c.tar.gz
gsoc2013-epiphany-a838f6d5ab82bac98a25fb3ce9cb2c0cd575146c.tar.bz2
gsoc2013-epiphany-a838f6d5ab82bac98a25fb3ce9cb2c0cd575146c.tar.lz
gsoc2013-epiphany-a838f6d5ab82bac98a25fb3ce9cb2c0cd575146c.tar.xz
gsoc2013-epiphany-a838f6d5ab82bac98a25fb3ce9cb2c0cd575146c.tar.zst
gsoc2013-epiphany-a838f6d5ab82bac98a25fb3ce9cb2c0cd575146c.zip
Use the embed url, the tab one can make no sense if the user edited it.
2003-06-20 Marco Pesenti Gritti <marco@it.gnome.org> * src/ephy-favicon-action.c: (each_url_get_data_binder): Use the embed url, the tab one can make no sense if the user edited it. * src/toolbar.c: (location_user_changed_cb), (toolbar_set_window), (toolbar_init), (toolbar_set_location): Block location updating when setting tab title on user_changed.
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