Commit Graph

530 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto 03ecb2dcb2 user-controls: Use GtkPopoverMenu API to set menu model
Pretty trivial replacement, since 'oars_popover' already is a
GtkPopoverMenu.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 6cb361efb9 user-image: Port to AdwAvatar
This simultaneously allows us to remove a lot of code, and make
Malcontent more consistent with the rest of the system.

Port MctUserImage to use an AdwAvatar internally. Make it inherit
AdwBin since it has a single child now.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto d4f219b71e user-controls: Use GtkRoot API to get toplevel
In practice, widgets that implement GtkRoot represent what
toplevel widgets used to. Use that instead.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 8c170d11a2 project: Port GdkScreen to GdkDisplay
API looks about the same, just switching to 'display'.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 6ee8b77b95 user-controls: Remove unused variable 2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto c39ffd45fc project: Remove unnecessary usage of gtk_widget_show()
Now that widgets are visible by default, no need to show them
after creating them. Also revove gtk_widget_show_all() which
doesn't exist in GTK4.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto bb0865eb23 project: Use gtk_window_present() to present windows
Instead of gtk_widget_show(). In practice, it's exactly the same,
but it'll make follow-up patches cleaner.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 360c5b0271 restrict-applications-selector: Adapt to GtkImage API changes
This was supposed to be a project-wide commit, but actually only
MctRestrictApplicationsDialog had APIs to be updated. MctUseImage
will undergo a major surgery soon, so it's left out.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 8560ca0677 project: Simplify buttons
GtkButton has an 'icon-name' property that greatly simplifies
setting up buttons. GtkMenuButton has a new 'always-show-arrow'
property that also allows us to simplify some code.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto c9f8bb22f6 restrict-applications-selector: Adapt to AdwActionRow
This greatly reduces the code size. GtkBin is no more, and
AdwActionRow has specific API to add suffix widgets.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 631df4f1a5 project: Adapt to GtkBox API changes
GtkBox provides a different API surface, such as gtk_box_append()
and gtk_box_prepend(), so switch to that.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 2d9b408a32 user-controls: Inherit from AdwBin
GtkBin is no more, but libadwaita has a nice 1:1 replacement which
is AdwBin.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto e322d8cd98 Hdy → Adw
This simply changes namespaces. Fortunately, no further widgetry
changes will be necessary - all the widgets and APIs seem to have
an exact match in libadwaita.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto d142554ed3 malcontent-control: Replace border-width by margins
The 'border-width' property does not exist in GTK4 anymore, so
replace it with margin-* and in one case just remove it entirely.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto a8484b9c07 project: Port to GTK4 accessibility framework
This was simple, since few widgets have accessibility properties
manually set. The 'static' role doesn't exist anymore, and GtkLabel
handles everything for us, so we can just drop it.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 262d6a6e7a project: Remove most can-focus properties
In GTK4, can-focus usage is much more specific to widget subclasses,
and in almost all cases it's not necessary to set it.

Remove it everywhere, except in one case where it still needs to be
manually set to False.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto 5bec6e8fdc project: Remove all visible=True properties
Start the GTK4 port by cleaning up all visible=True properties,
since widgets are visible by default on GTK4.
2022-07-20 19:23:12 -03:00
Georges Basile Stavracas Neto c31640fa12 build: Switch to GTK4 and libadwaita
Switch the build system to GTK4 and libadwaita, instead of GTK3
and libhandy.

This commit breaks the build.
2022-07-20 19:23:12 -03:00
Christopher Davis 52b4b490f3 dockerfile: Add libhandy as a dependency
Though it's unlikely Debian will have a version
new enough for us, it's still useful to have this an
advance. The meson subproject will work in cases where
we don't have a new enough version of libhandy.
2022-07-20 19:23:12 -03:00
Christopher Davis d11e609543 dependencies: Add libhandy as a subproject
Allows for building on systems that don't ship libhandy
or a version of libhandy that's new enough.
2022-07-20 19:23:12 -03:00
Christopher Davis 554b390cd4 main.ui: Use HdyStatusPage for status pages
We now have a nice pre-built widget for status pages
with an icon, title, description, and children.
We should take advantage of that instead of manually
setting up each status page.
2022-07-20 19:23:12 -03:00
Christopher Davis 73c1d7f3fe restrict-applications-selector: Hide placeholder when list isn't empty
Prevents a broken bottom border radius on the list.
2022-07-20 19:23:12 -03:00
Christopher Davis 9ed46ae597 restrict-applications-selector: Use HdyActionRow
Implements click-to-activate for rows in the dialog.
2022-07-20 19:23:12 -03:00
Christopher Davis c68058f0f3 restrict-applications: Use HdyPreferencesWindow
HdyPreferencesWindow provides a neat API we can use for
windows like this.
2022-07-20 19:23:12 -03:00
Christopher Davis 358cad3a24 user-controls: Use HdyPreferencesPage and HdyActionRow API
This allows us to get styling consistent with
HdyPreferencesWindow and similar content across GNOME.

