aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed.c
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gns@gnome.org>2013-02-05 10:34:42 +0800
committerGustavo Noronha Silva <gns@gnome.org>2013-02-07 21:08:15 +0800
commit8b911efb1c32d5424a7a4f7a2934b4c80ae0e158 (patch)
treebaf948f718ca528b50800590c5fef55aff49ad55 /embed/ephy-embed.c
parent5ab785702de658ba883de336ed4295631ff54b92 (diff)
downloadgsoc2013-epiphany-8b911efb1c32d5424a7a4f7a2934b4c80ae0e158.tar
gsoc2013-epiphany-8b911efb1c32d5424a7a4f7a2934b4c80ae0e158.tar.gz
gsoc2013-epiphany-8b911efb1c32d5424a7a4f7a2934b4c80ae0e158.tar.bz2
gsoc2013-epiphany-8b911efb1c32d5424a7a4f7a2934b4c80ae0e158.tar.lz
gsoc2013-epiphany-8b911efb1c32d5424a7a4f7a2934b4c80ae0e158.tar.xz
gsoc2013-epiphany-8b911efb1c32d5424a7a4f7a2934b4c80ae0e158.tar.zst
gsoc2013-epiphany-8b911efb1c32d5424a7a4f7a2934b4c80ae0e158.zip
The inspector has moved to starting attached, so follow the change
https://bugzilla.gnome.org/show_bug.cgi?id=693177
Diffstat (limited to 'embed/ephy-embed.c')
-rw-r--r--embed/ephy-embed.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index e12923b04..5d9f631bd 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -559,14 +559,8 @@ static gboolean
ephy_embed_attach_inspector_cb (WebKitWebInspector *inspector,
EphyEmbed *embed)
{
- GtkAllocation allocation;
- gtk_widget_get_allocation (GTK_WIDGET (embed->priv->scrolled_window), &allocation);
-
embed->priv->inspector_attached = TRUE;
- /* Set a sane position for the mover */
- gtk_paned_set_position (embed->priv->paned, allocation.height * 0.5);
-
gtk_widget_hide (embed->priv->inspector_window);
gtk_widget_reparent (GTK_WIDGET (embed->priv->inspector_scrolled_window),
GTK_WIDGET (embed->priv->paned));
@@ -601,8 +595,14 @@ ephy_embed_inspect_show_cb (WebKitWebInspector *inspector,
if (!embed->priv->inspector_attached) {
gtk_widget_show_all (embed->priv->inspector_window);
gtk_window_present (GTK_WINDOW (embed->priv->inspector_window));
- } else
+ } else {
+ GtkAllocation allocation;
+ gtk_widget_get_allocation (GTK_WIDGET (embed->priv->scrolled_window), &allocation);
+
+ /* Set a sane position for the mover */
+ gtk_paned_set_position (embed->priv->paned, allocation.height * 0.5);
gtk_widget_show (embed->priv->inspector_scrolled_window);
+ }
return TRUE;
}
@@ -1006,13 +1006,14 @@ ephy_embed_constructed (GObject *object)
G_CALLBACK (ephy_embed_attach_inspector_cb),
embed);
#else
- priv->inspector_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ priv->inspector_attached = TRUE;
priv->inspector_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->inspector_scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_container_add (GTK_CONTAINER (priv->inspector_window),
+ gtk_container_add (GTK_CONTAINER (priv->paned),
priv->inspector_scrolled_window);
+ priv->inspector_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (priv->inspector_window),
_("Web Inspector"));
gtk_window_set_default_size (GTK_WINDOW (priv->inspector_window),