r22189 - in /desktop/unstable/epiphany-browser/debian: changelog patches/14_inspect_element.patch

kov at users.alioth.debian.org kov at users.alioth.debian.org
Fri Oct 30 13:07:12 UTC 2009


Author: kov
Date: Fri Oct 30 13:07:11 2009
New Revision: 22189

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=22189
Log:
Patch from upstream to reintroduce Inspect Element

Added:
    desktop/unstable/epiphany-browser/debian/patches/14_inspect_element.patch
Modified:
    desktop/unstable/epiphany-browser/debian/changelog

Modified: desktop/unstable/epiphany-browser/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/epiphany-browser/debian/changelog?rev=22189&op=diff
==============================================================================
--- desktop/unstable/epiphany-browser/debian/changelog [utf-8] (original)
+++ desktop/unstable/epiphany-browser/debian/changelog [utf-8] Fri Oct 30 13:07:11 2009
@@ -3,6 +3,8 @@
   * New upstream release
   * debian/patches/99_autoreconf.patch:
   - Refreshed.
+  * debian/14_inspect_element.patch:
+  - patch from upstream to reintroduce the 'Inspect Element' option
 
  -- Gustavo Noronha Silva <kov at debian.org>  Fri, 30 Oct 2009 10:50:02 -0200
 