Part of a consistency push for GNOME 40
2022-07-20 19:23:12 -03:00
Christopher Davis d80ed10592 malcontent-control: Use HdyWindow and HdyHeaderBar 2022-07-13 12:00:33 -03:00
Philip Withnall f11d91da3a Merge branch 'gbsneto/appstream' into 'main'
libmalcontent-ui: Port to libappstream

Closes #51

See merge request pwithnall/malcontent!142
2022-07-13 14:29:08 +00:00
Georges Basile Stavracas Neto 25486a1df9 libmalcontent-ui: Port to libappstream
Depend on libappstream-dev, and include appstream.h instead of
appstream-glib.h.

We can depend on a new enough version of libappstream that all the
content rating symbols we need are available, which means that
`gs-content-rating.[ch]` can be dropped entirely.

Turns out no code changes are needed other than that.

Fixes: #51
2022-07-13 15:26:12 +01:00
Philip Withnall 0bbdb242a0 build: Bump Meson dependency to 0.57.0
This means we can depend on fix 42ba8efaf2 in Meson, which fixes use of
`volatile` in the default templates used by `gnome.mkenums_simple()`.
This fixes compiler warnings with recent compilers, which are promoted
to errors due to `-Werror`.

Meson 0.57.0 is available in bullseye-backports in Debian, which means
it’s available basically everywhere now.

Bumping the dependency required fixing a few deprecations in the
`meson.build` files.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-07-13 15:26:11 +01:00
Philip Withnall a732fd418d Merge branch 'main' into 'main'
update ru.po

See merge request pwithnall/malcontent!140
2022-06-20 09:43:56 +00:00
Ser82-png cae9044b92 update ru.po 2022-06-19 20:36:14 +10:00
Philip Withnall 40933baef2 Merge branch 'main' into 'main'
Update Russian translation

See merge request pwithnall/malcontent!139
2022-06-06 10:43:13 +00:00
Ser82-png c6581c49cd Update Russian translation 2022-06-05 11:43:28 +10:00
Philip Withnall 9d1e8ac3c5 0.10.5
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-31 13:56:40 +01:00
Philip Withnall 26961a0614 Merge branch 'main' into 'main'
Update Chinese (Taiwan) translation file.

See merge request pwithnall/malcontent!138
2022-05-31 12:52:16 +00:00
Freddy Cheng 788c13d827 Update Chinese (Taiwan) translation file. 2022-05-30 19:36:36 +00:00
Philip Withnall 0baa23ab44 Merge branch 'main' into 'main'
Update tr.po

See merge request pwithnall/malcontent!137
2022-05-19 13:51:20 +00:00
libre ajans 88a7c57fb0 Update tr.po 2022-05-19 13:42:32 +00:00
Philip Withnall 1a0b3e5d4b Merge branch 'polkornyipt-main-patch-69406' into 'main'
Update pt_BR.po

See merge request pwithnall/malcontent!136
2022-04-13 15:07:35 +00:00
Matheus Polkorny c36b5b268e Update pt_BR.po 2022-04-13 15:07:35 +00:00
Philip Withnall 0e89f39e89 Merge branch 'main' into 'main'
Add German help translation

See merge request pwithnall/malcontent!135
2022-03-21 13:15:26 +00:00
Tim Sabsch 069fe74e9c Add German help translation 2022-03-21 14:03:01 +01:00
Philip Withnall f8a7d0e372 Merge branch 'albanobattistella-main-patch-74286' into 'main'
Update it.po

See merge request pwithnall/malcontent!134
2022-03-14 11:47:22 +00:00
albanobattistella dbdc0d3f16 Update it.po 2022-03-12 15:13:38 +00:00
Philip Withnall d9bcc0537b 0.10.4
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-09 17:17:48 +00:00
Philip Withnall e1adf705cb help: Fix incorrect quoting in Italian .po file
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-09 17:17:48 +00:00
Philip Withnall 7259dab831 subproject: Bump libglib-testing to 0.1.1 for Meson fixes
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-09 17:07:23 +00:00
Philip Withnall 4b6e1521a6 Merge branch 'main' into 'main'
help: Add Italian help translation

See merge request pwithnall/malcontent!133
2022-01-17 13:38:47 +00:00
albanobattistella e1920eb287 help: Add Italian help translation 2022-01-17 13:36:46 +00:00
Philip Withnall db48b73b6e Merge branch 'fix-build-with-meson-0-61' into 'main'
Remove superfluous arguments to i18n.merge_file

See merge request pwithnall/malcontent!132
2022-01-17 13:29:09 +00:00