Skip to content

Commit c11e4ab

Browse files
authored
Port to GTK 4 (#377)
1 parent 9861f51 commit c11e4ab

19 files changed

Lines changed: 258 additions & 289 deletions

.github/workflows/gettext.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Gettext Updates
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66

77
jobs:
88
build:

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install Dependencies
2424
run: |
2525
apt update
26-
apt install -y libgranite-dev libgranite-7-dev libgtk-3-dev libgtk-4-dev libswitchboard-2.0-dev libgexiv2-dev meson valac
26+
apt install -y libadwaita-1-dev libgranite-7-dev libgtk-4-dev libswitchboard-3-dev libgexiv2-dev meson valac
2727
- name: Build
2828
env:
2929
DESTDIR: out

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release
22

33
on:
44
pull_request:
5-
branches: [master]
5+
branches: [main]
66
types: [closed]
77
jobs:
88
release:

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Switchboard Desktop Plug
1+
# Desktop Settings
22
[![Translation status](https://l10n.elementary.io/widgets/switchboard/-/switchboard-plug-pantheon-shell/svg-badge.svg)](https://l10n.elementary.io/engage/switchboard/?utm_source=widget)
33

44
![screenshot](data/screenshot-appearance.png?raw=true)
@@ -7,13 +7,10 @@
77

88
You'll need the following dependencies:
99

10-
* gnome-settings-daemon-dev
11-
* libswitchboard-2.0-dev
10+
* libswitchboard-3-dev
1211
* libgee-0.8-dev
1312
* libgexiv2-dev
14-
* libgtk-3-dev (>= 3.22)
1513
* libgtk-4-dev
16-
* libgranite-dev
1714
* libgranite-7-dev
1815
* meson
1916
* valac
@@ -26,4 +23,4 @@ Run `meson` to configure the build environment and then `ninja` to build
2623

2724
To install, use `ninja install`
2825

29-
sudo ninja install
26+
ninja install
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<component type="addon">
3-
<id>io.elementary.switchboard.pantheon-shell</id>
4-
<extends>io.elementary.switchboard</extends>
5-
<translation type="gettext">pantheon-desktop-plug</translation>
3+
<id>io.elementary.settings.desktop</id>
4+
<extends>io.elementary.settings</extends>
5+
<translation type="gettext">io.elementary.settings.desktop</translation>
66
<metadata_license>CC0-1.0</metadata_license>
77
<project_license>GPL-3.0</project_license>
88

data/icons.gresource.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<gresources>
3-
<gresource prefix="/io/elementary/switchboard/plug/pantheon-shell">
3+
<gresource prefix="/io/elementary/settings/desktop">
44
<file alias="appearance-default.svg" compressed="true" preprocess="xml-stripblanks">appearance-default.svg</file>
55
<file alias="appearance-dark.svg" compressed="true" preprocess="xml-stripblanks">appearance-dark.svg</file>
66
<file compressed="true">plug.css</file>
77
</gresource>
8-
<gresource prefix="io/elementary/switchboard/icons">
8+
<gresource prefix="io/elementary/settings/icons">
99
<file alias="32x32@2/apps/dock-icon-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/32.svg</file>
1010
<file alias="32x32/apps/dock-icon-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/32.svg</file>
1111
<file alias="48x48@2/apps/dock-icon-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/48.svg</file>

data/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
i18n.merge_file(
2-
input: 'pantheon-shell.metainfo.xml.in',
3-
output: 'io.elementary.switchboard.pantheon-shell.metainfo.xml',
2+
input: 'desktop.metainfo.xml.in',
3+
output: gettext_name + '.metainfo.xml',
44
po_dir: meson.source_root() / 'po' / 'extra',
55
type: 'xml',
66
install: true,

data/plug.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,19 @@
7878
0 3px 3px alpha(#000, 0.22);
7979
}
8080

81-
.wallpaper-container radio {
81+
.wallpaper-container check {
82+
border-radius: 50%;
8283
min-height: 20px;
8384
min-width: 20px;
8485
-gtk-icon-transform: scale(0.6);
8586
}
8687

87-
appearance-view radiobutton .card {
88+
.wallpaper-container picture {
89+
min-width: 162px;
90+
min-height: 100px;
91+
}
92+
93+
appearance-view checkbutton .card {
8894
background-position: center;
8995
background-repeat: no-repeat;
9096
background-size: 86px 64px, cover;
@@ -93,21 +99,21 @@ appearance-view radiobutton .card {
9399
margin: 6px 6px 12px 12px;
94100
}
95101

96-
appearance-view radiobutton .card.prefer-default {
102+
appearance-view checkbutton .card.prefer-default {
97103
background-color: white;
98104
background-image:
99-
url("resource:///io/elementary/switchboard/plug/pantheon-shell/appearance-default.svg"),
105+
url("resource:///io/elementary/settings/desktop/appearance-default.svg"),
100106
linear-gradient(
101107
to bottom,
102108
alpha(@accent_color_300, 0.1),
103109
alpha(@accent_color_500, 0.1)
104110
);
105111
}
106112

107-
appearance-view radiobutton .card.prefer-dark {
113+
appearance-view checkbutton .card.prefer-dark {
108114
background-color: mix(@BLACK_300, @BLACK_500, 0.25);
109115
background-image:
110-
url("resource:///io/elementary/switchboard/plug/pantheon-shell/appearance-dark.svg"),
116+
url("resource:///io/elementary/settings/desktop/appearance-dark.svg"),
111117
linear-gradient(
112118
to bottom,
113119
alpha(@accent_color_300, 0.1),

meson.build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
project(
2-
'pantheon-desktop',
2+
'desktop',
33
'vala', 'c',
44
version: '6.5.0'
55
)
6-
gettext_name = meson.project_name() + '-plug'
6+
gettext_name = 'io.elementary.settings.' + meson.project_name()
77
gnome = import('gnome')
88
i18n = import('i18n')
99

@@ -20,9 +20,9 @@ add_project_arguments(
2020
gio_dep = dependency('gio-2.0')
2121
glib_dep = dependency('glib-2.0')
2222
gobject_dep = dependency('gobject-2.0')
23-
granite_dep = dependency('granite', version: '>=6.0.0')
24-
gtk_dep = dependency('gtk+-3.0', version: '>= 3.22')
25-
hdy_dep = dependency ('libhandy-1')
23+
granite_dep = dependency('granite-7', version: '>=7.4.0')
24+
gtk_dep = dependency('gtk4')
25+
hdy_dep = dependency ('libadwaita-1')
2626
posix_dep = meson.get_compiler('vala').find_library('posix')
2727

2828
plug_resources = gnome.compile_resources(

po/extra/POTFILES

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
data/pantheon-shell.metainfo.xml.in
1+
data/desktop.metainfo.xml.in

0 commit comments

Comments
 (0)