| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This fixes an issue where removing an avatar from a contact would not
update the UI, as the current pixbuf would still keep being displayed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces a new class `Contacts.Chunk`. Just like libfolks,
we see a contact as a collection of data, or to word it differently: a
collection built up from "chunks" of information.
The net result of adding this concept adds quite a bit of lines of code,
but it does have some major benefits:
* Rather than stuffing new properties into yet another if-else spread
out over multiple places in contacts-utils (and quite a bit of other
files), we can create a new subclass of `Contacts.Chunk`
* This also goes for property-specific logic, which we can consolidate
within their appropriate classes/files.
* All of our logic is now unit-testable
In the future, this would allow for more cleanups/features:
* We can put the serialization code for each property inside the
`Contacts.Chunk`
* We can extend ContactSheet to show a vCard's information, before
actually importing it into a Folks.Individual.
* We can write unit tests on the set of chunks, rather than regularly
having to deal with yet another regression in e.g. the birthday
editor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GTK4 added some interesting concepts on top of / in conjunction with
list models, for example to map one list model on another by sorting
and/or filtering. Another example is to use this with selections.
This commit applies that concept to Contacts, which now uses the
`Contacts.Store` to build a base list model on top of the
`Folks.IndividualAggregator`, on top a sorted model (which can be
adjusted to sort on First/Last name, and finally a filter model, to
filter on the text in the search entry.
Another reason to do this, is that it allows us to use a `Gtk.ListView`
in the future. It's not possible to do so already due to the fact that
we need to differentiate between "Favorites" and "Other Contacts", which
needs extra API on Gtk.Listview side.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a mega-commit which ports Contacts to GTK4 and libadwaita, the
library which provides GNOME-specific widgets on top of GTK4.
This change also now follows the new mockups of Contacts, which use a
boxed list style to convey contact information.
There is a minor set of known issues which we'll still need to solve
later (preferably):
* For now, taking a picture with your webcam is not implemented. In
GTK3, we used to do this with Cheese, but this hasn't been ported to
GTK4. Ideally, we could just directly use Pipewire though.
* Some CRITICALs when we have some unexpectedly long names or property
values
* The delete button is gone for most properties. This probably needs to
be rethough at the design level on how we want to deal with it.
* We're still blocked a bit on libedataserverui not having a GTK4 port
yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes all remaining occurrences `using Gtk;`, `using Gee;`
and `using Hdy;`. There's a number of reasons why we're doing this, but
to list a few:
* The `Gtk` and `Hdy` namespaces have had issues before with types
having the same name (ie HdyHeaderBar and GtkHeaderBar) which could
suddenly break the build.
* By omitting namespaces, it's harder to see for new contributors what
the actual type is of a certain variable when they want to look up the
API
* In the long term, we want to get rid of Gee, as it's clear that it's
not really maintained, and has some serious performance drawbacks.
|
|
|
|
| |
And don't use `using Gtk;`, since some names of types can clash.
|
|
|
|
|
|
|
|
|
|
| |
Makes Contacts.Avatar a wrapper around HdyAvatar.
This allows us to drop our custom fallback and
circular avatar code in favor of HdyAvatar.
Fixes https://gitlab.gnome.org/GNOME/gnome-contacts/-/issues/183
Related to https://gitlab.gnome.org/GNOME/Initiatives/-/issues/20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes most of the Contact class and makes use of the Individual
of folks directly.
The aim of this refactor is to make the code more readable.
Since Individual provides most of the needed features the Contact class
adds a complicated abstraction without any real benefit.
Transform FakePersona a real Persona which can be used as a placeholder
till folks returns the real Persona.
Use SearchQuery to find the best matching contact when opening
gnome-contacts with a e-mail address
|
| |
|
| |
|
|
|
|
|
| |
We won't them by defaul though, you have to explicitly set 'docs' to
true when configuring meson.
|
| |
|
| |
|
|
|
|
|
| |
It won't work with the drawing area, so don't bother with all that extra
code.
|
|
|
|
| |
This should again decrease our memory usage in most cases.
|
|
|
|
| |
This fixes [bug 657962](https://bugzilla.gnome.org/show_bug.cgi?id=657962).
|
| |
|
| |
|
|
|
|
|
|
| |
* Always clip to a circle.
* In case there is no avatar, use a specific color for each contact and
draw a default icon on top if it.
|
|
|
|
|
|
|
| |
Leave all the button logic out of it and just be a simple DrawingArea.
NOTE: we temporarily lose our border because of this, but with the new
avatars, this should no longer be a problem.
|
| |
|
|
It's shorter *and* it's more obvious.
|