Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
484d414
WallpaperContainer: Gtk4 prep
danirabbit Nov 9, 2023
e4462c2
Initial GTK 4 build
danirabbit Nov 16, 2023
9819ec8
Merge branch 'danirabbit/wallpapercontainer-moregtk4prep' into danira…
danirabbit Nov 16, 2023
489dbed
Plug, Dock
danirabbit Nov 16, 2023
ac413cd
Text
danirabbit Nov 16, 2023
aa3e23c
Appearance
danirabbit Nov 16, 2023
45d5a74
Multitasking
danirabbit Nov 16, 2023
9e237d6
Finish making it compile
danirabbit Nov 16, 2023
860d8c6
Fix crash
danirabbit Nov 16, 2023
e1e9622
Fix checkbutton
danirabbit Nov 16, 2023
e905f28
Merge master
danirabbit Nov 17, 2023
b5931d1
Fix focus controller
danirabbit Nov 17, 2023
92b0810
Fix DnD
danirabbit Nov 17, 2023
21e6299
Merge master
danirabbit Nov 17, 2023
1d19e03
Fix missing icons
danirabbit Nov 17, 2023
ba60e88
HeaderLabel secondary text, mnemonic widgets, etc
danirabbit Nov 17, 2023
5fd24c1
Merge branch 'master' into danirabbit/gtk4
danirabbit Nov 17, 2023
b369c50
Merge branch 'master' into danirabbit/gtk4
danirabbit Jan 9, 2024
5475464
Fix thumb size
danirabbit Jan 9, 2024
f925f0e
Fix switcher homoegeneous
danirabbit Jan 9, 2024
2f80199
Fix appearance style
danirabbit Jan 9, 2024
83193ae
Fix some menu stuff
danirabbit Jan 9, 2024
45e692a
Fix part of toast
danirabbit Jan 9, 2024
c031ada
Connect to toast closed
danirabbit Jan 9, 2024
f4d8f3b
merge master
danirabbit Jan 10, 2024
43c9a1e
Namespace
danirabbit Jan 10, 2024
db67cb7
catch error
danirabbit Jan 10, 2024
a8c9a88
master → main
danirabbit Jan 10, 2024
8730514
fix css path
danirabbit Jan 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gettext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Gettext Updates

