aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2011-09-01 23:16:37 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2011-09-02 00:47:34 +0800
commit996bf1df4981e87d507e3fc8940d0c84b7d8ba9f (patch)
tree42d54e603261012d78193792fbf88c62167ed452 /src
parent3dc371664fa71b51ac64449361129712f4807833 (diff)
downloadgsoc2013-epiphany-996bf1df4981e87d507e3fc8940d0c84b7d8ba9f.tar
gsoc2013-epiphany-996bf1df4981e87d507e3fc8940d0c84b7d8ba9f.tar.gz
gsoc2013-epiphany-996bf1df4981e87d507e3fc8940d0c84b7d8ba9f.tar.bz2
gsoc2013-epiphany-996bf1df4981e87d507e3fc8940d0c84b7d8ba9f.tar.lz
gsoc2013-epiphany-996bf1df4981e87d507e3fc8940d0c84b7d8ba9f.tar.xz
gsoc2013-epiphany-996bf1df4981e87d507e3fc8940d0c84b7d8ba9f.tar.zst
gsoc2013-epiphany-996bf1df4981e87d507e3fc8940d0c84b7d8ba9f.zip
EphyWindow: Fix location entry's load progress
The caching of the GtkEntry was broken, since the toolbar items are destroyed on switching to/from fullscreen. Update the cache right after toolbar is rebuilt. https://bugzilla.gnome.org/show_bug.cgi?id=657936
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 3a0df31e1..ab6fb4e67 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -849,6 +849,26 @@ sync_chromes_visibility (EphyWindow *window)
}
static void
+ensure_location_entry (EphyWindow *window)
+{
+ GtkActionGroup *toolbar_action_group;
+ GtkAction *action;
+ GSList *proxies;
+ GtkWidget *proxy;
+ EphyWindowPrivate *priv = window->priv;
+
+ toolbar_action_group = ephy_toolbar_get_action_group (priv->toolbar);
+ action = gtk_action_group_get_action (toolbar_action_group,
+ "Location");
+ proxies = gtk_action_get_proxies (action);
+ if (proxies)
+ {
+ proxy = GTK_WIDGET (proxies->data);
+ priv->entry = ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY (proxy));
+ }
+}
+
+static void
ephy_window_fullscreen (EphyWindow *window)
{
EphyWindowPrivate *priv = window->priv;
@@ -883,6 +903,7 @@ ephy_window_fullscreen (EphyWindow *window)
(EGG_EDITABLE_TOOLBAR (priv->toolbar),
EGG_TOOLBARS_MODEL (
ephy_shell_get_toolbars_model (ephy_shell, TRUE)));
+ ensure_location_entry (window);
ephy_toolbar_set_show_leave_fullscreen (priv->toolbar,
!lockdown_fs);
@@ -901,6 +922,7 @@ ephy_window_unfullscreen (EphyWindow *window)
(EGG_EDITABLE_TOOLBAR (window->priv->toolbar),
EGG_TOOLBARS_MODEL (
ephy_shell_get_toolbars_model (ephy_shell, FALSE)));
+ ensure_location_entry (window);
ephy_toolbar_set_show_leave_fullscreen (window->priv->toolbar, FALSE);
@@ -3732,8 +3754,6 @@ ephy_window_constructor (GType type,
GtkActionGroup *toolbar_action_group;
GError *error = NULL;
guint settings_connection;
- GSList *proxies;
- GtkWidget *proxy;
GtkCssProvider *css_provider;
GFile *css_file;
@@ -3917,16 +3937,8 @@ ephy_window_constructor (GType type,
sync_chromes_visibility (window);
- /* Cache GtkEntry inside EphyLocationEntry */
- action = gtk_action_group_get_action (toolbar_action_group,
- "Location");
- proxies = gtk_action_get_proxies (action);
- if (proxies)
- {
- proxy = GTK_WIDGET (proxies->data);
- priv->entry = ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY (proxy));
- }
-
+ ensure_location_entry (window);
+
return object;
}