Commit graph

737 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
d2d3669d34 panel: Add titlebar to panels
Make CcPanel override GtkBuildable, and special-case two types
of children: "content" for the main content, and "titlebar" for
the titlebar. Those two child types exist merely for convenience,
since it's still possible to override the entire panel with
adw_bin_set_child().

For now, no panel is using any of these conveniences.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
3d06a71b38 panel: Add empty UI template file
The UI file currently has nothing, but we'll increment it soon
with the headerbar.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
48a9141bed panel: Add "title" property
Will be used by the panel titlebar to have the proper title.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
7476bef815 panel: Add 'folded' property
This property keeps track of whether the panel is folded
into the main leaflet. Will be used when moving headerbars
into the panel themselves.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
11d721b29d window: Cleanup UI file
Remove visible=True properties, receives-default, and an
outdated GTK version declaration.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
e225f8042f window: Remove unused struct field
We don't use panel_box anywhere.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
946417990c online-accounts: Port to GTK4
This is a massive rewrite of the panel. Because we can't have
nice things and WebKit2GTK for GTK4 won't be ready in time,
rework the panel to spawn a new subprocess with a dialog that
handles online accounts - both creation and editing.
2022-01-17 19:42:10 -03:00
Jan Beich
37b29c32cb meson: drop unused argument for i18n.merge_file()
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.

panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
2022-01-07 17:22:43 +00:00
Christopher Davis
617341591b cc-window: Use AdwLeaflet's navigation API
This should be preferred over `set_visible_child ()`
2022-01-07 13:43:50 +00:00
Christopher Davis
494f8a0f14 cc-window: Enable leaflet navigation
This enables touchpad/touchscreen gestures, alt+arrows,
and mouse buttons.
2022-01-07 13:43:50 +00:00
Mohammed Sadiq
fbb2f98c44 wwan: Port to GTK4 2022-01-06 15:04:28 +00:00
Christopher Davis
4e2706fc6f cc-window: Re-enable type-to-search
This was lost in the GTK4 port. This commit uses
GtkSearchBar's API to capture events.

See https://gnome.pages.gitlab.gnome.org/gtk/gtk4/method.SearchBar.set_key_capture_widget.html
2022-01-05 22:31:17 +00:00
Christopher Davis
f1d5a0e71e cc-window: Enable scroll-to-focus on panel list
GTK4 doesn't do this by default, so we need to make sure
to specify it on our GtkViewport.
2022-01-05 22:31:17 +00:00
Christopher Davis
58e3d7873a cc-panel-list: Adjust margins for sidebar rows
This matches the mockups and Patterns.
2021-12-17 21:36:54 +00:00
Christopher Davis
d72d23a1cd cc-panel-list: Remove use of sidebar-icon style
Generally sidebar icons aren't dimmed anymore.
2021-12-17 21:36:54 +00:00
Christopher Davis
6aa1361a5d cc-window.ui: Remove .view from sidebar
Sidebars should be the same color as window content
now.
2021-12-17 21:36:54 +00:00
Georges Basile Stavracas Neto
efbad6eb50 network: Port to GTK4
Boy this was hard.

To ease the pain of porting wireless-security to GTK4, add
a new WsFileChooserButton class that mimics the behavior of
a button that triggers a filechooser, as per the migration
guide suggests.

There were lots of GtkGrids, so the diff is particularly
horrendous. Sorry.

This needs serious testing before landing.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
816e6203e3 wacom: Port to GTK4
Many part of this commit were made by Carlos
Garnacho <carlosg@gnome.org>

WIP wacom: Port to GTK4

Lots of stuff missing and probably broken.

wacom: Port CcDrawingArea input to gestures

We have a handy GtkGestureStylus to use here, which avoids direct
handling of GdkEvents.

wacom: Update current stylus tracking to GtkGestureStylus

