Lukáš Tyrychtr
7b6f254e64
object_tree.c: One gtk_list_item_get_child call is redundant
...
Fixes #5551
2023-01-27 15:43:33 +01:00
Matthias Clasen
5e256590db
Deprecate treeviews and cell renderers
...
This includes
GtkCellArea
GtkCellAreaBox
GtkCellAreaContext
GtkCellEditable
GtkCellRenderer
GtkCellRendererAccel
GtkCellRendererCombo
GtkCellRendererPixbuf
GtkCellRendererProgress
GtkCellRendererSpin
GtkCellRendererSpinner
GtkCellRendererText
GtkCellRendererToggle
GtkCellView
GtkComboBox
GtkComboBoxText
GtkIconView
GtkListStore
GtkTreeModel
GtkTreeModelFilter
GtkTreeModelSort
GtkTreeStore
GtkTreeView
GtkTreeViewColumn
GtkTreeSelection
2022-10-11 17:18:21 -04:00
Matthias Clasen
a377f95aac
Drop unused includes
...
This gets rid of treeview includes in a number of places.
2022-10-04 22:49:05 -04:00
Benjamin Otte
3da3cb35a6
object-tree: Allow inspecting inspectors
...
We filter by display, so the inspector window should show up only when
inspecting the inspector.
2022-06-21 02:35:02 +02:00
Benjamin Otte
abdbef1b5e
inspector: Add inscription support
...
Allow searching for inscription text and show it in the label column.
2022-06-10 04:34:23 +02:00
Benjamin Otte
6ac7f0562b
inspector: Use inscriptions in the object tree
2022-06-10 04:34:23 +02:00
Benjamin Otte
fa1dca29b6
inspector: Allow searching for editable text
...
... and display it in the label column.
2022-06-07 17:33:04 +02:00
Bastien Nocera
0621dbc745
inspector: Search by pointer address
...
Useful to find a widget that corresponds to a pointer address in gdb.
2022-02-04 18:39:56 +01:00
Timm Bäder
eca3eab96f
Remove unneeded gtkstylecontext.h includes
2020-10-14 15:06:12 -04:00
Florian Müllner
12189bc10f
buildable: Rename set_name() to set_buildable_id()
...
GtkBuildable's get_name()/set_name() methods may shadow
GtkWidget's methods. Avoid that by renaming the API to
get_buildable_id()/set_buildable_id(), which also reflects
the name of the XML attribute the API refers to.
https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
2020-09-26 02:16:05 +02:00
Matthias Clasen
dfabe74c59
Make filter constructors return exact types
...
Make functions like gtk_custom_filter_new() return
the actual type they construct.
Update all callers.
2020-09-05 21:43:42 -04:00
Matthias Clasen
8d79a32c50
list widgets: Use selection models in the api
...
Change the apis in GtkListView, GtkColumnView and
GtkGridView to be explicitly about GtkSelectionModel,
to make it obvious that the widgets handle selection.
Update all users.
2020-08-31 17:15:05 -04:00
Matthias Clasen
ccb9dcc86b
singleselection: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
dd1c0c0b22
treelistmodel: Make constructor transfer full
...
Make gtk_tree_list_model_new() take the root model
as first argument, and make it transfer full, for
consistency with other wrapping list constructors.
Update all callers.
Still missing here: Make the model property writable,
and allow passing NULL in the constructor.
2020-07-26 18:04:40 -04:00
Matthias Clasen
706d464ae6
filterlistmodel: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
1e8be87026
flattenlistmodel: Make the constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:02:44 -04:00
Benjamin Otte
d375dce9f5
Replace "gchar" with "char"
2020-07-25 00:47:36 +02:00
Matthias Clasen
1b28353be5
inspector: Ellipsize in the object tree
...
We don't want a long label to blow up the width
of the inspector window.
2020-07-13 17:32:52 -04:00
Benjamin Otte
5080730728
listmodels: Stop respecting item-type
...
Simplify all view model APIs and always return G_TYPE_OBJECT as the
item-type for every model.
It turns out nobody uses item-type anyway.
So instead of adding lots of APIs, forcing people to think about it and
trying to figure out how to handle filter or map models that modify item
types, just having an easy life is a better approach.
All the models need to be able to deal with any type of object going
through anyway.
2020-07-05 02:59:21 +02:00
Matthias Clasen
14f26d2345
inspector: Don't set style classes on app widgets
...
Due to a mixup, the inspector was setting .dim-label on
widgets that get unmapped, instead of the labels representing
them in the object tree.
2020-06-15 11:22:32 -04:00
Matthias Clasen
e23baa59f0
inspector: Add columns to the object tree
...
Add columnview columns in the object tree.
We do the same for treeview columns.
2020-05-31 09:23:37 -04:00
Benjamin Otte
6e3b6980de
inspector: Port object tree to GtkColumnView
2020-05-30 19:26:46 -04:00
Benjamin Otte
bb44120ae3
inspector: Use a GtkTreeExpander in the object tree
2020-05-30 19:26:45 -04:00
Benjamin Otte
4abdf695e3
filterlistmodel: Rewrite to use GtkFilter
2020-05-30 12:30:23 -04:00
Matthias Clasen
a8df81b27c
inspector: Drop app-menu support
...
Don't add app menu to the object tree anymore;
this property is going away.
2020-05-22 17:31:05 -04:00
Matthias Clasen
2a24b8c653
Replace most remaining uses of container api
...
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
12ecbd1508
listboxrow: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
af6e0ee2b3
Use gtk_button_set_child throughout
...
Replace all uses of gtk_container_add on buttons
by gtk_button_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
df1816a29c
button: Drop relief
...
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
394ea32e93
Use gtk_widget_add/remove_css_class more
...
Replace most uses of gtk_style_context_add/remove_class
by the new APIs. The only remaining uses of the old API
are in save/restore situations.
2020-04-10 12:09:57 -04:00
Matthias Clasen
c297d45b8a
gtk: Stop using modifier intents
...
Reviewing the existing settings, the only backend with
some differences in the modifier intent settings is OS X,
and we would rather have that implemented by interpreting
the existing modifiers in the appropriate way.
X11 Wayland Win32 OS X
primary ctrl ctrl ctrl mod2
mnemonic alt alt alt alt
context menu - - - ctrl
extend sel shift shift shift shift
modify sel ctrl ctrl ctrl mod2
no text alt|ctrl alt|ctrl alt|ctrl mod2|ctrl
shift group varies - - alt
GTK now uses the following modifiers:
primary ctrl
mnemonic alt
extend sel shift
modify sel ctrl
no text alt|ctrl
The context menu and shift group intents were not used
in GTK at all.
Update tests to no longer expect <Primary> to roundtrip
through the accelerator parsing and formatting code.
2020-04-06 16:32:03 -04:00
Benjamin Otte
c1f71ee3e8
window: Remove GtkWindowType and window->type
...
And remove code that was making decisions on the type and just use
the part for toplevels.
2020-02-14 21:18:49 +01:00
Alexander Larsson
6a15e9169d
Rename GtkIcon widget to GtkBuiltinIcon
...
This is an internal widget whose name is not very important, and we
want to rename GtkIconInfo to GtkIcon, so lets rename this.
2020-01-30 10:53:33 +01:00
Matthias Clasen
7ee5779efc
gtk: Remove menu code
...
GtkMenu, GtkMenuBar, GtkMenuItem and their subclasses
and supporting classes are replaced by model-based popover
implementations.
2019-12-29 20:31:58 -05:00
Matthias Clasen
b59521bb82
inspector: Remove menu special-casing
2019-12-29 20:31:58 -05:00
Matthias Clasen
1437b0856c
inspector: Make object tree respect inspected display
...
Stop using gdk_display_get_dfault and use the
inspected display instead.
2019-12-07 14:59:49 -05:00
Matthias Clasen
abde37a4d7
inspector: Cleanup
...
Remove an unused enum.
2019-12-07 14:59:49 -05:00
Timm Bäder
c2306d3ba6
inspector: Select an object when activating it
2019-11-14 09:15:58 +01:00
Timm Bäder
44137574a1
inspector: Fix expander arrow node names
...
They vanished after the GtkExpander node rename
2019-10-22 09:37:08 +02:00
Matthias Clasen
b6baa15e0a
inspector: Use event controller names
...
Use these in the same place we use widget names.
2019-06-20 22:48:42 -04:00
Matthias Clasen
bda5a8214b
inspector: Don't duplicate popovers
...
Popovers are now regular children in the widget
tree, no need to duplicate them as toplevels
in the object tree.
2019-06-16 23:03:27 -04:00
Matthias Clasen
7447abb52b
Stop using gtk_widget_get_toplevel
...
All uses of it can be replaced by gtk_widget_get_root.
2019-05-28 20:25:16 +00:00
Matthias Clasen
6ab8ab87c8
Reimplement GtkPopover
2019-05-28 20:25:13 +00:00
Matthias Clasen
fde21b57cd
inspector: Improve property list editing
...
Replace the treeview with popups on the property
page with a listbox with inline editing.
2019-04-12 11:12:55 -04:00
Matthias Clasen
47249431e3
inspector: Stop using ::hierarchy-changed
...
Use the new root and unroot vfuncs instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
b8c981fb2b
inspector: Work with new search entry
...
Don't assume a search entry is an entry, and
use the editable api as far as possible.
2019-02-19 00:25:59 -05:00
Matthias Clasen
fbe0db4007
inspector: Add an api to activate an object
...
This will be used to make object property inspection
work again.
This will be used to make object property inspection
work againn
2019-02-13 13:40:40 -05:00
Benjamin Otte
be2609a271
inspector: Handle case where there's no default application
2018-09-19 04:31:29 +02:00
Benjamin Otte
2c84049769
treelistmodel: Improve naming a bit
...
The complexity with model items vs row items is really confusing. Add to
that treelistmodel position vs child model position vs parent position,
and you're so confused, even the best naming can't help.
And once you're there, consider passthrough vs non-passthrough...
2018-09-18 08:03:03 +02:00
Benjamin Otte
05e752e096
inspector: Turn object tree into a GtkListBox
...
The code gets rid of the GtkTreeView and replaces it with a GtkListBox.
Most of the logic is now done via GListModel subclasses.
A big change is that this new list is now tracking updates itself and
doesn't need to be manually updated. All code that used to cause rescans
or add forgotten objects to the tree has been removed.
If objects are missing from the object tree, the logic for tracking them
needs to be added.
2018-09-16 18:50:17 +02:00