Execute dialog: UI improvements
This MR makes three quality-of-life changes to the Execute Method dialog.
-
Use
json.dumps()
instead ofpprint.pformat()
, for pretty-printing outputpprint.pformat's output has several quirks that make it less than ideal for our data-display purposes.
- Its output has a fixed width, 80 characters by default
- It formats key:value pairs with the wrapped value aligned and indented to the right of the key, which for long key names means squeezing its contents into just a few columns of width
Instead, using json.dumps() with an indent of two spaces makes the output far more readable, particularly in the case of long keys and/or values.
-
Make the input and output text areas separately resizable, by wrapping them both in a GtkPaned container with splitter.
The amount of space needed for input and output, when executing methods, is rarely equal. Introduce a GtkPaned container around the two boxes, with a splitter between so that they can be resized relative to each other.
Also, regenerate the ui file for/from newer Glade, eliminate some deprecated widgets (GtkVBox) and properties (margin-left).
-
Raise the default size of the window from 320x400 to 800x600.
Previously it was 320x400, which given the amount of chrome present in the window made the text fields annoyingly tiny.
Pretty-printing org.gnome.Shell.Extensions.ListExtensions()
Before:
After: