After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676870 - Switching on webInspector is not obvious
Switching on webInspector is not obvious
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Interface
3.4.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-26 10:38 UTC by Alexey
Modified: 2016-06-01 14:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow to toggle the Web Inspector with keyboard shortcuts. (6.43 KB, text/plain)
2016-05-31 00:33 UTC, Carlos Alberto Lopez Perez
  Details
Allow to toggle the Web Inspector with keyboard shortcuts. (v2) (6.53 KB, patch)
2016-06-01 13:38 UTC, Carlos Alberto Lopez Perez
committed Details | Review

Description Alexey 2012-05-26 10:38:50 UTC
only one way i fond to toggle on web inspector is click "inspect element" in context menu.
I suggest two more ways to toggle it on: keyboard shortcut(F12 like in firebug or ctrl+shift+i like in chrome) and action in the main menu.
Comment 1 Adam Dingle 2013-06-19 12:20:26 UTC
I agree: I'd love to have a keyboard shortcut that opens the Web inspector.
Comment 2 Carlos Alberto Lopez Perez 2016-05-31 00:33:14 UTC
Created attachment 328771 [details]
Allow to toggle the Web Inspector with keyboard shortcuts.

This maps the keyboard shortcuts CTRL+SHIFT+I and F12 (these are standard ones as are used also on Chromium, Firefox and Safari).
    
It keeps track also of whether the Inspector window is loaded or not, so the keyboard shortcut closes the inspector window when it is already loaded on a given tab.
Comment 3 Michael Catanzaro 2016-06-01 10:51:49 UTC
Review of attachment 328771 [details]:

::: embed/ephy-embed.c
@@ +787,2 @@
   /* The inspector */
+  embed->inspector_loaded = FALSE;

I think ephy_embed_init is a better place to do this, since it doesn't require construction to have been completed first.

@@ +947,3 @@
+ * @embed: a #EphyEmbed
+ *
+ * Checks if the Web Inspector is loaded on this this #EphyEmbed.

Change "on" to "in" and get rid of the extra "this"

::: src/window-commands.c
@@ +1373,3 @@
+  view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
+
+  inspector_window = webkit_web_view_get_inspector(view);

Missing space before opening parenthesis, here and in each of the new lines below.
Comment 4 Michael Catanzaro 2016-06-01 10:52:19 UTC
(CCing Iulian since this adds a new GtkAction to get rid of.)
Comment 5 Carlos Alberto Lopez Perez 2016-06-01 13:38:40 UTC
Created attachment 328888 [details] [review]
Allow to toggle the Web Inspector with keyboard shortcuts. (v2)

This maps the keyboard shortcuts CTRL+SHIFT+I and F12 (these are standard ones as are used also on Chromium, Firefox and Safari).
    
It keeps track also of whether the Inspector window is loaded or not, so the keyboard shortcut closes the inspector window when it is already loaded on a given tab.

-- This is V2 addressing previous reviewer commits.