on:
push:
branches: [master]
branches: [main]

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y libgranite-dev libgranite-7-dev libgtk-3-dev libgtk-4-dev libswitchboard-2.0-dev libgexiv2-dev meson valac
apt install -y libadwaita-1-dev libgranite-7-dev libgtk-4-dev libswitchboard-3-dev libgexiv2-dev meson valac
- name: Build
env:
DESTDIR: out
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
pull_request:
branches: [master]
branches: [main]
types: [closed]
jobs:
release:
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Switchboard Desktop Plug
# Desktop Settings
[![Translation status](https://l10n.elementary.io/widgets/switchboard/-/switchboard-plug-pantheon-shell/svg-badge.svg)](https://l10n.elementary.io/engage/switchboard/?utm_source=widget)

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

You'll need the following dependencies:

* gnome-settings-daemon-dev
* libswitchboard-2.0-dev
* libswitchboard-3-dev
* libgee-0.8-dev
* libgexiv2-dev
* libgtk-3-dev (>= 3.22)
* libgtk-4-dev
* libgranite-dev
* libgranite-7-dev
* meson
* valac
Expand All @@ -26,4 +23,4 @@ Run `meson` to configure the build environment and then `ninja` to build

To install, use `ninja install`

sudo ninja install
ninja install
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
<id>io.elementary.switchboard.pantheon-shell</id>
<extends>io.elementary.switchboard</extends>
<translation type="gettext">pantheon-desktop-plug</translation>
<id>io.elementary.settings.desktop</id>
<extends>io.elementary.settings</extends>
<translation type="gettext">io.elementary.settings.desktop</translation>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>

Expand Down
4 changes: 2 additions & 2 deletions data/icons.gresource.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/io/elementary/switchboard/plug/pantheon-shell">
<gresource prefix="/io/elementary/settings/desktop">
<file alias="appearance-default.svg" compressed="true" preprocess="xml-stripblanks">appearance-default.svg</file>
<file alias="appearance-dark.svg" compressed="true" preprocess="xml-stripblanks">appearance-dark.svg</file>
<file compressed="true">plug.css</file>
</gresource>
<gresource prefix="io/elementary/switchboard/icons">
<gresource prefix="io/elementary/settings/icons">
<file alias="32x32@2/apps/dock-icon-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/32.svg</file>
<file alias="32x32/apps/dock-icon-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/32.svg</file>
<file alias="48x48@2/apps/dock-icon-symbolic.svg" compressed="true" preprocess="xml-stripblanks">icons/48.svg</file>
Expand Down
4 changes: 2 additions & 2 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
i18n.merge_file(
input: 'pantheon-shell.metainfo.xml.in',
output: 'io.elementary.switchboard.pantheon-shell.metainfo.xml',
input: 'desktop.metainfo.xml.in',
output: gettext_name + '.metainfo.xml',
po_dir: meson.source_root() / 'po' / 'extra',
type: 'xml',
install: true,
Expand Down
18 changes: 12 additions & 6 deletions data/plug.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,19 @@
0 3px 3px alpha(#000, 0.22);
}

.wallpaper-container radio {
.wallpaper-container check {
border-radius: 50%;
min-height: 20px;
min-width: 20px;
-gtk-icon-transform: scale(0.6);
}

appearance-view radiobutton .card {
.wallpaper-container picture {
min-width: 162px;
min-height: 100px;
}

appearance-view checkbutton .card {
background-position: center;
background-repeat: no-repeat;
background-size: 86px 64px, cover;
Expand All @@ -93,21 +99,21 @@ appearance-view radiobutton .card {
margin: 6px 6px 12px 12px;
}

appearance-view radiobutton .card.prefer-default {
appearance-view checkbutton .card.prefer-default {
background-color: white;
background-image:
url("resource:///io/elementary/switchboard/plug/pantheon-shell/appearance-default.svg"),
url("resource:///io/elementary/settings/desktop/appearance-default.svg"),
linear-gradient(
to bottom,
alpha(@accent_color_300, 0.1),
alpha(@accent_color_500, 0.1)
);
}

appearance-view radiobutton .card.prefer-dark {
appearance-view checkbutton .card.prefer-dark {
background-color: mix(@BLACK_300, @BLACK_500, 0.25);
background-image:
url("resource:///io/elementary/switchboard/plug/pantheon-shell/appearance-dark.svg"),
url("resource:///io/elementary/settings/desktop/appearance-dark.svg"),
linear-gradient(
to bottom,
alpha(@accent_color_300, 0.1),
Expand Down
10 changes: 5 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
project(
'pantheon-desktop',
'desktop',
'vala', 'c',
version: '6.5.0'
)
gettext_name = meson.project_name() + '-plug'
gettext_name = 'io.elementary.settings.' + meson.project_name()
gnome = import('gnome')
i18n = import('i18n')

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

plug_resources = gnome.compile_resources(
Expand Down
2 changes: 1 addition & 1 deletion po/extra/POTFILES
Original file line number Diff line number Diff line change
@@ -1 +1 @@
data/pantheon-shell.metainfo.xml.in
data/desktop.metainfo.xml.in
7 changes: 2 additions & 5 deletions set-wallpaper-contract/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ executable(
glib_dep,
gio_dep,
gobject_dep,
# granite_dep,
# gtk_dep,
# TODO: Re-use the variables above when the plug itself is ported to GTK 4
dependency('gtk4'),
dependency('granite-7'),
granite_dep,
gtk_dep,
posix_dep,
meson.get_compiler('c').find_library('m')
],
Expand Down
34 changes: 21 additions & 13 deletions src/Plug.vala
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ public class PantheonShell.Plug : Switchboard.Plug {
settings.set ("desktop/text", "text");

var provider = new Gtk.CssProvider ();
provider.load_from_resource ("/io/elementary/switchboard/plug/pantheon-shell/plug.css");
Gtk.StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
provider.load_from_resource ("/io/elementary/settings/desktop/plug.css");
Gtk.StyleContext.add_provider_for_display (Gdk.Display.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);

// DEPRECATED
settings.set ("desktop/wallpaper", "wallpaper");
settings.set ("desktop/hot-corners", "multitasking");

Object (category: Category.PERSONAL,
code_name: "io.elementary.switchboard.pantheon-shell",
code_name: "io.elementary.settings.desktop",
display_name: _("Desktop"),
description: _("Configure the dock, hot corners, and change wallpaper"),
icon: "preferences-desktop",
Expand All @@ -54,8 +54,6 @@ public class PantheonShell.Plug : Switchboard.Plug {

public override Gtk.Widget get_widget () {
if (main_grid == null) {
main_grid = new Gtk.Grid ();

wallpaper_view = new Wallpaper (this);

var multitasking = new Multitasking ();
Expand All @@ -74,15 +72,25 @@ public class PantheonShell.Plug : Switchboard.Plug {

stack.add_titled (multitasking, "multitasking", _("Multitasking"));

var stack_switcher = new Gtk.StackSwitcher ();
stack_switcher.stack = stack;
stack_switcher.halign = Gtk.Align.CENTER;
stack_switcher.homogeneous = true;
stack_switcher.margin = 24;
var stack_switcher = new Gtk.StackSwitcher () {
stack = stack,
halign = CENTER,
margin_top = 24,
margin_end = 24,
margin_bottom = 24,
margin_start = 24
};

var switcher_sizegroup = new Gtk.SizeGroup (HORIZONTAL);
unowned var switcher_child = stack_switcher.get_first_child ();
while (switcher_child != null) {
switcher_sizegroup.add_widget (switcher_child);
switcher_child = switcher_child.get_next_sibling ();
}

main_grid.attach (stack_switcher, 0, 0, 1, 1);
main_grid.attach (stack, 0, 1, 1, 1);
main_grid.show_all ();
main_grid = new Gtk.Grid ();
main_grid.attach (stack_switcher, 0, 0);
main_grid.attach (stack, 0, 1);
}

return main_grid;
Expand Down
Loading