Mohammed Sadiq
03679d4342
listlistmodel: Fix documentation comment
2018-09-18 09:56:19 +05:30
Georges Basile Stavracas Neto
1a4b60fb36
tree-list-model: Return the correct item type
...
When passthrough is enabled, it should return the GType
of the child GListModels; when disabled, it should be
GTK_TYPE_TREE_LIST_ROW.
The conditions are inverted however, causing a few
warnings to trigger.
Fix that by returning the correct GType.
2018-09-18 00:51:57 -03:00
Mohammed Sadiq
05b2ae0f31
Merge branch 'wip/sadiq/model-fixes' into 'master'
...
treelistmodel: Fix memory leak
See merge request GNOME/gtk!344
2018-09-18 02:54:30 +00:00
Mohammed Sadiq
f211d71f74
treelistmodel: Fix memory leak
...
gtk_tree_list_model_init_node() increases the reference count
of the model passed. Let's not do that, and let it take the
model passed.
2018-09-18 07:50:44 +05:30
Mohammed Sadiq
691ab421fb
Merge branch 'wip/sadiq/model-fixes' into 'master'
...
treelistmodel: Fix signal emission on row destroy
See merge request GNOME/gtk!343
2018-09-18 02:03:58 +00:00
Mohammed Sadiq
9e3e9e83ef
treelistmodel: Fix signal emission on row destroy
2018-09-18 07:11:27 +05:30
Manu Cornet
a0056d5ca8
Remove some duplication in testfilechooserbutton
...
Most of the code creating the two types of dialogs (open file,
choose folder) is the same. This refactors the common code into a
helper method. This also makes it easier to add other chooser types
for this test (e.g. save file).
2018-09-17 12:27:46 +00:00
Rico Tzschichholz
f3e6d00db1
gtk: Fix some g-i annotations warnings
2018-09-17 13:00:36 +02:00
Robert Ancell
e55df03fe2
Merge branch 'toolbar-expand' into 'master'
...
toolbar: Use hexpand/vexpand Gtk+ properties
See merge request GNOME/gtk!334
2018-09-17 08:59:19 +00:00
Robert Ancell
c8a13a2d8a
toolbar: Use hexpand/vexpand Gtk+ properties
2018-09-17 10:25:59 +02:00
Mohammed Sadiq
6971e2923d
docs: Fix inclusion of source files in tutorial
2018-09-17 13:39:22 +05:30
Matthias Clasen
231b76bdd1
tree list model: Add docs
2018-09-16 23:07:00 -04:00
Matthias Clasen
57ba4048de
Minor doc fix
...
Clarify some wording.
2018-09-16 23:07:00 -04:00
Benjamin Otte
545c5f18b2
testsuite: Disable some tests for older glib
2018-09-17 04:30:28 +02:00
Benjamin Otte
5571217218
testsuite: Add tests for GtkSortListModel
2018-09-17 03:57:37 +02:00
Benjamin Otte
b92c328425
sortlistmodel: Actually insert unsorted items at the wrong place
...
We were adding items in reverse order, oops.
2018-09-17 03:57:37 +02:00
Piotr Drąg
8bdcff3320
Update POTFILES.in
2018-09-16 21:02:31 +02:00
Benjamin Otte
9ffd88012d
docs: Add missing TreeListModel docs
2018-09-16 19:39:39 +02:00
Matthias Clasen
563fb97f90
Merge branch 'wip/sadiq/fixes' into 'master'
...
gdkselectioninputstream-x11: Fix memory leak
See merge request GNOME/gtk!340
2018-09-16 17:06:29 +00:00
Benjamin Otte
ee5708f543
testtreelistmodel: Display the file icon, because why not
2018-09-16 18:50:17 +02:00
Benjamin Otte
b7bf04fabd
inspector: Update the controllers list to show parent controllers
...
Now we show all the controllers that are relevant when widget gets sent
events.
2018-09-16 18:50:17 +02:00
Benjamin Otte
b94b8ac38d
testtreelistmodel: Make the statusbar display more info
...
Now display how many items were filtered (if any) and how many
directories remain to be sanned (if any).
2018-09-16 18:50:17 +02:00
Benjamin Otte
afd69db678
testtreelistmodel: Sort files by name
2018-09-16 18:50:17 +02:00
Benjamin Otte
f3834138f7
GtkSortListModel: Add
2018-09-16 18:50:17 +02:00
Benjamin Otte
64b7c123cc
testtreelistmodel: Add search
...
Add a simple search that does a case insensitive substring search of the
file paths.
2018-09-16 18:50:17 +02:00
Benjamin Otte
fcb780ee13
testtreelistmodel: Make the directory loading async
...
This is way more complicated than it should be, because it requires
manually limiting the number of open file enumerators.
On the other hand, it exhaustively tests the items-changed emission of
all involved listmodels because those signals come in pretty much
randomly.
It's also 50% slower than the sync version, with the caeat that the sync
version only shows the UI after it's done loading, while this version
shows it right away.
2018-09-16 18:50:17 +02:00
Benjamin Otte
65b795b861
testtreelistmodel: Add a hack to handle LONG lists
...
... and make the lists long by autoexpanding the tree.
2018-09-16 18:50:17 +02:00
Benjamin Otte
64d97b233b
GtkSliceListModel: add
2018-09-16 18:50:17 +02:00
Benjamin Otte
db8474e5b1
inspector: Make controllers page use gtk_list_box_bind_model()
2018-09-16 18:50:17 +02:00
Benjamin Otte
5e8983883e
inspector: Rename "Gestures" page to "Controllers"
...
And rename GtkInspectorGestures => GtkInspectorControllers, too.
2018-09-16 18:50:17 +02:00
Benjamin Otte
59006e2e03
inspector: Make gestures page handle all controllers
...
This requires removing support for gesture groups.
2018-09-16 18:50:17 +02:00
Benjamin Otte
b6acc31d44
GtkMapListModel: add
2018-09-16 18:50:17 +02:00
Benjamin Otte
6d0fe46cba
propertylookuplistmodel: Add
...
This model just takes an object and a property name and recursively
looks it up. In particular, I want it for:
widget, widget.parent, widget.parent.parent, ...
2018-09-16 18:50:17 +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
Benjamin Otte
2237009983
testsuite: Disable some tests with older glib
...
Fixes CI.
2018-09-16 18:50:17 +02:00
Benjamin Otte
417ac4ab43
inspector: Use a GtkPicture to display render nodes
...
Instead of the outdated render node view, use modern GTK APIs.
2018-09-16 18:50:17 +02:00
Benjamin Otte
4495eaae84
inspector: Add an icon to the render node list
2018-09-16 18:50:17 +02:00
Benjamin Otte
aba76fe8e9
inspector: Make the render node tree use a ListBox
...
It used to be a treeview.
2018-09-16 18:50:17 +02:00
Benjamin Otte
867042f88f
widget: Add gtk_widget_observe_controllers()
...
This mirrors gtk_widget_observe_children() - just that it observes the
controllers, not the children.
2018-09-16 18:50:17 +02:00
Benjamin Otte
32ec7dec61
gtk: Add GtkFlattenListModel
...
We can flatten lists of lists into lists now!
2018-09-16 18:50:17 +02:00
Benjamin Otte
d6161e09cd
treelistmodel: Add more API to navigate the tree
...
This adds functionality from GtkTreeIter into GtkTreeListRow that allows
finding items in the model and getting their position for use in
GtkListBox.
2018-09-16 18:50:17 +02:00
Benjamin Otte
4b5fb5ec79
treelistmodel: Refactor to add GtkTreeListRow
...
This patch does multiple things:
1. Add a custom persistent per-row object.
2. Move all per-row API to that object. This means notifications are now
possible.
3. Add a "passthrough" construct-only property to the TreeListModel that
influences if the model returns these new object or passes through
the ones from the model.
This greatly simplifies the code needed to be written for widgetry,
because one can just connect the per-row object to the expanders that
expand and collapse rows.
As an added power feature, these objects can also be passed through
further models (like filter models).
It also adds kind of a hack to Adwaita to make the test look neat.
2018-09-16 18:50:17 +02:00
Benjamin Otte
4f70f72349
gtk: Add GtkFilterListModel
...
This is a GListModel implementation that filters the given source model.
2018-09-16 18:50:17 +02:00
Benjamin Otte
dd94129e27
widget: Add gtk_widget_observe_children()
...
This creates a listmodel that tracks a widget's children. Doing so turns
adding/removing children from O(1) to O(N) though, so use with caution.
2018-09-16 18:50:17 +02:00
Benjamin Otte
63e5b827ed
window: Add gtk_window_get_toplevels()
...
This one returns a list of all toplevel windows.
2018-09-16 18:50:17 +02:00
Benjamin Otte
573c63973a
gtk: Add GtkTreeListModel
...
This is a GListModel implementation with a neat API that can be used to
implement trees inside GtkListBox.
2018-09-16 18:50:17 +02:00
Mohammed Sadiq
1ce960c85b
gdkselectioninputstream-x11: Fix memory leak
2018-09-16 20:08:25 +05:30
Matthias Clasen
d7a5dcba0b
gtk_application_inihit: allow no reason
...
We document this argument as nullable, so treat it as such.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1327
2018-09-13 23:31:48 -04:00
Emin Tufan Çetin
a4b1c6b384
Update Turkish translation
2018-09-11 20:17:29 +00:00
Jakub Steiner
0edec9bcae
Merge branch 'adwaita-fixes' into 'master'
...
Adwaita fixes
See merge request GNOME/gtk!333
2018-09-10 14:29:54 +00:00