Use the ::proximity signal to notice when we are being hovered with
a tablet stylus, and look up the tool from there.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
f598fb3ed6 display: Port to GTK4 2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
3f322e8553 shell: Allow panels set custom titlebars
This will be used by the Display panel to add a different
titlebar when confirming a new display configuration.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
d00cc3929e [WIP] color: Port to GTK4
This is very rough still. The calibration code
is entirely untested.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
d9d670328b background: Port to GTK4
CcBackgroundPreview required some layout changes, but
overall a pretty easy port.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
ddf6ca9952 region: Port to GTK4
An uneventful port.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
c6dd59f378 datetime: Port to GTK4
Of particular relevance, the timezone map was massively cleaned up.
It is much more pleasant to use now.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
d7e794e7ab keyboard: Port to GTK4
Drop the wm-common insanity.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
8141af469c printers: Port to GTK4
Fortunately for us GtkTreeView still operates pretty
much exactly like in GTK3. Other than that, it's a
dense junction of all that we've done so far to port
other panels.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
2b11900b0c bluetooth: Port to GTK4
This needs libgnome-bluetooth-2.0, which was recently merged.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
b81a180c4f thunderbolt: Port to GTK4
The C code of this panel is just so. damn. good. Porting it was
a breeze.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
3b6b678db9 diagnostics: Port to GTK4
A trivial one.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
f043ca3680 sharing: Port to GTK4
Again, it was easier to just switch some of the code to use
AdwActionRow, and that's what I've done in this commit.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
25edfb4a4b mouse: Port to GTK4
This one is an interesting case. It was easier to simply switch
to AdwPreferencesPage than actually port all the GtkFrames in
there.

In addition to that, the mouse test page now uses a GtkPicture
instead of a GtkImage, and the GtkDrawingArea API changes are
reflected in the code.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
2d762680d2 usage: Port to GTK4 2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
696ed350bb applications: Port to GTK4 2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
6cfd6e0652 multitasking: Port to GTK4 2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
a0d49cb3a8 power: Port to GTK4
Extra care was needed for the combo boxes, and the way we currently
use GtkStringList is kind of hacky, but overall things seem to be
working fine.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
800cab08bf microphone: Port to GTK4 2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
b965f7cf50 lock: Port to GTK4
This one was even more trivial than the previous one!
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
449c55be3a location: Port to GTK4
An almost trivial port too.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
26630338ba search: Port to GTK4
This one was the first panel ported that used Drag n' Drop, and
we can see how much of an improvement GTK4 is compared to GTK3
when handling DnD.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
c43eeea954 removable-media: Port to GTK4
A pretty boring, regular port again. No new challenges here.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
b9064cf2f6 default-apps: Port to GTK4
An easy one, mostly removing code from the UI file.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
9995a3bb79 universal-access: Port to GTK4
This was quite a huge port, but fortunately it mostly involved
removing tons of deprecated widgets (without replacement; just
drop them) and adjusting packing properties.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
a719008403 sound: Port to GTK4 2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
eff96c4cb1 camera: Port to GTK4 2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
75f6566a91 notifications: Port to GTK4
This one was relatively easy, since most of the brokenness came
from using deprecated properties that can just be dropped, and
packaging that can also just be dropped.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
3c8a0aa0b1 info-overview: Port to GTK4
- Remove visible=True properties from the UI file
 - Use GtkPicture for the OS logo
 - Drop gtk_dialog_run()
 - Port gnome-control-center-print-renderer to GTK4
   by using GdkSurface to create the GL context
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
30dcd1f973 window: Port to GTK4
- Inherit AdwApplicationWindow
 - GtkHeaderBar → AdwHeaderBar
 - Simplify the widget tree structure [1]
 - Drop custom key handler, use bindings instead

[1] It used to have a big messy chain of leaflets, headers,
and whatnot. Now it's simplified as:

 AdwLeaflet
 + ---------------- + --------------------------------- +
 |   AdwHeaderBar   |           AdwHeaderBar            |
 + ---------------- + --------------------------------- +
 |   GtkSearchBar   |                                   |
 + ---------------- +                                   |
 |                  |                                   |
 |                  |                                   |
 |                  |                                   |
 |                  |             GtkStack              |
 |   CcPanelList    |                                   |
 |                  |                                   |
 |                  |                                   |
 |                  |                                   |
 |                  |                                   |
 + ---------------- + --------------------------------- +
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
0818bf469c panel: Port to GTK4
Inherit AdwBin.
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
521ea3a635 panel-list: Port to GTK4
- Inherit AdwBin since GtkStack is a final class now
 - Replace GtkContainer APIs by their widget-specific ones
2021-12-14 22:34:21 -03:00
Georges Basile Stavracas Neto
15a67221a0 application: Add CSS provider on startup
GTK isn't fully initialized on init, so move that to startup.
2021-12-14 22:34:21 -03:00