Added: desktop/unstable/epiphany-browser/debian/patches/14_inspect_element.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/epiphany-browser/debian/patches/14_inspect_element.patch?rev=22189&op=file
==============================================================================
--- desktop/unstable/epiphany-browser/debian/patches/14_inspect_element.patch (added)
+++ desktop/unstable/epiphany-browser/debian/patches/14_inspect_element.patch [utf-8] Fri Oct 30 13:07:11 2009
@@ -1,0 +1,133 @@
+From c87401f28cb8ef3a645dfd5a687be6ddbbfe6790 Mon Sep 17 00:00:00 2001
+From: Gustavo Noronha Silva <gns at gnome.org>
+Date: Tue, 27 Oct 2009 08:09:57 -0200
+Subject: [PATCH] Provide the Inspect Element menu item again
+
+WebKit now provides API to start the web inspector, so we can restore
+the menu item.
+
+Bug #599473
+---
+ data/ui/epiphany-ui.xml |    8 ++++++++
+ src/ephy-window.c       |    9 +++++++++
+ src/popup-commands.c    |   21 +++++++++++++++++++++
+ src/popup-commands.h    |    3 +++
+ 4 files changed, 41 insertions(+), 0 deletions(-)
+
+diff --git a/data/ui/epiphany-ui.xml b/data/ui/epiphany-ui.xml
+index 1f3dcac..5be9e4f 100644
+--- a/data/ui/epiphany-ui.xml
++++ b/data/ui/epiphany-ui.xml
+@@ -117,6 +117,8 @@
+ 		<menuitem name="SaveImageAsIP" action="SaveImageAs"/>
+ 		<menuitem name="SetImageAsBackgroundIP" action="SetImageAsBackground"/>
+ 		<menuitem name="CopyImageLocationIP" action="CopyImageLocation"/>
++		<separator />
++		<menuitem name="InspectElementIP" action="InspectElement"/>
+ 	</popup>
+ 
+ 	<popup name="EphyDocumentPopup" action="PopupAction">
+@@ -134,6 +136,8 @@
+ 		<menuitem name="SaveImageAsDP" action="SaveImageAs"/>
+ 		<menuitem name="SetImageAsBackgroundDP" action="SetImageAsBackground"/>
+ 		<menuitem name="CopyImageLocationDP" action="CopyImageLocation"/>
++		<separator />
++		<menuitem name="InspectElementDP" action="InspectElement"/>
+ 	</popup>
+ 
+ 	<popup name="EphyLinkPopup" action="PopupAction">
+@@ -152,6 +156,8 @@
+ 		<menuitem name="SaveImageAsLP" action="SaveImageAs"/>
+ 		<menuitem name="SetImageAsBackgroundLP" action="SetImageAsBackground"/>
+ 		<menuitem name="CopyImageLocationLP" action="CopyImageLocation"/>
++		<separator />
++		<menuitem name="InspectElementLP" action="InspectElement"/>
+ 	</popup>
+ 
+ 	<popup name="EphyEmailLinkPopup" action="PopupAction">
+@@ -164,6 +170,8 @@
+ 		<menuitem name="SaveImageAsELP" action="SaveImageAs"/>
+ 		<menuitem name="SetImageAsBackgroundELP" action="SetImageAsBackground"/>
+ 		<menuitem name="CopyImageLocationELP" action="CopyImageLocation"/>
++		<separator />
++		<menuitem name="InspectElementELP" action="InspectElement"/>
+ 	</popup>
+ 
+ 	<popup name="EphyNotebookPopup" action="NotebookPopupAction">
+diff --git a/src/ephy-window.c b/src/ephy-window.c
+index df0c7df..a734e94 100644
+--- a/src/ephy-window.c
++++ b/src/ephy-window.c
+@@ -345,6 +345,10 @@ static const GtkActionEntry ephy_popups_entries [] = {
+ 	  NULL, NULL },
+ 	{ "StopImageAnimation", NULL, N_("St_op Animation"), NULL,
+ 	  NULL, NULL },
++
++	/* Inspector */
++	{ "InspectElement", NULL, N_("Inspect _Element"), NULL,
++	  NULL, G_CALLBACK (popup_cmd_inspect_element) },
+ };
+ 
+ static const struct
+@@ -1119,6 +1123,7 @@ update_popup_actions_visibility (EphyWindow *window,
+ {
+ 	GtkAction *action;
+ 	GtkActionGroup *action_group;
++	gboolean inspector_enabled;
+ 
+ 	action_group = window->priv->popups_action_group;
+ 
+@@ -1133,6 +1138,10 @@ update_popup_actions_visibility (EphyWindow *window,
+ 
+ 	action = gtk_action_group_get_action (action_group, "OpenFrame");
+ 	gtk_action_set_visible (action, is_frame);
++
++	inspector_enabled = eel_gconf_get_boolean (CONF_WEB_INSPECTOR_ENABLED);
++	action = gtk_action_group_get_action (action_group, "InspectElement");
++	gtk_action_set_visible (action, inspector_enabled);
+ }
+ 
+ static void
+diff --git a/src/popup-commands.c b/src/popup-commands.c
+index cbaf1e4..755817e 100644
+--- a/src/popup-commands.c
++++ b/src/popup-commands.c
+@@ -521,3 +521,24 @@ popup_cmd_open_image (GtkAction *action,
+ 	g_value_unset (&value);
+ 	g_free (scheme);
+ }
++
++void
++popup_cmd_inspect_element (GtkAction *action, EphyWindow *window)
++{
++	EphyEmbedEvent *event;
++	EphyEmbed *embed;
++	WebKitWebInspector *inspector;
++	guint x, y;
++
++	embed = ephy_embed_container_get_active_child
++		(EPHY_EMBED_CONTAINER (window));
++
++	event = ephy_window_get_context_event (window);
++	g_return_if_fail (event != NULL);
++
++	inspector = webkit_web_view_get_inspector
++		(EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed));
++
++	ephy_embed_event_get_coords (event, &x, &y);
++	webkit_web_inspector_inspect_coordinates (inspector, (gdouble)x, (gdouble)y);
++}
+diff --git a/src/popup-commands.h b/src/popup-commands.h
+index b1531bd..ddfc676 100644
+--- a/src/popup-commands.h
++++ b/src/popup-commands.h
+@@ -65,3 +65,6 @@ void popup_cmd_download_link		(GtkAction *action,
+ 
+ void popup_cmd_save_image_as		(GtkAction *action,
+ 					 EphyWindow *window);
++
++void popup_cmd_inspect_element		(GtkAction *action,
++					 EphyWindow *window);
+-- 
+1.6.5
+




More information about the pkg-gnome-commits mailing list