Matthias Clasen
326f4739ca
inspector: Redo the CSS node page
...
Showing two lists in a paned was a bit awkward, and space was
getting too limited. Go back to showing just the node list at
first, and make the CSS properties available via a stack. At
the same time, add a right-click context menu to the node list
to make the name and class editing more easily available.
2015-12-06 23:06:33 -05:00
Matthias Clasen
6f1c945010
inspector: Avoid a crash
...
gkt_cell_layout_get_area may return NULL, handle it.
2015-12-06 17:25:31 -05:00
Matthias Clasen
150728d6b0
inspector: Show the size request mode
...
This is not a property, so show it in the misc page.
2015-11-30 22:27:27 -05:00
Timm Bäder
df2cb5befc
inspector: Leave unneeded widgets out of source files
2015-11-24 11:17:10 +01:00
Matthias Clasen
036ee7a68b
inspector: Always underline at least one char
...
Empty underlines are hard to make out. Since we get somewhat
unreliable section information from the CSS parser, we just
make sure that we always underline at least one character.
2015-11-20 20:59:53 -05:00
Matthias Clasen
df55412ba2
inspector: Fix css warning tags
...
The builder syntax for tags was invalid here (why did this not
get flagged as error ?!). While we're at it, give the warning
underline a nice, orange color.
2015-11-20 20:35:39 -05:00
Matthias Clasen
ad49103b93
inspector: Show css parsing errors
...
The squiggly underline is useful, but seeing the error message
is much better, so show it in a tooltip.
2015-11-20 18:18:01 -05:00
Matthias Clasen
e9449f6014
inspector: Don't grow horizontally
...
Labels in the object tree are application data. Ellipsize them
to avoid growing extremely wide if the data is bogus.
2015-11-10 17:36:33 -05:00
Matthias Clasen
774b6f94d5
inspector: fix a typo
2015-11-10 17:36:23 -05:00
Matthias Clasen
b9613cc416
inspector: Some improvements to the CSS node tree
...
Set a min-content-height for the property list, and
allow horizontal scrolling.
2015-11-04 00:00:56 -05:00
Matthias Clasen
d077f627ef
inspector: Really show the selected CSS node
...
Try harder to scroll the selected CSS node into view.
2015-11-03 23:55:50 -05:00
Matthias Clasen
c711906f8c
inspector: Replace a use of gtk_button_set_focus_on_click
...
It is deprecated now.
2015-11-03 07:44:17 -05:00
Florian Müllner
e364ae3ea8
Use gtk_widget_set_focus_on_click() instead of deprecated setters
...
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Benjamin Otte
7cdfee71da
inspector: Do not show transient nodes
...
This is kind of a hack the way it's implemented, but it's necessary
for performance to ignore transient nodes as they get created all the
time (via gtk_style_context_save()) and invalidate the whole treeview.
And that causes resizes and redrawing of the treeview and performance of
the inspector would go down the drain now that we display a larger part
of the node tree.
2015-11-02 20:32:12 +01:00
Benjamin Otte
81de33e906
inspector: Always show full CSS node tree
...
Just select the node of the current widget whenever a new one gets
selected.
2015-11-02 20:32:12 +01:00
Benjamin Otte
5c53e873b1
inspector: Track updates of node styles
...
When the CSS style of a node changes, we want to display the new values
in the inspector.
This for example allows to see how styles update on hover or during
animations.
2015-11-01 16:45:11 +01:00
Benjamin Otte
e0f4bf5d35
inspector: Store the current node in the priv struct
2015-11-01 02:42:36 +01:00
Benjamin Otte
b89939f5a4
inspector: Split out a function
2015-11-01 02:42:36 +01:00
Matthias Clasen
b6fda5dc0a
inspector: Show CSS node state
...
This is useful when debugging state propagation issues between
CSS nodes.
2015-10-31 00:07:19 -04:00
Matthias Clasen
af3789bb87
inspector: Drop the style property list
...
Style properties are now shown for each CSS node in the
CSS node tab, so we don't need a separate per-widget tab
for this.
2015-10-30 06:51:43 -04:00
Matthias Clasen
91af42263b
inspector: Drop the style classes list
...
Style classes can now be added/removed for each CSS node in
the CSS node tab, so we don't need a separate per-widget tab
for this.
2015-10-30 06:51:43 -04:00
Matthias Clasen
37eb5c08a4
inspector: Cosmetic changes to the hierarchy tab
...
Put the interfaces below GInterface.
2015-10-28 00:41:13 -04:00
Matthias Clasen
3869bdbc2b
inspector: Add css node style properties
...
Add a per-cssnode view of style properties.
2015-10-28 00:33:14 -04:00
Matthias Clasen
ed00d86496
inspector: Allow editing css node properties
...
This reuses the property editor infrastructure from the
property list pages. Good that css nodes are objects.
2015-10-26 23:39:51 -04:00
Matthias Clasen
6852a1eef9
inspector: Support editing interned string properties
...
Sadly, interned string properties cannot be handled generically
at all - GObject insists on inserting a strcpy in any attempt
to set a string property with generic api, destroying the
internedness of the string.
Therefore, we have to special-case GtkCssNode in the property
editor code :-(
2015-10-26 23:39:51 -04:00
Matthias Clasen
f55e3f7eda
inspector: Be more careful with dead objects
...
gtk_inspector_object_tree_find_object accesses the type information
of the object, so we can't safely use it on an already decaying
object when we get a weak notify. Instead just walk the tree and
compare pointers, that is safe.
https://bugzilla.gnome.org/show_bug.cgi?id=756852
2015-10-25 13:11:17 -04:00
Matthias Clasen
4305aa1def
inspector: Improve css node UI
...
All the other object pages have a title, this one was missing it.
Add one, so the page fits in with the rest.
2015-10-25 09:20:43 -04:00
Matthias Clasen
1e112ca75e
inspector: Allow editing strv-valued properties
...
These do occur in some places, and we can easily allow editing
them.
2015-10-25 02:14:04 -04:00
Matthias Clasen
e0d9250a07
inspector: Show names for css nodes
...
Currently, we don't have any css nodes with names, but we will soon.
2015-10-22 20:58:08 -04:00
Sébastien Wilmet
9d3e9c9375
inspector: remove gtk_text_buffer_get_iter_at_line_index() workaround
...
The function is now safe to use.
https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-10-16 08:43:27 +02:00
Matthias Clasen
47237ddd94
inspector: Add a reset button for settings
...
This is exercising the new gtk_settings_reset_property api.
https://bugzilla.gnome.org/show_bug.cgi?id=755008
2015-10-03 22:42:12 -04:00
Matthias Clasen
ac72a9cedc
inspector: Ellipsize the accessible name
...
It can be long, and we don't want the inspector to grow excessively.
2015-09-23 07:01:15 -04:00
Benjamin Otte
bcc0a54383
inspector: Store the parent for the object tree
...
This allows selecting newly added random objects.
https://bugzilla.gnome.org/show_bug.cgi?id=754987
2015-09-14 23:36:37 +02:00
Benjamin Otte
bffeae6203
inspector: Handle object destruction without row references
...
This way, we can live without row references.
A side effect is that opening the inspector on the gtk-demo list box
example now only takes 0.5s instead of the previous 3 minutes.
2015-08-26 16:33:52 +02:00
Benjamin Otte
1f2bd47965
inspector: Implement find_object() without GtkTreeRowReference
...
Tree row references are slow to update. And we update the widget list
quite a bit, so when it grows it can get REALLY slow.
2015-08-26 15:46:07 +02:00
Benjamin Otte
c7ed2c2130
inspector: Refactor object tree construction
...
Instead of having lots of if statements, create a vtable. This will be
useful for the following patches.
2015-08-26 15:46:07 +02:00
Timm Bäder
571da2a8b3
Inspector: Protect against childless windows
2015-08-26 12:04:44 +02:00
Timm Bäder
30d56933d4
Inspector: Make monitor rows unactivatable
2015-08-25 18:11:46 +02:00
Matthias Clasen
56d39241a9
inspector: Fix a typo
...
Blocking a signal should be paired with unblocking.
Spotted by Krzesimir Nowak
2015-08-04 07:11:34 -04:00
Matthias Clasen
142efd186d
Inspector: Preserve selection when rescanning
...
We are semiregularly repopulating the object tree. Whenever
we do, we loose the selection, needlessly. Do the extra work
to preserve it.
http://bugzilla.gnome.org/show_bug.cgi?id=753130
2015-08-02 15:20:17 -04:00
Matthias Clasen
df50858dfd
inspector: Show monitor information
...
This is useful to verify the monitor information returned by
other backends.
2015-07-28 01:14:49 -04:00
Matthias Clasen
bc68600cb0
inspector: Show wayland display information
...
Don't call it "X display" when we show useful information under
Wayland as well.
2015-07-28 00:46:34 -04:00
Matthias Clasen
5c2759af3c
Use standard cursor names
...
This changes GTK+ to use gdk_cursor_new_from_name() with the
'standard' css names, instead of GdkCursorType.
https://bugzilla.gnome.org/show_bug.cgi?id=652085
2015-07-26 01:45:06 -04:00
Matthias Clasen
9a44f18940
inspector: Add a function to rescan
...
Currently, we only ever scanned the toplevel list and
widget tree once. That is not enough.
2015-07-23 21:27:37 -04:00
Matthias Clasen
c27b90cc79
Fix the build
2015-07-17 20:45:28 -04:00
Matthias Clasen
d8a40c4587
inspector: Avoid a NULL deref
...
Coverity pointed out that getting a class name requires
dereferencing the pointer, so only don't do it if it is NULL.
2015-07-17 19:52:52 -04:00
Matthias Clasen
2eb39a3b7a
inspector: Remove some dead code
...
Not sure what I was thinking here. Coverity pointed this out.
2015-07-17 18:47:39 -04:00
Matthias Clasen
ff86433ea1
inspector: Avoid a NULL deref
2015-07-17 18:42:24 -04:00
Matthias Clasen
1b8d06da2d
inspector: Check a return value
...
We don't care about the error here, but we were relying on
g_resources_get_info to zero the size even in case of error.
No need to do that, we can just check the return value. Plus,
it makes coverity happy.
2015-07-17 16:11:16 -04:00
Matthias Clasen
f960d4f486
inspector: Annotate a call whose return value we don't need
...
The way this code is written, we know that there is an item in
the hash table and the iter_next call will give it to us, so
no need to check the return value. Annotate the call to tell
coverity.
2015-07-17 16:11:16 -04:00