Bug 770245 - Please allow Inspector without needing to recompile gnome-terminal
Please allow Inspector without needing to recompile gnome-terminal
Status: RESOLVED FIXED
Product: gnome-terminal
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2016-08-22 16:37 UTC by Jeremy Bicha
Modified: 2016-09-04 12:16 UTC (History)
2 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments

Description Jeremy Bicha 2016-08-22 16:37:50 UTC
Distros usually do not compile gnome-terminal with --enable-debug. It would be nice if theme developers (for instance) could use GtkInspector without needing to recompile gnome-terminal.

Please enable Inspector by default but only show the Help>Inspector menu item if gsettings "org.gtk.Settings.Debug enable-inspector-keybinding" is set to true.
Comment 1 Egmont Koblinger 2016-08-22 19:04:34 UTC
+1

It shouldn't require recompiling g-t to be able to _somehow_ open the inspector.

At the same time I'm wondering why we don't respect the standard means of opening it (that is, the hotkeys don't work, but we have a menu item that other apps don't).
Comment 2 Debarshi Ray 2016-08-23 07:48:41 UTC
(In reply to Egmont Koblinger from comment #1)
> At the same time I'm wondering why we don't respect the standard means of
> opening it (that is, the hotkeys don't work, but we have a menu item that
> other apps don't).

Because all key strokes should be passed to the terminal application. See commit 7a3d8e370f312a040544a28525ce149e69243221
Comment 3 Egmont Koblinger 2016-08-23 07:52:30 UTC
Ctrl+letter and Ctrl+Shift+letter always generate the same byte. That's why all the hotkeys (e.g. Ctrl+Shift+N for new window) have this double modifier. So I can't see what's wrong with Ctrl+Shift+D or Ctrl+Shift+I opening the inspector.
Comment 4 Christian Persch′ 2016-08-23 18:29:38 UTC
When I added the code to disable the keys and install the menu item instead, there was no way to disable the inspector yet (now there's the gsettings key).

Also, I don't think the inspector is something any *user* requires, or even should be enabled to use, so disabling it by default with only a way to get it in a developer build seemed the best way for me.

Note that you can currently still get it if you start g-t-server yourself with the GTK_DEBUG=interactive (iirc) env var set.

I'd be ok with moving the menu item outside of the debug #ifdef and instead showing it iff the gsettings key is enabled.
Comment 5 Egmont Koblinger 2016-08-23 18:38:22 UTC
The last time I tried GTK_DEBUG=interactive it didn't work for me (on non-debug g-t-s). But now it works :)
Comment 6 Egmont Koblinger 2016-08-23 21:44:08 UTC
Oh yeah, I can recall it now.

Starting g-t-s with GTK_DEBUG=interactive does open an inspector window, however, it is useless. It only contains some global entries (a GtkSettings, and a TerminalApp with a GMenu), but nothing for the actual terminal windows.

In order to be able to inspect a window, you need to open the inspector after the terminal window has appeared, which is currently only possible via the menu entry in the debug build.

Note You need to log in before you can comment on or make changes to this bug.